1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: GPIO-based SBU mux 8 9maintainers: 10 - Bjorn Andersson <andersson@kernel.org> 11 12description: 13 In USB Type-C applications the SBU lines needs to be connected, disconnected 14 and swapped depending on the altmode and orientation. This binding describes 15 a family of hardware solutions which switches between these modes using GPIO 16 signals. 17 18properties: 19 compatible: 20 items: 21 - enum: 22 - nxp,cbdtu02043 23 - onnn,fsusb43l10x 24 - pericom,pi3usb102 25 - const: gpio-sbu-mux 26 27 enable-gpios: 28 description: Switch enable GPIO 29 30 select-gpios: 31 description: Orientation select 32 33 vcc-supply: 34 description: power supply 35 36 mode-switch: true 37 orientation-switch: true 38 39 port: 40 $ref: /schemas/graph.yaml#/properties/port 41 description: 42 A port node to link the SBU mux to a TypeC controller for the purpose of 43 handling altmode muxing and orientation switching. 44 45required: 46 - compatible 47 - enable-gpios 48 - select-gpios 49 - orientation-switch 50 - port 51 52allOf: 53 - $ref: usb-switch.yaml# 54 55additionalProperties: false 56 57examples: 58 - | 59 #include <dt-bindings/gpio/gpio.h> 60 61 tcpm { 62 connector { 63 compatible = "usb-c-connector"; 64 65 ports { 66 #address-cells = <1>; 67 #size-cells = <0>; 68 69 port@0 { 70 reg = <0>; 71 tcpm_hs_out: endpoint { 72 remote-endpoint = <&usb_hs_phy_in>; 73 }; 74 }; 75 76 port@1 { 77 reg = <1>; 78 tcpm_ss_out: endpoint { 79 remote-endpoint = <&usb_ss_phy_in>; 80 }; 81 }; 82 83 port@2 { 84 reg = <2>; 85 tcpm_sbu_out: endpoint { 86 remote-endpoint = <&sbu_mux_in>; 87 }; 88 }; 89 }; 90 }; 91 }; 92 93 sbu-mux { 94 compatible = "pericom,pi3usb102", "gpio-sbu-mux"; 95 96 enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; 97 select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; 98 99 mode-switch; 100 orientation-switch; 101 102 port { 103 sbu_mux_in: endpoint { 104 remote-endpoint = <&tcpm_sbu_out>; 105 }; 106 }; 107 }; 108... 109