arm64: dts: qcom: talos-lyra-evk: Wire up CYPD6129 USB Type-C ports
v5 cover arm64: dts: qcom: talos-lyra-evk: Wire up CYPD6129 USB Type-C ports
This series wires up the CYPD6129 UCSI PD controller on the Talos Lyra EVK carrier board, enabling USB Type-C role switching and SuperSpeed/HS muxing on both USB-C connectors.
v1 was posted as a single patch [v1].
v2 [v2] split the change in two and addressed review from Dmitry Baryshkov:
- Drop the VBUS-boost regulator's resistor-divider math from the commit message; describe it as a plain fixed regulator instead.
- Replace the verbose HS-routing explanation with a short "/* HS only */" comment above &usb_2_dwc3_hs.
- Drop the redundant dr_mode = "otg" on usb_1/usb_2 (it is already the dwc3 driver's default).
- Move usb-role-switch out of the board file and into the shared talos.dtsi, as its own patch (patch 1) alongside the graph port placeholders it depends on.
v3 [v3] only added the "v2" tag that was missing from the individual patch subjects in v2, with no functional change from v2.
v4 [v4] added a base-commit trailer that v3 was missing, again with no functional change from v2.
v5 addresses further review from Dmitry Baryshkov on v3/v4:
- connector@0/connector@1 are carrier-board-specific (a different carrier board could wire the same SoM differently), so they move out of the SoM-level typec@40 node in talos-lyra-evk-som.dtsi and into an extension of that node in talos-lyra-evk.dts.
- The endpoint wiring for usb_1/usb_1_dwc3_hs/usb_2/usb_2_dwc3_hs/ usb_qmpphy_out is likewise carrier-board-specific, so it moves from the SoM dtsi to the EVK dts alongside the connectors it feeds.
- The sbu-mux node drops its select-gpios/orientation-switch properties (no pinctrl was provided for the GPIO line), keeping just the mux's endpoint declaration.
v5 also rebases onto the just-landed Talos Lyra EVK board-addition commit and adds orientation-gpios to the typec@40 node, needed because connector@1's SBU mux requires CC orientation to steer SBU1/SBU2. connector@0 is USB-HS-only and gets the <0> placeholder. GPIO104, which this uses for connector@1, was already claimed by the carrier board's DP hot-plug-detect pin, so dp_hot_plug_det moves to GPIO80 to free it up.
[v1] Link: https://lore.kernel.org/r/[email protected]
[v2] Link: https://lore.kernel.org/r/[email protected]
[v3] Link: https://lore.kernel.org/all/[email protected]/
[v4] Link: https://lore.kernel.org/all/[email protected]/
Akash Kumar (2):
arm64: dts: qcom: talos: Add graph port placeholders for USB Type-C
muxing
arm64: dts: qcom: talos-lyra-evk: Wire up CYPD6129 USB Type-C ports
.../boot/dts/qcom/talos-lyra-evk-som.dtsi | 41 +++++++ arch/arm64/boot/dts/qcom/talos-lyra-evk.dts | 109 +++++++++++++++++- arch/arm64/boot/dts/qcom/talos.dtsi | 35 ++++++ 3 files changed, 180 insertions(+), 5 deletions(-)
base-commit: ddf1ba39f517292164e13baa8d2ece96cddc7aaa --
2.43.0
PATCH v5 1/2 arm64: dts: qcom: talos: Add graph port placeholders for USB Type-C muxing
Add empty port/endpoint nodes on the primary USB QMP PHY (usb_qmpphy) and the usb_1/usb_2 dwc3 controllers, along with orientation-switch on the PHY. These placeholders let board files wire up a USB-C PD controller's HS/SS endpoints directly via
&label { remote-endpoint = <...>; }; instead of redeclaring the port/ports structure on the shared nodes.
--- arch/arm64/boot/dts/qcom/talos.dtsi | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/qcom/talos.dtsi +35 -0
@@ -5078,7 +5078,21 @@ usb_qmpphy: phy@88e6000 { #phy-cells = <0>; + orientation-switch; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_qmpphy_out: endpoint { + }; + }; + }; }; usb_qmpphy_2: phy@88e8000 {
@@ -5163,7 +5177,21 @@ usb_1: usb@a600000 { wakeup-source; dma-coherent; + usb-role-switch; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_1_dwc3_hs: endpoint { + }; + }; + }; }; usb_2: usb@a800000 {
@@ -5220,7 +5248,14 @@ usb_2: usb@a800000 { wakeup-source; dma-coherent; + usb-role-switch; + status = "disabled"; + + port { + usb_2_dwc3_hs: endpoint { + }; + }; }; tsens0: thermal-sensor@c263000 {
Signature · 1 line
2.43.0
PATCH v5 2/2 arm64: dts: qcom: talos-lyra-evk: Wire up CYPD6129 USB Type-C ports
In reply to Akash KumarAdd the CYPD6129 UCSI PD controller (typec@40) on i2c5, along with its GPIO86 interrupt line and the PM8150 GPIO10 VBUS-enable control. The PD controller chip is part of the SoC/SoM card, so it is added to talos-lyra-evk-som.dtsi.
The two USB-C connectors themselves, and the endpoint wiring that routes them to usb_1/usb_2's dwc3 controllers and the USB QMP PHY, are carrier-board-specific — a different carrier board could wire the same SoM differently — so connector@0/connector@1 and the related usb_1/usb_1_dwc3_hs/usb_2/usb_2_dwc3_hs/usb_qmpphy_out endpoints are added to talos-lyra-evk.dts, extending the som.dtsi's typec@40 node by path.
connector@1 additionally routes its SBU lines through a GPIO-controlled SBU mux (onnn,fsusb43l10x), since connector@1's physical Type-C port carries SuperSpeed and SBU while connector@0's port is USB-HS-only by hardware design. The SBU mux lives on the carrier board, so it is added to talos-lyra-evk.dts along with the TLMM GPIO64 VBUS boost enable fixed regulator that supplies the USB daughter-card connector's VBUS.
Add orientation-gpios to the typec@40 node so CC orientation can be read for both connectors: connector@0 is USB-HS-only, so it gets the <0> placeholder, while connector@1 reports orientation via TLMM GPIO104. GPIO104 was already used for the carrier board's DP hot-plug-detect pin, so move dp_hot_plug_det to GPIO80 to free it up.
--- .../boot/dts/qcom/talos-lyra-evk-som.dtsi | 41 +++++++ arch/arm64/boot/dts/qcom/talos-lyra-evk.dts | 109 +++++++++++++++++- 2 files changed, 145 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/talos-lyra-evk-som.dtsi +41 -0
@@ -31,6 +31,16 @@ xo_board_clk: xo-board-clk { #clock-cells = <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; + }; }; &apps_rsc {
@@ -195,6 +205,28 @@ nvmem-layout { #size-cells = <1>; }; }; + + typec@40 { + compatible = "cypress,cypd6129"; + reg = <0x40>; + interrupts-extended = <&tlmm 86 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&usb0_intr_state>; + pinctrl-names = "default"; + orientation-gpios = <0>, <&tlmm 104 GPIO_ACTIVE_HIGH>; + wakeup-source; + + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&pm8150_gpios { + usb1_en: usb1-en-state { + pins = "gpio10"; + function = "normal"; + output-enable; + power-source = <0>; + }; }; &qspi {
@@ -259,6 +291,15 @@ &sdhc_2 { status = "okay"; }; +&tlmm { + usb0_intr_state: usb0-intr-state { + pins = "gpio86"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + &uart0 { status = "okay"; };
arch/arm64/boot/dts/qcom/talos-lyra-evk.dts +104 -5
142 lines not on this page · raw message
Signature · 1 line
2.43.0