public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc8280xp: Enable USB OTG on functional Type-C ports
@ 2026-03-13 14:08 Konrad Dybcio
  2026-03-13 14:37 ` Dmitry Baryshkov
  0 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2026-03-13 14:08 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

The two non-multiport USB controllers present on the platform are
role-switch capable, so mark them as such. They need no additional
plumbing, as tested on the X13s.

Enable OTG for all devices featuring a data-role provider in one fell
swoop to prevent hitting the edge case where UCSI code would time out
trying to get a reference to a struct usb_role_switch, which wouldn't
be registered if dr_mode was set to anything other than (the default)
OTG.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts                  | 8 --------
 arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts       | 8 --------
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 8 --------
 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts     | 8 --------
 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts  | 8 --------
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi                     | 4 ++++
 6 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index c53e00cae465..3acb63017fe3 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -819,10 +819,6 @@ &usb_0 {
 	status = "okay";
 };
 
-&usb_0_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_0_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con0_hs>;
 };
@@ -856,10 +852,6 @@ &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con1_hs>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
index 9819454abe13..e4513b66261b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
@@ -1132,10 +1132,6 @@ &usb_0 {
 	status = "okay";
 };
 
-&usb_0_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_0_dwc3_hs {
 	remote-endpoint = <&ucsi0_hs_in>;
 };
@@ -1169,10 +1165,6 @@ &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&ucsi1_hs_in>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index d84ca010ab9d..f83947c8b1b8 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -1341,10 +1341,6 @@ &usb_0 {
 	status = "okay";
 };
 
-&usb_0_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_0_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con0_hs>;
 };
@@ -1379,10 +1375,6 @@ &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con1_hs>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
index f2b4470d4407..82ad20c5c7a4 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
@@ -758,10 +758,6 @@ &usb_0 {
 	status = "okay";
 };
 
-&usb_0_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_0_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con0_hs>;
 };
@@ -795,10 +791,6 @@ &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con1_hs>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
index 00bbeeef6f14..1effb30c93af 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
@@ -986,10 +986,6 @@ &usb_0 {
 	status = "okay";
 };
 
-&usb_0_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_0_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con0_hs>;
 };
@@ -1023,10 +1019,6 @@ &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "host";
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_con1_hs>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 58876b25dd23..6303a0d572f2 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -4080,6 +4080,8 @@ usb_0_dwc3: usb@a600000 {
 				snps,dis-u1-entry-quirk;
 				snps,dis-u2-entry-quirk;
 
+				usb-role-switch;
+
 				ports {
 					#address-cells = <1>;
 					#size-cells = <0>;
@@ -4159,6 +4161,8 @@ usb_1_dwc3: usb@a800000 {
 				snps,dis-u1-entry-quirk;
 				snps,dis-u2-entry-quirk;
 
+				usb-role-switch;
+
 				ports {
 					#address-cells = <1>;
 					#size-cells = <0>;

---
base-commit: 5c9e55fecf9365890c64f14761a80f9413a3b1d1
change-id: 20260311-topic-x13s_otg-51ff8ae0ca37

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-25 22:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 14:08 [PATCH] arm64: dts: qcom: sc8280xp: Enable USB OTG on functional Type-C ports Konrad Dybcio
2026-03-13 14:37 ` Dmitry Baryshkov
2026-03-19 14:45   ` Konrad Dybcio
2026-03-25 12:22     ` Konrad Dybcio
2026-03-25 22:56     ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox