USB: Add support for Xilinx USB host controller
Subsystems (4)
PATCH v2 1/1 USB: Add support for Xilinx USB host controller
Add bus glue driver for Xilinx USB host controller. The controller can be configured as HS only or HS/FS hybrid. The driver uses the device tree file to configure the driver according to the setting in the hardware system.
This driver has been tested with usbtest using the NET2280 PCI card.
---
V1 - Updated per comments from Benjamin Herrenschmidt
<[email protected]> and Grant Likely <[email protected]>
V2 - Updated per comments from Benjamin Herrenschmidt and Grant Likely:
removed repetitive compatible lists, and removed irq_dispose_mapping call upon failure.
--- Documentation/powerpc/dts-bindings/xilinx.txt | 11 + drivers/usb/host/Kconfig | 15 +- drivers/usb/host/ehci-hcd.c | 5 + drivers/usb/host/ehci-xilinx-of.c | 300 +++++++++++++++++++++++++ 4 files changed, 329 insertions(+), 2 deletions(-) create mode 100644 drivers/usb/host/ehci-xilinx-of.c
Documentation/powerpc/dts-bindings/xilinx.txt +11 -0
@@ -292,4 +292,15 @@ - reg-offset : A value of 3 is required - reg-shift : A value of 2 is required + vii) Xilinx USB Host controller + + The Xilinx USB host controller is EHCI compatible but with a different + base address for the EHCI registers, and it is always a big-endian + USB Host controller. The hardware can be configured as high speed only, + or high speed/full speed hybrid. + + Required properties: + - xlnx,support-usb-fs: A value 0 means the core is built as high speed + only. A value 1 means the core also supports + full speed devices.
drivers/usb/host/Kconfig +13 -2
@@ -90,14 +90,25 @@ config USB_EHCI_TT_NEWSCHED config USB_EHCI_BIG_ENDIAN_MMIO bool - depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX) + depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX || XPS_USB_HCD_XILINX) default y config USB_EHCI_BIG_ENDIAN_DESC bool - depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX) + depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX || XPS_USB_HCD_XILINX) default y +config XPS_USB_HCD_XILINX + bool "Use Xilinx usb host EHCI controller core" + depends on USB_EHCI_HCD && (PPC32 || MICROBLAZE) + select USB_EHCI_BIG_ENDIAN_DESC + select USB_EHCI_BIG_ENDIAN_MMIO + ---help--- + Xilinx xps USB host controller core is EHCI compilant and has + transaction translator built-in. It can be configured to either + support both high speed and full speed devices, or high speed + devices only. + config USB_EHCI_FSL bool "Support for Freescale on-chip EHCI USB controller" depends on USB_EHCI_HCD && FSL_SOC
drivers/usb/host/ehci-hcd.c +5 -0
@@ -1107,6 +1107,11 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver#endif +#ifdef CONFIG_XPS_USB_HCD_XILINX +#include "ehci-xilinx-of.c" +#define OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver +#endif +#ifdef CONFIG_PLAT_ORION #include "ehci-orion.c" #define PLATFORM_DRIVER ehci_orion_driver
drivers/usb/host/ehci-xilinx-of.c new file +300 -0
300 lines not on this page · raw message
Signature · 5 lines
1.5.6.6 This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 8 lines · Julie Zhu
Add bus glue driver for Xilinx USB host controller. The controller can be configured as HS only or HS/FS hybrid. The driver uses the device tree file to configure the driver according to the setting in the hardware system.
This driver has been tested with usbtest using the NET2280 PCI card.
Signed-off-by Julie Zhu <[email protected]>Signed-off-by John Linn <[email protected]>
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.