Fix 'no USB device found' error.
Subsystems (2)
v4 cover Fix 'no USB device found' error.
This series fixes the "No USB device found" error for am335x-icev2 and am335x-evmsk. USB0 dual-role feature is now handled as peripheral only in the driver.
The error was not produced for am335x-evm because usb0 dr_mode was configured as peripheral in 'am335x-evm-u-boot.dtsi'. This fragment is no longer needed.
---
Changes in v4:
- Handle usb dual-role feature as peripheral in ti-musb driver.
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Remove usb0 dr_mode configuration from 'am335x-evm-u-boot.dtsi'.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Drop the modification made in arch/arm/mach-omap2/am33xx/board.c
- Configure usb0 dr_mode as peripheral in 'am335x-icev2-u-boot.dtsi'
and 'am335x-evmsk-u-boot.dtsi' device trees.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Julien Panis (2):
musb-new: ti-musb: Handle usb dual-role feature as peripheral
arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ---- drivers/usb/musb-new/ti-musb.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-)
---
base-commit: 19b77d3d23966a0d6dbb3c86187765f11100fb6f
change-id: 20230621-fix_usb_ether_init-4bf4f1135113
Best regards,
Signature · 1 line
Julien Panis <[email protected]>
PATCH v4 1/2 musb-new: ti-musb: Handle usb dual-role feature as peripheral
This prevents from getting some 'No USB device found' error, in usb_ether_init() function for instance.
--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/musb-new/ti-musb.c +1 -0
@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode =usb_get_dr_mode (node);switch (dr_mode) {case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG :/* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",
Signature · 1 line
2.37.3
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
Quoted 2 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.
Looks good to me:
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
In reply to Julien PanisQuoted 24 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/musb-new/ti-musb.c +1
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode =usb_get_dr_mode (node);switch (dr_mode) {case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG :/* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",Signature · 2 lines
-- 2.37.3
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
In reply to Julien PanisQuoted 15 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>Reviewed-by Tony Lindgren <[email protected]>Reviewed-by Nishanth Menon <[email protected]>--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/musb-new/ti-musb.c +0
-0
drivers/usb/musb-new/ti-musb.c static int ti_musb_wrapper_bind(struct udevice *parent) · line 308
Quoted 7 lines
drivers/usb/musb-new/ti-musb.c +1
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode =usb_get_dr_mode (node);switch (dr_mode) {case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG :/* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",
Julien, why don't we support OTG mode here instead?
Signature · 1 line
Tom
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
Quoted 12 lines · Tom Rini
Quoted 10 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>Reviewed-by Tony Lindgren <[email protected]>Reviewed-by Nishanth Menon <[email protected]>--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)
Quoted 14 lines
drivers/usb/musb-new/ti-musb.c static int ti_musb_wrapper_bind(struct udevice *parent) · line 308
Quoted 12 lines
drivers/usb/musb-new/ti-musb.c +1
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode =usb_get_dr_mode (node);switch (dr_mode) {case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG :/* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",Julien, why don't we support OTG mode here instead?
Roger, can this be achieved with this controller ?
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
Hi Julien,
Quoted 28 lines · Julien Panis
Quoted 12 lines · Tom Rini
Quoted 10 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>Reviewed-by Tony Lindgren <[email protected]>Reviewed-by Nishanth Menon <[email protected]>---
drivers/usb/musb-new/ti-musb.c| 1 +1 file changed, 1 insertion(+)Quoted 14 lines
Quoted 7 lines
drivers/usb/musb-new/ti-musb.c +0
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode = usb_get_dr_mode(node); switch (dr_mode) {Quoted 5 lines
case
USB_DR_MODE_PERIPHERAL:
+ caseUSB_DR_MODE_OTG:
/* Bind MUSB device */
ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",Julien, why don't we support OTG mode here instead?
Quoted 1 line
Roger, can this be achieved with this controller ?
The Controller supports OTG mode but I'm not sure of the u-boot driver.
Bin / Stephan might know.
Signature · 2 lines
cheers, -roger
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
Quoted 31 lines · Roger Quadros
Hi Julien,
Quoted 28 lines · Julien Panis
Quoted 26 lines · Tom Rini
Quoted 15 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>Reviewed-by Tony Lindgren <[email protected]>Reviewed-by Nishanth Menon <[email protected]>--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/musb-new/ti-musb.c +0
-0drivers/usb/musb-new/ti-musb.c static int ti_musb_wrapper_bind(struct udevice *parent) · line 308
Quoted 7 lines
drivers/usb/musb-new/ti-musb.c +1
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode = usb_get_dr_mode(node); switch (dr_mode) { case USB_DR_MODE_PERIPHERAL: + case USB_DR_MODE_OTG: /* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",Julien, why don't we support OTG mode here instead?
Quoted 5 lines
Quoted 1 line
Roger, can this be achieved with this controller ?
The Controller supports OTG mode but I'm not sure of the u-boot driver.
Bin / Stephan might know.
Surely the controller supports both Host and Peripheral mode.
Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
Quoted 32 lines · Marek Vasut
Quoted 31 lines · Roger Quadros
Hi Julien,
Quoted 28 lines · Julien Panis
Quoted 26 lines · Tom Rini
Quoted 15 lines · Julien Panis
This prevents from getting some 'No USB device found' error, in
usb_ether_init()function for instance.Signed-off-by Julien Panis <[email protected]>Reviewed-by Tony Lindgren <[email protected]>Reviewed-by Nishanth Menon <[email protected]>--- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/musb-new/ti-musb.c +0
-0drivers/usb/musb-new/ti-musb.c static int ti_musb_wrapper_bind(struct udevice *parent) · line 308
Quoted 7 lines
drivers/usb/musb-new/ti-musb.c +1
-0@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode = usb_get_dr_mode(node); switch (dr_mode) { case USB_DR_MODE_PERIPHERAL: + case USB_DR_MODE_OTG: /* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral",Julien, why don't we support OTG mode here instead?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Roger, can this be achieved with this controller ?
The Controller supports OTG mode but I'm not sure of the u-boot driver.
Bin / Stephan might know.
Surely the controller supports both Host and Peripheral mode.
And perhaps the other half of the disconnect here is that DWC2/DWC3 at least behave in U-Boot as Marek is asking.
Signature · 1 line
Tom
PATCH v4 2/2 arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
In reply to Julien PanisUSB0 dual-role feature is now handled as peripheral only in ti-musb driver.
--- arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/dts/am335x-evm-u-boot.dtsi +0 -4
@@ -23,10 +23,6 @@ status = "disabled"; }; -&usb0 { - dr_mode = "peripheral"; -}; - &i2c0 { bootph-all; };
Signature · 1 line
2.37.3
Re: [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
Quoted 27 lines · Julien Panis
USB0 dual-role feature is now handled as peripheral only in ti-musb driver.
Signed-off-by Julien Panis <[email protected]>--- arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-)arch/arm/dts/am335x-evm-u-boot.dtsi +0
-4@@ -23,10 +23,6 @@ status = "disabled"; }; -&usb0 { - dr_mode = "peripheral"; -}; - &i2c0 { bootph-all; };Signature · 2 lines
-- 2.37.3
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Hi Julien,
Quoted 26 lines · Julien Panis
This series fixes the "No USB device found" error for am335x-icev2 and am335x-evmsk. USB0 dual-role feature is now handled as peripheral only in the driver.
The error was not produced for am335x-evm because usb0
dr_modewas configured as peripheral in 'am335x-evm-u-boot.dtsi'. This fragment is no longer needed.Signed-off-by Julien Panis <[email protected]>---
Changes in v4:
- Handle usb dual-role feature as peripheral in ti-musb driver.
- Link to v3: https://lore.kernel.org/r/[email protected]Changes in v3:
- Remove usb0dr_modeconfiguration from 'am335x-evm-u-boot.dtsi'.
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- Drop the modification made inarch/arm/mach-omap2/am33xx/board.c
- Configure usb0dr_modeas peripheral in 'am335x-icev2-u-boot.dtsi'
and 'am335x-evmsk-u-boot.dtsi' device trees.
- Link to v1: https://lore.kernel.org/r/[email protected]
Quoted 4 lines
---
Julien Panis (2):
musb-new: ti-musb: Handle usb dual-role feature as peripheral
arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
for this series:
I also see other boards doing the wrong thing. i.e. replacing 'otg' with 'peripheral'.
dra71-evm-u-boot.dtsi: dr_mode = "peripheral";dra72-evm-revc-u-boot.dtsi: dr_mode = "peripheral";dra72-evm-u-boot.dtsi: dr_mode = "peripheral";dra76-evm-u-boot.dtsi: dr_mode = "peripheral";dra7-evm-u-boot.dtsi: dr_mode = "peripheral";k3-am642-evm-u-boot.dtsi: dr_mode="peripheral";k3-am654-r5-base-board-u-boot.dtsi: dr_mode = "peripheral";k3-am654-r5-base-board-u-boot.dtsi: dr_mode = "peripheral";k3-j7200-common-proc-board-u-boot.dtsi: dr_mode = "peripheral";k3-j721e-common-proc-board-u-boot.dtsi: dr_mode = "peripheral";keystone-k2e-evm-u-boot.dtsi: dr_mode = "peripheral";
Is this something you can fix (in dwc3 driver) as it is on similar lines ;). Thanks!
Signature · 2 lines
cheers, -roger