[U-Boot] [PATCH 0/4] am57xx: beagle-x15: get usb host working

Hi,
This series fixes dwc3 usb config issues and am57xx-evm USB configuration to get USB host ports working properly on am57xx-evm and beagle-x15.
-- cheers, -roger
Roger Quadros (4): usb: dwc3: fix kconfig board: ti: am57xx: Fix USB configuration usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled usb: gadget: udc: Build on USB_GADGET
drivers/usb/dwc3/Kconfig | 9 +++++---- drivers/usb/dwc3/Makefile | 2 +- drivers/usb/gadget/udc/Makefile | 2 +- include/configs/am57xx_evm.h | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-)

DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com --- drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support" - depends on (USB && USB_GADGET) - select USB_GADGET_DUALSPEED + depends on (USB || USB_GADGET) + select USB_GADGET_DUALSPEED if USB_GADGET help - Say Y here if your system has a Dual Role SuperSpeed - USB controller based on the DesignWare USB3 IP Core. + Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection" + default USB_DWC3_HOST if (USB && !USB_GADGET) + default USB_DWC3_GADGET if (!USB && USB_GADGET)
config USB_DWC3_HOST bool "Host only mode"

On 05/13/2016 02:17 PM, Roger Quadros wrote:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
- depends on (USB && USB_GADGET)
- select USB_GADGET_DUALSPEED
- depends on (USB || USB_GADGET)
- select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
- default USB_DWC3_HOST if (USB && !USB_GADGET)
- default USB_DWC3_GADGET if (!USB && USB_GADGET)
What happens if I select both USB and USB_GADGET ?
config USB_DWC3_HOST bool "Host only mode"

On 13/05/16 15:23, Marek Vasut wrote:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
- depends on (USB && USB_GADGET)
- select USB_GADGET_DUALSPEED
- depends on (USB || USB_GADGET)
- select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
- default USB_DWC3_HOST if (USB && !USB_GADGET)
- default USB_DWC3_GADGET if (!USB && USB_GADGET)
What happens if I select both USB and USB_GADGET ?
Ideally we want to have dual role operation but that code seems to have been stripped off from the dwc3/core.c.
So till dual-role is added back it will work in HOST mode by default but user can still choose GADGET mode.
config USB_DWC3_HOST bool "Host only mode"
cheers, -roger

On 05/13/2016 02:27 PM, Roger Quadros wrote:
On 13/05/16 15:23, Marek Vasut wrote:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
- depends on (USB && USB_GADGET)
- select USB_GADGET_DUALSPEED
- depends on (USB || USB_GADGET)
- select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
- default USB_DWC3_HOST if (USB && !USB_GADGET)
- default USB_DWC3_GADGET if (!USB && USB_GADGET)
What happens if I select both USB and USB_GADGET ?
Ideally we want to have dual role operation but that code seems to have been stripped off from the dwc3/core.c.
So till dual-role is added back it will work in HOST mode by default but user can still choose GADGET mode.
All right, not great, but let's go with this. Thanks

2016-05-13 21:23 GMT+09:00 Marek Vasut marex@denx.de:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
depends on (USB && USB_GADGET)
select USB_GADGET_DUALSPEED
depends on (USB || USB_GADGET)
select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
default USB_DWC3_HOST if (USB && !USB_GADGET)
default USB_DWC3_GADGET if (!USB && USB_GADGET)
What happens if I select both USB and USB_GADGET ?
Unlike Linux, CONFIG_USB_GADGET depends on CONFIG_USB in U-Boot.
So, (!USB && USB_GADGET) never happens.

Hi.
2016-05-13 21:17 GMT+09:00 Roger Quadros rogerq@ti.com:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
depends on (USB && USB_GADGET)
select USB_GADGET_DUALSPEED
depends on (USB || USB_GADGET)
select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
default USB_DWC3_HOST if (USB && !USB_GADGET)
default USB_DWC3_GADGET if (!USB && USB_GADGET)
config USB_DWC3_HOST bool "Host only mode" -- 2.7.4
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Please note the following commit changed the meaning of CONFIG_USB.
commit 68f7c5db2d1e714c15b49b0759ddef8f8344f184 Author: Paul Kocialkowski contact@paulk.fr AuthorDate: Tue Aug 4 17:04:05 2015 +0200 Commit: Marek Vasut marex@denx.de CommitDate: Wed Aug 5 17:20:34 2015 +0200
usb: Generic USB Kconfig option, that fits both host and gadget and comments
There is no particular reason why the USB Kconfig option should be specific host mode. In prevision of adding MUSB host and gadget to Kconfig, this move the title and help message of the USB Kconfig option to a more generic forma
Adding comments to the usb Kconfig allows for a better separation and more readability in generated configs and in menuconfig.
Signed-off-by: Paul Kocialkowski contact@paulk.fr
In Linux, CONFIG_USB enables the host mode of USB. So, "depends on (USB || USB_GADGET)" makes sense.
In U-Boot, since the commit above, CONFIG_USB enables the whole of USB frame-work, including host, gadget.
USB_DWC3 already resides inside of if USB ... endif so, depends on (USB || USB_GADGET) does not make sense.

