Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
Fushen, On Wednesday 30 June 2010 22:16:52 fushen chen wrote: The driver is based on Synopsys driver 2.60a. OK. We started to prepare open source submission based on our internal version. We sync this version to linux-2.6-denx repository from time to time. I'll sync the driver to the latest linux-2.6-denx as Wolfgang pointed out, and re-submit patch to open source. Thanks. I really appreciate this. A lot of effort has gone into this driver to fix some very troubling issues. And this driver version has undergone very intensive testing. So please make sure to integrate the changes/fixes. And please add myself and Chuck Meade ch...@theptrgroup.com, who did most of the bigger changes, to Cc on your new patch versions. Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
On Tue, Jun 29, 2010 at 04:13:24PM -0700, David Daney wrote: On 06/29/2010 03:41 PM, David Brownell wrote: Good -- MUSB won't be the only one. ;) Could you mention a few Linux-enabled chips which include this controller? I can. Some members of the Octeon family: arch/mips/cavium-octeon Plus ECONA CNS3xxx (arch/arm/mach-cns3xxx). -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
Hi Fushen, Hi Mark, On Tuesday 29 June 2010 23:26:54 Fushen Chen wrote: The DWC OTG driver module provides the initialization and cleanup entry points for the DWC OTG USB driver. Signed-off-by: Fushen Chen fc...@apm.com Signed-off-by: Mark Miesfeld mmiesf...@apm.com I tried to compare this driver with the version that's currently available in the linux-2.6-denx repository. But the differences are quite big. Could you please list the history of this DWC driver? Things like: - Which Synopsis version is it based upon? - What changes/enhancements/fixups where made from APM? - How was this driver tested (USB host and device mode)? As Wolfgang already pointed out, the driver in our git repository has undergone multiple changes/fixes. Did you take a look at them and try to integrate them? Thanks. Cheers, Stefan ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
Hello. Fushen Chen wrote: The DWC OTG driver module provides the initialization and cleanup entry points for the DWC OTG USB driver. Signed-off-by: Fushen Chen fc...@apm.com Signed-off-by: Mark Miesfeld mmiesf...@apm.com [...] diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts index 083e68e..1a141b8 100644 --- a/arch/powerpc/boot/dts/kilauea.dts +++ b/arch/powerpc/boot/dts/kilauea.dts @@ -394,5 +394,20 @@ 0x0 0x0 0x0 0x3 UIC2 0xd 0x4 /* swizzled int C */ 0x0 0x0 0x0 0x4 UIC2 0xe 0x4 /* swizzled int D */; }; + + USBOTG0: usb...@ef6c { + compatible = amcc,dwc-otg; + reg = 0xef6c 0x1; + interrupt-parent = USBOTG0; + interrupts = 0x0 0x1 0x2; + #interrupt-cells = 0x1; + #address-cells = 0x0; + #size-cells = 0x0; + interrupt-map = + 0x0 UIC2 0x1e 0x4 /* USB-OTG */ + 0x1 UIC1 0x1a 0x8 /* HIGH-POWER */ + 0x2 UIC0 0xc 0x4 /* DMA */ ; + interrupt-map-mask = 0x; + }; }; }; Please put this file in a separate patch and push thru the PowerPC tree. WBR, Sergei ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
On 06/30/2010 12:41 AM, David Brownell wrote: Could you mention a few Linux-enabled chips which include this controller? Ralink APSoC chips (rt2880, rt305x) do: http://svn.dd-wrt.com:8000/dd-wrt/browser/src/linux/rt2880/linux-2.6.23/drivers/usb/dwc_otg/Kconfig Daniel -- Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 Göttingen, Germany Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160 Geschäftsführer: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055 emlix - your embedded linux partner ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
Stefan, The driver is based on Synopsys driver 2.60a. We started to prepare open source submission based on our internal version. We sync this version to linux-2.6-denx repository from time to time. I'll sync the driver to the latest linux-2.6-denx as Wolfgang pointed out, and re-submit patch to open source. We modified the driver mostly to follow Linux kernel coding style. Both USB host and device modes are tested. Thanks, Fushen 1. On Wed, 2010-06-30 at 11:27 +0200, Stefan Roese wrote: Hi Fushen, Hi Mark, On Tuesday 29 June 2010 23:26:54 Fushen Chen wrote: The DWC OTG driver module provides the initialization and cleanup entry points for the DWC OTG USB driver. Signed-off-by: Fushen Chen fc...@apm.com Signed-off-by: Mark Miesfeld mmiesf...@apm.com I tried to compare this driver with the version that's currently available in the linux-2.6-denx repository. But the differences are quite big. Could you please list the history of this DWC driver? Things like: - Which Synopsis version is it based upon? - What changes/enhancements/fixups where made from APM? - How was this driver tested (USB host and device mode)? As Wolfgang already pointed out, the driver in our git repository has undergone multiple changes/fixes. Did you take a look at them and try to integrate them? Thanks. Cheers, Stefan ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
David, AppliedMicro has PPC-405EX and PPC-460EX SOC using this controller. There will be another arch/powerpc/boot/dts/canyonlands.dts for PPC-460EX board. Thanks, Fushen On Tue, 2010-06-29 at 15:41 -0700, David Brownell wrote: Good -- MUSB won't be the only one. ;) Could you mention a few Linux-enabled chips which include this controller? arch/powerpc/boot/dts/kilauea.dts | 15 + Also, please provide a clean patch that only includes the driver, and split PPC hooks into a separate patch. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
The DWC OTG driver module provides the initialization and cleanup entry points for the DWC OTG USB driver. Signed-off-by: Fushen Chen fc...@apm.com Signed-off-by: Mark Miesfeld mmiesf...@apm.com --- arch/powerpc/boot/dts/kilauea.dts | 15 + drivers/usb/gadget/Kconfig|8 +- drivers/usb/gadget/gadget_chips.h |7 + drivers/usb/otg/Kconfig | 87 +++ drivers/usb/otg/Makefile | 10 + drivers/usb/otg/dwc_otg_driver.c | 1236 + drivers/usb/otg/dwc_otg_driver.h | 97 +++ 7 files changed, 1457 insertions(+), 3 deletions(-) create mode 100644 drivers/usb/otg/dwc_otg_driver.c create mode 100644 drivers/usb/otg/dwc_otg_driver.h diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts index 083e68e..1a141b8 100644 --- a/arch/powerpc/boot/dts/kilauea.dts +++ b/arch/powerpc/boot/dts/kilauea.dts @@ -394,5 +394,20 @@ 0x0 0x0 0x0 0x3 UIC2 0xd 0x4 /* swizzled int C */ 0x0 0x0 0x0 0x4 UIC2 0xe 0x4 /* swizzled int D */; }; + + USBOTG0: usb...@ef6c { + compatible = amcc,dwc-otg; + reg = 0xef6c 0x1; + interrupt-parent = USBOTG0; + interrupts = 0x0 0x1 0x2; + #interrupt-cells = 0x1; + #address-cells = 0x0; + #size-cells = 0x0; + interrupt-map = + 0x0 UIC2 0x1e 0x4 /* USB-OTG */ + 0x1 UIC1 0x1a 0x8 /* HIGH-POWER */ + 0x2 UIC0 0xc 0x4 /* DMA */ ; + interrupt-map-mask = 0x; + }; }; }; diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 591ae9f..130626a 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -109,8 +109,8 @@ config USB_GADGET_SELECTED # - discrete ones (including all PCI-only controllers) # - debug/dummy gadget+hcd is last. # -choice - prompt USB Peripheral Controller +menuconfig USB_PERIPHERAL_CONTROLLER + bool USB Peripheral Controller depends on USB_GADGET help A USB device uses a controller to talk to its host. @@ -122,6 +122,8 @@ choice # Integrated controllers # +if USB_PERIPHERAL_CONTROLLER + config USB_GADGET_AT91 boolean Atmel AT91 USB Device Port depends on ARCH_AT91 !ARCH_AT91SAM9RL !ARCH_AT91CAP9 !ARCH_AT91SAM9G45 @@ -542,7 +544,7 @@ config USB_DUMMY_HCD # NOTE: Please keep dummy_hcd LAST so that real hardware appears # first and will be selected by default. -endchoice +endif # USB_PERIPHERAL_CONTROLLER config USB_GADGET_DUALSPEED bool diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index e511fec..3d5c136 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -142,6 +142,11 @@ #define gadget_is_s3c_hsotg(g)0 #endif +#if defined(CONFIG_USB_DWC_OTG) || defined(CONFIG_DWC_DEVICE_ONLY) +#definegadget_is_dwc_otg_pcd(g)(!strcmp(dwc_otg_pcd, (g)-name)) +#else +#definegadget_is_dwc_otg_pcd(g)0 +#endif /** * usb_gadget_controller_number - support bcdDevice id convention @@ -200,6 +205,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) return 0x25; else if (gadget_is_s3c_hsotg(gadget)) return 0x26; + else if (gadget_is_dwc_otg_pcd(gadget)) + return 0x27; return -ENOENT; } diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 3d2d3e5..745bac2 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig @@ -69,4 +69,91 @@ config NOP_USB_XCEIV built-in with usb ip or which are autonomous and doesn't require any phy programming such as ISP1x04 etc. +config USB_DWC_OTG + depends on (USB || USB_GADGET) + depends on 405EZ || 405EX || 460EX + select USB_OTG_UTILS + tristate Synopsys DWC OTG Controller + default USB_GADGET + help + This driver provides USB Device Controller support for the + Synopsys DesignWare USB OTG Core used on the AMCC 405EZ/405EX/ + 460EX. + + Note that on the 405EZ, this Core provides USB Device Controller + function only. It does not act as a true OTG device, and the + 'OTG' is slightly misleading. + +config DWC_LEGACY_405EX + bool Enable 405EX Legacy Support (lower performance) + default n + depends on USB_DWC_OTG 405EX + select DWC_SLAVE + help + Enable Legacy 405EX Chip support (Rev 1.0) where DWC DMA is broken + Selecting this option will cause lower performance + Don't select this unless you want to support Rev 1.0 405EX chips (obsolete) +
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
Good -- MUSB won't be the only one. ;) Could you mention a few Linux-enabled chips which include this controller? arch/powerpc/boot/dts/kilauea.dts | 15 + Also, please provide a clean patch that only includes the driver, and split PPC hooks into a separate patch. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/9] Add Synopsys DesignWare HS USB OTG Controller driver.
On 06/29/2010 03:41 PM, David Brownell wrote: Good -- MUSB won't be the only one. ;) Could you mention a few Linux-enabled chips which include this controller? I can. Some members of the Octeon family: arch/mips/cavium-octeon Although there would probably be some SOC specific glue needed for chips not targeted by the initial patch set. David Daney arch/powerpc/boot/dts/kilauea.dts | 15 + Also, please provide a clean patch that only includes the driver, and split PPC hooks into a separate patch. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev