All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add usb-role-switch support for USB Type-C ports on Shikra
@ 2026-08-20 14:47 Akash Kumar
  2026-08-20 14:47 ` [PATCH 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Akash Kumar @ 2026-08-20 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

The USB DT support series for Shikra ("Add DT Support for USB on
Shikra") enabled both USB controllers in device mode, since role
switching support was not yet present:

https://lore.kernel.org/all/20260811-usb-shikra-v7-v7-2-753e928f37ae@oss.qualcomm.com/

This series adds that role-switching support. 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.

Patch 1 adds the device-tree binding for the CYPD6129/CYPD6229 dual
Type-C PD controllers. Patch 2 adds the corresponding compatible
strings to the ucsi_ccg driver's of_device_id table so it binds to
boards describing these controllers. Patch 3 wires up the CYPD6129
typec node on the affected Shikra boards and switches usb_1/usb_2 to
OTG mode so role switching can take effect.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>

---
Akash Kumar (3):
  dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller
  usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229
  arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports

 .../bindings/usb/cypress,cypd6129.yaml        |  99 ++++++++++++++++
 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 +++++++++++++++++-
 drivers/usb/typec/ucsi/ucsi_ccg.c             |   2 +
 5 files changed, 324 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
---
base-commit: 96c901471bf7948b9b9f70d38ea11631a8c33b4c
change-id: 20260820-shikra-usb-role-switch-a3f910b2b2b1
lore link: https://lore.kernel.org/all/20260811-usb-shikra-v7-v7-0-753e928f37ae@oss.qualcomm.com/
---
2.43.0


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

* [PATCH 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller
  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 ` 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
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Akash Kumar @ 2026-08-20 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

Add the device-tree binding documentation for the Cypress cypd6129
and cypd6229 dual Type-C PD controllers. These are used on Shikra
CQM/CQS/IQS platforms to handle usb-role-switch for the USB Type-C
ports over an I2C interface, similarly to the existing cypd4226
binding.

cypd6229 is a variant of cypd6129 and is described with a
"cypress,cypd6129" fallback compatible string.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 .../bindings/usb/cypress,cypd6129.yaml        | 99 +++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml

diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
new file mode 100644
index 000000000000..f709f82f2092
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd6129.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd6129/cypd6229 Type-C Controller
+
+maintainers:
+  - Akash Kumar <akash.kumar@oss.qualcomm.com>
+
+description:
+  The Cypress cypd6129 and cypd6229 are dual Type-C PD controllers that are
+  controlled via an I2C interface.
+
+properties:
+  compatible:
+    oneOf:
+      - const: cypress,cypd6129
+      - items:
+          - const: cypress,cypd6229
+          - const: cypress,cypd6129
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  pinctrl-0: true
+  pinctrl-1: true
+
+  pinctrl-names:
+    minItems: 1
+    items:
+      - const: default
+      - const: sleep
+
+patternProperties:
+  '^connector@[01]$':
+    $ref: /schemas/connector/usb-connector.yaml#
+    required:
+      - reg
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+anyOf:
+  - required:
+      - connector@0
+  - required:
+      - connector@1
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      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>;
+
+        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>;
+              endpoint {
+                remote-endpoint = <&usb_role_switch0>;
+              };
+            };
+          };
+        };
+      };
+    };
-- 
2.43.0


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