On 17/05/16 13:33, Masahiro Yamada wrote:
Hi.
2016-05-13 21:17 GMT+09:00 Roger Quadros rogerq@ti.com:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
depends on (USB && USB_GADGET)
select USB_GADGET_DUALSPEED
depends on (USB || USB_GADGET)
select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
default USB_DWC3_HOST if (USB && !USB_GADGET)
default USB_DWC3_GADGET if (!USB && USB_GADGET)
config USB_DWC3_HOST bool "Host only mode" -- 2.7.4
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Please note the following commit changed the meaning of CONFIG_USB.
commit 68f7c5db2d1e714c15b49b0759ddef8f8344f184 Author: Paul Kocialkowski contact@paulk.fr AuthorDate: Tue Aug 4 17:04:05 2015 +0200 Commit: Marek Vasut marex@denx.de CommitDate: Wed Aug 5 17:20:34 2015 +0200
usb: Generic USB Kconfig option, that fits both host and gadget and comments There is no particular reason why the USB Kconfig option should be specific host mode. In prevision of adding MUSB host and gadget to Kconfig, this move the title and help message of the USB Kconfig option to a more generic forma Adding comments to the usb Kconfig allows for a better separation and more readability in generated configs and in menuconfig. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
In Linux, CONFIG_USB enables the host mode of USB. So, "depends on (USB || USB_GADGET)" makes sense.
In U-Boot, since the commit above, CONFIG_USB enables the whole of USB frame-work, including host, gadget.
USB_DWC3 already resides inside of if USB ... endif so, depends on (USB || USB_GADGET) does not make sense.
OK, thanks for pointing this out.
But USB doesn't mean Host is active and USB_GADGET means gadget framework is available.
So I think we have incomplete information for deciding about Host role based on just Kconfig.
cheers, -roger

On 05/18/2016 02:47 PM, Roger Quadros wrote:
On 17/05/16 13:33, Masahiro Yamada wrote:
Hi.
2016-05-13 21:17 GMT+09:00 Roger Quadros rogerq@ti.com:
DWC3 can be used in host only or gadget only mode.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/dwc3/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..caf695b 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,15 +1,16 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support"
depends on (USB && USB_GADGET)
select USB_GADGET_DUALSPEED
depends on (USB || USB_GADGET)
select USB_GADGET_DUALSPEED if USB_GADGET help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection"
default USB_DWC3_HOST if (USB && !USB_GADGET)
default USB_DWC3_GADGET if (!USB && USB_GADGET)
config USB_DWC3_HOST bool "Host only mode" -- 2.7.4
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Please note the following commit changed the meaning of CONFIG_USB.
commit 68f7c5db2d1e714c15b49b0759ddef8f8344f184 Author: Paul Kocialkowski contact@paulk.fr AuthorDate: Tue Aug 4 17:04:05 2015 +0200 Commit: Marek Vasut marex@denx.de CommitDate: Wed Aug 5 17:20:34 2015 +0200
usb: Generic USB Kconfig option, that fits both host and gadget and comments There is no particular reason why the USB Kconfig option should be specific host mode. In prevision of adding MUSB host and gadget to Kconfig, this move the title and help message of the USB Kconfig option to a more generic forma Adding comments to the usb Kconfig allows for a better separation and more readability in generated configs and in menuconfig. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
In Linux, CONFIG_USB enables the host mode of USB. So, "depends on (USB || USB_GADGET)" makes sense.
In U-Boot, since the commit above, CONFIG_USB enables the whole of USB frame-work, including host, gadget.
USB_DWC3 already resides inside of if USB ... endif so, depends on (USB || USB_GADGET) does not make sense.
OK, thanks for pointing this out.
But USB doesn't mean Host is active and USB_GADGET means gadget framework is available.
So I think we have incomplete information for deciding about Host role based on just Kconfig.
On an OTG controller, you should check the ID pin at runtime to determine which mode the controller should work in. The Kconfig options should select the supported modes, not enforce particular one. If the ID pin is not available or you want to force the controller into particular mode, do it via DT or platdata.

DWC3 can be used as host or as gadget controller and the actual mode is determined at runtime so USB_DWC3_DUAL_ROLE must be the default mode when both host and gadget drivers are available.
As DWC3 core implements an XHCI host controller, we use USB_XHCI_HCD to check if host driver is available.
USB_DWC3_HOST and USB_DWC3_GADGET are only set if a particular mode needs to be forced or if both host and gadget drivers are not available.
Build the dwc3 gadget drivers only if gadget mode can be used at runtime.
Signed-off-by: Roger Quadros rogerq@ti.com --- v2: - don't depend on USB as dwc3/kconfig already depends on that - use USB_XHCI_HCD to decide whether host operation is available. - Add USB_DWC3_DUAL_ROLE, which means that controller can operate either in host or gadget mode. The actual mode is decided at runtime based on dwc3->dr_mode.
drivers/usb/dwc3/Kconfig | 18 +++++++++++++----- drivers/usb/dwc3/Makefile | 4 +++- drivers/usb/dwc3/core.h | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index e93398f..0db536e 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -1,19 +1,20 @@ config USB_DWC3 bool "DesignWare USB3 DRD Core Support" - depends on (USB && USB_GADGET) - select USB_GADGET_DUALSPEED + select USB_GADGET_DUALSPEED if USB_GADGET help - Say Y here if your system has a Dual Role SuperSpeed - USB controller based on the DesignWare USB3 IP Core. + Say Y here if your system has DesignWare USB3 IP Core.
if USB_DWC3
choice bool "DWC3 Mode Selection" + default USB_DWC3_DUAL_ROLE if (USB_GADGET && USB_XHCI_HCD) + default USB_DWC3_HOST if (!USB_GADGET && USB_XHCI_HCD) + default USB_DWC3_GADGET if (USB_GADGET && !USB_XHCI_HCD)
config USB_DWC3_HOST bool "Host only mode" - depends on USB + depends on USB_XHCI_HCD help Select this when you want to use DWC3 in host mode only, thereby the gadget feature will be regressed. @@ -25,6 +26,13 @@ config USB_DWC3_GADGET Select this when you want to use DWC3 in gadget mode only, thereby the host feature will be regressed.
+config USB_DWC3_DUAL_ROLE + bool "Dual role mode" + depends on (USB_XHCI_HCD && USB_GADGET) + help + This is the default mode of working of DWC3 controller where + both host and gadget features are enabled. + endchoice
comment "Platform Glue Driver Support" diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 0cd7302..d2ad2e9 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -6,7 +6,9 @@ obj-$(CONFIG_USB_DWC3) += dwc3.o
dwc3-y := core.o
-dwc3-y += gadget.o ep0.o +ifneq ($(filter y,$(CONFIG_USB_DWC3_GADGET) $(CONFIG_USB_DWC3_DUAL_ROLE)),) +dwc3-yi += gadget.o ep0.o +endif
obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 72d2fcd..faf0c0f 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -989,7 +989,7 @@ struct dwc3_gadget_ep_cmd_params { /* prototypes */ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc);
-#ifdef CONFIG_USB_DWC3_HOST +#if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) int dwc3_host_init(struct dwc3 *dwc); void dwc3_host_exit(struct dwc3 *dwc); #else @@ -999,7 +999,7 @@ static inline void dwc3_host_exit(struct dwc3 *dwc) { } #endif
-#ifdef CONFIG_USB_DWC3_GADGET +#if IS_ENABLED(CONFIG_USB_DWC3_GADGET) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) int dwc3_gadget_init(struct dwc3 *dwc); void dwc3_gadget_exit(struct dwc3 *dwc); int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode);

This fixes build.
Signed-off-by: Roger Quadros rogerq@ti.com --- include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT

On 05/13/2016 02:17 PM, Roger Quadros wrote:
This fixes build.
This commit message needs a fix.
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT

Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Fix that by enabling CONFIG_USB_DWC3 and other related options CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
[1] => usb start starting USB... USB0: data abort pc : [<fff7ed10>] lr : [<fff7ebbf>] reloc pc : [<8081dd10>] lr : [<8081dbbf>] sp : fef3d260 ip : 00000000 fp : fef3d2a8 r10: fffa4610 r9 : fef50ed0 r8 : 00000000 r7 : fef3d280 r6 : fef3d284 r5 : fffbc380 r4 : 00000000 r3 : 48880000 r2 : 00000000 r1 : 00000000 r0 : fffbc380 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Signed-off-by: Roger Quadros rogerq@ti.com --- include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT

On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Fix that by enabling CONFIG_USB_DWC3 and other related options CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
[1] => usb start starting USB... USB0: data abort pc : [<fff7ed10>] lr : [<fff7ebbf>] reloc pc : [<8081dd10>] lr : [<8081dbbf>] sp : fef3d260 ip : 00000000 fp : fef3d2a8 r10: fffa4610 r9 : fef50ed0 r8 : 00000000 r7 : fef3d280 r6 : fef3d284 r5 : fffbc380 r4 : 00000000 r3 : 48880000 r2 : 00000000 r1 : 00000000 r0 : fffbc380 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
Changelog is missing ;-)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT

On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
cheers, -roger
Fix that by enabling CONFIG_USB_DWC3 and other related options CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
[1] => usb start starting USB... USB0: data abort pc : [<fff7ed10>] lr : [<fff7ebbf>] reloc pc : [<8081dd10>] lr : [<8081dbbf>] sp : fef3d260 ip : 00000000 fp : fef3d2a8 r10: fffa4610 r9 : fef50ed0 r8 : 00000000 r7 : fef3d280 r6 : fef3d284 r5 : fffbc380 r4 : 00000000 r3 : 48880000 r2 : 00000000 r1 : 00000000 r0 : fffbc380 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
Changelog is missing ;-)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT

On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
cheers, -roger
cheers, -roger
Fix that by enabling CONFIG_USB_DWC3 and other related options CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
[1] => usb start starting USB... USB0: data abort pc : [<fff7ed10>] lr : [<fff7ebbf>] reloc pc : [<8081dd10>] lr : [<8081dbbf>] sp : fef3d260 ip : 00000000 fp : fef3d2a8 r10: fffa4610 r9 : fef50ed0 r8 : 00000000 r7 : fef3d280 r6 : fef3d284 r5 : fffbc380 r4 : 00000000 r3 : 48880000 r2 : 00000000 r1 : 00000000 r0 : fffbc380 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
Changelog is missing ;-)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On 16/05/16 12:26, Roger Quadros wrote:
On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
But board_usb_init() calls
ti_usb_phy_uboot_init(&usb_phy1_device); dwc3_omap_uboot_init(&usb_otg_ss1_glue); dwc3_uboot_init(&usb_otg_ss1);
which depend on CONFIG_USB_DWC3_PHY_OMAP, CONFIG_USB_DWC3_OMAP and CONFIG_USB_DWC3 respectively.
So I really don't know how to fix all this.
-- cheers, -roger
Fix that by enabling CONFIG_USB_DWC3 and other related options CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
[1] => usb start starting USB... USB0: data abort pc : [<fff7ed10>] lr : [<fff7ebbf>] reloc pc : [<8081dd10>] lr : [<8081dbbf>] sp : fef3d260 ip : 00000000 fp : fef3d2a8 r10: fffa4610 r9 : fef50ed0 r8 : 00000000 r7 : fef3d280 r6 : fef3d284 r5 : fffbc380 r4 : 00000000 r3 : 48880000 r2 : 00000000 r1 : 00000000 r0 : fffbc380 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
Changelog is missing ;-)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
/* SATA */ #define CONFIG_BOARD_LATE_INIT
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi Roger,
On Monday 16 May 2016 03:19 PM, Roger Quadros wrote:
On 16/05/16 12:26, Roger Quadros wrote:
On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
IIRC, board_usb_init for xhci (omap) is mostly a NOP.
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
clocks are not turned on in board_usb_init() right? The board_usb_init() in am57xx/board.c is used only for gadget mode.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
right, but before that we might have to cleanup xhci-omap.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
But board_usb_init() calls
ti_usb_phy_uboot_init(&usb_phy1_device); dwc3_omap_uboot_init(&usb_otg_ss1_glue); dwc3_uboot_init(&usb_otg_ss1);
which depend on CONFIG_USB_DWC3_PHY_OMAP, CONFIG_USB_DWC3_OMAP and CONFIG_USB_DWC3 respectively.
IMO we should cleanup xhci-omap so that all the initializations are done using ti_usb_phy_uboot_init, dwc3_omap_uboot_init and dwc3_uboot_init. Then modify dwc3_uboot_init to initialize host or device based on CONFIG_*.
Thanks Kishon

On 16/05/16 13:03, Kishon Vijay Abraham I wrote:
Hi Roger,
On Monday 16 May 2016 03:19 PM, Roger Quadros wrote:
On 16/05/16 12:26, Roger Quadros wrote:
On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote:
Currently CONFIG_USB_DWC3 is not selected so doing a usb start command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
IIRC, board_usb_init for xhci (omap) is mostly a NOP.
Then who will call board_usb_init() for host case?
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
clocks are not turned on in board_usb_init() right? The board_usb_init() in am57xx/board.c is used only for gadget mode.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
right, but before that we might have to cleanup xhci-omap.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
But board_usb_init() calls
ti_usb_phy_uboot_init(&usb_phy1_device); dwc3_omap_uboot_init(&usb_otg_ss1_glue); dwc3_uboot_init(&usb_otg_ss1);
which depend on CONFIG_USB_DWC3_PHY_OMAP, CONFIG_USB_DWC3_OMAP and CONFIG_USB_DWC3 respectively.
IMO we should cleanup xhci-omap so that all the initializations are done using ti_usb_phy_uboot_init, dwc3_omap_uboot_init and dwc3_uboot_init. Then modify dwc3_uboot_init to initialize host or device based on CONFIG_*.
I'm still trying to get a grip of how USB works in u-boot. Is CONFIG_CMD_USB only meant for host mode or gadget mode as well? Is dual-role even required in u-boot? probably it is not a good idea and we just ignore it for simplicity.
What determines whether a USB port is meant for Host or device operation? Is it the CONFIG_ or caller of board_usb_init()? I see board_usb_init() being used by gadget drivers, host drivers, dfu.c, etc.
cheers, -roger

Hi Roger,
On Monday 16 May 2016 04:01 PM, Roger Quadros wrote:
On 16/05/16 13:03, Kishon Vijay Abraham I wrote:
Hi Roger,
On Monday 16 May 2016 03:19 PM, Roger Quadros wrote:
On 16/05/16 12:26, Roger Quadros wrote:
On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote:
On 05/13/2016 02:36 PM, Roger Quadros wrote: > Currently CONFIG_USB_DWC3 is not selected so doing a usb start > command results in a serious error [1].
Why does this error happen ? That is what should be fixed. Selecting some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
IIRC, board_usb_init for xhci (omap) is mostly a NOP.
Then who will call board_usb_init() for host case?
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
clocks are not turned on in board_usb_init() right? The board_usb_init() in am57xx/board.c is used only for gadget mode.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
right, but before that we might have to cleanup xhci-omap.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
But board_usb_init() calls
ti_usb_phy_uboot_init(&usb_phy1_device); dwc3_omap_uboot_init(&usb_otg_ss1_glue); dwc3_uboot_init(&usb_otg_ss1);
which depend on CONFIG_USB_DWC3_PHY_OMAP, CONFIG_USB_DWC3_OMAP and CONFIG_USB_DWC3 respectively.
IMO we should cleanup xhci-omap so that all the initializations are done using ti_usb_phy_uboot_init, dwc3_omap_uboot_init and dwc3_uboot_init. Then modify dwc3_uboot_init to initialize host or device based on CONFIG_*.
I'm still trying to get a grip of how USB works in u-boot. Is CONFIG_CMD_USB only meant for host mode or gadget mode as well?
IIRC it is only for host. Commands like usb start, usb stop are used to start and stop host.
Is dual-role even required in u-boot? probably it is not a good idea and we just ignore it for simplicity.
yeah.
What determines whether a USB port is meant for Host or device operation? Is it the CONFIG_ or caller of board_usb_init()?
It should be the caller of board_usb_init(). The same port can be used as device or host based on command used (the command determines the caller of board_usb_init).
Thanks Kishon

On 16/05/16 14:10, Kishon Vijay Abraham I wrote:
Hi Roger,
On Monday 16 May 2016 04:01 PM, Roger Quadros wrote:
On 16/05/16 13:03, Kishon Vijay Abraham I wrote:
Hi Roger,
On Monday 16 May 2016 03:19 PM, Roger Quadros wrote:
On 16/05/16 12:26, Roger Quadros wrote:
On 16/05/16 12:06, Roger Quadros wrote:
On 13/05/16 15:45, Marek Vasut wrote: > On 05/13/2016 02:36 PM, Roger Quadros wrote: >> Currently CONFIG_USB_DWC3 is not selected so doing a usb start >> command results in a serious error [1]. > > Why does this error happen ? That is what should be fixed. Selecting > some random options seems like papering over a bug.
Agreed. I was lazy :P.
OK. The issue is like this.
CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls board_usb_init().
IIRC, board_usb_init for xhci (omap) is mostly a NOP.
Then who will call board_usb_init() for host case?
But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined and that is missing in am57xx_evm.h leading to the serious error. We're trying to access the IP without turning on the necessary clocks.
clocks are not turned on in board_usb_init() right? The board_usb_init() in am57xx/board.c is used only for gadget mode.
So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.
right, but before that we might have to cleanup xhci-omap.
But then again looking into the future, what if we want only gadget operation? That would not define XHCI, but we still need board_usb_init(). So board_usb_init() should be defined based on CONFIG_CMD_USB=y?
What do you suggest?
But board_usb_init() calls
ti_usb_phy_uboot_init(&usb_phy1_device); dwc3_omap_uboot_init(&usb_otg_ss1_glue); dwc3_uboot_init(&usb_otg_ss1);
which depend on CONFIG_USB_DWC3_PHY_OMAP, CONFIG_USB_DWC3_OMAP and CONFIG_USB_DWC3 respectively.
IMO we should cleanup xhci-omap so that all the initializations are done using ti_usb_phy_uboot_init, dwc3_omap_uboot_init and dwc3_uboot_init. Then modify dwc3_uboot_init to initialize host or device based on CONFIG_*.
I'm still trying to get a grip of how USB works in u-boot. Is CONFIG_CMD_USB only meant for host mode or gadget mode as well?
IIRC it is only for host. Commands like usb start, usb stop are used to start and stop host.
Is dual-role even required in u-boot? probably it is not a good idea and we just ignore it for simplicity.
yeah.
What determines whether a USB port is meant for Host or device operation? Is it the CONFIG_ or caller of board_usb_init()?
It should be the caller of board_usb_init(). The same port can be used as device or host based on command used (the command determines the caller of board_usb_init).
Then it is upto board_usb_init() to complain if it is called for some mode and the respective drivers are not enabled.
board_usb_init() must be defined in the board if CONFIG_CMD_USB || USB_GADGET
But there is no single config option for USB_GADGET. people seem to be calling board_usb_init() from all over the place without any dependency on USB_GADGET. e.g. dfu.c, ether.c, fastboot.c, thordown.c, usb_mass_storage.c, ether.c
So things will break with various configurations. So probably for now board_usb_init() has to be always defined.
cheers, -roger

