Skip to contentSkip to conversation

Fix 'no USB device found' error.

PATCH Superseded Julien Panis 5 participants 13 messages Jun 22, 2023 – Jul 6, 2023 Arm (32-bit)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Fix 'no USB device found' error.

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

 arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
 arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
 2 files changed, 8 insertions(+)

---
base-commit: 19b77d3d23966a0d6dbb3c86187765f11100fb6f
change-id: 20230621-fix_usb_ether_init-4bf4f1135113

Best regards,

Signature · 1 line
Julien Panis <[email protected]>
#1 lore raw

PATCH v2 1/2 arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0

This patch configures usb0 dr_mode as peripheral
on am335x-icev2 board.

---
 arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/am335x-icev2-u-boot.dtsi +4 -0
index 67bfac916eee..7dcd5ec00605 100644
@@ -22,3 +22,7 @@
 		xtal-load-pf = <0>;
 	};
 };
+
+&usb0 {
+	dr_mode = "peripheral";
+};
Signature · 1 line
2.37.3
#2 lore raw

PATCH v2 2/2 arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

In reply to Julien Panis

This patch configures usb0 dr_mode as peripheral
on am335x-evmsk board.

---
 arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/am335x-evmsk-u-boot.dtsi +4 -0
index 669cb6bf1655..010005c45091 100644
@@ -20,3 +20,7 @@
 		};
 	};
 };
+
+&usb0 {
+	dr_mode = "peripheral";
+};
Signature · 1 line
2.37.3
#3 lore raw
In reply to Julien Panis
Quoted 13 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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]

Quoted 8 lines

---
Julien Panis (2):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

 arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
 arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
 2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

Signature · 1 line
Tom
#4 lore raw
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
  arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
  arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
  2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

#5 lore raw
Quoted 29 lines · Julien Panis
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
  arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
  arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
  2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

Quoted 8 lines

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

It's I think even more likely that the am335x_evm fragment needs to go upstream too.

Signature · 1 line
Tom
#6 lore raw
Quoted 39 lines · Tom Rini
Quoted 29 lines · Julien Panis
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
  arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
  arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
  2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

Quoted 8 lines

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

Quoted 2 lines

It's I think even more likely that the am335x_evm fragment needs to go upstream too.

Adding Tony to the thread, but I think it is better to send the changes to upstream kernel.

--
Regards
Nishanth Menon

#7 lore raw
Quoted 40 lines · Nishanth Menon
Quoted 36 lines · Tom Rini
Quoted 27 lines · Julien Panis
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
   arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
   arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
   2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

Quoted 8 lines

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

Quoted 2 lines

It's I think even more likely that the am335x_evm fragment needs to go upstream too.

Quoted 6 lines

Adding Tony to the thread, but I think it is better to send the changes to upstream kernel.

--
Regards
Nishanth Menon

OK, thanks.
So I will send a series to linux (usb0 configured as peripheral for the 3 boards). Then, I will send a patch to remove usb0 node from 'am335x-evm-u-boot.dtsi'.

Julien Panis

#8 lore raw
In reply to Nishanth Menon
Quoted 40 lines · Nishanth Menon
Quoted 39 lines · Tom Rini
Quoted 37 lines · Julien Panis
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
  arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
  arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
  2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

Quoted 6 lines
Quoted 2 lines

It's I think even more likely that the am335x_evm fragment needs to go upstream too.

Adding Tony to the thread, but I think it is better to send the changes to upstream kernel.

Linux DT files are correct. USB0 is a dual-role port so it sets it to 'otg'. u-boot doesn't support 'otg' so we need to override it to 'peripheral' in -u-boot.dtsi

Signature · 2 lines
cheers,
-roger
#9 lore raw
Quoted 46 lines · Roger Quadros
Quoted 43 lines · Nishanth Menon
Quoted 41 lines · Tom Rini
Quoted 29 lines · Julien Panis
Quoted 19 lines · Tom Rini
Quoted 18 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

Quoted 6 lines
Quoted 3 lines
  arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
  arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
  2 files changed, 8 insertions(+)

I'll ask the first question that Nishanth might also ask, which is why don't these belong in the kernel dts files? Thanks!

Quoted 8 lines

That's a good question. :) Looping Nishanth...
usb0 dr_mode property is already overlayed for am335x-evm, in 'am335x-evm-u-boot.dtsi'. So, it appeared more consistent to me to do the same thing for am335x-icev2 and am335x-evmsk. I guess that the goal is to configure usb0 as host by default at kernel boot, since we do not necessarily want to use this usb0 as peripheral from userspace.
Is it the right explanation @Vignesh @Nishanth ?

It's I think even more likely that the am335x_evm fragment needs to go upstream too.

Quoted 6 lines
Quoted 3 lines

Adding Tony to the thread, but I think it is better to send the changes to upstream kernel.

Linux DT files are correct. USB0 is a dual-role port so it sets it to 'otg'. u-boot doesn't support 'otg' so we need to override it to 'peripheral' in -u-boot.dtsi

Ah, thanks, that was the missing bit of background information.

Signature · 1 line
Tom
#10 lore raw
Quoted 5 lines · Tom Rini
Quoted 2 lines · Roger Quadros

Linux DT files are correct. USB0 is a dual-role port so it sets it to 'otg'. u-boot doesn't support 'otg' so we need to override it to 'peripheral' in -u-boot.dtsi

Ah, thanks, that was the missing bit of background information.

It would be best to parse dual-role feature in the driver to handle it as peripheral only and keep the dts the same.

Regards,

Tony

#11 lore raw
Quoted 9 lines · Tony Lindgren
Quoted 5 lines · Tom Rini
Quoted 2 lines · Roger Quadros

Linux DT files are correct. USB0 is a dual-role port so it sets it to 'otg'. u-boot doesn't support 'otg' so we need to override it to 'peripheral' in -u-boot.dtsi

Ah, thanks, that was the missing bit of background information.

It would be best to parse dual-role feature in the driver to handle it as peripheral only and keep the dts the same.

+1

Signature · 2 lines
cheers,
-roger
Reviewed-by on the v2 series
#12 lore raw
In reply to Julien Panis
Quoted 13 lines · Julien Panis

This series fixes usb0 dr_mode for am335x-icev2
and am335x-evmsk. It must be set to 'peripheral'
in order to avoid 'no USB device found' error,
in usb_ether_init() function.

---
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]

Quoted 8 lines

---
Julien Panis (2):
arm: dts: am335x-icev2-u-boot: Configure peripheral mode for usb0
arm: dts: am335x-evmsk-u-boot: Configure peripheral mode for usb0

 arch/arm/dts/am335x-evmsk-u-boot.dtsi | 4 ++++
 arch/arm/dts/am335x-icev2-u-boot.dtsi | 4 ++++
 2 files changed, 8 insertions(+)

For this series:

Signature · 2 lines
cheers,
-roger