xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7620-pinctrl.yaml (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/pinctrl/mediatek,mt7620-pinctrl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: MediaTek MT7620 Pin Controller
8
9maintainers:
10  - Arınç ÜNAL <arinc.unal@arinc9.com>
11  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
12
13description: |
14  MediaTek MT7620 pin controller for MT7620 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,mt7620-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: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand,
39                   pa, pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf,
40                   refclk, rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite,
41                   wdt refclk, wdt rst, wled]
42
43          groups:
44            description:
45              An array of strings. Each string contains the name of a group.
46            maxItems: 1
47
48        required:
49          - groups
50          - function
51
52        allOf:
53          - if:
54              properties:
55                function:
56                  const: ephy
57            then:
58              properties:
59                groups:
60                  enum: [ephy]
61
62          - if:
63              properties:
64                function:
65                  const: gpio
66            then:
67              properties:
68                groups:
69                  enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi,
70                         spi refclk, uartf, uartlite, wdt, wled]
71
72          - if:
73              properties:
74                function:
75                  const: gpio i2s
76            then:
77              properties:
78                groups:
79                  enum: [uartf]
80
81          - if:
82              properties:
83                function:
84                  const: gpio uartf
85            then:
86              properties:
87                groups:
88                  enum: [uartf]
89
90          - if:
91              properties:
92                function:
93                  const: i2c
94            then:
95              properties:
96                groups:
97                  enum: [i2c]
98
99          - if:
100              properties:
101                function:
102                  const: i2s uartf
103            then:
104              properties:
105                groups:
106                  enum: [uartf]
107
108          - if:
109              properties:
110                function:
111                  const: mdio
112            then:
113              properties:
114                groups:
115                  enum: [mdio]
116
117          - if:
118              properties:
119                function:
120                  const: nand
121            then:
122              properties:
123                groups:
124                  enum: [nd_sd]
125
126          - if:
127              properties:
128                function:
129                  const: pa
130            then:
131              properties:
132                groups:
133                  enum: [pa]
134
135          - if:
136              properties:
137                function:
138                  const: pcie refclk
139            then:
140              properties:
141                groups:
142                  enum: [pcie]
143
144          - if:
145              properties:
146                function:
147                  const: pcie rst
148            then:
149              properties:
150                groups:
151                  enum: [pcie]
152
153          - if:
154              properties:
155                function:
156                  const: pcm gpio
157            then:
158              properties:
159                groups:
160                  enum: [uartf]
161
162          - if:
163              properties:
164                function:
165                  const: pcm i2s
166            then:
167              properties:
168                groups:
169                  enum: [uartf]
170
171          - if:
172              properties:
173                function:
174                  const: pcm uartf
175            then:
176              properties:
177                groups:
178                  enum: [uartf]
179
180          - if:
181              properties:
182                function:
183                  const: refclk
184            then:
185              properties:
186                groups:
187                  enum: [mdio]
188
189          - if:
190              properties:
191                function:
192                  const: rgmii1
193            then:
194              properties:
195                groups:
196                  enum: [rgmii1]
197
198          - if:
199              properties:
200                function:
201                  const: rgmii2
202            then:
203              properties:
204                groups:
205                  enum: [rgmii2]
206
207          - if:
208              properties:
209                function:
210                  const: sd
211            then:
212              properties:
213                groups:
214                  enum: [nd_sd]
215
216          - if:
217              properties:
218                function:
219                  const: spi
220            then:
221              properties:
222                groups:
223                  enum: [spi]
224
225          - if:
226              properties:
227                function:
228                  const: spi refclk
229            then:
230              properties:
231                groups:
232                  enum: [spi refclk]
233
234          - if:
235              properties:
236                function:
237                  const: uartf
238            then:
239              properties:
240                groups:
241                  enum: [uartf]
242
243          - if:
244              properties:
245                function:
246                  const: uartlite
247            then:
248              properties:
249                groups:
250                  enum: [uartlite]
251
252          - if:
253              properties:
254                function:
255                  const: wdt refclk
256            then:
257              properties:
258                groups:
259                  enum: [wdt]
260
261          - if:
262              properties:
263                function:
264                  const: wdt rst
265            then:
266              properties:
267                groups:
268                  enum: [wdt]
269
270          - if:
271              properties:
272                function:
273                  const: wled
274            then:
275              properties:
276                groups:
277                  enum: [wled]
278
279allOf:
280  - $ref: pinctrl.yaml#
281
282required:
283  - compatible
284
285additionalProperties: false
286
287examples:
288  - |
289    pinctrl {
290      compatible = "ralink,mt7620-pinctrl";
291
292      i2c_pins: i2c0-pins {
293        pinmux {
294          groups = "i2c";
295          function = "i2c";
296        };
297      };
298    };
299