* [PATCH 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229
  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 14:47 ` Akash Kumar
  2026-08-21 11:53   ` Abel Vesa
  2026-08-20 14:47 ` [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
  3 siblings, 1 reply; 12+ messages in thread
From: Akash Kumar @ 2026-08-20 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

Add cypd6129 and cypd6229 compatible strings to the of_device_id
match table so the driver binds to boards describing these Cypress
PD controllers in their device tree. No other driver changes are
needed since the chip is accessed through the same generic UCSI/HPI
I2C register protocol as the existing cypd4226 support.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index d46ca942026e..37b96d662e59 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1527,6 +1527,8 @@ static void ucsi_ccg_remove(struct i2c_client *client)
 
 static const struct of_device_id ucsi_ccg_of_match_table[] = {
 		{ .compatible = "cypress,cypd4226", },
+		{ .compatible = "cypress,cypd6129", },
+		{ .compatible = "cypress,cypd6229", },
 		{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, ucsi_ccg_of_match_table);
-- 
2.43.0


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

* [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports
  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 14:47 ` [PATCH 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
@ 2026-08-20 14:47 ` Akash Kumar
  2026-08-20 18:38   ` Abel Vesa
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
  3 siblings, 1 reply; 12+ messages in thread
From: Akash Kumar @ 2026-08-20 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

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


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

* Re: [PATCH 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller
  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
  0 siblings, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2026-08-20 18:09 UTC (permalink / raw)
  To: Akash Kumar
  Cc: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley, linux-usb,
	linux-kernel, linux-arm-msm, devicetree

[-- Attachment #1: Type: text/plain, Size: 3663 bytes --]

On Thu, Aug 20, 2026 at 08:17:36PM +0530, Akash Kumar wrote:
> Add the device-tree binding documentation for the Cypress cypd6129
> and cypd6229 dual Type-C PD controllers. These are used on Shikra
> CQM/CQS/IQS platforms to handle usb-role-switch for the USB Type-C
> ports over an I2C interface, similarly to the existing cypd4226
> binding.
> 
> cypd6229 is a variant of cypd6129 and is described with a
> "cypress,cypd6129" fallback compatible string.
> 
> Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
> ---
>  .../bindings/usb/cypress,cypd6129.yaml        | 99 +++++++++++++++++++
>  1 file changed, 99 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
> new file mode 100644
> index 000000000000..f709f82f2092
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
> @@ -0,0 +1,99 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/cypress,cypd6129.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cypress cypd6129/cypd6229 Type-C Controller
> +
> +maintainers:
> +  - Akash Kumar <akash.kumar@oss.qualcomm.com>
> +
> +description:
> +  The Cypress cypd6129 and cypd6229 are dual Type-C PD controllers that are
> +  controlled via an I2C interface.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: cypress,cypd6129
> +      - items:
> +          - const: cypress,cypd6229
> +          - const: cypress,cypd6129
> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  pinctrl-0: true
> +  pinctrl-1: true
> +
> +  pinctrl-names:
> +    minItems: 1
> +    items:
> +      - const: default
> +      - const: sleep
> +
> +patternProperties:
> +  '^connector@[01]$':
> +    $ref: /schemas/connector/usb-connector.yaml#
> +    required:
> +      - reg
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +anyOf:
> +  - required:
> +      - connector@0
> +  - required:
> +      - connector@1
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      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>;
> +
> +        connector@0 {
> +          compatible = "usb-c-connector";
> +          reg = <0>;
> +          label = "USB-C";
> +          data-role = "dual";
> +          power-role = "dual";
> +          wakeup-source;

whitespace nitpickery, blank line here

> +          ports {
> +            #address-cells = <1>;
> +            #size-cells = <0>;

and here

> +            port@0 {
> +              reg = <0>;

and here

Otherwise, this seems fine to me. With that,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

pw-bot: changes-requested

> +              endpoint {
> +                remote-endpoint = <&usb_role_switch0>;
> +              };
> +            };
> +          };
> +        };
> +      };
> +    };
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports
  2026-08-20 14:47 ` [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
@ 2026-08-20 18:38   ` Abel Vesa
  0 siblings, 0 replies; 12+ messages in thread
From: Abel Vesa @ 2026-08-20 18:38 UTC (permalink / raw)
  To: Akash Kumar
  Cc: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley, linux-usb,
	linux-kernel, linux-arm-msm, devicetree

On 26-08-20 20:17:38, Akash Kumar wrote:
> 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;

AFAICT, this fails dtbs_check because it isn't allowed by the
usb-connector.yaml.

I see you added it in the example the new schema you added. That
should've failed at dt_bindings_check.

Same comment for the other dtes files.

> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +
> +					ucsi_ccg_port: endpoint {
> +						remote-endpoint = <&usb_1_dwc3_hs>;
> +					};
> +				};
> +			};
> +		};

