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