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