Where is the second connector?

> +	};
> +};
> +
>  &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;

I don't think this property is actually defined anywhere. I wonder which
tree is this done on.

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

* [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support
  2026-08-20 14:47 [PATCH 0/3] Add usb-role-switch support for USB Type-C ports on Shikra Akash Kumar
                   ` (2 preceding siblings ...)
  2026-08-20 14:47 ` [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
@ 2026-08-21 10:26 ` Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
                     ` (3 more replies)
  3 siblings, 4 replies; 12+ messages in thread
From: Akash Kumar @ 2026-08-21 10:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

This series adds support for the Cypress cypd6129/cypd6229 dual
Type-C PD controllers used on the Shikra CQM/CQS/IQS platforms to
handle usb-role-switch, and wires up the corresponding DT nodes.

Changes in v2:
- dt-bindings: add a top-level "wakeup-source" property on the
  controller node (matching richtek,rt1719.yaml/ti,tps6598x.yaml) and
  move "wakeup-source;" in the example out of "connector@0" onto the
  parent node, since usb-connector.yaml ends in
  "unevaluatedProperties: false" and does not itself declare
  "wakeup-source" -- placing it inside the connector node fails
  dtbs_check. Also fixed related whitespace nitpicks in the example.
- dts: apply the same wakeup-source relocation to all three affected
  boards (shikra-cqm-evk, shikra-cqs-evk, shikra-iqs-evk).
- dts: fix shikra-iqs-evk's cypd6229 node to use the
  "cypress,cypd6229", "cypress,cypd6129" fallback compatible string
  pair required by the binding, instead of "cypress,cypd6229" alone.
- dts: fix shikra-cqm-evk/shikra-cqs-evk wiring so CYPD6129 connects
  to usb_2_dwc3_hs (secondary port) and PM4125's built-in typec
  connects to usb_1_dwc3_hs/pm4125_hs_in (primary port), and add the
  missing reverse remote-endpoint links on pm4125_hs_in/pm4125_ss_in.
- No changes to patch 2/3 (driver match table).

Link to v1: https://lore.kernel.org/all/20260820145036.2035641-1-akash.kumar@oss.qualcomm.com/

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
Akash Kumar (3):
      dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller
      usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229
      arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports

 .../devicetree/bindings/usb/cypress,cypd6129.yaml  | 107 +++++++++++++++++++++
 arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts        |  84 +++++++++++++++-
 arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi       |  45 +++++++++
 arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts        |  84 +++++++++++++++-
 arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts        | 107 ++++++++++++++++++++-
 drivers/usb/typec/ucsi/ucsi_ccg.c                  |   2 +
 6 files changed, 418 insertions(+), 11 deletions(-)
---
base-commit: da0b33862d815a7c88f2a809e40b098a15a2faad
change-id: 20260821-shikra-usb-dt-v7-apply-512eccb018a1

Best regards,
-- 
Akash Kumar <akash.kumar@oss.qualcomm.com>

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

* [PATCH v2 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
@ 2026-08-21 10:26   ` Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Akash Kumar @ 2026-08-21 10:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

Add the device-tree binding documentation for the Cypress cypd6129
and cypd6229 dual Type-C PD controllers. These are used on Shikra
CQM/CQS/IQS platforms to handle usb-role-switch for the USB Type-C
ports over an I2C interface, similarly to the existing cypd4226
binding.

cypd6229 is a variant of cypd6129 and is described with a
"cypress,cypd6129" fallback compatible string.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 .../devicetree/bindings/usb/cypress,cypd6129.yaml  | 107 +++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
new file mode 100644
index 000000000000..43e2c1902fd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd6129.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd6129/cypd6229 Type-C Controller
+
+maintainers:
+  - Akash Kumar <akash.kumar@oss.qualcomm.com>
+
+description:
+  The Cypress cypd6129 and cypd6229 are dual Type-C PD controllers that are
+  controlled via an I2C interface.
+
+properties:
+  compatible:
+    oneOf:
+      - const: cypress,cypd6129
+      - items:
+          - const: cypress,cypd6229
+          - const: cypress,cypd6129
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  pinctrl-0: true
+  pinctrl-1: true
+
+  pinctrl-names:
+    minItems: 1
+    items:
+      - const: default
+      - const: sleep
+
+  wakeup-source:
+    description: enable IRQ remote wakeup, see power/wakeup-source.txt
+    type: boolean
+
+patternProperties:
+  '^connector@[01]$':
+    $ref: /schemas/connector/usb-connector.yaml#
+    required:
+      - reg
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+anyOf:
+  - required:
+      - connector@0
+  - required:
+      - connector@1
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      typec@40 {
+        compatible = "cypress,cypd6129";
+        reg = <0x40>;
+        interrupts-extended = <&tlmm 136 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 = "USB-C";
+          data-role = "dual";
+          power-role = "dual";
+
+          ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+              reg = <0>;
+
+              endpoint {
+                remote-endpoint = <&usb_role_switch0>;
+              };
+            };
+          };
+        };
+      };
+    };

-- 
2.43.0

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

* [PATCH v2 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
@ 2026-08-21 10:26   ` Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
  2026-08-21 11:39   ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Abel Vesa
  3 siblings, 0 replies; 12+ messages in thread
From: Akash Kumar @ 2026-08-21 10:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

Add cypd6129 and cypd6229 compatible strings to the of_device_id
match table so the driver binds to boards describing these Cypress
PD controllers in their device tree. No other driver changes are
needed since the chip is accessed through the same generic UCSI/HPI
I2C register protocol as the existing cypd4226 support.

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index d46ca942026e..37b96d662e59 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1527,6 +1527,8 @@ static void ucsi_ccg_remove(struct i2c_client *client)
 
 static const struct of_device_id ucsi_ccg_of_match_table[] = {
 		{ .compatible = "cypress,cypd4226", },
+		{ .compatible = "cypress,cypd6129", },
+		{ .compatible = "cypress,cypd6229", },
 		{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, ucsi_ccg_of_match_table);

-- 
2.43.0

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

* [PATCH v2 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
  2026-08-21 10:26   ` [PATCH v2 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
@ 2026-08-21 10:26   ` Akash Kumar
  2026-08-21 11:39   ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Abel Vesa
  3 siblings, 0 replies; 12+ messages in thread
From: Akash Kumar @ 2026-08-21 10:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

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  |  84 ++++++++++++++++++++-
 arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi |  45 +++++++++++
 arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts  |  84 ++++++++++++++++++++-
 arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts  | 107 ++++++++++++++++++++++++++-
 4 files changed, 309 insertions(+), 11 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..41290b562fa3 100644
--- a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
@@ -42,6 +42,51 @@ &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";
+		wakeup-source;
+
+		#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";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					ucsi_ccg_port: endpoint {
+						remote-endpoint = <&usb_2_dwc3_hs>;
+					};
+				};
+			};
+		};
+	};
+};
+
+&pm4125_hs_in {
+	remote-endpoint = <&usb_1_dwc3_hs>;
+};
+
+&pm4125_ss_in {
+	remote-endpoint = <&usb_qmpphy_out>;
+};
+
 &sdhc_1 {
 	vmmc-supply = <&pm4125_l20>;
 	vqmmc-supply = <&pm4125_l14>;
@@ -58,6 +103,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 = <&pm4125_hs_in>;
+};
+
 &usb_1_hsphy {
 	vdd-supply = <&pm4125_l12>;
 	vdda-pll-supply = <&pm4125_l13>;
@@ -66,11 +128,14 @@ &usb_1_hsphy {
 	status = "okay";
 };
 
-&usb_qmpphy {
-	vdda-phy-supply = <&pm4125_l8>;
-	vdda-pll-supply = <&pm4125_l13>;
+&usb_2 {
+	/delete-property/ dr_mode;
 
-	status = "okay";
+	port {
+		usb_2_dwc3_hs: endpoint {
+			remote-endpoint = <&ucsi_ccg_port>;
+		};
+	};
 };
 
 &usb_2_hsphy {
@@ -80,3 +145,14 @@ &usb_2_hsphy {
 
 	status = "okay";
 };
+
+&usb_qmpphy_out {
+	remote-endpoint = <&pm4125_ss_in>;
+};
+
+&usb_qmpphy {
+	vdda-phy-supply = <&pm4125_l8>;
+	vdda-pll-supply = <&pm4125_l13>;
+
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi b/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
index 8ac42ff625a0..e4dd793c882b 100644
--- a/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
@@ -85,6 +85,51 @@ &pm4125_resin {
 	status = "okay";
 };
 
+&pm4125_typec {
+	status = "okay";
+
+	connector {
+		compatible = "usb-c-connector";
+
+		power-role = "dual";
+		data-role = "dual";
+		self-powered;
+
+		typec-power-opmode = "default";
+		pd-disable;
+
+		vbus-supply = <&pm4125_vbus>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				pm4125_hs_in: endpoint {
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				pm4125_ss_in: endpoint {
+				};
+			};
+		};
+	};
+};
+
+&pm4125_vbus {
+	regulator-min-microvolt = <5000000>;
+	regulator-max-microvolt = <5000000>;
+	regulator-min-microamp = <500000>;
+	regulator-max-microamp = <500000>;
+
+	status = "okay";
+};
+
 &pm8005_regulators {
 	status = "disabled";
 };
diff --git a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
index 34568f1c7b63..36514a31d66e 100644
--- a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
@@ -42,6 +42,51 @@ &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";
+		wakeup-source;
+
+		#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";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					ucsi_ccg_port: endpoint {
+						remote-endpoint = <&usb_2_dwc3_hs>;
+					};
+				};
+			};
+		};
+	};
+};
+
+&pm4125_hs_in {
+	remote-endpoint = <&usb_1_dwc3_hs>;
+};
+
+&pm4125_ss_in {
+	remote-endpoint = <&usb_qmpphy_out>;
+};
+
 &sdhc_1 {
 	vmmc-supply = <&pm4125_l20>;
 	vqmmc-supply = <&pm4125_l14>;
@@ -58,6 +103,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 = <&pm4125_hs_in>;
+};
+
 &usb_1_hsphy {
 	vdd-supply = <&pm4125_l12>;
 	vdda-pll-supply = <&pm4125_l13>;
@@ -66,11 +128,14 @@ &usb_1_hsphy {
 	status = "okay";
 };
 
-&usb_qmpphy {
-	vdda-phy-supply = <&pm4125_l8>;
-	vdda-pll-supply = <&pm4125_l13>;
+&usb_2 {
+	/delete-property/ dr_mode;
 
-	status = "okay";
+	port {
+		usb_2_dwc3_hs: endpoint {
+			remote-endpoint = <&ucsi_ccg_port>;
+		};
+	};
 };
 
 &usb_2_hsphy {
@@ -80,3 +145,14 @@ &usb_2_hsphy {
 
 	status = "okay";
 };
+
+&usb_qmpphy_out {
+	remote-endpoint = <&pm4125_ss_in>;
+};
+
+&usb_qmpphy {
+	vdda-phy-supply = <&pm4125_l8>;
+	vdda-pll-supply = <&pm4125_l13>;
+
+	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..ee0b55b2c462 100644
--- a/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts
+++ b/arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts
@@ -42,6 +42,72 @@ &remoteproc_mpss {
 	status = "okay";
 };
 
+&i2c3 {
+	status = "okay";
+
+	typec@40 {
+		compatible = "cypress,cypd6229", "cypress,cypd6129";
+		reg = <0x40>;
+		interrupts-extended = <&tlmm 50 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-0 = <&usb0_intr_state>;
+		pinctrl-names = "default";
+		wakeup-source;
+
+		#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";
+
+			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";
+
+			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 +124,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 +151,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 +170,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

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

* Re: [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support
  2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
                     ` (2 preceding siblings ...)
  2026-08-21 10:26   ` [PATCH v2 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
@ 2026-08-21 11:39   ` Abel Vesa
  3 siblings, 0 replies; 12+ messages in thread
From: Abel Vesa @ 2026-08-21 11:39 UTC (permalink / raw)
  To: Akash Kumar
  Cc: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley, linux-usb,
	linux-kernel, linux-arm-msm, devicetree

On 26-08-21 15:56:49, Akash Kumar wrote:
> This series adds support for the Cypress cypd6129/cypd6229 dual
> Type-C PD controllers used on the Shikra CQM/CQS/IQS platforms to
> handle usb-role-switch, and wires up the corresponding DT nodes.
> 
> Changes in v2:
> - dt-bindings: add a top-level "wakeup-source" property on the
>   controller node (matching richtek,rt1719.yaml/ti,tps6598x.yaml) and
>   move "wakeup-source;" in the example out of "connector@0" onto the
>   parent node, since usb-connector.yaml ends in
>   "unevaluatedProperties: false" and does not itself declare
>   "wakeup-source" -- placing it inside the connector node fails
>   dtbs_check. Also fixed related whitespace nitpicks in the example.
> - dts: apply the same wakeup-source relocation to all three affected
>   boards (shikra-cqm-evk, shikra-cqs-evk, shikra-iqs-evk).
> - dts: fix shikra-iqs-evk's cypd6229 node to use the
>   "cypress,cypd6229", "cypress,cypd6129" fallback compatible string
>   pair required by the binding, instead of "cypress,cypd6229" alone.
> - dts: fix shikra-cqm-evk/shikra-cqs-evk wiring so CYPD6129 connects
>   to usb_2_dwc3_hs (secondary port) and PM4125's built-in typec
>   connects to usb_1_dwc3_hs/pm4125_hs_in (primary port), and add the
>   missing reverse remote-endpoint links on pm4125_hs_in/pm4125_ss_in.
> - No changes to patch 2/3 (driver match table).
> 
> Link to v1: https://lore.kernel.org/all/20260820145036.2035641-1-akash.kumar@oss.qualcomm.com/
> 
> Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>

Please do not send as reply to earlier revisions.

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

* Re: [PATCH 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229
  2026-08-20 14:47 ` [PATCH 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
@ 2026-08-21 11:53   ` Abel Vesa
  0 siblings, 0 replies; 12+ messages in thread
From: Abel Vesa @ 2026-08-21 11:53 UTC (permalink / raw)
  To: Akash Kumar
  Cc: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley, linux-usb,
	linux-kernel, linux-arm-msm, devicetree

On 26-08-20 20:17:37, Akash Kumar wrote:
> Add cypd6129 and cypd6229 compatible strings to the of_device_id
> match table so the driver binds to boards describing these Cypress
> PD controllers in their device tree. No other driver changes are
> needed since the chip is accessed through the same generic UCSI/HPI
> I2C register protocol as the existing cypd4226 support.
> 
> Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>

This looks OK to me, so:

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

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

end of thread, other threads:[~2026-08-21 11:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-21 11:53   ` Abel Vesa
2026-08-20 14:47 ` [PATCH 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
2026-08-20 18:38   ` Abel Vesa
2026-08-21 10:26 ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Akash Kumar
2026-08-21 10:26   ` [PATCH v2 1/3] dt-bindings: usb: Add Cypress cypd6129/cypd6229 Type-C controller Akash Kumar
2026-08-21 10:26   ` [PATCH v2 2/3] usb: typec: ucsi: ccg: Add support for cypd6129/cypd6229 Akash Kumar
2026-08-21 10:26   ` [PATCH v2 3/3] arm64: dts: qcom: shikra: Wire up usb-role-switch for USB Type-C ports Akash Kumar
2026-08-21 11:39   ` [PATCH v2 0/3] arm64: dts: qcom: shikra: Add CYPD6129/CYPD6229 Type-C controller support Abel Vesa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.