On Fri, May 13, 2016 at 03:17:51PM +0300, Roger Quadros wrote:
This fixes build.
Signed-off-by: Roger Quadros rogerq@ti.com
include/configs/am57xx_evm.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 32d7d4d..939057c 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -63,6 +63,7 @@ #define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */ +#define CONFIG_USB_DWC3 #define CONFIG_USB_HOST #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI @@ -72,6 +73,8 @@
#define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB3PHY1_HOST +#define CONFIG_USB_DWC3_PHY_OMAP +#define CONFIG_USB_DWC3_OMAP
This needs to be done in the defconfig. And you're leaving other boards broken: pcm051_rev1 and others, please do at least an am33xx build, thanks!

It is pointless to build gadget driver if USB_GADGET is disabled.
Signed-off-by: Roger Quadros rogerq@ti.com --- drivers/usb/dwc3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 0cd7302..2964bae 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_USB_DWC3) += dwc3.o
dwc3-y := core.o
-dwc3-y += gadget.o ep0.o +obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o
obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o

On 05/13/2016 02:17 PM, Roger Quadros wrote:
It is pointless to build gadget driver if USB_GADGET is disabled.
Signed-off-by: Roger Quadros rogerq@ti.com
Acked-by: Marek Vasut marex@denx.de
drivers/usb/dwc3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 0cd7302..2964bae 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_USB_DWC3) += dwc3.o
dwc3-y := core.o
-dwc3-y += gadget.o ep0.o +obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o
obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o

On Fri, May 13, 2016 at 03:17:52PM +0300, Roger Quadros wrote:
It is pointless to build gadget driver if USB_GADGET is disabled.
Signed-off-by: Roger Quadros rogerq@ti.com Acked-by: Marek Vasut marex@denx.de
Applied to u-boot/master, thanks!

udc-core is a generic framework and not specific to dwc3. So build it based on USB_GADGET.
Signed-off-by: Roger Quadros rogerq@ti.com --- drivers/usb/gadget/udc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 1699ccd..68766c5 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o +obj-$(CONFIG_USB_GADGET) += udc-core.o

On 05/13/2016 02:17 PM, Roger Quadros wrote:
udc-core is a generic framework and not specific to dwc3. So build it based on USB_GADGET.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/gadget/udc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 1699ccd..68766c5 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o +obj-$(CONFIG_USB_GADGET) += udc-core.o
Did you buildman this against all boards ?

On 13/05/16 15:24, Marek Vasut wrote:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
udc-core is a generic framework and not specific to dwc3. So build it based on USB_GADGET.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/gadget/udc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 1699ccd..68766c5 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o +obj-$(CONFIG_USB_GADGET) += udc-core.o
Did you buildman this against all boards ?
Nope, I've never used it before but I'll give it a shot.
cheers, -roger

On 05/13/2016 02:29 PM, Roger Quadros wrote:
On 13/05/16 15:24, Marek Vasut wrote:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
udc-core is a generic framework and not specific to dwc3. So build it based on USB_GADGET.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/gadget/udc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 1699ccd..68766c5 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o +obj-$(CONFIG_USB_GADGET) += udc-core.o
Did you buildman this against all boards ?
Nope, I've never used it before but I'll give it a shot.
cheers, -roger
I use this script to do my buildmanning:
# U-Boot: Quick build test bubm() {( branch=`git branch | grep '^*' | sed "s/^..//"` dir=/tmp/bm-$1 arch="arm aarch64 mips powerpc nios2" shift 1 ./tools/buildman/buildman -o ${dir} -b ${branch} --step=0 ${arch} $@ )}

On 13/05/16 15:47, Marek Vasut wrote:
On 05/13/2016 02:29 PM, Roger Quadros wrote:
On 13/05/16 15:24, Marek Vasut wrote:
On 05/13/2016 02:17 PM, Roger Quadros wrote:
udc-core is a generic framework and not specific to dwc3. So build it based on USB_GADGET.
Signed-off-by: Roger Quadros rogerq@ti.com
drivers/usb/gadget/udc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 1699ccd..68766c5 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o +obj-$(CONFIG_USB_GADGET) += udc-core.o
Did you buildman this against all boards ?
Nope, I've never used it before but I'll give it a shot.
cheers, -roger
I use this script to do my buildmanning:
# U-Boot: Quick build test bubm() {( branch=`git branch | grep '^*' | sed "s/^..//"` dir=/tmp/bm-$1 arch="arm aarch64 mips powerpc nios2" shift 1 ./tools/buildman/buildman -o ${dir} -b ${branch} --step=0 ${arch} $@ )}
Thanks Marek.
This patch sure breaks all non DWC3 USB platforms. So let's drop this. I wasn't aware that every other gadget driver is implementing its own usb core API.
cheers, -roger

