From: Akash Kumar <akash.kumar@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports
Date: Thu, 20 Aug 2026 20:17:38 +0530 [thread overview]
Message-ID: <20260820145036.2035641-4-akash.kumar@oss.qualcomm.com> (raw)
In-Reply-To: <20260820145036.2035641-1-akash.kumar@oss.qualcomm.com>
On Shikra CQS/CQM platforms, usb-role-switch is handled by PM4125 on
the primary Type-C port and Cypress PD controller CYPD6129 on the
second Type-C port. On Shikra IQS platform, usb-role-switch is
handled by Cypress PD controller CYPD6129 on both Type-C ports.
Add the CYPD6129 typec node under i2c3, wire its connector endpoints
to the corresponding DWC3 controller ports via remote-endpoint
phandles, and switch the associated USB controllers to OTG mode so
role switching can take effect.
Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts | 64 +++++++++++-
arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts | 64 +++++++++++-
arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts | 108 +++++++++++++++++++-
3 files changed, 223 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
index 3866ab8b0faa..c92ab8e6cc0c 100644
--- a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
@@ -42,6 +42,43 @@ &remoteproc_mpss {
status = "okay";
};
+&i2c3 {
+ status = "okay";
+
+ typec@40 {
+ compatible = "cypress,cypd6129";
+ reg = <0x40>;
+ interrupts-extended = <&tlmm 136 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&usb0_intr_state>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ccg_typec_con0: connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "dual";
+ wakeup-source;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ucsi_ccg_port: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+ };
+ };
+ };
+};
+
&sdhc_1 {
vmmc-supply = <&pm4125_l20>;
vqmmc-supply = <&pm4125_l14>;
@@ -58,6 +95,23 @@ &sdhc_1 {
status = "okay";
};
+&tlmm {
+ usb0_intr_state: usb0-intr-state {
+ pins = "gpio136";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+};
+
+&usb_1 {
+ /delete-property/ dr_mode;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&ucsi_ccg_port>;
+};
+
&usb_1_hsphy {
vdd-supply = <&pm4125_l12>;
vdda-pll-supply = <&pm4125_l13>;
@@ -66,17 +120,17 @@ &usb_1_hsphy {
status = "okay";
};
-&usb_qmpphy {
- vdda-phy-supply = <&pm4125_l8>;
+&usb_2_hsphy {
+ vdd-supply = <&pm4125_l12>;
vdda-pll-supply = <&pm4125_l13>;
+ vdda-phy-dpdm-supply = <&pm4125_l21>;
status = "okay";
};
-&usb_2_hsphy {
- vdd-supply = <&pm4125_l12>;
+&usb_qmpphy {
+ vdda-phy-supply = <&pm4125_l8>;
vdda-pll-supply = <&pm4125_l13>;
- vdda-phy-dpdm-supply = <&pm4125_l21>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
index 34568f1c7b63..8a3d173568a1 100644
--- a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
@@ -42,6 +42,43 @@ &remoteproc_mpss {
status = "okay";
};
+&i2c3 {
+ status = "okay";
+
+ typec@40 {
+ compatible = "cypress,cypd6129";
+ reg = <0x40>;
+ interrupts-extended = <&tlmm 136 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&usb0_intr_state>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ccg_typec_con0: connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "dual";
+ wakeup-source;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ucsi_ccg_port: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+ };
+ };
+ };
+};
+
&sdhc_1 {
vmmc-supply = <&pm4125_l20>;
vqmmc-supply = <&pm4125_l14>;
@@ -58,6 +95,23 @@ &sdhc_1 {
status = "okay";
};
+&tlmm {
+ usb0_intr_state: usb0-intr-state {
+ pins = "gpio136";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+};
+
+&usb_1 {
+ /delete-property/ dr_mode;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&ucsi_ccg_port>;
+};
+
&usb_1_hsphy {
vdd-supply = <&pm4125_l12>;
vdda-pll-supply = <&pm4125_l13>;
@@ -66,17 +120,17 @@ &usb_1_hsphy {
status = "okay";
};
-&usb_qmpphy {
- vdda-phy-supply = <&pm4125_l8>;
+&usb_2_hsphy {
+ vdd-supply = <&pm4125_l12>;
vdda-pll-supply = <&pm4125_l13>;
+ vdda-phy-dpdm-supply = <&pm4125_l21>;
status = "okay";
};
-&usb_2_hsphy {
- vdd-supply = <&pm4125_l12>;
+&usb_qmpphy {
+ vdda-phy-supply = <&pm4125_l8>;
vdda-pll-supply = <&pm4125_l13>;
- vdda-phy-dpdm-supply = <&pm4125_l21>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts
index 543d769125ef..bf09d199f2a3 100644
--- a/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts
@@ -42,6 +42,73 @@ &remoteproc_mpss {
status = "okay";
};
+&i2c3 {
+ status = "okay";
+
+ typec@40 {
+ compatible = "cypress,cypd6229";
+ reg = <0x40>;
+ interrupts-extended = <&tlmm 50 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&usb0_intr_state>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ccg_typec_con0: connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "USB2-Type-C";
+ data-role = "dual";
+ power-role = "dual";
+ wakeup-source;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ucsi_ccg_port0_hs: endpoint {
+ remote-endpoint = <&usb_2_dwc3_hs>;
+ };
+ };
+ };
+ };
+
+ ccg_typec_con1: connector@1 {
+ compatible = "usb-c-connector";
+ reg = <1>;
+ label = "USB3-Type-C";
+ data-role = "dual";
+ power-role = "dual";
+ wakeup-source;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ucsi_ccg_port_1_hs: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ucsi_ccg_port_1_ss: endpoint {
+ remote-endpoint = <&usb_qmpphy_out>;
+ };
+ };
+ };
+ };
+ };
+};
+
&sdhc_1 {
vmmc-supply = <&pm8150_l17>;
vqmmc-supply = <&pm8150_s4>;
@@ -58,6 +125,25 @@ &sdhc_1 {
status = "okay";
};
+&tlmm {
+ usb0_intr_state: usb0-intr-state {
+ pins = "gpio50";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+};
+
+&usb_1 {
+ /delete-property/ dr_mode;
+
+ status = "okay";
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&ucsi_ccg_port_1_hs>;
+};
+
&usb_1_hsphy {
vdd-supply = <&pm8150_l4>;
vdda-pll-supply = <&pm8150_l12>;
@@ -66,11 +152,16 @@ &usb_1_hsphy {
status = "okay";
};
-&usb_qmpphy {
- vdda-phy-supply = <&pm8150_l6>;
- vdda-pll-supply = <&pm8150_l12>;
+&usb_2 {
+ /delete-property/ dr_mode;
status = "okay";
+
+ port {
+ usb_2_dwc3_hs: endpoint {
+ remote-endpoint = <&ucsi_ccg_port0_hs>;
+ };
+ };
};
&usb_2_hsphy {
@@ -80,3 +171,14 @@ &usb_2_hsphy {
status = "okay";
};
+
+&usb_qmpphy {
+ vdda-phy-supply = <&pm8150_l6>;
+ vdda-pll-supply = <&pm8150_l12>;
+
+ status = "okay";
+};
+
+&usb_qmpphy_out {
+ remote-endpoint = <&ucsi_ccg_port_1_ss>;
+};
--
2.43.0
next prev parent reply other threads:[~2026-08-20 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:47 [PATCH 0/3] Add usb-role-switch support for USB Type-C ports on Shikra Akash Kumar
2026-08-20 14:47 ` [PATCH 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
2026-08-20 18:09 ` Conor Dooley
2026-08-20 14:47 ` [PATCH 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
2026-08-20 14:47 ` Akash Kumar [this message]
2026-08-20 18:38 ` [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Abel Vesa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260820145036.2035641-4-akash.kumar@oss.qualcomm.com \
--to=akash.kumar@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox