arm64: dts: qcom: talos-lyra-evk: Add CYPD6129 Type-C support
PATCH 1/1 arm64: dts: qcom: talos-lyra-evk: Add CYPD6129 Type-C support
Add support for the Cypress CYPD6129 dual Type-C PD controller on the Talos Lyra EVK.
Enable the controller on I2C5 at address 0x40, configure its GPIO86 interrupt and wakeup support, and describe both USB Type-C connectors. Connect the connectors to USB1 and USB2 through USB role-switch remote-endpoint links.
Configure both USB controllers in OTG mode with usb-role-switch support so that the CYPD6129 controller can manage their USB data roles.
USB1 is routed to the daughter-card board-to-board connector. Add a fixed USB1 VBUS regulator controlled by PM8150 GPIO10 to provide and control VBUS for the USB port on the daughter card. Configure the corresponding PM8150 GPIO pinctrl state and keep the regulator enabled for the board configuration.
Add the TLMM GPIO64 VBUS boost enable as a GPIO hog. This enables the 5 V boost converter required to generate the VBUS supply for the USB daughter-card connector. The boost converter output is set to 5 V by the feedback network consisting of R2403 and R2401:
VOUT = 0.6 * (1 + R2403 / R2401)
= 0.6 * (1 + 75K / 10K)
= 5 VThe changes also add the I2C5 alias, CYPD6129 pinctrl configuration, wakeup-source properties, USB endpoint connections, and the required VBUS power-control GPIO descriptions.
--- arch/arm64/boot/dts/qcom/talos-lyra-evk.dts | 119 +++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-)
---
base-commit: b7e62b4d28bc0d2f16f03904616da78e4478aa88
change-id: 20261012-talos-lyra-evk-v2-v2-0-dcc9316ebb59
base commit link: https://lore.kernel.org/all/[email protected]/
Link to Driver and DT-Binding change: https://lore.kernel.org/all/[email protected]/
---
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +117 -2
@@ -11,6 +11,10 @@ / { compatible = "qcom,talos-lyra-evk", "qcom,qcs615", "qcom,sm6150"; chassis-type = "embedded"; + aliases { + i2c5 = &i2c5; + }; + dp0-connector { compatible = "dp-connector"; label = "DP0";
@@ -25,6 +29,16 @@ dp0_connector_in: endpoint { }; }; + regulator-usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "USB1_VBUS"; + gpio = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&usb1_en>; + pinctrl-names = "default"; + enable-active-high; + regulator-always-on; + }; + }; &i2c5 {
@@ -59,6 +73,68 @@ expander3: gpio@3c { #gpio-cells = <2>; gpio-controller; }; + + typec@40 { + compatible = "cypress,cypd6129"; + reg = <0x40>; + interrupt-parent = <&tlmm>; + interrupts = <86 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&usb0_intr_state>; + pinctrl-names = "default"; + wakeup-source; + + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + /* + * connector@0 is the USB0 Type-C port with SuperSpeed support, + * routed to usb_1. connector@1 is the USB1 Type-C port with + * USB 2.0 HS-only support, routed to usb_2. + */ + 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_0_hs: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + }; + }; + + ccg_typec_con1: connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + label = "USB-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_2_dwc3_hs>; + }; + }; + }; + }; + }; }; &mdss {
@@ -74,6 +150,15 @@ &mdss_dp0_out { remote-endpoint = <&dp0_connector_in>; }; +&pm8150_gpios { + usb1_en: usb1-en-state { + pins = "gpio10"; + function = "normal"; + output-enable; + power-source = <0>; + }; +}; + &pon_pwrkey { status = "okay"; };
@@ -94,10 +179,33 @@ tpm@0 { }; }; +&tlmm { + usb0_intr_state: usb0-intr-state { + pins = "gpio86"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + vbus_boost_5v: vbus-boost-5v-hog { + gpio-hog; + gpios = <64 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "vbus-boost-5v"; + }; +}; + &usb_1 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; status = "okay"; + + port { + usb_1_dwc3_hs: endpoint { + remote-endpoint = <&ucsi_ccg_port_0_hs>; + }; + }; }; &usb_1_hsphy {
@@ -109,9 +217,16 @@ &usb_1_hsphy { }; &usb_2 { - dr_mode = "host"; + dr_mode = "otg"; + usb-role-switch; status = "okay"; + + port { + usb_2_dwc3_hs: endpoint { + remote-endpoint = <&ucsi_ccg_port_1_hs>; + }; + }; }; &usb_2_hsphy {
Signature · 1 line
2.43.0
Quoted 34 lines · Akash Kumar
Add support for the Cypress CYPD6129 dual Type-C PD controller on the Talos Lyra EVK.
Enable the controller on I2C5 at address
0x40, configure its GPIO86 interrupt and wakeup support, and describe both USB Type-C connectors. Connect the connectors to USB1 and USB2 through USB role-switch remote-endpoint links.Configure both USB controllers in OTG mode with usb-role-switch support so that the CYPD6129 controller can manage their USB data roles.
USB1 is routed to the daughter-card board-to-board connector. Add a fixed USB1 VBUS regulator controlled by PM8150 GPIO10 to provide and control VBUS for the USB port on the daughter card. Configure the corresponding PM8150 GPIO pinctrl state and keep the regulator enabled for the board configuration.
Add the TLMM GPIO64 VBUS boost enable as a GPIO hog. This enables the 5 V boost converter required to generate the VBUS supply for the USB daughter-card connector. The boost converter output is set to 5 V by the feedback network consisting of R2403 and R2401:
VOUT = 0.6 * (1 + R2403 / R2401) = 0.6 * (1 + 75K / 10K) = 5 VThe changes also add the I2C5 alias, CYPD6129 pinctrl configuration, wakeup-source properties, USB endpoint connections, and the required VBUS power-control GPIO descriptions.
Signed-off-by Akash Kumar <[email protected]>--- arch/arm64/boot/dts/qcom/talos-lyra-evk.dts | 119 +++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-)
Quoted 6 lines
---
base-commit:b7e62b4d28bc0d2f16f03904616da78e4478aa88
change-id: 20261012-talos-lyra-evk-v2-v2-0-dcc9316ebb5
base commit link: https://lore.kernel.org/all/[email protected]/Link to Driver and DT-Binding change: https://lore.kernel.org/all/[email protected]/
This depends on both the driver+dt change *and* the missing base DT, making this effectively unmergeable. Please either send the changes together or refrain from sending them until that's possible
Konrad
Quoted 2 lines · Akash Kumar
Add support for the Cypress CYPD6129 dual Type-C PD controller on the Talos Lyra EVK.
[...]
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts dp0_connector_in: endpoint { · line 42
Quoted 11 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +10
-0+ regulator-usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "USB1_VBUS"; + gpio = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&usb1_en>; + pinctrl-names = "default"; + enable-active-high; + regulator-always-on; + }; + };
Stray \n
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 81
Quoted 12 lines
&i2c5 {
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +6
-0@@ -59,6 +73,68 @@ expander3: gpio@3c { #gpio-cells = <2>; gpio-controller; }; + + typec@40 { + compatible = "cypress,cypd6129"; + reg = <0x40>; + interrupt-parent = <&tlmm>; + interrupts = <86 IRQ_TYPE_LEVEL_LOW>;
interrupts-extended = <&tlmm 86 IRQ..>;
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 89
Quoted 8 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +8
-0+ pinctrl-0 = <&usb0_intr_state>; + pinctrl-names = "default"; + wakeup-source; + + #address-cells = <1>; + #size-cells = <0>; + + status = "okay";
Nodes are enabled by deafult
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 95
Quoted 6 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +6
-0+ + /* + * connector@0 is the USB0 Type-C port with SuperSpeed support, + * routed to usb_1. connector@1 is the USB1 Type-C port with + * USB 2.0 HS-only support, routed to usb_2. + */
We can read this from the of_graph below, please drop this comment
[...]
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts tpm@0 { · line 199
Quoted 3 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +1
-1&usb_1 { - dr_mode = "peripheral"; + dr_mode = "otg";
This is the default
Review expander3: gpio@3c { · line 98
Quoted 1 line
(quoted diff) +1
-0+ usb-role-switch;
This belongs in the SoC DTSI
[...]
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts &usb_1_hsphy { · line 229
Quoted 12 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +8
-1&usb_2 { - dr_mode = "host"; + dr_mode = "otg"; + usb-role-switch; status = "okay"; + + port { + usb_2_dwc3_hs: endpoint { + remote-endpoint = <&ucsi_ccg_port_1_hs>; + }; + };
Likewise
Konrad
Quoted 17 lines · Akash Kumar
Add support for the Cypress CYPD6129 dual Type-C PD controller on the Talos Lyra EVK.
Enable the controller on I2C5 at address
0x40, configure its GPIO86 interrupt and wakeup support, and describe both USB Type-C connectors. Connect the connectors to USB1 and USB2 through USB role-switch remote-endpoint links.Configure both USB controllers in OTG mode with usb-role-switch support so that the CYPD6129 controller can manage their USB data roles.
USB1 is routed to the daughter-card board-to-board connector. Add a fixed USB1 VBUS regulator controlled by PM8150 GPIO10 to provide and control VBUS for the USB port on the daughter card. Configure the corresponding PM8150 GPIO pinctrl state and keep the regulator enabled for the board configuration.
Quoted 8 lines
Add the TLMM GPIO64 VBUS boost enable as a GPIO hog. This enables the 5 V boost converter required to generate the VBUS supply for the USB daughter-card connector. The boost converter output is set to 5 V by the feedback network consisting of R2403 and R2401:
VOUT = 0.6 * (1 + R2403 / R2401) = 0.6 * (1 + 75K / 10K) = 5 V
Too many details. Describe is as a regulator instead.
Quoted 25 lines
The changes also add the I2C5 alias, CYPD6129 pinctrl configuration, wakeup-source properties, USB endpoint connections, and the required VBUS power-control GPIO descriptions.
Signed-off-by Akash Kumar <[email protected]>--- arch/arm64/boot/dts/qcom/talos-lyra-evk.dts | 119 +++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-)---
base-commit:b7e62b4d28bc0d2f16f03904616da78e4478aa88
change-id: 20261012-talos-lyra-evk-v2-v2-0-dcc9316ebb59
base commit link: https://lore.kernel.org/all/[email protected]/Link to Driver and DT-Binding change: https://lore.kernel.org/all/[email protected]/
---arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +4
-0@@ -59,6 +73,68 @@ expander3: gpio@3c { #gpio-cells = <2>; gpio-controller; }; + + typec@40 { + compatible = "cypress,cypd6129"; + reg = <0x40>;
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 89
Quoted 10 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +10
-0+ interrupt-parent = <&tlmm>; + interrupts = <86 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&usb0_intr_state>; + pinctrl-names = "default"; + wakeup-source; + + #address-cells = <1>; + #size-cells = <0>; + + status = "okay";
Drop
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 95
Quoted 6 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +6
-0+ + /* + * connector@0 is the USB0 Type-C port with SuperSpeed support, + * routed to usb_1. connector@1 is the USB1 Type-C port with + * USB 2.0 HS-only support, routed to usb_2. + */
Just add /* HS only */ to a corresponding controller.
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 96
Quoted 1 line
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +1
-0+ ccg_typec_con0: connector@0 {
Unused label, drop.
Quoted 11 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +11
-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 {
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts expander3: gpio@3c { · line 117
Quoted 10 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +10
-0+ reg = <0>; + + ucsi_ccg_port_0_hs: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + }; + }; + + ccg_typec_con1: connector@1 {
Unused label, drop.
Quoted 42 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +29
-0+ compatible = "usb-c-connector"; + reg = <1>; + label = "USB-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_2_dwc3_hs>; + }; + }; + }; + }; + }; }; &mdss {@@ -74,6 +150,15 @@ &mdss_dp0_out { remote-endpoint = <&dp0_connector_in>; }; +&pm8150_gpios { + usb1_en: usb1-en-state { + pins = "gpio10"; + function = "normal"; + output-enable; + power-source = <0>; + }; +}; + &pon_pwrkey { status = "okay"; };@@ -94,10 +179,33 @@ tpm@0 { }; };
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts tpm@0 { · line 190
Quoted 10 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +9
-0+&tlmm { + usb0_intr_state: usb0-intr-state { + pins = "gpio86"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + vbus_boost_5v: vbus-boost-5v-hog {
Should become a regulator.
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts tpm@0 { · line 199
Quoted 10 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +8
-1+ gpio-hog; + gpios = <64 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "vbus-boost-5v"; + }; +}; + &usb_1 { - dr_mode = "peripheral"; + dr_mode = "otg";
Default, drop.
Review tpm@0 { · line 200
Quoted 1 line
(quoted diff) +1
-0+ usb-role-switch;
=> talos.dtsi, separate commit.
Quoted 12 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +6
-0status = "okay"; + + port { + usb_1_dwc3_hs: endpoint { + remote-endpoint = <&ucsi_ccg_port_0_hs>; + }; + }; }; &usb_1_hsphy {
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts &usb_1_hsphy { · line 220
Quoted 5 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +1
-1@@ -109,9 +217,16 @@ &usb_1_hsphy { }; &usb_2 { - dr_mode = "host"; + dr_mode = "otg";
Default, drop
Review &usb_1_hsphy { · line 221
Quoted 1 line
(quoted diff) +1
-0+ usb-role-switch;
=> talos.dtsi
Quoted 14 lines
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +6
-0status = "okay"; + + port { + usb_2_dwc3_hs: endpoint { + remote-endpoint = <&ucsi_ccg_port_1_hs>; + }; + }; }; &usb_2_hsphy {Signature · 1 line
2.43.0
Signature · 2 lines
With best wishes Dmitry