Skip to contentSkip to conversation

arm64: dts: ti: k3-am62-main: disable usb lpm

PATCH Applied Andrejs Cainikovs 5 participants 8 messages Feb 9, 2024 – Feb 15, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: ti: k3-am62-main: disable usb lpm

From: Andrejs Cainikovs <[email protected]>

AM62 USB works with some devices, while failing to operate with others.

[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

This seems to be related to LPM (Link Power Management), and disabling it turns USB into reliable working state.

As per AM62 reference manual:

Quoted 6 lines

4.8.2.1 USB2SS Unsupported Features

The following features are not supported on this family of devices:
...
- USB 2.0 ECN: Link Power Management (LPM)
...

Fixes 2240f96cf3cd ("arm64: dts: ti: k3-am62-main: Add support for USB")
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +4 -0
index 464b7565d085..c49fbce5cb70 100644
@@ -640,6 +640,8 @@ usb0: usb@31000000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 
@@ -663,6 +665,8 @@ usb1: usb@31100000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 
Signature · 1 line
2.34.1
#1 lore raw

Hi Andrejs,

Quoted 3 lines · Andrejs Cainikovs

From: Andrejs Cainikovs <[email protected]>

AM62 USB works with some devices, while failing to operate with others.

Could you please share which devices failed to work for you?

Quoted 39 lines
[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

This seems to be related to LPM (Link Power Management), and disabling it turns USB into reliable working state.

As per AM62 reference manual:

Quoted 6 lines

4.8.2.1 USB2SS Unsupported Features

The following features are not supported on this family of devices:
...
- USB 2.0 ECN: Link Power Management (LPM)
...

Fixes 2240f96cf3cd ("arm64: dts: ti: k3-am62-main: Add support for USB")
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
index 464b7565d085..c49fbce5cb70 100644
@@ -640,6 +640,8 @@ usb0: usb@31000000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 

arch/arm64/boot/dts/ti/k3-am62-main.dtsi usb1: usb@31100000 { · line 672

Quoted 8 lines
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
@@ -663,6 +665,8 @@ usb1: usb@31100000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 

Instead of this could you please check if this series fixes the issue for you?
https://lore.kernel.org/all/[email protected]/

Signature · 2 lines
cheers,
-roger
#2 lore raw

Hello Roger,

Quoted 14 lines · Roger Quadros

arch/arm64/boot/dts/ti/k3-am62-main.dtsi usb1: usb@31100000 { · line 669

Quoted 10 lines · Andrejs Cainikovs
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
index 464b7565d085..c49fbce5cb70 100644
@@ -663,6 +665,8 @@ usb1: usb@31100000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;

Instead of this could you please check if this series fixes the issue for you?
https://lore.kernel.org/all/[email protected]/

Isn't this change correct despite whatever the test results on that change are going to be? The manual is pretty adamant on LPM not being supported by the AM62 SoC.

Francesco

#3 lore raw
Quoted 18 lines · Francesco Dolcini

Hello Roger,

Quoted 14 lines · Roger Quadros

arch/arm64/boot/dts/ti/k3-am62-main.dtsi usb1: usb@31100000 { · line 669

Quoted 10 lines · Andrejs Cainikovs
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
index 464b7565d085..c49fbce5cb70 100644
@@ -663,6 +665,8 @@ usb1: usb@31100000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;

Instead of this could you please check if this series fixes the issue for you?
https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

Isn't this change correct despite whatever the test results on that change are going to be? The manual is pretty adamant on LPM not being supported by the AM62 SoC.

You are right. We should have this in regardless.

Signature · 2 lines
cheers,
-roger
#4 lore raw
In reply to Roger Quadros
Quoted 8 lines · Roger Quadros

Hi Andrejs,

Quoted 3 lines · Andrejs Cainikovs

From: Andrejs Cainikovs <[email protected]>

AM62 USB works with some devices, while failing to operate with others.

Could you please share which devices failed to work for you?

Hi Roger,

This USB memory stick is the one that is failing most of the time:
ID 058f:6387 Alcor Micro Corp. Flash Drive (DigiKey 1GB)

I used following test to reproduce the issue: boot without any devices connected, once booted - connect to PC for gadget mode (RNDIS), and then unplug cable and connect USB drive.

I did not had any failures with this USB memory stick, btw:
ID 0951:1643 Kingston Technology DataTraveler G3

/Andrejs

Quoted 38 lines
Quoted 38 lines
[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

This seems to be related to LPM (Link Power Management), and disabling it turns USB into reliable working state.

As per AM62 reference manual:

Quoted 6 lines

4.8.2.1 USB2SS Unsupported Features

The following features are not supported on this family of devices:
...
- USB 2.0 ECN: Link Power Management (LPM)
...

Fixes 2240f96cf3cd ("arm64: dts: ti: k3-am62-main: Add support for USB")
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
index 464b7565d085..c49fbce5cb70 100644
@@ -640,6 +640,8 @@ usb0: usb@31000000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 
Quoted 13 lines

arch/arm64/boot/dts/ti/k3-am62-main.dtsi usb1: usb@31100000 { · line 672

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -0
@@ -663,6 +665,8 @@ usb1: usb@31100000 {
 			interrupt-names = "host", "peripheral";
 			maximum-speed = "high-speed";
 			dr_mode = "otg";
+			snps,usb2-gadget-lpm-disable;
+			snps,usb2-lpm-disable;
 		};
 	};
 

Instead of this could you please check if this series fixes the issue for you?
https://lore.kernel.org/all/[email protected]/

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 1/1
#5 lore raw
In reply to Andrejs Cainikovs
Quoted 17 lines · Andrejs Cainikovs

From: Andrejs Cainikovs <[email protected]>

AM62 USB works with some devices, while failing to operate with others.

[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

This seems to be related to LPM (Link Power Management), and disabling it turns USB into reliable working state.

As per AM62 reference manual:

Quoted 2 lines

4.8.2.1 USB2SS Unsupported Features

Quoted 7 lines
Quoted 4 lines

The following features are not supported on this family of devices:
...
- USB 2.0 ECN: Link Power Management (LPM)
...

Fixes 2240f96cf3cd ("arm64: dts: ti: k3-am62-main: Add support for USB")

Francesco

Reviewed-by on v1 1/1
#6 lore raw
In reply to Andrejs Cainikovs
Quoted 17 lines · Andrejs Cainikovs

From: Andrejs Cainikovs <[email protected]>

AM62 USB works with some devices, while failing to operate with others.

[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

This seems to be related to LPM (Link Power Management), and disabling it turns USB into reliable working state.

As per AM62 reference manual:

Quoted 2 lines

4.8.2.1 USB2SS Unsupported Features

Quoted 7 lines
Quoted 4 lines

The following features are not supported on this family of devices:
...
- USB 2.0 ECN: Link Power Management (LPM)
...

Fixes 2240f96cf3cd ("arm64: dts: ti: k3-am62-main: Add support for USB")
maintainer Applied
#7 lore raw
In reply to Andrejs Cainikovs

Hi Andrejs Cainikovs,

Quoted 9 lines · Andrejs Cainikovs

AM62 USB works with some devices, while failing to operate with others.

[  560.189822] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  560.195631] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 2
[  574.388509] xhci-hcd xhci-hcd.4.auto: can't setup: -110
[  574.393814] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  574.399544] xhci-hcd: probe of xhci-hcd.4.auto failed with error -110

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/1] arm64: dts: ti: k3-am62-main: disable usb lpm

      commit: 576ad1d1d8b12a632598f7963d640f9422781f9a

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh