Debian Codegraph @

Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml

raw
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
7 title: GPIO-based SBU mux
8
9 maintainers:
10 - Bjorn Andersson <[email protected]>
11
12 description:
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
18 properties:
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
47 required:
48 - compatible
49 - select-gpios
50 - orientation-switch
51 - port
52
53 allOf:
54 - $ref: usb-switch.yaml#
55 - $ref: usb-switch-ports.yaml#
56 - if:
57 required:
58 - mode-switch
59 then:
60 required:
61 - enable-gpios
62
63 additionalProperties: false
64
65 examples:
66 - |
67 #include <dt-bindings/gpio/gpio.h>
68
69 tcpm {
70 connector {
71 compatible = "usb-c-connector";
72
73 ports {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 port@0 {
78 reg = <0>;
79 tcpm_hs_out: endpoint {
80 remote-endpoint = <&usb_hs_phy_in>;
81 };
82 };
83
84 port@1 {
85 reg = <1>;
86 tcpm_ss_out: endpoint {
87 remote-endpoint = <&usb_ss_phy_in>;
88 };
89 };
90
91 port@2 {
92 reg = <2>;
93 tcpm_sbu_out: endpoint {
94 remote-endpoint = <&sbu_mux_in>;
95 };
96 };
97 };
98 };
99 };
100
101 sbu-mux {
102 compatible = "pericom,pi3usb102", "gpio-sbu-mux";
103
104 enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
105 select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
106
107 mode-switch;
108 orientation-switch;
109
110 port {
111 sbu_mux_in: endpoint {
112 remote-endpoint = <&tcpm_sbu_out>;
113 };
114 };
115 };
116 ...