Skip to contentSkip to conversation

arm64: dts: qcom: x1e80100-crd: enable otg on usb ports

PATCH Superseded Jonathan Marek 2 participants 3 messages Oct 11, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm64: dts: qcom: x1e80100-crd: enable otg on usb ports

The 3 USB ports on x1e80100-crd are OTG-capable, change dr_mode and add usb-role-switch flag to enable OTG.

---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +6 -3
index 6dfc85eda3540..53e76b3f0c831 100644
@@ -1558,7 +1558,8 @@ &usb_1_ss0 {
 };
 
 &usb_1_ss0_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss0_dwc3_hs {
@@ -1590,7 +1591,8 @@ &usb_1_ss1 {
 };
 
 &usb_1_ss1_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss1_dwc3_hs {
@@ -1622,7 +1624,8 @@ &usb_1_ss2 {
 };
 
 &usb_1_ss2_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss2_dwc3_hs {
Signature · 1 line
2.45.1
#1 lore raw

PATCH 2/2 arm64: dts: qcom: x1e78100-t14s: enable otg on usb-c ports

The 2 USB-C ports on x1e78100-t14s are OTG-capable, change dr_mode and add usb-role-switch flag to enable OTG.

---
 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +4 -2
index 08ec2419f95fc..8579c45dcb0a4 100644
@@ -1033,7 +1033,8 @@ &usb_1_ss0 {
 };
 
 &usb_1_ss0_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss0_dwc3_hs {
@@ -1065,7 +1066,8 @@ &usb_1_ss1 {
 };
 
 &usb_1_ss1_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss1_dwc3_hs {
Signature · 1 line
2.45.1
#2 lore raw
In reply to Jonathan Marek
Quoted 13 lines · Jonathan Marek

The 3 USB ports on x1e80100-crd are OTG-capable, change dr_mode and add usb-role-switch flag to enable OTG.

---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +0 -0
index 6dfc85eda3540..53e76b3f0c831 100644

arch/arm64/boot/dts/qcom/x1e80100-crd.dts &usb_1_ss0 { · line 1561

Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +1 -1
@@ -1558,7 +1558,8 @@ &usb_1_ss0 {
 };
 
 &usb_1_ss0_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";

There should be no need to specify "otg", it is a default if I remember correctly.

arch/arm64/boot/dts/qcom/x1e80100-crd.dts &usb_1_ss0 { · line 1562

Quoted 1 line
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +1 -0
+	usb-role-switch;

Please move usb-role-switch to the x1e80100.dtsi instead.

Quoted 26 lines
arch/arm64/boot/dts/qcom/x1e80100-crd.dts +4 -2
 };
 
 &usb_1_ss0_dwc3_hs {
@@ -1590,7 +1591,8 @@ &usb_1_ss1 {
 };
 
 &usb_1_ss1_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss1_dwc3_hs {
@@ -1622,7 +1624,8 @@ &usb_1_ss2 {
 };
 
 &usb_1_ss2_dwc3 {
-	dr_mode = "host";
+	dr_mode = "otg";
+	usb-role-switch;
 };
 
 &usb_1_ss2_dwc3_hs {
Signature · 1 line
2.45.1
Signature · 2 lines
With best wishes
Dmitry