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,fsusb42 24 - onnn,fsusb43l10x 25 - pericom,pi3usb102 26 - ti,tmuxhs4212 27 - const: gpio-sbu-mux 28 29 enable-gpios: 30 description: Switch enable GPIO 31 32 select-gpios: 33 description: Orientation select 34 35 vcc-supply: 36 description: power supply 37 38 mode-switch: true 39 orientation-switch: true 40 41 port: 42 $ref: /schemas/graph.yaml#/properties/port 43 description: 44 A port node to link the SBU mux to a TypeC controller for the purpose of 45 handling altmode muxing and orientation switching. 46 47required: 48 - compatible 49 - select-gpios 50 - orientation-switch 51 - port 52 53allOf: 54 - $ref: usb-switch.yaml# 55 - if: 56 required: 57 - mode-switch 58 then: 59 required: 60 - enable-gpios 61 62additionalProperties: false 63 64examples: 65 - | 66 #include <dt-bindings/gpio/gpio.h> 67 68 tcpm { 69 connector { 70 compatible = "usb-c-connector"; 71 72 ports { 73 #address-cells = <1>; 74 #size-cells = <0>; 75 76 port@0 { 77 reg = <0>; 78 tcpm_hs_out: endpoint { 79 remote-endpoint = <&usb_hs_phy_in>; 80 }; 81 }; 82 83 port@1 { 84 reg = <1>; 85 tcpm_ss_out: endpoint { 86 remote-endpoint = <&usb_ss_phy_in>; 87 }; 88 }; 89 90 port@2 { 91 reg = <2>; 92 tcpm_sbu_out: endpoint { 93 remote-endpoint = <&sbu_mux_in>; 94 }; 95 }; 96 }; 97 }; 98 }; 99 100 sbu-mux { 101 compatible = "pericom,pi3usb102", "gpio-sbu-mux"; 102 103 enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; 104 select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; 105 106 mode-switch; 107 orientation-switch; 108 109 port { 110 sbu_mux_in: endpoint { 111 remote-endpoint = <&tcpm_sbu_out>; 112 }; 113 }; 114 }; 115... 116