mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports
@ 2026-11-19 18:13 Akash Kumar
  2026-11-19 18:13 ` [PATCH 1/2] arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C muxing Akash Kumar
  2026-11-19 18:13 ` [PATCH 2/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar
  0 siblings, 2 replies; 3+ messages in thread
From: Akash Kumar @ 2026-11-19 18:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, linux-arm-msm, devicetree

This series wires up the CYPD6129 UCSI PD controller on the LeMans
Draco EVK carrier board, enabling USB Type-C role switching and
SuperSpeed/HS muxing on both USB-C connectors.

Patch 1 adds the shared OF graph port placeholders and
usb-role-switch on usb_1 in lemans.dtsi, and drops the fixed
dr_mode = "host" override in the Draco SoM now that the port's mode
is determined by the role switch instead.

Patch 2 adds the CYPD6129 controller, reached through a PCA9546 I2C
mux on i2c11, and hooks up its two Type-C connectors to the usb_1
HS/SS endpoints introduced in patch 1.

Akash Kumar (2):
  arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C
    muxing
  arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports

 arch/arm64/boot/dts/qcom/lemans-draco-evk.dts | 110 ++++++++++++++++++
 .../arm64/boot/dts/qcom/lemans-draco-som.dtsi |   2 -
 arch/arm64/boot/dts/qcom/lemans.dtsi          |  20 ++++
 3 files changed, 130 insertions(+), 2 deletions(-)
---

base-commit: 42c51622f624d32187e9a833178830718de18ade
change-id: 20261119-lemans-draco-cypd6129-v1
---
2.43.0


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

* [PATCH 1/2] arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C muxing
  2026-11-19 18:13 [PATCH 0/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar
@ 2026-11-19 18:13 ` Akash Kumar
  2026-11-19 18:13 ` [PATCH 2/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar
  1 sibling, 0 replies; 3+ messages in thread
From: Akash Kumar @ 2026-11-19 18:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, linux-arm-msm, devicetree

Add an OF graph "ports" node under usb_1 with HS and SS endpoint
placeholders, and enable usb-role-switch, so board files can hook up
a UCSI PD controller to drive Type-C role switching and SS/HS muxing.

Drop the fixed dr_mode = "host" override on usb_1 in the Draco SoM,
since the port's mode will now be determined by the role switch
instead of being pinned to host.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 .../arm64/boot/dts/qcom/lemans-draco-som.dtsi |  2 --
 arch/arm64/boot/dts/qcom/lemans.dtsi          | 20 +++++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/lemans-draco-som.dtsi b/arch/arm64/boot/dts/qcom/lemans-draco-som.dtsi
index 1001b6b81c31..6861cccabb2f 100644
--- a/arch/arm64/boot/dts/qcom/lemans-draco-som.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans-draco-som.dtsi
@@ -384,8 +384,6 @@ &usb_0_qmpphy {
 };
 
 &usb_1 {
-	dr_mode = "host";
-
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 20f329c0df75..0c24e5438935 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -3024,9 +3024,29 @@ usb_1: usb@a800000 {
 			snps,dis-u1-entry-quirk;
 			snps,dis-u2-entry-quirk;
 
+			usb-role-switch;
 			dma-coherent;
 
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usb_1_dwc3_hs: endpoint {
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					usb_1_dwc3_ss: endpoint {
+					};
+				};
+			};
 		};
 
 		usb_2: usb@a400000 {
-- 
2.43.0


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

* [PATCH 2/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports
  2026-11-19 18:13 [PATCH 0/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar
  2026-11-19 18:13 ` [PATCH 1/2] arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C muxing Akash Kumar
@ 2026-11-19 18:13 ` Akash Kumar
  1 sibling, 0 replies; 3+ messages in thread
From: Akash Kumar @ 2026-11-19 18:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-kernel, linux-arm-msm, devicetree

Add the CYPD6129 UCSI PD controller, reached through a PCA9546 I2C
mux on i2c11, for the two USB Type-C connectors on the Draco EVK
carrier board. Hook up its OF graph connectors to the usb_1 HS/SS
endpoints to drive Type-C role switching and SuperSpeed/HS muxing.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/lemans-draco-evk.dts | 110 ++++++++++++++++++
 1 file changed, 110 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
index 7ac3a867d29a..fe7c676b8035 100644
--- a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
@@ -4,6 +4,7 @@
  */
 /dts-v1/;
 
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pwm/pwm.h>
 #include "lemans-draco-som.dtsi"
 
@@ -351,6 +352,89 @@ queue3 {
 	};
 };
 
+&i2c11 {
+	status = "okay";
+
+	i2c-mux@70 {
+		compatible = "nxp,pca9546";
+		reg = <0x70>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		i2c@3 {
+			reg = <3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			typec@40 {
+				compatible = "cypress,cypd6229", "cypress,cypd6129";
+				reg = <0x40>;
+				interrupts-extended = <&pmm8654au_2_gpios 5 IRQ_TYPE_LEVEL_LOW>;
+				pinctrl-0 = <&usb0_intr_state>;
+				pinctrl-names = "default";
+				wakeup-source;
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				connector@0 {
+					compatible = "usb-c-connector";
+					reg = <0>;
+					label = "USB0-Type-C";
+					data-role = "dual";
+					power-role = "dual";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+							ucsi_ccg_port0_hs: endpoint {
+								remote-endpoint = <&usb_0_dwc3_hs>;
+							};
+						};
+
+						port@1 {
+							reg = <1>;
+							ucsi_ccg_port0_ss: endpoint {
+								remote-endpoint = <&usb_0_dwc3_ss>;
+							};
+						};
+					};
+				};
+
+				connector@1 {
+					compatible = "usb-c-connector";
+					reg = <1>;
+					label = "USB1-Type-C";
+					data-role = "dual";
+					power-role = "dual";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+							ucsi_ccg_port1_hs: endpoint {
+								remote-endpoint = <&usb_1_dwc3_hs>;
+							};
+						};
+
+						port@1 {
+							reg = <1>;
+							ucsi_ccg_port1_ss: endpoint {
+								remote-endpoint = <&usb_1_dwc3_ss>;
+							};
+						};
+					};
+				};
+			};
+		};
+	};
+};
+
 &i2c18 {
 	status = "okay";
 
@@ -636,6 +720,16 @@ pcie@0,1 {
 	};
 };
 
+&pmm8654au_2_gpios {
+	usb0_intr_state: usb0-intr-state {
+		pins = "gpio5";
+		function = "normal";
+		input-enable;
+		bias-pull-up;
+		power-source = <0>;
+	};
+};
+
 &qup_i2c4_default {
 	drive-strength = <6>;
 	bias-pull-up;
@@ -776,3 +870,19 @@ uart17_ep: endpoint {
 		};
 	};
 };
+
+&usb_0_dwc3_hs {
+	remote-endpoint = <&ucsi_ccg_port0_hs>;
+};
+
+&usb_0_dwc3_ss {
+	remote-endpoint = <&ucsi_ccg_port0_ss>;
+};
+
+&usb_1_dwc3_hs {
+	remote-endpoint = <&ucsi_ccg_port1_hs>;
+};
+
+&usb_1_dwc3_ss {
+	remote-endpoint = <&ucsi_ccg_port1_ss>;
+};
-- 
2.43.0


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

end of thread, other threads:[~2026-11-19 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 18:13 [PATCH 0/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar
2026-11-19 18:13 ` [PATCH 1/2] arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C muxing Akash Kumar
2026-11-19 18:13 ` [PATCH 2/2] arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports Akash Kumar

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

all inboxes | Powered by JetHome®