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