This source file includes following definitions.
- sun8i_a83t_pinctrl_probe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include <linux/init.h>
16 #include <linux/platform_device.h>
17 #include <linux/of.h>
18 #include <linux/of_device.h>
19 #include <linux/pinctrl/pinctrl.h>
20
21 #include "pinctrl-sunxi.h"
22
23 static const struct sunxi_desc_pin sun8i_a83t_pins[] = {
24
25 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
26 SUNXI_FUNCTION(0x0, "gpio_in"),
27 SUNXI_FUNCTION(0x1, "gpio_out"),
28 SUNXI_FUNCTION(0x2, "uart2"),
29 SUNXI_FUNCTION(0x3, "jtag"),
30 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)),
31 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
32 SUNXI_FUNCTION(0x0, "gpio_in"),
33 SUNXI_FUNCTION(0x1, "gpio_out"),
34 SUNXI_FUNCTION(0x2, "uart2"),
35 SUNXI_FUNCTION(0x3, "jtag"),
36 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)),
37 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
38 SUNXI_FUNCTION(0x0, "gpio_in"),
39 SUNXI_FUNCTION(0x1, "gpio_out"),
40 SUNXI_FUNCTION(0x2, "uart2"),
41 SUNXI_FUNCTION(0x3, "jtag"),
42 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)),
43 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
44 SUNXI_FUNCTION(0x0, "gpio_in"),
45 SUNXI_FUNCTION(0x1, "gpio_out"),
46 SUNXI_FUNCTION(0x2, "uart2"),
47 SUNXI_FUNCTION(0x3, "jtag"),
48 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)),
49 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
50 SUNXI_FUNCTION(0x0, "gpio_in"),
51 SUNXI_FUNCTION(0x1, "gpio_out"),
52 SUNXI_FUNCTION(0x2, "i2s0"),
53 SUNXI_FUNCTION(0x3, "tdm"),
54 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)),
55 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
56 SUNXI_FUNCTION(0x0, "gpio_in"),
57 SUNXI_FUNCTION(0x1, "gpio_out"),
58 SUNXI_FUNCTION(0x2, "i2s0"),
59 SUNXI_FUNCTION(0x3, "tdm"),
60 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)),
61 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
62 SUNXI_FUNCTION(0x0, "gpio_in"),
63 SUNXI_FUNCTION(0x1, "gpio_out"),
64 SUNXI_FUNCTION(0x2, "i2s0"),
65 SUNXI_FUNCTION(0x3, "tdm"),
66 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)),
67 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
68 SUNXI_FUNCTION(0x0, "gpio_in"),
69 SUNXI_FUNCTION(0x1, "gpio_out"),
70 SUNXI_FUNCTION(0x2, "i2s0"),
71 SUNXI_FUNCTION(0x3, "tdm"),
72 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)),
73 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 8),
74 SUNXI_FUNCTION(0x0, "gpio_in"),
75 SUNXI_FUNCTION(0x1, "gpio_out"),
76 SUNXI_FUNCTION(0x2, "i2s0"),
77 SUNXI_FUNCTION(0x3, "tdm"),
78 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)),
79 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 9),
80 SUNXI_FUNCTION(0x0, "gpio_in"),
81 SUNXI_FUNCTION(0x1, "gpio_out"),
82 SUNXI_FUNCTION(0x2, "uart0"),
83 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)),
84 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
85 SUNXI_FUNCTION(0x0, "gpio_in"),
86 SUNXI_FUNCTION(0x1, "gpio_out"),
87 SUNXI_FUNCTION(0x2, "uart0"),
88 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)),
89
90 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
91 SUNXI_FUNCTION(0x0, "gpio_in"),
92 SUNXI_FUNCTION(0x1, "gpio_out"),
93 SUNXI_FUNCTION(0x2, "nand0"),
94 SUNXI_FUNCTION(0x3, "spi0")),
95 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
96 SUNXI_FUNCTION(0x0, "gpio_in"),
97 SUNXI_FUNCTION(0x1, "gpio_out"),
98 SUNXI_FUNCTION(0x2, "nand0"),
99 SUNXI_FUNCTION(0x3, "spi0")),
100 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
101 SUNXI_FUNCTION(0x0, "gpio_in"),
102 SUNXI_FUNCTION(0x1, "gpio_out"),
103 SUNXI_FUNCTION(0x2, "nand0"),
104 SUNXI_FUNCTION(0x3, "spi0")),
105 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
106 SUNXI_FUNCTION(0x0, "gpio_in"),
107 SUNXI_FUNCTION(0x1, "gpio_out"),
108 SUNXI_FUNCTION(0x2, "nand0"),
109 SUNXI_FUNCTION(0x3, "spi0")),
110 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
111 SUNXI_FUNCTION(0x0, "gpio_in"),
112 SUNXI_FUNCTION(0x1, "gpio_out"),
113 SUNXI_FUNCTION(0x2, "nand0")),
114 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
115 SUNXI_FUNCTION(0x0, "gpio_in"),
116 SUNXI_FUNCTION(0x1, "gpio_out"),
117 SUNXI_FUNCTION(0x2, "nand0"),
118 SUNXI_FUNCTION(0x3, "mmc2")),
119 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
120 SUNXI_FUNCTION(0x0, "gpio_in"),
121 SUNXI_FUNCTION(0x1, "gpio_out"),
122 SUNXI_FUNCTION(0x2, "nand0"),
123 SUNXI_FUNCTION(0x3, "mmc2")),
124 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
125 SUNXI_FUNCTION(0x0, "gpio_in"),
126 SUNXI_FUNCTION(0x1, "gpio_out"),
127 SUNXI_FUNCTION(0x2, "nand0")),
128 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
129 SUNXI_FUNCTION(0x0, "gpio_in"),
130 SUNXI_FUNCTION(0x1, "gpio_out"),
131 SUNXI_FUNCTION(0x2, "nand0"),
132 SUNXI_FUNCTION(0x3, "mmc2")),
133 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
134 SUNXI_FUNCTION(0x0, "gpio_in"),
135 SUNXI_FUNCTION(0x1, "gpio_out"),
136 SUNXI_FUNCTION(0x2, "nand0"),
137 SUNXI_FUNCTION(0x3, "mmc2")),
138 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
139 SUNXI_FUNCTION(0x0, "gpio_in"),
140 SUNXI_FUNCTION(0x1, "gpio_out"),
141 SUNXI_FUNCTION(0x2, "nand0"),
142 SUNXI_FUNCTION(0x3, "mmc2")),
143 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
144 SUNXI_FUNCTION(0x0, "gpio_in"),
145 SUNXI_FUNCTION(0x1, "gpio_out"),
146 SUNXI_FUNCTION(0x2, "nand0"),
147 SUNXI_FUNCTION(0x3, "mmc2")),
148 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
149 SUNXI_FUNCTION(0x0, "gpio_in"),
150 SUNXI_FUNCTION(0x1, "gpio_out"),
151 SUNXI_FUNCTION(0x2, "nand0"),
152 SUNXI_FUNCTION(0x3, "mmc2")),
153 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
154 SUNXI_FUNCTION(0x0, "gpio_in"),
155 SUNXI_FUNCTION(0x1, "gpio_out"),
156 SUNXI_FUNCTION(0x2, "nand0"),
157 SUNXI_FUNCTION(0x3, "mmc2")),
158 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
159 SUNXI_FUNCTION(0x0, "gpio_in"),
160 SUNXI_FUNCTION(0x1, "gpio_out"),
161 SUNXI_FUNCTION(0x2, "nand"),
162 SUNXI_FUNCTION(0x3, "mmc2")),
163 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
164 SUNXI_FUNCTION(0x0, "gpio_in"),
165 SUNXI_FUNCTION(0x1, "gpio_out"),
166 SUNXI_FUNCTION(0x2, "nand"),
167 SUNXI_FUNCTION(0x3, "mmc2")),
168 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
169 SUNXI_FUNCTION(0x0, "gpio_in"),
170 SUNXI_FUNCTION(0x1, "gpio_out"),
171 SUNXI_FUNCTION(0x2, "nand"),
172 SUNXI_FUNCTION(0x3, "mmc2")),
173 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
174 SUNXI_FUNCTION(0x0, "gpio_in"),
175 SUNXI_FUNCTION(0x1, "gpio_out"),
176 SUNXI_FUNCTION(0x2, "nand")),
177 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
178 SUNXI_FUNCTION(0x0, "gpio_in"),
179 SUNXI_FUNCTION(0x1, "gpio_out"),
180 SUNXI_FUNCTION(0x2, "nand")),
181
182 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
183 SUNXI_FUNCTION(0x0, "gpio_in"),
184 SUNXI_FUNCTION(0x1, "gpio_out"),
185 SUNXI_FUNCTION(0x2, "lcd0"),
186 SUNXI_FUNCTION(0x4, "gmac")),
187 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
188 SUNXI_FUNCTION(0x0, "gpio_in"),
189 SUNXI_FUNCTION(0x1, "gpio_out"),
190 SUNXI_FUNCTION(0x2, "lcd0"),
191 SUNXI_FUNCTION(0x4, "gmac")),
192 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
193 SUNXI_FUNCTION(0x0, "gpio_in"),
194 SUNXI_FUNCTION(0x1, "gpio_out"),
195 SUNXI_FUNCTION(0x2, "lcd0"),
196 SUNXI_FUNCTION(0x4, "gmac")),
197 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
198 SUNXI_FUNCTION(0x0, "gpio_in"),
199 SUNXI_FUNCTION(0x1, "gpio_out"),
200 SUNXI_FUNCTION(0x2, "lcd0"),
201 SUNXI_FUNCTION(0x4, "gmac")),
202 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
203 SUNXI_FUNCTION(0x0, "gpio_in"),
204 SUNXI_FUNCTION(0x1, "gpio_out"),
205 SUNXI_FUNCTION(0x2, "lcd0"),
206 SUNXI_FUNCTION(0x4, "gmac")),
207 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
208 SUNXI_FUNCTION(0x0, "gpio_in"),
209 SUNXI_FUNCTION(0x1, "gpio_out"),
210 SUNXI_FUNCTION(0x2, "lcd0"),
211 SUNXI_FUNCTION(0x4, "gmac")),
212 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
213 SUNXI_FUNCTION(0x0, "gpio_in"),
214 SUNXI_FUNCTION(0x1, "gpio_out"),
215 SUNXI_FUNCTION(0x2, "lcd0"),
216 SUNXI_FUNCTION(0x4, "gmac")),
217 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
218 SUNXI_FUNCTION(0x0, "gpio_in"),
219 SUNXI_FUNCTION(0x1, "gpio_out"),
220 SUNXI_FUNCTION(0x2, "lcd0"),
221 SUNXI_FUNCTION(0x4, "gmac")),
222 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
223 SUNXI_FUNCTION(0x0, "gpio_in"),
224 SUNXI_FUNCTION(0x1, "gpio_out"),
225 SUNXI_FUNCTION(0x2, "lcd0"),
226 SUNXI_FUNCTION(0x4, "gmac")),
227 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
228 SUNXI_FUNCTION(0x0, "gpio_in"),
229 SUNXI_FUNCTION(0x1, "gpio_out"),
230 SUNXI_FUNCTION(0x2, "lcd0"),
231 SUNXI_FUNCTION(0x4, "gmac")),
232 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
233 SUNXI_FUNCTION(0x0, "gpio_in"),
234 SUNXI_FUNCTION(0x1, "gpio_out"),
235 SUNXI_FUNCTION(0x2, "lcd0"),
236 SUNXI_FUNCTION(0x4, "gmac")),
237 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
238 SUNXI_FUNCTION(0x0, "gpio_in"),
239 SUNXI_FUNCTION(0x1, "gpio_out"),
240 SUNXI_FUNCTION(0x2, "lcd0"),
241 SUNXI_FUNCTION(0x4, "gmac")),
242 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
243 SUNXI_FUNCTION(0x0, "gpio_in"),
244 SUNXI_FUNCTION(0x1, "gpio_out"),
245 SUNXI_FUNCTION(0x2, "lcd0"),
246 SUNXI_FUNCTION(0x3, "lvds0"),
247 SUNXI_FUNCTION(0x4, "gmac")),
248 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
249 SUNXI_FUNCTION(0x0, "gpio_in"),
250 SUNXI_FUNCTION(0x1, "gpio_out"),
251 SUNXI_FUNCTION(0x2, "lcd0"),
252 SUNXI_FUNCTION(0x3, "lvds0"),
253 SUNXI_FUNCTION(0x4, "gmac")),
254 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
255 SUNXI_FUNCTION(0x0, "gpio_in"),
256 SUNXI_FUNCTION(0x1, "gpio_out"),
257 SUNXI_FUNCTION(0x2, "lcd0"),
258 SUNXI_FUNCTION(0x3, "lvds0"),
259 SUNXI_FUNCTION(0x4, "gmac")),
260 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
261 SUNXI_FUNCTION(0x0, "gpio_in"),
262 SUNXI_FUNCTION(0x1, "gpio_out"),
263 SUNXI_FUNCTION(0x2, "lcd0"),
264 SUNXI_FUNCTION(0x3, "lvds0"),
265 SUNXI_FUNCTION(0x4, "gmac")),
266 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
267 SUNXI_FUNCTION(0x0, "gpio_in"),
268 SUNXI_FUNCTION(0x1, "gpio_out"),
269 SUNXI_FUNCTION(0x2, "lcd0"),
270 SUNXI_FUNCTION(0x3, "lvds0"),
271 SUNXI_FUNCTION(0x4, "gmac")),
272 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
273 SUNXI_FUNCTION(0x0, "gpio_in"),
274 SUNXI_FUNCTION(0x1, "gpio_out"),
275 SUNXI_FUNCTION(0x2, "lcd0"),
276 SUNXI_FUNCTION(0x3, "lvds0"),
277 SUNXI_FUNCTION(0x4, "gmac")),
278 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
279 SUNXI_FUNCTION(0x0, "gpio_in"),
280 SUNXI_FUNCTION(0x1, "gpio_out"),
281 SUNXI_FUNCTION(0x2, "lcd0"),
282 SUNXI_FUNCTION(0x3, "lvds0")),
283 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
284 SUNXI_FUNCTION(0x0, "gpio_in"),
285 SUNXI_FUNCTION(0x1, "gpio_out"),
286 SUNXI_FUNCTION(0x2, "lcd0"),
287 SUNXI_FUNCTION(0x3, "lvds0")),
288 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
289 SUNXI_FUNCTION(0x0, "gpio_in"),
290 SUNXI_FUNCTION(0x1, "gpio_out"),
291 SUNXI_FUNCTION(0x2, "lcd0"),
292 SUNXI_FUNCTION(0x3, "lvds0")),
293 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
294 SUNXI_FUNCTION(0x0, "gpio_in"),
295 SUNXI_FUNCTION(0x1, "gpio_out"),
296 SUNXI_FUNCTION(0x2, "lcd0"),
297 SUNXI_FUNCTION(0x3, "lvds0")),
298 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 28),
299 SUNXI_FUNCTION(0x0, "gpio_in"),
300 SUNXI_FUNCTION(0x1, "gpio_out"),
301 SUNXI_FUNCTION(0x2, "pwm")),
302 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 29),
303 SUNXI_FUNCTION(0x0, "gpio_in"),
304 SUNXI_FUNCTION(0x1, "gpio_out")),
305
306 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
307 SUNXI_FUNCTION(0x0, "gpio_in"),
308 SUNXI_FUNCTION(0x1, "gpio_out"),
309 SUNXI_FUNCTION(0x2, "csi"),
310 SUNXI_FUNCTION(0x4, "ccir")),
311 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
312 SUNXI_FUNCTION(0x0, "gpio_in"),
313 SUNXI_FUNCTION(0x1, "gpio_out"),
314 SUNXI_FUNCTION(0x2, "csi"),
315 SUNXI_FUNCTION(0x4, "ccir")),
316 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
317 SUNXI_FUNCTION(0x0, "gpio_in"),
318 SUNXI_FUNCTION(0x1, "gpio_out"),
319 SUNXI_FUNCTION(0x2, "csi"),
320 SUNXI_FUNCTION(0x4, "ccir")),
321 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
322 SUNXI_FUNCTION(0x0, "gpio_in"),
323 SUNXI_FUNCTION(0x1, "gpio_out"),
324 SUNXI_FUNCTION(0x2, "csi"),
325 SUNXI_FUNCTION(0x4, "ccir")),
326 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
327 SUNXI_FUNCTION(0x0, "gpio_in"),
328 SUNXI_FUNCTION(0x1, "gpio_out"),
329 SUNXI_FUNCTION(0x2, "csi")),
330 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
331 SUNXI_FUNCTION(0x0, "gpio_in"),
332 SUNXI_FUNCTION(0x1, "gpio_out"),
333 SUNXI_FUNCTION(0x2, "csi")),
334 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
335 SUNXI_FUNCTION(0x0, "gpio_in"),
336 SUNXI_FUNCTION(0x1, "gpio_out"),
337 SUNXI_FUNCTION(0x2, "csi"),
338 SUNXI_FUNCTION(0x4, "ccir")),
339 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
340 SUNXI_FUNCTION(0x0, "gpio_in"),
341 SUNXI_FUNCTION(0x1, "gpio_out"),
342 SUNXI_FUNCTION(0x2, "csi"),
343 SUNXI_FUNCTION(0x4, "ccir")),
344 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
345 SUNXI_FUNCTION(0x0, "gpio_in"),
346 SUNXI_FUNCTION(0x1, "gpio_out"),
347 SUNXI_FUNCTION(0x2, "csi"),
348 SUNXI_FUNCTION(0x4, "ccir")),
349 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
350 SUNXI_FUNCTION(0x0, "gpio_in"),
351 SUNXI_FUNCTION(0x1, "gpio_out"),
352 SUNXI_FUNCTION(0x2, "csi"),
353 SUNXI_FUNCTION(0x4, "ccir")),
354 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
355 SUNXI_FUNCTION(0x0, "gpio_in"),
356 SUNXI_FUNCTION(0x1, "gpio_out"),
357 SUNXI_FUNCTION(0x2, "csi"),
358 SUNXI_FUNCTION(0x3, "uart4"),
359 SUNXI_FUNCTION(0x4, "ccir")),
360 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
361 SUNXI_FUNCTION(0x0, "gpio_in"),
362 SUNXI_FUNCTION(0x1, "gpio_out"),
363 SUNXI_FUNCTION(0x2, "csi"),
364 SUNXI_FUNCTION(0x3, "uart4"),
365 SUNXI_FUNCTION(0x4, "ccir")),
366 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
367 SUNXI_FUNCTION(0x0, "gpio_in"),
368 SUNXI_FUNCTION(0x1, "gpio_out"),
369 SUNXI_FUNCTION(0x2, "csi"),
370 SUNXI_FUNCTION(0x3, "uart4"),
371 SUNXI_FUNCTION(0x4, "ccir")),
372 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
373 SUNXI_FUNCTION(0x0, "gpio_in"),
374 SUNXI_FUNCTION(0x1, "gpio_out"),
375 SUNXI_FUNCTION(0x2, "csi"),
376 SUNXI_FUNCTION(0x3, "uart4"),
377 SUNXI_FUNCTION(0x4, "ccir")),
378 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
379 SUNXI_FUNCTION(0x0, "gpio_in"),
380 SUNXI_FUNCTION(0x1, "gpio_out"),
381 SUNXI_FUNCTION(0x2, "csi"),
382 SUNXI_FUNCTION(0x3, "i2c2")),
383 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
384 SUNXI_FUNCTION(0x0, "gpio_in"),
385 SUNXI_FUNCTION(0x1, "gpio_out"),
386 SUNXI_FUNCTION(0x2, "csi"),
387 SUNXI_FUNCTION(0x3, "i2c2")),
388 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 16),
389 SUNXI_FUNCTION(0x0, "gpio_in"),
390 SUNXI_FUNCTION(0x1, "gpio_out")),
391 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 17),
392 SUNXI_FUNCTION(0x0, "gpio_in"),
393 SUNXI_FUNCTION(0x1, "gpio_out")),
394 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 18),
395 SUNXI_FUNCTION(0x0, "gpio_in"),
396 SUNXI_FUNCTION(0x1, "gpio_out"),
397 SUNXI_FUNCTION(0x3, "spdif")),
398 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 19),
399 SUNXI_FUNCTION(0x0, "gpio_in"),
400 SUNXI_FUNCTION(0x1, "gpio_out")),
401
402 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
403 SUNXI_FUNCTION(0x0, "gpio_in"),
404 SUNXI_FUNCTION(0x1, "gpio_out"),
405 SUNXI_FUNCTION(0x2, "mmc0"),
406 SUNXI_FUNCTION(0x3, "jtag")),
407 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
408 SUNXI_FUNCTION(0x0, "gpio_in"),
409 SUNXI_FUNCTION(0x1, "gpio_out"),
410 SUNXI_FUNCTION(0x2, "mmc0"),
411 SUNXI_FUNCTION(0x3, "jtag")),
412 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
413 SUNXI_FUNCTION(0x0, "gpio_in"),
414 SUNXI_FUNCTION(0x1, "gpio_out"),
415 SUNXI_FUNCTION(0x2, "mmc0"),
416 SUNXI_FUNCTION(0x3, "uart0")),
417 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
418 SUNXI_FUNCTION(0x0, "gpio_in"),
419 SUNXI_FUNCTION(0x1, "gpio_out"),
420 SUNXI_FUNCTION(0x2, "mmc0"),
421 SUNXI_FUNCTION(0x3, "jtag")),
422 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
423 SUNXI_FUNCTION(0x0, "gpio_in"),
424 SUNXI_FUNCTION(0x1, "gpio_out"),
425 SUNXI_FUNCTION(0x2, "mmc0"),
426 SUNXI_FUNCTION(0x3, "uart0")),
427 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
428 SUNXI_FUNCTION(0x0, "gpio_in"),
429 SUNXI_FUNCTION(0x1, "gpio_out"),
430 SUNXI_FUNCTION(0x2, "mmc0"),
431 SUNXI_FUNCTION(0x3, "jtag")),
432 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 6),
433 SUNXI_FUNCTION(0x0, "gpio_in"),
434 SUNXI_FUNCTION(0x1, "gpio_out")),
435
436 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
437 SUNXI_FUNCTION(0x0, "gpio_in"),
438 SUNXI_FUNCTION(0x1, "gpio_out"),
439 SUNXI_FUNCTION(0x2, "mmc1"),
440 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 0)),
441 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
442 SUNXI_FUNCTION(0x0, "gpio_in"),
443 SUNXI_FUNCTION(0x1, "gpio_out"),
444 SUNXI_FUNCTION(0x2, "mmc1"),
445 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 1)),
446 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
447 SUNXI_FUNCTION(0x0, "gpio_in"),
448 SUNXI_FUNCTION(0x1, "gpio_out"),
449 SUNXI_FUNCTION(0x2, "mmc1"),
450 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 2)),
451 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
452 SUNXI_FUNCTION(0x0, "gpio_in"),
453 SUNXI_FUNCTION(0x1, "gpio_out"),
454 SUNXI_FUNCTION(0x2, "mmc1"),
455 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 3)),
456 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
457 SUNXI_FUNCTION(0x0, "gpio_in"),
458 SUNXI_FUNCTION(0x1, "gpio_out"),
459 SUNXI_FUNCTION(0x2, "mmc1"),
460 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)),
461 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
462 SUNXI_FUNCTION(0x0, "gpio_in"),
463 SUNXI_FUNCTION(0x1, "gpio_out"),
464 SUNXI_FUNCTION(0x2, "mmc1"),
465 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)),
466 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
467 SUNXI_FUNCTION(0x0, "gpio_in"),
468 SUNXI_FUNCTION(0x1, "gpio_out"),
469 SUNXI_FUNCTION(0x2, "uart1"),
470 SUNXI_FUNCTION(0x3, "spi1"),
471 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 6)),
472 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
473 SUNXI_FUNCTION(0x0, "gpio_in"),
474 SUNXI_FUNCTION(0x1, "gpio_out"),
475 SUNXI_FUNCTION(0x2, "uart1"),
476 SUNXI_FUNCTION(0x3, "spi1"),
477 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 7)),
478 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
479 SUNXI_FUNCTION(0x0, "gpio_in"),
480 SUNXI_FUNCTION(0x1, "gpio_out"),
481 SUNXI_FUNCTION(0x2, "uart1"),
482 SUNXI_FUNCTION(0x3, "spi1"),
483 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 8)),
484 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
485 SUNXI_FUNCTION(0x0, "gpio_in"),
486 SUNXI_FUNCTION(0x1, "gpio_out"),
487 SUNXI_FUNCTION(0x2, "uart1"),
488 SUNXI_FUNCTION(0x3, "spi1"),
489 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 9)),
490 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
491 SUNXI_FUNCTION(0x0, "gpio_in"),
492 SUNXI_FUNCTION(0x1, "gpio_out"),
493 SUNXI_FUNCTION(0x2, "i2s1"),
494 SUNXI_FUNCTION(0x3, "uart3"),
495 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 10)),
496 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
497 SUNXI_FUNCTION(0x0, "gpio_in"),
498 SUNXI_FUNCTION(0x1, "gpio_out"),
499 SUNXI_FUNCTION(0x2, "i2s1"),
500 SUNXI_FUNCTION(0x3, "uart3"),
501 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 11)),
502 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
503 SUNXI_FUNCTION(0x0, "gpio_in"),
504 SUNXI_FUNCTION(0x1, "gpio_out"),
505 SUNXI_FUNCTION(0x2, "i2s1"),
506 SUNXI_FUNCTION(0x3, "uart3"),
507 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 12)),
508 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
509 SUNXI_FUNCTION(0x0, "gpio_in"),
510 SUNXI_FUNCTION(0x1, "gpio_out"),
511 SUNXI_FUNCTION(0x2, "i2s1"),
512 SUNXI_FUNCTION(0x3, "uart3"),
513 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 13)),
514
515 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
516 SUNXI_FUNCTION(0x0, "gpio_in"),
517 SUNXI_FUNCTION(0x1, "gpio_out"),
518 SUNXI_FUNCTION(0x2, "i2c0"),
519 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 0)),
520 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
521 SUNXI_FUNCTION(0x0, "gpio_in"),
522 SUNXI_FUNCTION(0x1, "gpio_out"),
523 SUNXI_FUNCTION(0x2, "i2c0"),
524 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 1)),
525 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
526 SUNXI_FUNCTION(0x0, "gpio_in"),
527 SUNXI_FUNCTION(0x1, "gpio_out"),
528 SUNXI_FUNCTION(0x2, "i2c1"),
529 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 2)),
530 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
531 SUNXI_FUNCTION(0x0, "gpio_in"),
532 SUNXI_FUNCTION(0x1, "gpio_out"),
533 SUNXI_FUNCTION(0x2, "i2c1"),
534 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 3)),
535 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
536 SUNXI_FUNCTION(0x0, "gpio_in"),
537 SUNXI_FUNCTION(0x1, "gpio_out"),
538 SUNXI_FUNCTION(0x2, "i2c2"),
539 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 4)),
540 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
541 SUNXI_FUNCTION(0x0, "gpio_in"),
542 SUNXI_FUNCTION(0x1, "gpio_out"),
543 SUNXI_FUNCTION(0x2, "i2c2"),
544 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 5)),
545 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
546 SUNXI_FUNCTION(0x0, "gpio_in"),
547 SUNXI_FUNCTION(0x1, "gpio_out"),
548 SUNXI_FUNCTION(0x2, "hdmi"),
549 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 6)),
550 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
551 SUNXI_FUNCTION(0x0, "gpio_in"),
552 SUNXI_FUNCTION(0x1, "gpio_out"),
553 SUNXI_FUNCTION(0x2, "hdmi"),
554 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 7)),
555 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
556 SUNXI_FUNCTION(0x0, "gpio_in"),
557 SUNXI_FUNCTION(0x1, "gpio_out"),
558 SUNXI_FUNCTION(0x2, "hdmi"),
559 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 8)),
560 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
561 SUNXI_FUNCTION(0x0, "gpio_in"),
562 SUNXI_FUNCTION(0x1, "gpio_out"),
563 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 9)),
564 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
565 SUNXI_FUNCTION(0x0, "gpio_in"),
566 SUNXI_FUNCTION(0x1, "gpio_out"),
567 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 10)),
568 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
569 SUNXI_FUNCTION(0x0, "gpio_in"),
570 SUNXI_FUNCTION(0x1, "gpio_out"),
571 SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 11)),
572 };
573
574 static const struct sunxi_pinctrl_desc sun8i_a83t_pinctrl_data = {
575 .pins = sun8i_a83t_pins,
576 .npins = ARRAY_SIZE(sun8i_a83t_pins),
577 .irq_banks = 3,
578 };
579
580 static int sun8i_a83t_pinctrl_probe(struct platform_device *pdev)
581 {
582 return sunxi_pinctrl_init(pdev,
583 &sun8i_a83t_pinctrl_data);
584 }
585
586 static const struct of_device_id sun8i_a83t_pinctrl_match[] = {
587 { .compatible = "allwinner,sun8i-a83t-pinctrl", },
588 {}
589 };
590
591 static struct platform_driver sun8i_a83t_pinctrl_driver = {
592 .probe = sun8i_a83t_pinctrl_probe,
593 .driver = {
594 .name = "sun8i-a83t-pinctrl",
595 .of_match_table = sun8i_a83t_pinctrl_match,
596 },
597 };
598 builtin_platform_driver(sun8i_a83t_pinctrl_driver);