usb:xhci:dwc3: Add dwc3 drv code
Subsystems (5)
cover usb:xhci:dwc3: Add dwc3 drv code
A lot of dwc3 code has been duplicated in various xhci drivers. Hence, to minimize this duplication, a new dwc3 file is written that provides common APIs for all other drivers.
First four patches introduce dwc3 file, and necessary changes are made in other drivers for this new drv. I would request all platform/driver owners to please help me in testng these changes on their respective platforms.
Last four patches are freescale layerscape la1021aqds/ ls1021atwr platform specific.
Ramneek Mehresh (4):
drivers:usb:dwc3: Add DWC3 controller driver support usb:xhci:exynos: Remove common dwc3 drv functions calls usb:xhci:omap: Remove common dwc3 drv functions calls usb:xhci:keystone: Remove common dwc3 drv functions calls
ramneek mehresh (4):
drivers:usb:fsl: Add XHCI driver support arch:arm:fsl: Add XHCI support for LS1021A include:configs:ls1021atwr: Enable USB IP support include:configs:ls1021aqds: Enable USB IP support
arch/arm/include/asm/arch-ls102xa/config.h | 1 + arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 10 ++ drivers/usb/host/Makefile | 2 + drivers/usb/host/xhci-dwc3.c | 91 ++++++++++++++++++ drivers/usb/host/xhci-exynos5.c | 78 ---------------- drivers/usb/host/xhci-fsl.c | 109 ++++++++++++++++++++++ drivers/usb/host/xhci-keystone.c | 88 ----------------- drivers/usb/host/xhci-omap.c | 60 ------------ drivers/usb/phy/omap_usb_phy.c | 18 ---- include/configs/am43xx_evm.h | 1 + include/configs/beagle_x15.h | 1 + include/configs/dra7xx_evm.h | 1 + include/configs/exynos5-common.h | 1 + include/configs/ks2_evm.h | 1 + include/configs/ls1021aqds.h | 22 ++++- include/configs/ls1021atwr.h | 38 ++++++++ include/linux/usb/dwc3.h | 6 ++ include/linux/usb/xhci-fsl.h | 54 +++++++++++ 18 files changed, 333 insertions(+), 249 deletions(-) create mode 100644 drivers/usb/host/xhci-dwc3.c create mode 100644 drivers/usb/host/xhci-fsl.c create mode 100644 include/linux/usb/xhci-fsl.h
Signature · 1 line
1.8.3.1
PATCH 1/8 drivers:usb:dwc3: Add DWC3 controller driver support
Add support for DWC3 XHCI controller driver
--- drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-dwc3.c | 91 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/usb/dwc3.h | 6 +++ 3 files changed, 98 insertions(+) create mode 100644 drivers/usb/host/xhci-dwc3.c
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_EHCI_ZYNQ) += ehci-zynq.o # xhci obj-$(CONFIG_USB_XHCI) += xhci.o xhci-mem.o xhci-ring.o +obj-$(CONFIG_USB_XHCI_DWC3) += xhci-dwc3.o obj-$(CONFIG_USB_XHCI_KEYSTONE) += xhci-keystone.o obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
drivers/usb/host/xhci-dwc3.c new file +91 -0
91 lines not on this page · raw message
include/linux/usb/dwc3.h +6 -0
@@ -191,4 +191,10 @@ struct dwc3 { /* offset: 0xC100 */#define DWC3_DCTL_CSFTRST (1 << 30)#define DWC3_DCTL_LSFTRST (1 << 29) +#ifdef CONFIG_USB_XHCI_DWC3 +void dwc3_set_mode (struct dwc3 *dwc3_reg,u32 mode); +void dwc3_core_soft_reset (struct dwc3 *dwc3_reg); +int dwc3_core_init (struct dwc3 *dwc3_reg); +void usb_phy_reset (struct dwc3 *dwc3_reg); +#endif #endif /* __DWC3_H_ */
Signature · 1 line
1.8.3.1
PATCH 1/8 drivers:usb:dwc3: Add DWC3 controller driver support
Quoted 3 lines · Ramneek Mehresh
Add support for DWC3 XHCI controller driver
Signed-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/6cd7b99d/attachment.sig>
PATCH 2/8 usb:xhci:exynos: Remove common dwc3 drv functions calls
In reply to Ramneek MehreshRemove all redundant dwc3 driver function calls that are defined by dwc3 driver
--- drivers/usb/host/xhci-exynos5.c | 78 ---------------------------------------- include/configs/exynos5-common.h | 1 + 2 files changed, 1 insertion(+), 78 deletions(-)
drivers/usb/host/xhci-exynos5.c +0 -78
@@ -179,84 +179,6 @@ static void exynos5_usb3_phy_exit(struct exynos_usb3_phy *phy)set_usbdrd_phy_ctrl (POWER_USB_DRD_PHY_CTRL_DISABLE ); } -static void dwc3_set_mode (struct dwc3 *dwc3_reg,u32 mode) -{ -clrsetbits_le32 (&dwc3_reg->g_ctl, -DWC3_GCTL_PRTCAPDIR (DWC3_GCTL_PRTCAP_OTG ), -DWC3_GCTL_PRTCAPDIR (mode)); -} - -static void dwc3_core_soft_reset (struct dwc3 *dwc3_reg) -{ -/* Before Resetting PHY, put Core in Reset */ -setbits_le32 (&dwc3_reg->g_ctl, -DWC3_GCTL_CORESOFTRESET ); - -/* Assert USB3 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb3pipectl[0 ], -DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Assert USB2 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb2phycfg, -DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -mdelay (100 ); - -/* Clear USB3 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb3pipectl[0 ], -DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Clear USB2 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb2phycfg, -DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -/* After PHYs are stable we can take Core out of reset state */ -clrbits_le32 (&dwc3_reg->g_ctl, -DWC3_GCTL_CORESOFTRESET ); -} - -static int dwc3_core_init (struct dwc3 *dwc3_reg) -{ -u32 reg; -u32 revision; -unsigned int dwc3_hwparams1; - - revision =readl (&dwc3_reg->g_snpsid); -/* This should read as U3 followed by revision number */ -if ((revision &DWC3_GSNPSID_MASK ) !=0x55330000 ) { -puts ("this is not a DesignWare USB3 DRD Core\n" ); -return -EINVAL ; - } - -dwc3_core_soft_reset (dwc3_reg); - - dwc3_hwparams1 =readl (&dwc3_reg->g_hwparams1); - - reg =readl (&dwc3_reg->g_ctl); - reg &= ~DWC3_GCTL_SCALEDOWN_MASK ; - reg &= ~DWC3_GCTL_DISSCRAMBLE ; -switch (DWC3_GHWPARAMS1_EN_PWROPT (dwc3_hwparams1)) { -case DWC3_GHWPARAMS1_EN_PWROPT_CLK : - reg &= ~DWC3_GCTL_DSBLCLKGTNG ; -break ; -default : -debug ("No power optimization available\n" ); - } - -/* -* WORKAROUND: DWC3 revisions <1.90a have a bug -* where the device can fail to connect@SuperSpeed -* and falls back to high-speed mode which causes -* the device to enter a Connect/Disconnect loop -*/ -if ((revision &DWC3_REVISION_MASK ) <0x190a ) - reg |=DWC3_GCTL_U2RSTECN ; - -writel (reg, &dwc3_reg->g_ctl); - -return 0 ; -} -static int exynos_xhci_core_init (struct exynos_xhci *exynos) {int ret;
include/configs/exynos5-common.h +1 -0
@@ -182,6 +182,7 @@/* USB */ #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE +#define CONFIG_USB_XHCI_DWC3 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
Signature · 1 line
1.8.3.1
PATCH 2/8 usb:xhci:exynos: Remove common dwc3 drv functions calls
Quoted 4 lines · Ramneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver
Signed-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/e7e71aaf/attachment.sig>
PATCH 3/8 usb:xhci:omap: Remove common dwc3 drv functions calls
In reply to Ramneek MehreshRemove all redundant dwc3 driver function calls that are defined by dwc3 driver
--- drivers/usb/host/xhci-omap.c | 60 ------------------------------------------ drivers/usb/phy/omap_usb_phy.c | 18 ------------- include/configs/am43xx_evm.h | 1 + include/configs/beagle_x15.h | 1 + include/configs/dra7xx_evm.h | 1 + 5 files changed, 3 insertions(+), 78 deletions(-)
drivers/usb/host/xhci-omap.c +0 -60
@@ -34,66 +34,6 @@ inline int __board_usb_init(int index, enum usb_init_type init)int board_usb_init (int index,enum usb_init_type init) __attribute__((weak,alias ("__board_usb_init" ))); -static void dwc3_set_mode (struct dwc3 *dwc3_reg,u32 mode) -{ -clrsetbits_le32 (&dwc3_reg->g_ctl, -DWC3_GCTL_PRTCAPDIR (DWC3_GCTL_PRTCAP_OTG ), -DWC3_GCTL_PRTCAPDIR (mode)); -} - -static void dwc3_core_soft_reset (struct dwc3 *dwc3_reg) -{ -/* Before Resetting PHY, put Core in Reset */ -setbits_le32 (&dwc3_reg->g_ctl,DWC3_GCTL_CORESOFTRESET ); - -omap_reset_usb_phy (dwc3_reg); - -/* After PHYs are stable we can take Core out of reset state */ -clrbits_le32 (&dwc3_reg->g_ctl,DWC3_GCTL_CORESOFTRESET ); -} - -static int dwc3_core_init (struct dwc3 *dwc3_reg) -{ -u32 reg; -u32 revision; -unsigned int dwc3_hwparams1; - - revision =readl (&dwc3_reg->g_snpsid); -/* This should read as U3 followed by revision number */ -if ((revision &DWC3_GSNPSID_MASK ) !=0x55330000 ) { -puts ("this is not a DesignWare USB3 DRD Core\n" ); -return -1 ; - } - -dwc3_core_soft_reset (dwc3_reg); - - dwc3_hwparams1 =readl (&dwc3_reg->g_hwparams1); - - reg =readl (&dwc3_reg->g_ctl); - reg &= ~DWC3_GCTL_SCALEDOWN_MASK ; - reg &= ~DWC3_GCTL_DISSCRAMBLE ; -switch (DWC3_GHWPARAMS1_EN_PWROPT (dwc3_hwparams1)) { -case DWC3_GHWPARAMS1_EN_PWROPT_CLK : - reg &= ~DWC3_GCTL_DSBLCLKGTNG ; -break ; -default : -debug ("No power optimization available\n" ); - } - -/* -* WORKAROUND: DWC3 revisions <1.90a have a bug -* where the device can fail to connect@SuperSpeed -* and falls back to high-speed mode which causes -* the device to enter a Connect/Disconnect loop -*/ -if ((revision &DWC3_REVISION_MASK ) <0x190a ) - reg |=DWC3_GCTL_U2RSTECN ; - -writel (reg, &dwc3_reg->g_ctl); - -return 0 ; -} -static int omap_xhci_core_init (struct omap_xhci *omap) {int ret =0 ;
drivers/usb/phy/omap_usb_phy.c +0 -18
@@ -223,24 +223,6 @@ void usb_phy_power(int on) }#endif /* CONFIG_AM437X_USB2PHY2_HOST */ -void omap_reset_usb_phy (struct dwc3 *dwc3_reg) -{ -/* Assert USB3 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb3pipectl[0 ],DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Assert USB2 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb2phycfg,DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -mdelay (100 ); - -/* Clear USB3 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb3pipectl[0 ],DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Clear USB2 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb2phycfg,DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -} -void omap_enable_phy (struct omap_xhci *omap) {#ifdef CONFIG_OMAP_USB2PHY2_HOST
include/configs/am43xx_evm.h +1 -0
@@ -102,6 +102,7 @@#define CONFIG_CMD_USB #define CONFIG_USB_HOST #define CONFIG_USB_XHCI +#define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI_OMAP #define CONFIG_USB_STORAGE #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
include/configs/beagle_x15.h +1 -0
@@ -66,6 +66,7 @@/* USB xHCI HOST */ #define CONFIG_CMD_USB #define CONFIG_USB_HOST +#define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI #define CONFIG_USB_XHCI_OMAP #define CONFIG_USB_STORAGE
include/configs/dra7xx_evm.h +1 -0
@@ -173,6 +173,7 @@#define CONFIG_CMD_USB #define CONFIG_USB_HOST #define CONFIG_USB_XHCI +#define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI_OMAP #define CONFIG_USB_STORAGE #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
Signature · 1 line
1.8.3.1
PATCH 3/8 usb:xhci:omap: Remove common dwc3 drv functions calls
Quoted 4 lines · Ramneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver
Signed-off-by Ramneek Mehresh <[email protected]>
On an am43xx-gp-evm:
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/29418f5a/attachment.sig>
PATCH 4/8 usb:xhci:keystone: Remove common dwc3 drv functions calls
In reply to Ramneek MehreshRemove all redundant dwc3 driver function calls that are defined by dwc3 driver
--- drivers/usb/host/xhci-keystone.c | 88 ---------------------------------------- include/configs/ks2_evm.h | 1 + 2 files changed, 1 insertion(+), 88 deletions(-)
drivers/usb/host/xhci-keystone.c +0 -88
@@ -68,94 +68,6 @@ static void keystone_xhci_phy_unset(struct keystone_xhci_phy *phy)writel (val, &phy->phy_clock); } -static void dwc3_set_mode (struct dwc3 *dwc3_reg,u32 mode) -{ -clrsetbits_le32 (&dwc3_reg->g_ctl, -DWC3_GCTL_PRTCAPDIR (DWC3_GCTL_PRTCAP_OTG ), -DWC3_GCTL_PRTCAPDIR (mode)); -} - -static void dwc3_core_soft_reset (struct dwc3 *dwc3_reg) -{ -/* Before Resetting PHY, put Core in Reset */ -setbits_le32 (&dwc3_reg->g_ctl,DWC3_GCTL_CORESOFTRESET ); - -/* Assert USB3 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb3pipectl[0 ],DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Assert USB2 PHY reset */ -setbits_le32 (&dwc3_reg->g_usb2phycfg[0 ],DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -mdelay (100 ); - -/* Clear USB3 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb3pipectl[0 ],DWC3_GUSB3PIPECTL_PHYSOFTRST ); - -/* Clear USB2 PHY reset */ -clrbits_le32 (&dwc3_reg->g_usb2phycfg[0 ],DWC3_GUSB2PHYCFG_PHYSOFTRST ); - -/* After PHYs are stable we can take Core out of reset state */ -clrbits_le32 (&dwc3_reg->g_ctl,DWC3_GCTL_CORESOFTRESET ); -} - -static int dwc3_core_init (struct dwc3 *dwc3_reg) -{ -u32 revision, val; -unsigned long t_rst; -unsigned int dwc3_hwparams1; - - revision =readl (&dwc3_reg->g_snpsid); -/* This should read as U3 followed by revision number */ -if ((revision &DWC3_GSNPSID_MASK ) !=0x55330000 ) { -puts ("this is not a DesignWare USB3 DRD Core\n" ); -return -EINVAL ; - } - -/* issue device SoftReset too */ -writel (DWC3_DCTL_CSFTRST , &dwc3_reg->d_ctl); - - t_rst =get_timer (0 ); -do { - val =readl (&dwc3_reg->d_ctl); -if (!(val &DWC3_DCTL_CSFTRST )) -break ; -WATCHDOG_RESET (); - }while (get_timer (t_rst) <500 ); - -if (val &DWC3_DCTL_CSFTRST ) { -debug ("Reset timed out\n" ); -return -2 ; - } - -dwc3_core_soft_reset (dwc3_reg); - - dwc3_hwparams1 =readl (&dwc3_reg->g_hwparams1); - - val =readl (&dwc3_reg->g_ctl); - val &= ~DWC3_GCTL_SCALEDOWN_MASK ; - val &= ~DWC3_GCTL_DISSCRAMBLE ; -switch (DWC3_GHWPARAMS1_EN_PWROPT (dwc3_hwparams1)) { -case DWC3_GHWPARAMS1_EN_PWROPT_CLK : - val &= ~DWC3_GCTL_DSBLCLKGTNG ; -break ; -default : -printf ("No power optimization available\n" ); - } - -/* -* WORKAROUND: DWC3 revisions <1.90a have a bug -* where the device can fail to connect@SuperSpeed -* and falls back to high-speed mode which causes -* the device to enter a Connect/Disconnect loop -*/ -if ((revision &DWC3_REVISION_MASK ) <0x190a ) - val |=DWC3_GCTL_U2RSTECN ; - -writel (val, &dwc3_reg->g_ctl); - -return 0 ; -} -static int keystone_xhci_core_init (struct dwc3 *dwc3_reg) {int ret;
include/configs/ks2_evm.h +1 -0
@@ -197,6 +197,7 @@/* USB Configuration */ #define CONFIG_USB_XHCI +#define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI_KEYSTONE #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2#define CONFIG_USB_STORAGE
Signature · 1 line
1.8.3.1
PATCH 4/8 usb:xhci:keystone: Remove common dwc3 drv functions calls
Quoted 4 lines · Ramneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver
Signed-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/7b6ee518/attachment.sig>
PATCH 5/8 drivers:usb:fsl: Add XHCI driver support
In reply to Ramneek MehreshFrom: ramneek mehresh <[email protected]>
Add xhci driver support for all FSL socs
--- drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-fsl.c | 109 +++++++++++++++++++++++++++++++++++++++++++ include/linux/usb/xhci-fsl.h | 54 +++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 drivers/usb/host/xhci-fsl.c create mode 100644 include/linux/usb/xhci-fsl.h
drivers/usb/host/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_XHCI) += xhci.o xhci-mem.o xhci-ring.o obj-$(CONFIG_USB_XHCI_DWC3) += xhci-dwc3.o obj-$(CONFIG_USB_XHCI_KEYSTONE) += xhci-keystone.o obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o +obj-$(CONFIG_USB_XHCI_FSL) += xhci-fsl.o obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o obj-$(CONFIG_USB_XHCI_UNIPHIER) += xhci-uniphier.o
drivers/usb/host/xhci-fsl.c new file +109 -0
109 lines not on this page · raw message
include/linux/usb/xhci-fsl.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 5/8 drivers:usb:fsl: Add XHCI driver support
Quoted 5 lines · Ramneek Mehresh
From: ramneek mehresh <[email protected]>
Add xhci driver support for all FSL socs
Signed-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/43e1b890/attachment.sig>
PATCH 6/8 arch:arm:fsl: Add XHCI support for LS1021A
In reply to Ramneek MehreshFrom: ramneek mehresh <[email protected]>
Add base register address information for USB
XHCI controller on LS1021A
--- arch/arm/include/asm/arch-ls102xa/config.h | 1 + arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 10 ++++++++++ 2 files changed, 11 insertions(+)
arch/arm/include/asm/arch-ls102xa/config.h +1 -0
@@ -35,6 +35,7 @@#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x011c0500)#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x011d0500)#define CONFIG_SYS_DCU_ADDR (CONFIG_SYS_IMMR + 0x01ce0000) +#define CONFIG_SYS_LS102XA_XHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x02100000)#define CONFIG_SYS_LS102XA_USB1_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_LS102XA_USB1_OFFSET)
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +10 -0
@@ -395,4 +395,14 @@ struct ccsr_cci400 { } pcounter[4]; /* Performance Counter */u8 res_e004[0x10000 -0xe004 ]; }; + +/* USB-XHCI */ +#define FSL_XHCI_BASE 0x3100000 +#define FSL_OCP1_SCP_BASE 0x4a084c00 +#define FSL_OTG_WRAPPER_BASE 0x4A020000 + +#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_LS102XA_XHCI_USB1_ADDR +#define CONFIG_SYS_FSL_XHCI_USB2_ADDR 0 +#define FSL_USB_XHCI_ADDR {CONFIG_SYS_FSL_XHCI_USB1_ADDR, \ + CONFIG_SYS_FSL_XHCI_USB2_ADDR}#endif /* __ASM_ARCH_LS102XA_IMMAP_H_ */
Signature · 1 line
1.8.3.1
PATCH 6/8 arch:arm:fsl: Add XHCI support for LS1021A
Quoted 6 lines · Ramneek Mehresh
From: ramneek mehresh <[email protected]>
Add base register address information for USB
XHCI controller on LS1021ASigned-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/419baff6/attachment.sig>
PATCH 7/8 include:configs:ls1021atwr: Enable USB IP support
In reply to Ramneek MehreshFrom: ramneek mehresh <[email protected]>
Enable USB IP support for both EHCI and XHCI for
ls1021atwr platform
--- include/configs/ls1021atwr.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
include/configs/ls1021atwr.h +38 -0
@@ -28,6 +28,44 @@#define CONFIG_SYS_INIT_RAM_SIZE OCRAM_SIZE/* +* USB +*/ + +/* +* EHCI Support - disbaled by default as +* there is no signal coming out of soc on +* this board for this controller. However, +* the silicon still has this controller, +* and anyone can use this controller by +* taking signals out on their board. +*/ + +/*#define CONFIG_HAS_FSL_DR_USB*/ + +#ifdef CONFIG_HAS_FSL_DR_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_FSL +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#endif + +/* XHCI Support - enabled by default */ +#define CONFIG_HAS_FSL_XHCI_USB + +#ifdef CONFIG_HAS_FSL_XHCI_USB +#define CONFIG_USB_XHCI_FSL +#define CONFIG_USB_XHCI_DWC3 +#define CONFIG_USB_XHCI +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 +#endif + +#if defined(CONFIG_HAS_FSL_DR_USB ) || defined(CONFIG_HAS_FSL_XHCI_USB ) +#define CONFIG_CMD_USB +#define CONFIG_USB_STORAGE +#define CONFIG_CMD_EXT2 +#endif + +/* * Generic Timer Definitions */ #define GENERIC_TIMER_CLK 12500000
Signature · 1 line
1.8.3.1
PATCH 7/8 include:configs:ls1021atwr: Enable USB IP support
Quoted 6 lines · Ramneek Mehresh
From: ramneek mehresh <[email protected]>
Enable USB IP support for both EHCI and XHCI for
ls1021atwr platformSigned-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/2351ece4/attachment.sig>
PATCH 8/8 include:configs:ls1021aqds: Enable USB IP support
In reply to Ramneek MehreshFrom: ramneek mehresh <[email protected]>
Enable USB IP support for both EHCI and XHCI for
ls1021aqds platform
--- include/configs/ls1021aqds.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
include/configs/ls1021aqds.h +17 -5
@@ -424,19 +424,31 @@ unsigned long get_board_ddr_clk(void);/* * USB */ -#define CONFIG_HAS_FSL_DR_USB +/* EHCI Support - disbaled by default */ +/*#define CONFIG_HAS_FSL_DR_USB*/ #ifdef CONFIG_HAS_FSL_DR_USB #define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_FSL +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#endif -#ifdef CONFIG_USB_EHCI +/*XHCI Support - enabled by default*/ +#define CONFIG_HAS_FSL_XHCI_USB + +#ifdef CONFIG_HAS_FSL_XHCI_USB +#define CONFIG_USB_XHCI_FSL +#define CONFIG_USB_XHCI_DWC3 +#define CONFIG_USB_XHCI +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 +#endif + +#if defined(CONFIG_HAS_FSL_DR_USB ) || defined(CONFIG_HAS_FSL_XHCI_USB )#define CONFIG_CMD_USB #define CONFIG_USB_STORAGE -#define CONFIG_USB_EHCI_FSL -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_CMD_EXT2 #endif -#endif /* * Video
Signature · 1 line
1.8.3.1
PATCH 8/8 include:configs:ls1021aqds: Enable USB IP support
Quoted 6 lines · Ramneek Mehresh
From: ramneek mehresh <[email protected]>
Enable USB IP support for both EHCI and XHCI for
ls1021aqds platformSigned-off-by Ramneek Mehresh <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150603/3c357a3d/attachment.sig>
cover usb:xhci:dwc3: Add dwc3 drv code
In reply to Ramneek MehreshQuoted 10 lines · Ramneek Mehresh
A lot of dwc3 code has been duplicated in various xhci drivers. Hence, to minimize this duplication, a new dwc3 file is written that provides common APIs for all other drivers.
First four patches introduce dwc3 file, and necessary changes are made in other drivers for this new drv. I would request all platform/driver owners to please help me in testng these changes on their respective platforms.
Quoted 5 lines
Last four patches are freescale layerscape la1021aqds/ ls1021atwr platform specific.
Ramneek Mehresh (4):
drivers:usb:dwc3: Add DWC3 controller driver support
Please put space after : , always.
Quoted 5 lines
usb:xhci:exynos: Remove common dwc3 drv functions calls usb:xhci:omap: Remove common dwc3 drv functions calls usb:xhci:keystone: Remove common dwc3 drv functions calls
ramneek mehresh (4):
It might be a good idea to crosscheck your name with your ID card ...
Quoted 1 line
drivers:usb:fsl: Add XHCI driver support
There's no such tag as "drivers:".
Quoted 3 lines
arch:arm:fsl: Add XHCI support for LS1021A include:configs:ls1021atwr: Enable USB IP support include:configs:ls1021aqds: Enable USB IP support
The tag doesn't really describe path or anything, so just boardname is fine in this case.
I fixed all those and applied to u-boot-usb/next .
Thanks
Best regards,
Marek Vasut
A message that is not in the archive (sent off-list or not yet received): SN1PR0301MB1583C4E922C45EE033AFEA2EE0A10@SN1PR0301MB1583.namprd03.prod.outlook.com
cover usb:xhci:dwc3: Add dwc3 drv code
Quoted 1 line · Ramneek Mehresh
Hi Marek,
Hello,
Quoted 4 lines
Below patches are applied on usb-next branch since 7-Jun-2015. When are you planning for these patches to be in u-boot main? We have to send some LS2085A based patches in upstream(which are all dependent on these patches), and LS2085A soc support is already on u-boot main.
I will apply them to u-boot-usb/master after 2015.07 is out.
btw Please avoid top-posting, this practice is frowned upon in many mailing lists.
Quoted 52 lines
Thanks and Regards,
RamneekQuoted 49 lines
-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Sunday, June 07, 2015 7:03 PM
To: Mehresh Ramneek-B31383
Cc: u-boot at lists.denx.de; gautam.vivek at samsung.com; dmurphy at ti.com
Subject: Re: [PATCH 0/8] usb:xhci:dwc3: Add dwc3 drv codeQuoted 9 lines · Ramneek Mehresh
A lot of dwc3 code has been duplicated in various xhci drivers. Hence, to minimize this duplication, a new
dwc3 file is written that provides common APIs for all other drivers.First four patches introduce dwc3 file, and necessary changes are made in other drivers for this new drv.
I would request all platform/driver owners to please help me in testng these changes on their respective platforms.Quoted 5 lines
Last four patches are freescale layerscape la1021aqds/ ls1021atwr platform specific.
Ramneek Mehresh (4):
drivers:usb:dwc3: Add DWC3 controller driver supportPlease put space after : , always.
Quoted 5 lines
usb:xhci:exynos: Remove common dwc3 drv functions calls usb:xhci:omap: Remove common dwc3 drv functions calls usb:xhci:keystone: Remove common dwc3 drv functions calls
ramneek mehresh (4):
It might be a good idea to crosscheck your name with your ID card ...
Quoted 1 line
drivers:usb:fsl: Add XHCI driver support
There's no such tag as "drivers:".
Quoted 3 lines
arch:arm:fsl: Add XHCI support for LS1021A include:configs:ls1021atwr: Enable USB IP support include:configs:ls1021aqds: Enable USB IP support
The tag doesn't really describe path or anything, so just boardname is fine in this case.
I fixed all those and applied to u-boot-usb/next .
Thanks
Best regards,
Marek Vasut
Best regards,
Marek Vasut