dt-bindings: pinctrl: rt3883: add proper function muxing binding
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / pinctrl / ralink,rt3883-pinctrl.yaml
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/ralink,rt3883-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Ralink RT3883 Pin Controller
8
9 maintainers:
10   - Arınç ÜNAL <arinc.unal@arinc9.com>
11   - Sergio Paracuellos <sergio.paracuellos@gmail.com>
12
13 description:
14   Ralink RT3883 pin controller for RT3883 SoC.
15   The pin controller can only set the muxing of pin groups. Muxing individual
16   pins is not supported. There is no pinconf support.
17
18 properties:
19   compatible:
20     const: ralink,rt3883-pinctrl
21
22 patternProperties:
23   '-pins$':
24     type: object
25     patternProperties:
26       '^(.*-)?pinmux$':
27         type: object
28         description: node for pinctrl.
29         $ref: pinmux-node.yaml#
30
31         properties:
32           function:
33             description:
34               A string containing the name of the function to mux to the group.
35             enum: [ge1, ge2, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag,
36                    lna a, lna g, mdio, pci-dev, pci-fnc, pci-host1, pci-host2,
37                    pcm gpio, pcm i2s, pcm uartf, spi, uartf, uartlite]
38
39           groups:
40             description:
41               An array of strings. Each string contains the name of a group.
42             maxItems: 1
43
44         required:
45           - groups
46           - function
47
48         allOf:
49           - if:
50               properties:
51                 function:
52                   const: ge1
53             then:
54               properties:
55                 groups:
56                   enum: [ge1]
57
58           - if:
59               properties:
60                 function:
61                   const: ge2
62             then:
63               properties:
64                 groups:
65                   enum: [ge2]
66
67           - if:
68               properties:
69                 function:
70                   const: gpio
71             then:
72               properties:
73                 groups:
74                   enum: [ge1, ge2, i2c, jtag, lna a, lna g, mdio, pci, spi,
75                          uartf, uartlite]
76
77           - if:
78               properties:
79                 function:
80                   const: gpio i2s
81             then:
82               properties:
83                 groups:
84                   enum: [uartf]
85
86           - if:
87               properties:
88                 function:
89                   const: gpio uartf
90             then:
91               properties:
92                 groups:
93                   enum: [uartf]
94
95           - if:
96               properties:
97                 function:
98                   const: i2c
99             then:
100               properties:
101                 groups:
102                   enum: [i2c]
103
104           - if:
105               properties:
106                 function:
107                   const: i2s uartf
108             then:
109               properties:
110                 groups:
111                   enum: [uartf]
112
113           - if:
114               properties:
115                 function:
116                   const: jtag
117             then:
118               properties:
119                 groups:
120                   enum: [jtag]
121
122           - if:
123               properties:
124                 function:
125                   const: lna a
126             then:
127               properties:
128                 groups:
129                   enum: [lna a]
130
131           - if:
132               properties:
133                 function:
134                   const: lna g
135             then:
136               properties:
137                 groups:
138                   enum: [lna g]
139
140           - if:
141               properties:
142                 function:
143                   const: mdio
144             then:
145               properties:
146                 groups:
147                   enum: [mdio]
148
149           - if:
150               properties:
151                 function:
152                   const: pci-dev
153             then:
154               properties:
155                 groups:
156                   enum: [pci]
157
158           - if:
159               properties:
160                 function:
161                   const: pci-fnc
162             then:
163               properties:
164                 groups:
165                   enum: [pci]
166
167           - if:
168               properties:
169                 function:
170                   const: pci-host1
171             then:
172               properties:
173                 groups:
174                   enum: [pci]
175
176           - if:
177               properties:
178                 function:
179                   const: pci-host2
180             then:
181               properties:
182                 groups:
183                   enum: [pci]
184
185           - if:
186               properties:
187                 function:
188                   const: pcm gpio
189             then:
190               properties:
191                 groups:
192                   enum: [uartf]
193
194           - if:
195               properties:
196                 function:
197                   const: pcm i2s
198             then:
199               properties:
200                 groups:
201                   enum: [uartf]
202
203           - if:
204               properties:
205                 function:
206                   const: pcm uartf
207             then:
208               properties:
209                 groups:
210                   enum: [uartf]
211
212           - if:
213               properties:
214                 function:
215                   const: spi
216             then:
217               properties:
218                 groups:
219                   enum: [spi]
220
221           - if:
222               properties:
223                 function:
224                   const: uartf
225             then:
226               properties:
227                 groups:
228                   enum: [uartf]
229
230           - if:
231               properties:
232                 function:
233                   const: uartlite
234             then:
235               properties:
236                 groups:
237                   enum: [uartlite]
238
239         additionalProperties: false
240
241     additionalProperties: false
242
243 allOf:
244   - $ref: "pinctrl.yaml#"
245
246 required:
247   - compatible
248
249 additionalProperties: false
250
251 examples:
252   - |
253     pinctrl {
254       compatible = "ralink,rt3883-pinctrl";
255
256       i2c_pins: i2c0-pins {
257         pinmux {
258           groups = "i2c";
259           function = "i2c";
260         };
261       };
262     };