On 05/13/2016 02:17 PM, Roger Quadros wrote:
Hi,
Hi!
This series fixes dwc3 usb config issues and am57xx-evm USB configuration to get USB host ports working properly on am57xx-evm and beagle-x15.
CCing Masahiro as he also did some DWC3 work and submitted some patches.
-- cheers, -roger
Roger Quadros (4): usb: dwc3: fix kconfig board: ti: am57xx: Fix USB configuration usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled usb: gadget: udc: Build on USB_GADGET
drivers/usb/dwc3/Kconfig | 9 +++++---- drivers/usb/dwc3/Makefile | 2 +- drivers/usb/gadget/udc/Makefile | 2 +- include/configs/am57xx_evm.h | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-)

On 13/05/16 15:17, Roger Quadros wrote:
Hi,
This series fixes dwc3 usb config issues and am57xx-evm USB configuration to get USB host ports working properly on am57xx-evm and beagle-x15.
Small update. Super-Speed devices are still not working, but that is a different issue which seems to have been existed since long ago. I will debug this issue in the coming days.
cheers, -roger
Roger Quadros (4): usb: dwc3: fix kconfig board: ti: am57xx: Fix USB configuration usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled usb: gadget: udc: Build on USB_GADGET
drivers/usb/dwc3/Kconfig | 9 +++++---- drivers/usb/dwc3/Makefile | 2 +- drivers/usb/gadget/udc/Makefile | 2 +- include/configs/am57xx_evm.h | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-)

On 05/13/2016 02:39 PM, Roger Quadros wrote:
On 13/05/16 15:17, Roger Quadros wrote:
Hi,
This series fixes dwc3 usb config issues and am57xx-evm USB configuration to get USB host ports working properly on am57xx-evm and beagle-x15.
Small update. Super-Speed devices are still not working, but that is a different issue which seems to have been existed since long ago. I will debug this issue in the coming days.
Cool. You have a whole MW for that ;-)
cheers, -roger
Roger Quadros (4): usb: dwc3: fix kconfig board: ti: am57xx: Fix USB configuration usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled usb: gadget: udc: Build on USB_GADGET
drivers/usb/dwc3/Kconfig | 9 +++++---- drivers/usb/dwc3/Makefile | 2 +- drivers/usb/gadget/udc/Makefile | 2 +- include/configs/am57xx_evm.h | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-)

On 13/05/16 15:47, Marek Vasut wrote:
On 05/13/2016 02:39 PM, Roger Quadros wrote:
On 13/05/16 15:17, Roger Quadros wrote:
Hi,
This series fixes dwc3 usb config issues and am57xx-evm USB configuration to get USB host ports working properly on am57xx-evm and beagle-x15.
Small update. Super-Speed devices are still not working, but that is a different issue which seems to have been existed since long ago. I will debug this issue in the coming days.
Cool. You have a whole MW for that ;-)
Still stuck with this issue. It seems like it finds both high-speed and super-speed hubs but fails getting descriptor of the super-speed hub.
Is super-speed host known to work on any platform on u-boot? Any ideas how to debug this further? The hub chip is on the board so I can't connect a USB bus analyzer there.
cheers, -roger
=> usb start starting USB... USB0: board_usb_init 0 adding phy 0 to list dwc3_core_soft_reset ti_usb3_phy_power 1 usb3 power up done dwc3_set_mode 1 config1 0x7d00e config1 0x7d00e config1 0x7d00e Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.00 scanning bus 0 for devices... USB hub found 2 ports detected individual port power switching standalone hub individual port over-current protection power on to power good time: 20ms hub controller current requirement: 0mA port 1 is removable port 2 is removable get_hub_status returned status 1, change 902 local power source is lost (inactive) no over-current condition exists enabling power on all ports port 1 returns 0 port 2 returns 0 pgood_delay=20ms devnum=1 poweron: query_delay=100 connect_timeout=1100 Port 1 Status 101 Change 1 devnum=1 port=1: USB dev found portstatus 101, change 1, 12 Mb/s legacy_hub_port_reset: resetting port 1... portstatus 111, change 0, 12 Mb/s STAT_C_CONNECTION = 0 STAT_CONNECTION = 1 USB_PORT_STAT_ENABLE 0 portstatus 503, change 10, 480 Mb/s STAT_C_CONNECTION = 0 STAT_CONNECTION = 1 USB_PORT_STAT_ENABLE 1 req=6 (0x6), type=128 (0x80), value=256 (0x100), index=0 start_trb fef56940, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 256,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 18 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=512 (0x200), index=0 start_trb fef56970, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 512,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 9 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=512 (0x200), index=0 start_trb fef569a0, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 512,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 41 XHCI done. status 0x0 req=9 (0x9), type=0 (0x0), value=1 (0x1), index=0 start_trb fef569d0, start_cycle 1 req->requesttype = 0, req->request = 9,le16_to_cpu(req->value) = 1,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 0 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=768 (0x300), index=0 start_trb fef569f0, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 768,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 255 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=769 (0x301), index=1033 start_trb fef56a20, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 769,le16_to_cpu(req->index) = 1033,le16_to_cpu(req->length) = 255 XHCI done. status 0x0 USB hub found req=6 (0x6), type=160 (0xa0), value=10496 (0x2900), index=0 start_trb fef56a50, start_cycle 1 req->requesttype = 160, req->request = 6,le16_to_cpu(req->value) = 10496,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 req=6 (0x6), type=160 (0xa0), value=10496 (0x2900), index=0 start_trb fef56a80, start_cycle 1 req->requesttype = 160, req->request = 6,le16_to_cpu(req->value) = 10496,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 9 XHCI done. status 0x0 4 ports detected individual port power switching standalone hub individual port over-current protection power on to power good time: 100ms hub controller current requirement: 0mA port 1 is removable port 2 is removable port 3 is removable port 4 is removable req=0 (0x0), type=160 (0xa0), value=0 (0x0), index=0 start_trb fef56ab0, start_cycle 1 req->requesttype = 160, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 get_hub_status returned status 0, change 0 local power source is good no over-current condition exists enabling power on all ports req=3 (0x3), type=35 (0x23), value=8 (0x8), index=1 start_trb fef56ae0, start_cycle 1 req->requesttype = 35, req->request = 3,le16_to_cpu(req->value) = 8,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 0 XHCI done. status 0x0 port 1 returns 0 req=3 (0x3), type=35 (0x23), value=8 (0x8), index=2 start_trb fef56b00, start_cycle 1 req->requesttype = 35, req->request = 3,le16_to_cpu(req->value) = 8,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 0 XHCI done. status 0x0 port 2 returns 0 req=3 (0x3), type=35 (0x23), value=8 (0x8), index=3 start_trb fef56b20, start_cycle 1 req->requesttype = 35, req->request = 3,le16_to_cpu(req->value) = 8,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 0 XHCI done. status 0x0 port 3 returns 0 req=3 (0x3), type=35 (0x23), value=8 (0x8), index=4 start_trb fef56b40, start_cycle 1 req->requesttype = 35, req->request = 3,le16_to_cpu(req->value) = 8,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 0 XHCI done. status 0x0 port 4 returns 0 pgood_delay=100ms devnum=2 poweron: query_delay=100 connect_timeout=1100 Port 2 Status 703 Change 1 devnum=1 port=2: USB dev found portstatus 703, change 1, 5 Gb/s legacy_hub_port_reset: resetting port 2... portstatus 703, change 10, 5 Gb/s STAT_C_CONNECTION = 0 STAT_CONNECTION = 1 USB_PORT_STAT_ENABLE 1 req=6 (0x6), type=128 (0x80), value=256 (0x100), index=0 start_trb fef587c0, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 256,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 18 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=512 (0x200), index=0 start_trb fef587f0, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 512,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 9 XHCI done. status 0x0 req=6 (0x6), type=128 (0x80), value=512 (0x200), index=0 start_trb fef58820, start_cycle 1 req->requesttype = 128, req->request = 6,le16_to_cpu(req->value) = 512,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 31 XHCI done. status 0x0 req=9 (0x9), type=0 (0x0), value=1 (0x1), index=0 start_trb fef58850, start_cycle 1 req->requesttype = 0, req->request = 9,le16_to_cpu(req->value) = 1,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 0 XHCI done. status 0x0
*-------interesting part-------* USB hub found req=6 (0x6), type=160 (0xa0), value=10496 (0x2900), index=0 start_trb fef58870, start_cycle 1 req->requesttype = 160, req->request = 6,le16_to_cpu(req->value) = 10496,le16_to_cpu(req->index) = 0,le16_to_cpu(req->length) = 4 XHCI done. status 0x2 usb_hub_configure: failed to get hub descriptor, giving up 2 hub: disabling port 2 *-------end interesting part---*
req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56b60, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56b90, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56bc0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56bf0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56c20, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56c50, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56c80, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56cb0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56ce0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56d10, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56950, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56980, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef569b0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef569e0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56a10, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56a40, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56a70, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56aa0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56ad0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56b00, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56b30, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56b60, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56b90, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56bc0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56bf0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56c20, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56c50, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56c80, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56cb0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56ce0, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56d10, start_cycle 0 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56950, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56980, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef569b0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef569e0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56a10, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56a40, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56a70, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56aa0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=4 start_trb fef56ad0, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 4,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 4 Status 100 Change 0 devnum=2 port=4: timeout req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=1 start_trb fef56b00, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 1,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 1 Status 100 Change 0 devnum=2 port=1: timeout req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=2 start_trb fef56b30, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 2,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 2 Status 100 Change 0 devnum=2 port=2: timeout req=0 (0x0), type=163 (0xa3), value=0 (0x0), index=3 start_trb fef56b60, start_cycle 1 req->requesttype = 163, req->request = 0,le16_to_cpu(req->value) = 0,le16_to_cpu(req->index) = 3,le16_to_cpu(req->length) = 4 XHCI done. status 0x0 Port 3 Status 100 Change 0 devnum=2 port=3: timeout 2 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found =>
participants (5)
-
Kishon Vijay Abraham I
-
Marek Vasut
-
Masahiro Yamada
-
Roger Quadros
-
Tom Rini