* [PATCH] arm64: dts: qcom: glymur: Add mode-switch to the USB controllers
@ 2026-11-17 11:38 Tapas Rana
2026-11-17 11:47 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Tapas Rana @ 2026-11-17 11:38 UTC (permalink / raw)
To: andersson, konradybcio
Cc: robh, krzk+dt, conor+dt, abel.vesa, dmitry.baryshkov,
konrad.dybcio, 26rote, linux-arm-msm, devicetree, linux-kernel,
Tapas Rana
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.
Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
---
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/20261112113838.506-1-26rote@gmail.com/
arch/arm64/boot/dts/qcom/glymur.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qcom/glymur.dtsi
index 65a398c0a992..e9469bb7a832 100644
--- a/arch/arm64/boot/dts/qcom/glymur.dtsi
+++ b/arch/arm64/boot/dts/qcom/glymur.dtsi
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: dts: qcom: glymur: Add mode-switch to the USB controllers
2026-11-17 11:38 [PATCH] arm64: dts: qcom: glymur: Add mode-switch to the USB controllers Tapas Rana
@ 2026-11-17 11:47 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-17 11:47 UTC (permalink / raw)
To: Tapas Rana; +Cc: devicetree, robh, conor+dt
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 <tapas.rana@oss.qualcomm.com>
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.
> diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qcom/glymur.dtsi
> index 65a398c0a9920..e9469bb7a8326 100644
> --- a/arch/arm64/boot/dts/qcom/glymur.dtsi
> +++ b/arch/arm64/boot/dts/qcom/glymur.dtsi
> @@ -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.
> @@ -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.
> @@ -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.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117113834.925310-1-tapas.rana@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 11:38 [PATCH] arm64: dts: qcom: glymur: Add mode-switch to the USB controllers Tapas Rana
2026-11-17 11:47 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox