arm64: dts: qcom: x1e80100: fix USB OTG regressions
v3 cover arm64: dts: qcom: x1e80100: fix USB OTG regressions
A recent change enabling OTG mode on the Lenovo ThinkPad T14s USB-C ports can break SuperSpeed device hotplugging.
Abel noticed that the corresponding commit for the CRD also triggers a hard reset during resume from suspend.
Dmitry had already reported that enabling role switching can break UCSI.
With retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
Note that Stephan has also identified other problems with the offending commits here:
https://lore.kernel.org/all/[email protected]/
Johan
Changes in v3
- revert also the dtsi change that enable role-switching since it breaks UCSI (and DisplayPort alt mode) when the controllers are in host mode
Changes in v2
- revert also the corresponding patch for the CRD which breaks suspend
Johan Hovold (3):
Revert "arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports" Revert "arm64: dts: qcom: x1e80100-crd: enable otg on usb ports" Revert "arm64: dts: qcom: x1e80100: enable OTG on USB-C controllers"
.../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 12 ++++++++++++ arch/arm64/boot/dts/qcom/x1e80100.dtsi | 6 ------ 3 files changed, 20 insertions(+), 6 deletions(-)
Signature · 1 line
2.45.2
PATCH v3 1/3 Revert "arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports"
This reverts commit 1a48dd7b9ac809d1bd0fd2fef509abba83433846.
A recent change enabling OTG mode on the Lenovo ThinkPad T14s USB-C ports can break SuperSpeed device hotplugging. The host controller is enumerated, but the device is not:
xhci-hcd xhci-hcd.5.auto: xHCI Host Controller xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 3 xhci-hcd xhci-hcd.5.auto: hcc params 0x0110ffc5 hci version 0x110 quirks 0x000080a000000810 xhci-hcd xhci-hcd.5.auto: irq 247, io mem 0x0a800000 xhci-hcd xhci-hcd.5.auto: xHCI Host Controller xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 4 xhci-hcd xhci-hcd.5.auto: Host supports USB 3.1 Enhanced SuperSpeed hub 3-0:1.0: USB hub found hub 3-0:1.0: 1 port detected hub 4-0:1.0: USB hub found hub 4-0:1.0: 1 port detected
Once this happens on either of the two ports, no amount of disconnecting and reconnecting makes the SuperSpeed device be enumerated, while FullSpeed device enumeration still works.
With retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
--- .../arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +8 -0
@@ -1515,6 +1515,10 @@ &usb_1_ss0 { status = "okay"; }; +&usb_1_ss0_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss0_dwc3_hs { remote-endpoint = <&pmic_glink_ss0_hs_in>; };
@@ -1543,6 +1547,10 @@ &usb_1_ss1 { status = "okay"; }; +&usb_1_ss1_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss1_dwc3_hs { remote-endpoint = <&pmic_glink_ss1_hs_in>; };
Signature · 1 line
2.45.2
Re: [PATCH v3 1/3] Revert "arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports"
Quoted 22 lines · Johan Hovold
This reverts commit
1a48dd7b9ac809d1bd0fd2fef509abba83433846.A recent change enabling OTG mode on the Lenovo ThinkPad T14s USB-C ports can break SuperSpeed device hotplugging. The host controller is enumerated, but the device is not:
xhci-hcd xhci-hcd.5.auto: xHCI Host Controller xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 3 xhci-hcd xhci-hcd.5.auto: hcc params 0x0110ffc5 hci version 0x110 quirks 0x000080a000000810 xhci-hcd xhci-hcd.5.auto: irq 247, io mem 0x0a800000 xhci-hcd xhci-hcd.5.auto: xHCI Host Controller xhci-hcd xhci-hcd.5.auto: new USB bus registered, assigned bus number 4 xhci-hcd xhci-hcd.5.auto: Host supports USB 3.1 Enhanced SuperSpeed hub 3-0:1.0: USB hub found hub 3-0:1.0: 1 port detected hub 4-0:1.0: USB hub found hub 4-0:1.0: 1 port detectedOnce this happens on either of the two ports, no amount of disconnecting and reconnecting makes the SuperSpeed device be enumerated, while FullSpeed device enumeration still works.
Quoted 6 lines
With retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
Fixes 1a48dd7b9ac8 ("arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports")Cc Jonathan Marek <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Quoted 33 lines
--- .../arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +8
-0@@ -1515,6 +1515,10 @@ &usb_1_ss0 { status = "okay"; }; +&usb_1_ss0_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss0_dwc3_hs { remote-endpoint = <&pmic_glink_ss0_hs_in>; };@@ -1543,6 +1547,10 @@ &usb_1_ss1 { status = "okay"; }; +&usb_1_ss1_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss1_dwc3_hs { remote-endpoint = <&pmic_glink_ss1_hs_in>; };Signature · 1 line
2.45.2
PATCH v3 2/3 Revert "arm64: dts: qcom: x1e80100-crd: enable otg on usb ports"
In reply to Johan HovoldThis reverts commit 2dd3250191bcfe93b0c9da46624af830310400a7.
A recent change enabling OTG mode on the x1e81000 CRD breaks suspend. Specifically, the device hard resets during resume if suspended with all controllers in device mode (i.e. no USB device connected).
The corresponding change on the T14s also led to SuperSpeed hotplugs not being detected.
With retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
--- arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +12 -0
@@ -1840,6 +1840,10 @@ &usb_1_ss0 { status = "okay"; }; +&usb_1_ss0_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss0_dwc3_hs { remote-endpoint = <&pmic_glink_ss0_hs_in>; };
@@ -1868,6 +1872,10 @@ &usb_1_ss1 { status = "okay"; }; +&usb_1_ss1_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss1_dwc3_hs { remote-endpoint = <&pmic_glink_ss1_hs_in>; };
@@ -1896,6 +1904,10 @@ &usb_1_ss2 { status = "okay"; }; +&usb_1_ss2_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss2_dwc3_hs { remote-endpoint = <&pmic_glink_ss2_hs_in>; };
Signature · 1 line
2.45.2
Re: [PATCH v3 2/3] Revert "arm64: dts: qcom: x1e80100-crd: enable otg on usb ports"
Quoted 9 lines · Johan Hovold
This reverts commit
2dd3250191bcfe93b0c9da46624af830310400a7.A recent change enabling OTG mode on the x1e81000 CRD breaks suspend. Specifically, the device hard resets during resume if suspended with all controllers in device mode (i.e. no USB device connected).
The corresponding change on the T14s also led to SuperSpeed hotplugs not being detected.
Quoted 7 lines
With retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
Fixes 2dd3250191bc ("arm64: dts: qcom: x1e80100-crd: enable otg on usb ports")Reported-by Abel Vesa <[email protected]>Cc Jonathan Marek <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Quoted 44 lines
--- arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm64/boot/dts/qcom/x1e80100-crd.dts +12
-0@@ -1840,6 +1840,10 @@ &usb_1_ss0 { status = "okay"; }; +&usb_1_ss0_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss0_dwc3_hs { remote-endpoint = <&pmic_glink_ss0_hs_in>; };@@ -1868,6 +1872,10 @@ &usb_1_ss1 { status = "okay"; }; +&usb_1_ss1_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss1_dwc3_hs { remote-endpoint = <&pmic_glink_ss1_hs_in>; };@@ -1896,6 +1904,10 @@ &usb_1_ss2 { status = "okay"; }; +&usb_1_ss2_dwc3 { + dr_mode = "host"; +}; + &usb_1_ss2_dwc3_hs { remote-endpoint = <&pmic_glink_ss2_hs_in>; };Signature · 1 line
2.45.2
PATCH v3 3/3 Revert "arm64: dts: qcom: x1e80100: enable OTG on USB-C controllers"
In reply to Johan HovoldThis reverts commit f042bc234c2e00764b8aa2c9e2f8177cdc63f664.
A recent change enabling role switching for the x1e80100 USB-C controllers breaks UCSI and DisplayPort Alternate Mode when the controllers are in host mode:
ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: PPM init failed, stop trying
As enabling OTG mode currently breaks SuperSpeed hotplug and suspend, and with retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 6 ------ 1 file changed, 6 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +0 -6
@@ -4422,8 +4422,6 @@ usb_1_ss2_dwc3: usb@a000000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;
@@ -4677,8 +4675,6 @@ usb_1_ss0_dwc3: usb@a600000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;
@@ -4777,8 +4773,6 @@ usb_1_ss1_dwc3: usb@a800000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.45.2
Re: [PATCH v3 3/3] Revert "arm64: dts: qcom: x1e80100: enable OTG on USB-C controllers"
Quoted 12 lines · Johan Hovold
This reverts commit
f042bc234c2e00764b8aa2c9e2f8177cdc63f664.A recent change enabling role switching for the x1e80100 USB-C controllers breaks UCSI and DisplayPort Alternate Mode when the controllers are in host mode:
ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: PPM init failed, stop trying
As enabling OTG mode currently breaks SuperSpeed hotplug and suspend, and with retimer (and orientation detection) support not even merged yet, let's revert at least until we have stable host mode in mainline.
Quoted 6 lines
Fixes f042bc234c2e ("arm64: dts: qcom: x1e80100: enable OTG on USB-C controllers")Reported-by Dmitry Baryshkov <[email protected]>Link https://lore.kernel.org/all/hw2pdof4ajadjsjrb44f2q4cz4yh5qcqz5d3l7gjt2koycqs3k@xx5xvd26uyef open hereCc Jonathan Marek <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Quoted 38 lines
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 6 ------ 1 file changed, 6 deletions(-)arch/arm64/boot/dts/qcom/x1e80100.dtsi +0
-6@@ -4422,8 +4422,6 @@ usb_1_ss2_dwc3: usb@a000000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;@@ -4677,8 +4675,6 @@ usb_1_ss0_dwc3: usb@a600000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;@@ -4777,8 +4773,6 @@ usb_1_ss1_dwc3: usb@a800000 { dma-coherent; - usb-role-switch; - ports { #address-cells = <1>; #size-cells = <0>;Signature · 1 line
2.45.2
Quoted 9 lines · Johan Hovold
A recent change enabling OTG mode on the Lenovo ThinkPad T14s USB-C ports can break SuperSpeed device hotplugging.
Abel noticed that the corresponding commit for the CRD also triggers a hard reset during resume from suspend.
Dmitry had already reported that enabling role switching can break UCSI.
[...]
Applied, thanks!
[1/3] Revert "arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports"
(no commit info)
[2/3] Revert "arm64: dts: qcom: x1e80100-crd: enable otg on usb ports"
commit: 2e5e1a7ea692dc2b9f1acf0ebeb75bc282733cac
[3/3] Revert "arm64: dts: qcom: x1e80100: enable OTG on USB-C controllers"
commit: 7db0ba3e6e6c215353c1e58b42dfd77c7ab89256Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>