arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports
cover arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports
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
PATCH 1/2 arm64: dts: qcom: lemans: Add graph port placeholders for USB Type-C muxing
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.
--- .../arm64/boot/dts/qcom/lemans-draco-som.dtsi | 2 -- arch/arm64/boot/dts/qcom/lemans.dtsi | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/lemans-draco-som.dtsi +0 -2
@@ -384,8 +384,6 @@ &usb_0_qmpphy { }; &usb_1 { - dr_mode = "host"; - status = "okay"; };
arch/arm64/boot/dts/qcom/lemans.dtsi +20 -0
@@ -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 {
Signature · 1 line
2.43.0
PATCH 2/2 arm64: dts: qcom: lemans-draco-evk: Wire up CYPD6129 USB Type-C ports
In reply to Akash KumarAdd 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.
--- arch/arm64/boot/dts/qcom/lemans-draco-evk.dts | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+)
arch/arm64/boot/dts/qcom/lemans-draco-evk.dts +110 -0
@@ -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>; +};
Signature · 1 line
2.43.0