xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/ralink,mt7621-pinctrl.yaml (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
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,mt7621-pinctrl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ralink MT7621 Pin Controller
8
9maintainers:
10  - Arınç ÜNAL <arinc.unal@arinc9.com>
11  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
12
13description:
14  Ralink MT7621 pin controller for MT7621 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,mt7621-pinctrl
21
22patternProperties:
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: [gpio, i2c, i2s, jtag, mdio, nand1, nand2, pcie refclk,
36                   pcie rst, pcm, rgmii1, rgmii2, sdhci, spdif2, spdif3, spi,
37                   uart1, uart2, uart3, wdt refclk, wdt rst]
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: gpio
53            then:
54              properties:
55                groups:
56                  enum: [i2c, jtag, mdio, pcie, rgmii1, rgmii2, sdhci, spi,
57                         uart1, uart2, uart3, wdt]
58
59          - if:
60              properties:
61                function:
62                  const: i2c
63            then:
64              properties:
65                groups:
66                  enum: [i2c]
67
68          - if:
69              properties:
70                function:
71                  const: i2s
72            then:
73              properties:
74                groups:
75                  enum: [uart3]
76
77          - if:
78              properties:
79                function:
80                  const: jtag
81            then:
82              properties:
83                groups:
84                  enum: [jtag]
85
86          - if:
87              properties:
88                function:
89                  const: mdio
90            then:
91              properties:
92                groups:
93                  enum: [mdio]
94
95          - if:
96              properties:
97                function:
98                  const: nand1
99            then:
100              properties:
101                groups:
102                  enum: [spi]
103
104          - if:
105              properties:
106                function:
107                  const: nand2
108            then:
109              properties:
110                groups:
111                  enum: [sdhci]
112
113          - if:
114              properties:
115                function:
116                  const: pcie refclk
117            then:
118              properties:
119                groups:
120                  enum: [pcie]
121
122          - if:
123              properties:
124                function:
125                  const: pcie rst
126            then:
127              properties:
128                groups:
129                  enum: [pcie]
130
131          - if:
132              properties:
133                function:
134                  const: pcm
135            then:
136              properties:
137                groups:
138                  enum: [uart2]
139
140          - if:
141              properties:
142                function:
143                  const: rgmii1
144            then:
145              properties:
146                groups:
147                  enum: [rgmii1]
148
149          - if:
150              properties:
151                function:
152                  const: rgmii2
153            then:
154              properties:
155                groups:
156                  enum: [rgmii2]
157
158          - if:
159              properties:
160                function:
161                  const: sdhci
162            then:
163              properties:
164                groups:
165                  enum: [sdhci]
166
167          - if:
168              properties:
169                function:
170                  const: spdif2
171            then:
172              properties:
173                groups:
174                  enum: [uart2]
175
176          - if:
177              properties:
178                function:
179                  const: spdif3
180            then:
181              properties:
182                groups:
183                  enum: [uart3]
184
185          - if:
186              properties:
187                function:
188                  const: spi
189            then:
190              properties:
191                groups:
192                  enum: [spi]
193
194          - if:
195              properties:
196                function:
197                  const: uart1
198            then:
199              properties:
200                groups:
201                  enum: [uart1]
202
203          - if:
204              properties:
205                function:
206                  const: uart2
207            then:
208              properties:
209                groups:
210                  enum: [uart2]
211
212          - if:
213              properties:
214                function:
215                  const: uart3
216            then:
217              properties:
218                groups:
219                  enum: [uart3]
220
221          - if:
222              properties:
223                function:
224                  const: wdt refclk
225            then:
226              properties:
227                groups:
228                  enum: [wdt]
229
230          - if:
231              properties:
232                function:
233                  const: wdt rst
234            then:
235              properties:
236                groups:
237                  enum: [wdt]
238
239        additionalProperties: false
240
241    additionalProperties: false
242
243allOf:
244  - $ref: "pinctrl.yaml#"
245
246required:
247  - compatible
248
249additionalProperties: false
250
251examples:
252  - |
253    pinctrl {
254      compatible = "ralink,mt7621-pinctrl";
255
256      i2c_pins: i2c0-pins {
257        pinmux {
258          groups = "i2c";
259          function = "i2c";
260        };
261      };
262    };
263