arm64: dts: qcom: glymur: Add mode-switch to the USB controllers
PATCH 1/1 arm64: dts: qcom: glymur: Add mode-switch to the USB controllers
When the USB3-DP combo PHY is a mode switch, DisplayPort pin assignments C and E put it in DP-only mode, where it stops the USB3 PIPE clock. Add mode-switch to the USB controllers as well, so that they get the Type-C mode, move to the UTMI clock first and keep their USB 2.0 ports working.
---
Depends on Joonhoe Kim's dwc3 mode-switch series, which adds the mode-switch binding and registers the controller as a Type-C mux in dwc3-qcom. Without it, pmic_glink_altmode defers its probe indefinitely:
https://lore.kernel.org/all/[email protected]/
arch/arm64/boot/dts/qcom/glymur.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/qcom/glymur.dtsi +3 -0
@@ -4998,6 +4998,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
@@ -5088,6 +5089,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
@@ -5178,6 +5180,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] arm64: dts: qcom: glymur: mode-switch on usb_0/1/2 defers pmic_glink_altmode - [Low] arm64: dts…
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider:
- [High] arm64: dts: qcom: glymur: mode-switch on usb_0/1/2 defers pmic_glink_altmode
- [Low] arm64: dts: qcom: glymur: undocumented mode-switch violates qcom,snps-dwc3.yaml
- [Low] arm64: dts: qcom: glymur: usb_2 retains mode-switch on ThinkPad T14s Gen 7
--
commit e8839a36fb73b72bbb31e50290cbe000b0e68876
Author: Tapas Rana <[email protected]>
arm64: dts: qcom: glymur: Add mode-switch to the USB controllers
This commit adds the mode-switch property to the usb_0, usb_1, and usb_2 controller nodes in glymur.dtsi so they receive Type-C mode updates.
arch/arm64/boot/dts/qcom/glymur.dtsi &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, · line 5004
Quoted 12 lines
arch/arm64/boot/dts/qcom/glymur.dtsi +1
-0@@ -4998,6 +4998,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
[Severity: High]
Does adding mode-switch to usb_0, usb_1, and usb_2 without Type-C mux registration in dwc3-qcom cause pmic_glink_altmode_probe() to defer indefinitely?
On Glymur and Mahua boards, each usb-c-connector links its high-speed endpoint to usb_0, usb_1, or usb_2. When pmic_glink_altmode_probe() calls fwnode_typec_mux_get(), typec_mux_match() sees mode-switch on the controller node and looks up a matching device in typec_mux_class. Because dwc3-qcom does not call typec_mux_register() in this tree, typec_mux_match() returns ERR_PTR(-EPROBE_DEFER), breaking Type-C alternate modes, orientation switching, and DisplayPort HPD on all Glymur and Mahua boards until the dwc3-qcom support is present.
arch/arm64/boot/dts/qcom/glymur.dtsi &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, · line 5095
Quoted 8 lines
arch/arm64/boot/dts/qcom/glymur.dtsi +1
-0@@ -5088,6 +5089,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
[Severity: Low]
Does adding mode-switch to usb_0, usb_1, and usb_2 fail dtbs_check against Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml?
The qcom,snps-dwc3 binding sets unevaluatedProperties: false and neither it nor the referenced snps,dwc3-common.yaml defines mode-switch.
arch/arm64/boot/dts/qcom/glymur.dtsi &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, · line 5185
Quoted 7 lines
arch/arm64/boot/dts/qcom/glymur.dtsi +1
-0@@ -5178,6 +5180,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; + mode-switch; usb-role-switch; wakeup-source;
[Severity: Low]
Should mahua-lenovo-thinkpad-t14s-gen7-lcd.dts delete mode-switch on usb_2 alongside usb-role-switch?
That board overrides &usb_2 as a fixed USB 2.0 host controller for an internal fingerprint reader without a USB3-DP combo PHY or Type-C connector, and already uses /delete-property/ usb-role-switch.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1