arm64: dts: qcom: sm8550: add TRNG node
[linux-modified.git] / Documentation / devicetree / bindings / usb / smsc,usb3503.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/usb/smsc,usb3503.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: SMSC USB3503 High-Speed Hub Controller
8
9 maintainers:
10   - Dongjin Kim <tobetter@gmail.com>
11
12 properties:
13   compatible:
14     enum:
15       - smsc,usb3503
16       - smsc,usb3503a
17       - smsc,usb3803
18
19   reg:
20     maxItems: 1
21
22   connect-gpios:
23     maxItems: 1
24     description: >
25       GPIO for connect
26
27   intn-gpios:
28     maxItems: 1
29     description: >
30       GPIO for interrupt
31
32   reset-gpios:
33     maxItems: 1
34     description: >
35       GPIO for reset
36
37   bypass-gpios:
38     maxItems: 1
39     description: >
40       GPIO for bypass.
41       Control signal to select between HUB MODE and BYPASS MODE.
42
43   disabled-ports:
44     $ref: /schemas/types.yaml#/definitions/uint32-array
45     minItems: 1
46     maxItems: 3
47     items:
48       minimum: 1
49       maximum: 3
50     description: >
51       Specifies the ports unused using their port number. Do not describe this
52       property if all ports have to be enabled.
53
54   initial-mode:
55     $ref: /schemas/types.yaml#/definitions/uint32
56     description: >
57       Specifies initial mode. 1 for Hub mode, 2 for standby mode and 3 for bypass mode.
58       In bypass mode the downstream port 3 is connected to the upstream port with low
59       switch resistance R_on.
60
61   clocks:
62     maxItems: 1
63     description: >
64       Clock used for driving REFCLK signal. If not provided the driver assumes
65       that clock signal is always available, its rate is specified by REF_SEL
66       pins and a value from the primary reference clock frequencies table is
67       used.
68
69   clock-names:
70     const: refclk
71
72   refclk-frequency:
73     $ref: /schemas/types.yaml#/definitions/uint32
74     description: >
75       Frequency of the REFCLK signal as defined by REF_SEL pins. If not
76       provided, driver will not set rate of the REFCLK signal and assume that a
77       value from the primary reference clock frequencies table is used.
78
79 required:
80   - compatible
81
82 allOf:
83   - if:
84       not:
85         properties:
86           compatible:
87             enum:
88               - smsc,usb3803
89     then:
90       properties:
91         bypass-gpios: false
92
93   - if:
94       required:
95         - bypass-gpios
96     then:
97       properties:
98         initial-mode:
99           enum: [1, 2, 3]
100     else:
101       properties:
102         initial-mode:
103           enum: [1, 2]
104
105 additionalProperties: false
106
107 examples:
108   - |
109       i2c {
110           #address-cells = <1>;
111           #size-cells = <0>;
112
113           usb-hub@8 {
114               compatible = "smsc,usb3503";
115               reg = <0x08>;
116               connect-gpios = <&gpx3 0 1>;
117               disabled-ports = <2 3>;
118               intn-gpios = <&gpx3 4 1>;
119               reset-gpios = <&gpx3 5 1>;
120               initial-mode = <1>;
121               clocks = <&clks 80>;
122               clock-names = "refclk";
123           };
124       };
125
126   - |
127       i2c {
128           #address-cells = <1>;
129           #size-cells = <0>;
130
131           usb-hub@8 {
132               compatible = "smsc,usb3803";
133               reg = <0x08>;
134               connect-gpios = <&gpx3 0 1>;
135               disabled-ports = <2 3>;
136               intn-gpios = <&gpx3 4 1>;
137               reset-gpios = <&gpx3 5 1>;
138               bypass-gpios = <&gpx3 6 1>;
139               initial-mode = <3>;
140               clocks = <&clks 80>;
141               clock-names = "refclk";
142           };
143       };
144
145   - |
146       #include <dt-bindings/gpio/gpio.h>
147
148       usb-hub {
149           /* I2C is not connected */
150           compatible = "smsc,usb3503";
151           initial-mode = <1>; /* initialize in HUB mode */
152           disabled-ports = <1>;
153           intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
154           reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
155           connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
156           refclk-frequency = <19200000>;
157       };
158
159 ...