1
2
3
4
5
6
7
8
9
10
11
12
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/of.h>
16#include <linux/of_device.h>
17#include <linux/pinctrl/pinctrl.h>
18
19#include "pinctrl-sunxi.h"
20
21static const struct sunxi_desc_pin sun4i_a10_pins[] = {
22 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
23 SUNXI_FUNCTION(0x0, "gpio_in"),
24 SUNXI_FUNCTION(0x1, "gpio_out"),
25 SUNXI_FUNCTION(0x2, "emac"),
26 SUNXI_FUNCTION(0x3, "spi1"),
27 SUNXI_FUNCTION(0x4, "uart2"),
28 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
29 PINCTRL_SUN7I_A20 |
30 PINCTRL_SUN8I_R40)),
31 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
32 SUNXI_FUNCTION(0x0, "gpio_in"),
33 SUNXI_FUNCTION(0x1, "gpio_out"),
34 SUNXI_FUNCTION(0x2, "emac"),
35 SUNXI_FUNCTION(0x3, "spi1"),
36 SUNXI_FUNCTION(0x4, "uart2"),
37 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
38 PINCTRL_SUN7I_A20 |
39 PINCTRL_SUN8I_R40)),
40 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
41 SUNXI_FUNCTION(0x0, "gpio_in"),
42 SUNXI_FUNCTION(0x1, "gpio_out"),
43 SUNXI_FUNCTION(0x2, "emac"),
44 SUNXI_FUNCTION(0x3, "spi1"),
45 SUNXI_FUNCTION(0x4, "uart2"),
46 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
47 PINCTRL_SUN7I_A20 |
48 PINCTRL_SUN8I_R40)),
49 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
50 SUNXI_FUNCTION(0x0, "gpio_in"),
51 SUNXI_FUNCTION(0x1, "gpio_out"),
52 SUNXI_FUNCTION(0x2, "emac"),
53 SUNXI_FUNCTION(0x3, "spi1"),
54 SUNXI_FUNCTION(0x4, "uart2"),
55 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
56 PINCTRL_SUN7I_A20 |
57 PINCTRL_SUN8I_R40)),
58 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
59 SUNXI_FUNCTION(0x0, "gpio_in"),
60 SUNXI_FUNCTION(0x1, "gpio_out"),
61 SUNXI_FUNCTION(0x2, "emac"),
62 SUNXI_FUNCTION(0x3, "spi1"),
63 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
64 PINCTRL_SUN7I_A20 |
65 PINCTRL_SUN8I_R40)),
66 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
67 SUNXI_FUNCTION(0x0, "gpio_in"),
68 SUNXI_FUNCTION(0x1, "gpio_out"),
69 SUNXI_FUNCTION(0x2, "emac"),
70 SUNXI_FUNCTION(0x3, "spi3"),
71 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
72 PINCTRL_SUN7I_A20 |
73 PINCTRL_SUN8I_R40)),
74 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
75 SUNXI_FUNCTION(0x0, "gpio_in"),
76 SUNXI_FUNCTION(0x1, "gpio_out"),
77 SUNXI_FUNCTION(0x2, "emac"),
78 SUNXI_FUNCTION(0x3, "spi3"),
79 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
80 PINCTRL_SUN7I_A20 |
81 PINCTRL_SUN8I_R40)),
82 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
83 SUNXI_FUNCTION(0x0, "gpio_in"),
84 SUNXI_FUNCTION(0x1, "gpio_out"),
85 SUNXI_FUNCTION(0x2, "emac"),
86 SUNXI_FUNCTION(0x3, "spi3"),
87 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
88 PINCTRL_SUN7I_A20 |
89 PINCTRL_SUN8I_R40)),
90 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
91 SUNXI_FUNCTION(0x0, "gpio_in"),
92 SUNXI_FUNCTION(0x1, "gpio_out"),
93 SUNXI_FUNCTION(0x2, "emac"),
94 SUNXI_FUNCTION(0x3, "spi3"),
95 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
96 PINCTRL_SUN7I_A20 |
97 PINCTRL_SUN8I_R40)),
98 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
99 SUNXI_FUNCTION(0x0, "gpio_in"),
100 SUNXI_FUNCTION(0x1, "gpio_out"),
101 SUNXI_FUNCTION(0x2, "emac"),
102 SUNXI_FUNCTION(0x3, "spi3"),
103 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
104 PINCTRL_SUN7I_A20 |
105 PINCTRL_SUN8I_R40),
106 SUNXI_FUNCTION_VARIANT(0x6, "i2s1",
107 PINCTRL_SUN7I_A20 |
108 PINCTRL_SUN8I_R40)),
109 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
110 SUNXI_FUNCTION(0x0, "gpio_in"),
111 SUNXI_FUNCTION(0x1, "gpio_out"),
112 SUNXI_FUNCTION(0x2, "emac"),
113 SUNXI_FUNCTION(0x4, "uart1"),
114 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
115 PINCTRL_SUN7I_A20 |
116 PINCTRL_SUN8I_R40)),
117 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
118 SUNXI_FUNCTION(0x0, "gpio_in"),
119 SUNXI_FUNCTION(0x1, "gpio_out"),
120 SUNXI_FUNCTION(0x2, "emac"),
121 SUNXI_FUNCTION(0x4, "uart1"),
122 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
123 PINCTRL_SUN7I_A20 |
124 PINCTRL_SUN8I_R40)),
125 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
126 SUNXI_FUNCTION(0x0, "gpio_in"),
127 SUNXI_FUNCTION(0x1, "gpio_out"),
128 SUNXI_FUNCTION(0x2, "emac"),
129 SUNXI_FUNCTION(0x3, "uart6"),
130 SUNXI_FUNCTION(0x4, "uart1"),
131 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
132 PINCTRL_SUN7I_A20 |
133 PINCTRL_SUN8I_R40)),
134 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
135 SUNXI_FUNCTION(0x0, "gpio_in"),
136 SUNXI_FUNCTION(0x1, "gpio_out"),
137 SUNXI_FUNCTION(0x2, "emac"),
138 SUNXI_FUNCTION(0x3, "uart6"),
139 SUNXI_FUNCTION(0x4, "uart1"),
140 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
141 PINCTRL_SUN7I_A20 |
142 PINCTRL_SUN8I_R40)),
143 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
144 SUNXI_FUNCTION(0x0, "gpio_in"),
145 SUNXI_FUNCTION(0x1, "gpio_out"),
146 SUNXI_FUNCTION(0x2, "emac"),
147 SUNXI_FUNCTION(0x3, "uart7"),
148 SUNXI_FUNCTION(0x4, "uart1"),
149 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
150 PINCTRL_SUN7I_A20 |
151 PINCTRL_SUN8I_R40),
152 SUNXI_FUNCTION_VARIANT(0x6, "i2s1",
153 PINCTRL_SUN7I_A20 |
154 PINCTRL_SUN8I_R40)),
155 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
156 SUNXI_FUNCTION(0x0, "gpio_in"),
157 SUNXI_FUNCTION(0x1, "gpio_out"),
158 SUNXI_FUNCTION(0x2, "emac"),
159 SUNXI_FUNCTION(0x3, "uart7"),
160 SUNXI_FUNCTION(0x4, "uart1"),
161 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
162 PINCTRL_SUN7I_A20 |
163 PINCTRL_SUN8I_R40),
164 SUNXI_FUNCTION_VARIANT(0x6, "i2s1",
165 PINCTRL_SUN7I_A20 |
166 PINCTRL_SUN8I_R40)),
167 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
168 SUNXI_FUNCTION(0x0, "gpio_in"),
169 SUNXI_FUNCTION(0x1, "gpio_out"),
170 SUNXI_FUNCTION(0x2, "emac"),
171 SUNXI_FUNCTION(0x3, "can"),
172 SUNXI_FUNCTION(0x4, "uart1"),
173 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
174 PINCTRL_SUN7I_A20 |
175 PINCTRL_SUN8I_R40),
176 SUNXI_FUNCTION_VARIANT(0x6, "i2s1",
177 PINCTRL_SUN7I_A20 |
178 PINCTRL_SUN8I_R40)),
179 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
180 SUNXI_FUNCTION(0x0, "gpio_in"),
181 SUNXI_FUNCTION(0x1, "gpio_out"),
182 SUNXI_FUNCTION(0x2, "emac"),
183 SUNXI_FUNCTION(0x3, "can"),
184 SUNXI_FUNCTION(0x4, "uart1"),
185 SUNXI_FUNCTION_VARIANT(0x5, "gmac",
186 PINCTRL_SUN7I_A20 |
187 PINCTRL_SUN8I_R40),
188 SUNXI_FUNCTION_VARIANT(0x6, "i2s1",
189 PINCTRL_SUN7I_A20 |
190 PINCTRL_SUN8I_R40)),
191
192 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
193 SUNXI_FUNCTION(0x0, "gpio_in"),
194 SUNXI_FUNCTION(0x1, "gpio_out"),
195 SUNXI_FUNCTION(0x2, "i2c0"),
196 SUNXI_FUNCTION_VARIANT(0x3, "pll_lock_dbg",
197 PINCTRL_SUN8I_R40)),
198 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
199 SUNXI_FUNCTION(0x0, "gpio_in"),
200 SUNXI_FUNCTION(0x1, "gpio_out"),
201 SUNXI_FUNCTION(0x2, "i2c0")),
202 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
203 SUNXI_FUNCTION(0x0, "gpio_in"),
204 SUNXI_FUNCTION(0x1, "gpio_out"),
205 SUNXI_FUNCTION_VARIANT(0x2, "pwm",
206 PINCTRL_SUN4I_A10 |
207 PINCTRL_SUN7I_A20),
208 SUNXI_FUNCTION_VARIANT(0x3, "pwm",
209 PINCTRL_SUN8I_R40)),
210 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
211 SUNXI_FUNCTION(0x0, "gpio_in"),
212 SUNXI_FUNCTION(0x1, "gpio_out"),
213 SUNXI_FUNCTION_VARIANT(0x2, "ir0",
214 PINCTRL_SUN4I_A10 |
215 PINCTRL_SUN7I_A20),
216 SUNXI_FUNCTION_VARIANT(0x3, "pwm",
217 PINCTRL_SUN8I_R40),
218
219
220
221
222
223
224 SUNXI_FUNCTION(0x4, "spdif")),
225 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
226 SUNXI_FUNCTION(0x0, "gpio_in"),
227 SUNXI_FUNCTION(0x1, "gpio_out"),
228 SUNXI_FUNCTION(0x2, "ir0")),
229 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
230 SUNXI_FUNCTION(0x0, "gpio_in"),
231 SUNXI_FUNCTION(0x1, "gpio_out"),
232
233
234
235
236
237
238 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
239 PINCTRL_SUN4I_A10),
240 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
241 PINCTRL_SUN7I_A20 |
242 PINCTRL_SUN8I_R40),
243 SUNXI_FUNCTION(0x3, "ac97")),
244 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
245 SUNXI_FUNCTION(0x0, "gpio_in"),
246 SUNXI_FUNCTION(0x1, "gpio_out"),
247 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
248 PINCTRL_SUN4I_A10),
249 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
250 PINCTRL_SUN7I_A20 |
251 PINCTRL_SUN8I_R40),
252 SUNXI_FUNCTION(0x3, "ac97")),
253 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
254 SUNXI_FUNCTION(0x0, "gpio_in"),
255 SUNXI_FUNCTION(0x1, "gpio_out"),
256 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
257 PINCTRL_SUN4I_A10),
258 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
259 PINCTRL_SUN7I_A20 |
260 PINCTRL_SUN8I_R40),
261 SUNXI_FUNCTION(0x3, "ac97")),
262 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 8),
263 SUNXI_FUNCTION(0x0, "gpio_in"),
264 SUNXI_FUNCTION(0x1, "gpio_out"),
265 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
266 PINCTRL_SUN4I_A10),
267 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
268 PINCTRL_SUN7I_A20 |
269 PINCTRL_SUN8I_R40),
270 SUNXI_FUNCTION(0x3, "ac97")),
271 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 9),
272 SUNXI_FUNCTION(0x0, "gpio_in"),
273 SUNXI_FUNCTION(0x1, "gpio_out"),
274 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
275 PINCTRL_SUN4I_A10),
276 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
277 PINCTRL_SUN7I_A20 |
278 PINCTRL_SUN8I_R40),
279 SUNXI_FUNCTION_VARIANT(0x4, "pwm",
280 PINCTRL_SUN8I_R40)),
281 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
282 SUNXI_FUNCTION(0x0, "gpio_in"),
283 SUNXI_FUNCTION(0x1, "gpio_out"),
284 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
285 PINCTRL_SUN4I_A10),
286 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
287 PINCTRL_SUN7I_A20 |
288 PINCTRL_SUN8I_R40),
289 SUNXI_FUNCTION_VARIANT(0x4, "pwm",
290 PINCTRL_SUN8I_R40)),
291 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 11),
292 SUNXI_FUNCTION(0x0, "gpio_in"),
293 SUNXI_FUNCTION(0x1, "gpio_out"),
294 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
295 PINCTRL_SUN4I_A10),
296 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
297 PINCTRL_SUN7I_A20 |
298 PINCTRL_SUN8I_R40)),
299 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 12),
300 SUNXI_FUNCTION(0x0, "gpio_in"),
301 SUNXI_FUNCTION(0x1, "gpio_out"),
302 SUNXI_FUNCTION_VARIANT(0x2, "i2s",
303 PINCTRL_SUN4I_A10),
304 SUNXI_FUNCTION_VARIANT(0x2, "i2s0",
305 PINCTRL_SUN7I_A20 |
306 PINCTRL_SUN8I_R40),
307 SUNXI_FUNCTION(0x3, "ac97"),
308
309 SUNXI_FUNCTION_VARIANT(0x4, "spdif",
310 PINCTRL_SUN4I_A10 |
311 PINCTRL_SUN7I_A20)),
312 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13),
313 SUNXI_FUNCTION(0x0, "gpio_in"),
314 SUNXI_FUNCTION(0x1, "gpio_out"),
315 SUNXI_FUNCTION(0x2, "spi2"),
316
317 SUNXI_FUNCTION(0x4, "spdif")),
318 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
319 SUNXI_FUNCTION(0x0, "gpio_in"),
320 SUNXI_FUNCTION(0x1, "gpio_out"),
321 SUNXI_FUNCTION(0x2, "spi2"),
322 SUNXI_FUNCTION(0x3, "jtag")),
323 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
324 SUNXI_FUNCTION(0x0, "gpio_in"),
325 SUNXI_FUNCTION(0x1, "gpio_out"),
326 SUNXI_FUNCTION(0x2, "spi2"),
327 SUNXI_FUNCTION(0x3, "jtag")),
328 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
329 SUNXI_FUNCTION(0x0, "gpio_in"),
330 SUNXI_FUNCTION(0x1, "gpio_out"),
331 SUNXI_FUNCTION(0x2, "spi2"),
332 SUNXI_FUNCTION(0x3, "jtag")),
333 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17),
334 SUNXI_FUNCTION(0x0, "gpio_in"),
335 SUNXI_FUNCTION(0x1, "gpio_out"),
336 SUNXI_FUNCTION(0x2, "spi2"),
337 SUNXI_FUNCTION(0x3, "jtag")),
338 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18),
339 SUNXI_FUNCTION(0x0, "gpio_in"),
340 SUNXI_FUNCTION(0x1, "gpio_out"),
341 SUNXI_FUNCTION(0x2, "i2c1")),
342 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 19),
343 SUNXI_FUNCTION(0x0, "gpio_in"),
344 SUNXI_FUNCTION(0x1, "gpio_out"),
345 SUNXI_FUNCTION(0x2, "i2c1")),
346 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 20),
347 SUNXI_FUNCTION(0x0, "gpio_in"),
348 SUNXI_FUNCTION(0x1, "gpio_out"),
349 SUNXI_FUNCTION(0x2, "i2c2"),
350 SUNXI_FUNCTION_VARIANT(0x4, "pwm",
351 PINCTRL_SUN8I_R40)),
352 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 21),
353 SUNXI_FUNCTION(0x0, "gpio_in"),
354 SUNXI_FUNCTION(0x1, "gpio_out"),
355 SUNXI_FUNCTION(0x2, "i2c2"),
356 SUNXI_FUNCTION_VARIANT(0x4, "pwm",
357 PINCTRL_SUN8I_R40)),
358 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 22),
359 SUNXI_FUNCTION(0x0, "gpio_in"),
360 SUNXI_FUNCTION(0x1, "gpio_out"),
361 SUNXI_FUNCTION(0x2, "uart0"),
362 SUNXI_FUNCTION_VARIANT(0x3, "ir1",
363 PINCTRL_SUN4I_A10 |
364 PINCTRL_SUN7I_A20)),
365 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 23),
366 SUNXI_FUNCTION(0x0, "gpio_in"),
367 SUNXI_FUNCTION(0x1, "gpio_out"),
368 SUNXI_FUNCTION(0x2, "uart0"),
369 SUNXI_FUNCTION(0x3, "ir1")),
370
371 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
372 SUNXI_FUNCTION(0x0, "gpio_in"),
373 SUNXI_FUNCTION(0x1, "gpio_out"),
374 SUNXI_FUNCTION(0x2, "nand0"),
375 SUNXI_FUNCTION(0x3, "spi0")),
376 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
377 SUNXI_FUNCTION(0x0, "gpio_in"),
378 SUNXI_FUNCTION(0x1, "gpio_out"),
379 SUNXI_FUNCTION(0x2, "nand0"),
380 SUNXI_FUNCTION(0x3, "spi0")),
381 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
382 SUNXI_FUNCTION(0x0, "gpio_in"),
383 SUNXI_FUNCTION(0x1, "gpio_out"),
384 SUNXI_FUNCTION(0x2, "nand0"),
385 SUNXI_FUNCTION(0x3, "spi0")),
386 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
387 SUNXI_FUNCTION(0x0, "gpio_in"),
388 SUNXI_FUNCTION(0x1, "gpio_out"),
389 SUNXI_FUNCTION(0x2, "nand0")),
390 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
391 SUNXI_FUNCTION(0x0, "gpio_in"),
392 SUNXI_FUNCTION(0x1, "gpio_out"),
393 SUNXI_FUNCTION(0x2, "nand0")),
394 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
395 SUNXI_FUNCTION(0x0, "gpio_in"),
396 SUNXI_FUNCTION(0x1, "gpio_out"),
397 SUNXI_FUNCTION(0x2, "nand0"),
398 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
399 PINCTRL_SUN8I_R40)),
400 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
401 SUNXI_FUNCTION(0x0, "gpio_in"),
402 SUNXI_FUNCTION(0x1, "gpio_out"),
403 SUNXI_FUNCTION(0x2, "nand0"),
404 SUNXI_FUNCTION(0x3, "mmc2")),
405 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
406 SUNXI_FUNCTION(0x0, "gpio_in"),
407 SUNXI_FUNCTION(0x1, "gpio_out"),
408 SUNXI_FUNCTION(0x2, "nand0"),
409 SUNXI_FUNCTION(0x3, "mmc2")),
410 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
411 SUNXI_FUNCTION(0x0, "gpio_in"),
412 SUNXI_FUNCTION(0x1, "gpio_out"),
413 SUNXI_FUNCTION(0x2, "nand0"),
414 SUNXI_FUNCTION(0x3, "mmc2")),
415 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
416 SUNXI_FUNCTION(0x0, "gpio_in"),
417 SUNXI_FUNCTION(0x1, "gpio_out"),
418 SUNXI_FUNCTION(0x2, "nand0"),
419 SUNXI_FUNCTION(0x3, "mmc2")),
420 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
421 SUNXI_FUNCTION(0x0, "gpio_in"),
422 SUNXI_FUNCTION(0x1, "gpio_out"),
423 SUNXI_FUNCTION(0x2, "nand0"),
424 SUNXI_FUNCTION(0x3, "mmc2")),
425 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
426 SUNXI_FUNCTION(0x0, "gpio_in"),
427 SUNXI_FUNCTION(0x1, "gpio_out"),
428 SUNXI_FUNCTION(0x2, "nand0"),
429 SUNXI_FUNCTION(0x3, "mmc2")),
430 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
431 SUNXI_FUNCTION(0x0, "gpio_in"),
432 SUNXI_FUNCTION(0x1, "gpio_out"),
433 SUNXI_FUNCTION(0x2, "nand0"),
434 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
435 PINCTRL_SUN8I_R40)),
436 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
437 SUNXI_FUNCTION(0x0, "gpio_in"),
438 SUNXI_FUNCTION(0x1, "gpio_out"),
439 SUNXI_FUNCTION(0x2, "nand0"),
440 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
441 PINCTRL_SUN8I_R40)),
442 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
443 SUNXI_FUNCTION(0x0, "gpio_in"),
444 SUNXI_FUNCTION(0x1, "gpio_out"),
445 SUNXI_FUNCTION(0x2, "nand0"),
446 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
447 PINCTRL_SUN8I_R40)),
448 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
449 SUNXI_FUNCTION(0x0, "gpio_in"),
450 SUNXI_FUNCTION(0x1, "gpio_out"),
451 SUNXI_FUNCTION(0x2, "nand0"),
452 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
453 PINCTRL_SUN8I_R40)),
454 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
455 SUNXI_FUNCTION(0x0, "gpio_in"),
456 SUNXI_FUNCTION(0x1, "gpio_out"),
457 SUNXI_FUNCTION(0x2, "nand0")),
458 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
459 SUNXI_FUNCTION(0x0, "gpio_in"),
460 SUNXI_FUNCTION(0x1, "gpio_out"),
461 SUNXI_FUNCTION(0x2, "nand0")),
462 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
463 SUNXI_FUNCTION(0x0, "gpio_in"),
464 SUNXI_FUNCTION(0x1, "gpio_out"),
465 SUNXI_FUNCTION(0x2, "nand0")),
466 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
467 SUNXI_FUNCTION(0x0, "gpio_in"),
468 SUNXI_FUNCTION(0x1, "gpio_out"),
469 SUNXI_FUNCTION(0x2, "nand0"),
470 SUNXI_FUNCTION(0x3, "spi2")),
471 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 20),
472 SUNXI_FUNCTION(0x0, "gpio_in"),
473 SUNXI_FUNCTION(0x1, "gpio_out"),
474 SUNXI_FUNCTION(0x2, "nand0"),
475 SUNXI_FUNCTION(0x3, "spi2")),
476 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 21),
477 SUNXI_FUNCTION(0x0, "gpio_in"),
478 SUNXI_FUNCTION(0x1, "gpio_out"),
479 SUNXI_FUNCTION(0x2, "nand0"),
480 SUNXI_FUNCTION(0x3, "spi2")),
481 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 22),
482 SUNXI_FUNCTION(0x0, "gpio_in"),
483 SUNXI_FUNCTION(0x1, "gpio_out"),
484 SUNXI_FUNCTION(0x2, "nand0"),
485 SUNXI_FUNCTION(0x3, "spi2")),
486 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 23),
487 SUNXI_FUNCTION(0x0, "gpio_in"),
488 SUNXI_FUNCTION(0x1, "gpio_out"),
489 SUNXI_FUNCTION(0x3, "spi0")),
490 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 24),
491 SUNXI_FUNCTION(0x0, "gpio_in"),
492 SUNXI_FUNCTION(0x1, "gpio_out"),
493 SUNXI_FUNCTION(0x2, "nand0"),
494 SUNXI_FUNCTION_VARIANT(0x3, "mmc2",
495 PINCTRL_SUN8I_R40)),
496
497 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
498 SUNXI_FUNCTION(0x0, "gpio_in"),
499 SUNXI_FUNCTION(0x1, "gpio_out"),
500 SUNXI_FUNCTION(0x2, "lcd0"),
501 SUNXI_FUNCTION(0x3, "lvds0")),
502 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
503 SUNXI_FUNCTION(0x0, "gpio_in"),
504 SUNXI_FUNCTION(0x1, "gpio_out"),
505 SUNXI_FUNCTION(0x2, "lcd0"),
506 SUNXI_FUNCTION(0x3, "lvds0")),
507 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
508 SUNXI_FUNCTION(0x0, "gpio_in"),
509 SUNXI_FUNCTION(0x1, "gpio_out"),
510 SUNXI_FUNCTION(0x2, "lcd0"),
511 SUNXI_FUNCTION(0x3, "lvds0")),
512 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
513 SUNXI_FUNCTION(0x0, "gpio_in"),
514 SUNXI_FUNCTION(0x1, "gpio_out"),
515 SUNXI_FUNCTION(0x2, "lcd0"),
516 SUNXI_FUNCTION(0x3, "lvds0")),
517 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
518 SUNXI_FUNCTION(0x0, "gpio_in"),
519 SUNXI_FUNCTION(0x1, "gpio_out"),
520 SUNXI_FUNCTION(0x2, "lcd0"),
521 SUNXI_FUNCTION(0x3, "lvds0")),
522 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
523 SUNXI_FUNCTION(0x0, "gpio_in"),
524 SUNXI_FUNCTION(0x1, "gpio_out"),
525 SUNXI_FUNCTION(0x2, "lcd0"),
526 SUNXI_FUNCTION(0x3, "lvds0")),
527 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
528 SUNXI_FUNCTION(0x0, "gpio_in"),
529 SUNXI_FUNCTION(0x1, "gpio_out"),
530 SUNXI_FUNCTION(0x2, "lcd0"),
531 SUNXI_FUNCTION(0x3, "lvds0")),
532 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
533 SUNXI_FUNCTION(0x0, "gpio_in"),
534 SUNXI_FUNCTION(0x1, "gpio_out"),
535 SUNXI_FUNCTION(0x2, "lcd0"),
536 SUNXI_FUNCTION(0x3, "lvds0")),
537 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
538 SUNXI_FUNCTION(0x0, "gpio_in"),
539 SUNXI_FUNCTION(0x1, "gpio_out"),
540 SUNXI_FUNCTION(0x2, "lcd0"),
541 SUNXI_FUNCTION(0x3, "lvds0")),
542 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
543 SUNXI_FUNCTION(0x0, "gpio_in"),
544 SUNXI_FUNCTION(0x1, "gpio_out"),
545 SUNXI_FUNCTION(0x2, "lcd0"),
546 SUNXI_FUNCTION(0x3, "lvds0")),
547 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
548 SUNXI_FUNCTION(0x0, "gpio_in"),
549 SUNXI_FUNCTION(0x1, "gpio_out"),
550 SUNXI_FUNCTION(0x2, "lcd0"),
551 SUNXI_FUNCTION(0x3, "lvds1")),
552 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
553 SUNXI_FUNCTION(0x0, "gpio_in"),
554 SUNXI_FUNCTION(0x1, "gpio_out"),
555 SUNXI_FUNCTION(0x2, "lcd0"),
556 SUNXI_FUNCTION(0x3, "lvds1")),
557 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
558 SUNXI_FUNCTION(0x0, "gpio_in"),
559 SUNXI_FUNCTION(0x1, "gpio_out"),
560 SUNXI_FUNCTION(0x2, "lcd0"),
561 SUNXI_FUNCTION(0x3, "lvds1")),
562 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
563 SUNXI_FUNCTION(0x0, "gpio_in"),
564 SUNXI_FUNCTION(0x1, "gpio_out"),
565 SUNXI_FUNCTION(0x2, "lcd0"),
566 SUNXI_FUNCTION(0x3, "lvds1")),
567 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
568 SUNXI_FUNCTION(0x0, "gpio_in"),
569 SUNXI_FUNCTION(0x1, "gpio_out"),
570 SUNXI_FUNCTION(0x2, "lcd0"),
571 SUNXI_FUNCTION(0x3, "lvds1")),
572 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
573 SUNXI_FUNCTION(0x0, "gpio_in"),
574 SUNXI_FUNCTION(0x1, "gpio_out"),
575 SUNXI_FUNCTION(0x2, "lcd0"),
576 SUNXI_FUNCTION(0x3, "lvds1")),
577 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
578 SUNXI_FUNCTION(0x0, "gpio_in"),
579 SUNXI_FUNCTION(0x1, "gpio_out"),
580 SUNXI_FUNCTION(0x2, "lcd0"),
581 SUNXI_FUNCTION(0x3, "lvds1")),
582 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
583 SUNXI_FUNCTION(0x0, "gpio_in"),
584 SUNXI_FUNCTION(0x1, "gpio_out"),
585 SUNXI_FUNCTION(0x2, "lcd0"),
586 SUNXI_FUNCTION(0x3, "lvds1")),
587 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
588 SUNXI_FUNCTION(0x0, "gpio_in"),
589 SUNXI_FUNCTION(0x1, "gpio_out"),
590 SUNXI_FUNCTION(0x2, "lcd0"),
591 SUNXI_FUNCTION(0x3, "lvds1")),
592 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
593 SUNXI_FUNCTION(0x0, "gpio_in"),
594 SUNXI_FUNCTION(0x1, "gpio_out"),
595 SUNXI_FUNCTION(0x2, "lcd0"),
596 SUNXI_FUNCTION(0x3, "lvds1")),
597 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
598 SUNXI_FUNCTION(0x0, "gpio_in"),
599 SUNXI_FUNCTION(0x1, "gpio_out"),
600 SUNXI_FUNCTION(0x2, "lcd0"),
601 SUNXI_FUNCTION(0x3, "csi1")),
602 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
603 SUNXI_FUNCTION(0x0, "gpio_in"),
604 SUNXI_FUNCTION(0x1, "gpio_out"),
605 SUNXI_FUNCTION(0x2, "lcd0"),
606 SUNXI_FUNCTION(0x3, "sim")),
607 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
608 SUNXI_FUNCTION(0x0, "gpio_in"),
609 SUNXI_FUNCTION(0x1, "gpio_out"),
610 SUNXI_FUNCTION(0x2, "lcd0"),
611 SUNXI_FUNCTION(0x3, "sim")),
612 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
613 SUNXI_FUNCTION(0x0, "gpio_in"),
614 SUNXI_FUNCTION(0x1, "gpio_out"),
615 SUNXI_FUNCTION(0x2, "lcd0"),
616 SUNXI_FUNCTION(0x3, "sim")),
617 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
618 SUNXI_FUNCTION(0x0, "gpio_in"),
619 SUNXI_FUNCTION(0x1, "gpio_out"),
620 SUNXI_FUNCTION(0x2, "lcd0"),
621 SUNXI_FUNCTION(0x3, "sim")),
622 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
623 SUNXI_FUNCTION(0x0, "gpio_in"),
624 SUNXI_FUNCTION(0x1, "gpio_out"),
625 SUNXI_FUNCTION(0x2, "lcd0"),
626 SUNXI_FUNCTION(0x3, "sim")),
627 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
628 SUNXI_FUNCTION(0x0, "gpio_in"),
629 SUNXI_FUNCTION(0x1, "gpio_out"),
630 SUNXI_FUNCTION(0x2, "lcd0"),
631 SUNXI_FUNCTION(0x3, "sim")),
632 SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
633 SUNXI_FUNCTION(0x0, "gpio_in"),
634 SUNXI_FUNCTION(0x1, "gpio_out"),
635 SUNXI_FUNCTION(0x2, "lcd0"),
636 SUNXI_FUNCTION(0x3, "sim")),
637
638 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
639 SUNXI_FUNCTION(0x0, "gpio_in"),
640 SUNXI_FUNCTION(0x1, "gpio_out"),
641 SUNXI_FUNCTION(0x2, "ts0"),
642 SUNXI_FUNCTION(0x3, "csi0")),
643 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
644 SUNXI_FUNCTION(0x0, "gpio_in"),
645 SUNXI_FUNCTION(0x1, "gpio_out"),
646 SUNXI_FUNCTION(0x2, "ts0"),
647 SUNXI_FUNCTION(0x3, "csi0")),
648 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
649 SUNXI_FUNCTION(0x0, "gpio_in"),
650 SUNXI_FUNCTION(0x1, "gpio_out"),
651 SUNXI_FUNCTION(0x2, "ts0"),
652 SUNXI_FUNCTION(0x3, "csi0")),
653 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
654 SUNXI_FUNCTION(0x0, "gpio_in"),
655 SUNXI_FUNCTION(0x1, "gpio_out"),
656 SUNXI_FUNCTION(0x2, "ts0"),
657 SUNXI_FUNCTION(0x3, "csi0")),
658 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
659 SUNXI_FUNCTION(0x0, "gpio_in"),
660 SUNXI_FUNCTION(0x1, "gpio_out"),
661 SUNXI_FUNCTION(0x2, "ts0"),
662 SUNXI_FUNCTION(0x3, "csi0")),
663 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
664 SUNXI_FUNCTION(0x0, "gpio_in"),
665 SUNXI_FUNCTION(0x1, "gpio_out"),
666 SUNXI_FUNCTION(0x2, "ts0"),
667 SUNXI_FUNCTION(0x3, "csi0"),
668 SUNXI_FUNCTION(0x4, "sim")),
669 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
670 SUNXI_FUNCTION(0x0, "gpio_in"),
671 SUNXI_FUNCTION(0x1, "gpio_out"),
672 SUNXI_FUNCTION(0x2, "ts0"),
673 SUNXI_FUNCTION(0x3, "csi0")),
674 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
675 SUNXI_FUNCTION(0x0, "gpio_in"),
676 SUNXI_FUNCTION(0x1, "gpio_out"),
677 SUNXI_FUNCTION(0x2, "ts0"),
678 SUNXI_FUNCTION(0x3, "csi0")),
679 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
680 SUNXI_FUNCTION(0x0, "gpio_in"),
681 SUNXI_FUNCTION(0x1, "gpio_out"),
682 SUNXI_FUNCTION(0x2, "ts0"),
683 SUNXI_FUNCTION(0x3, "csi0")),
684 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
685 SUNXI_FUNCTION(0x0, "gpio_in"),
686 SUNXI_FUNCTION(0x1, "gpio_out"),
687 SUNXI_FUNCTION(0x2, "ts0"),
688 SUNXI_FUNCTION(0x3, "csi0")),
689 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
690 SUNXI_FUNCTION(0x0, "gpio_in"),
691 SUNXI_FUNCTION(0x1, "gpio_out"),
692 SUNXI_FUNCTION(0x2, "ts0"),
693 SUNXI_FUNCTION(0x3, "csi0")),
694 SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
695 SUNXI_FUNCTION(0x0, "gpio_in"),
696 SUNXI_FUNCTION(0x1, "gpio_out"),
697 SUNXI_FUNCTION(0x2, "ts0"),
698 SUNXI_FUNCTION(0x3, "csi0")),
699
700 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
701 SUNXI_FUNCTION(0x0, "gpio_in"),
702 SUNXI_FUNCTION(0x1, "gpio_out"),
703 SUNXI_FUNCTION(0x2, "mmc0"),
704 SUNXI_FUNCTION(0x4, "jtag")),
705 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
706 SUNXI_FUNCTION(0x0, "gpio_in"),
707 SUNXI_FUNCTION(0x1, "gpio_out"),
708 SUNXI_FUNCTION(0x2, "mmc0"),
709 SUNXI_FUNCTION(0x4, "jtag")),
710 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
711 SUNXI_FUNCTION(0x0, "gpio_in"),
712 SUNXI_FUNCTION(0x1, "gpio_out"),
713 SUNXI_FUNCTION(0x2, "mmc0"),
714 SUNXI_FUNCTION(0x4, "uart0")),
715 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
716 SUNXI_FUNCTION(0x0, "gpio_in"),
717 SUNXI_FUNCTION(0x1, "gpio_out"),
718 SUNXI_FUNCTION(0x2, "mmc0"),
719 SUNXI_FUNCTION(0x4, "jtag")),
720 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
721 SUNXI_FUNCTION(0x0, "gpio_in"),
722 SUNXI_FUNCTION(0x1, "gpio_out"),
723 SUNXI_FUNCTION(0x2, "mmc0"),
724 SUNXI_FUNCTION(0x4, "uart0")),
725 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
726 SUNXI_FUNCTION(0x0, "gpio_in"),
727 SUNXI_FUNCTION(0x1, "gpio_out"),
728 SUNXI_FUNCTION(0x2, "mmc0"),
729 SUNXI_FUNCTION(0x4, "jtag")),
730
731 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
732 SUNXI_FUNCTION(0x0, "gpio_in"),
733 SUNXI_FUNCTION(0x1, "gpio_out"),
734 SUNXI_FUNCTION(0x2, "ts1"),
735 SUNXI_FUNCTION(0x3, "csi1"),
736 SUNXI_FUNCTION(0x4, "mmc1")),
737 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
738 SUNXI_FUNCTION(0x0, "gpio_in"),
739 SUNXI_FUNCTION(0x1, "gpio_out"),
740 SUNXI_FUNCTION(0x2, "ts1"),
741 SUNXI_FUNCTION(0x3, "csi1"),
742 SUNXI_FUNCTION(0x4, "mmc1")),
743 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
744 SUNXI_FUNCTION(0x0, "gpio_in"),
745 SUNXI_FUNCTION(0x1, "gpio_out"),
746 SUNXI_FUNCTION(0x2, "ts1"),
747 SUNXI_FUNCTION(0x3, "csi1"),
748 SUNXI_FUNCTION(0x4, "mmc1")),
749 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
750 SUNXI_FUNCTION(0x0, "gpio_in"),
751 SUNXI_FUNCTION(0x1, "gpio_out"),
752 SUNXI_FUNCTION(0x2, "ts1"),
753 SUNXI_FUNCTION(0x3, "csi1"),
754 SUNXI_FUNCTION(0x4, "mmc1")),
755 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
756 SUNXI_FUNCTION(0x0, "gpio_in"),
757 SUNXI_FUNCTION(0x1, "gpio_out"),
758 SUNXI_FUNCTION(0x2, "ts1"),
759 SUNXI_FUNCTION(0x3, "csi1"),
760 SUNXI_FUNCTION(0x4, "mmc1"),
761 SUNXI_FUNCTION(0x5, "csi0")),
762 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
763 SUNXI_FUNCTION(0x0, "gpio_in"),
764 SUNXI_FUNCTION(0x1, "gpio_out"),
765 SUNXI_FUNCTION(0x2, "ts1"),
766 SUNXI_FUNCTION(0x3, "csi1"),
767 SUNXI_FUNCTION(0x4, "mmc1"),
768 SUNXI_FUNCTION(0x5, "csi0")),
769 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
770 SUNXI_FUNCTION(0x0, "gpio_in"),
771 SUNXI_FUNCTION(0x1, "gpio_out"),
772 SUNXI_FUNCTION(0x2, "ts1"),
773 SUNXI_FUNCTION(0x3, "csi1"),
774 SUNXI_FUNCTION(0x4, "uart3"),
775 SUNXI_FUNCTION(0x5, "csi0")),
776 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
777 SUNXI_FUNCTION(0x0, "gpio_in"),
778 SUNXI_FUNCTION(0x1, "gpio_out"),
779 SUNXI_FUNCTION(0x2, "ts1"),
780 SUNXI_FUNCTION(0x3, "csi1"),
781 SUNXI_FUNCTION(0x4, "uart3"),
782 SUNXI_FUNCTION(0x5, "csi0")),
783 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
784 SUNXI_FUNCTION(0x0, "gpio_in"),
785 SUNXI_FUNCTION(0x1, "gpio_out"),
786 SUNXI_FUNCTION(0x2, "ts1"),
787 SUNXI_FUNCTION(0x3, "csi1"),
788 SUNXI_FUNCTION(0x4, "uart3"),
789 SUNXI_FUNCTION(0x5, "csi0")),
790 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
791 SUNXI_FUNCTION(0x0, "gpio_in"),
792 SUNXI_FUNCTION(0x1, "gpio_out"),
793 SUNXI_FUNCTION(0x2, "ts1"),
794 SUNXI_FUNCTION(0x3, "csi1"),
795 SUNXI_FUNCTION(0x4, "uart3"),
796 SUNXI_FUNCTION(0x5, "csi0"),
797 SUNXI_FUNCTION_VARIANT(0x6, "bist",
798 PINCTRL_SUN8I_R40)),
799 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
800 SUNXI_FUNCTION(0x0, "gpio_in"),
801 SUNXI_FUNCTION(0x1, "gpio_out"),
802 SUNXI_FUNCTION(0x2, "ts1"),
803 SUNXI_FUNCTION(0x3, "csi1"),
804 SUNXI_FUNCTION(0x4, "uart4"),
805 SUNXI_FUNCTION(0x5, "csi0"),
806 SUNXI_FUNCTION_VARIANT(0x6, "bist",
807 PINCTRL_SUN8I_R40)),
808 SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
809 SUNXI_FUNCTION(0x0, "gpio_in"),
810 SUNXI_FUNCTION(0x1, "gpio_out"),
811 SUNXI_FUNCTION(0x2, "ts1"),
812 SUNXI_FUNCTION(0x3, "csi1"),
813 SUNXI_FUNCTION(0x4, "uart4"),
814 SUNXI_FUNCTION(0x5, "csi0")),
815
816 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
817 SUNXI_FUNCTION(0x0, "gpio_in"),
818 SUNXI_FUNCTION(0x1, "gpio_out"),
819 SUNXI_FUNCTION(0x2, "lcd1"),
820 SUNXI_FUNCTION_VARIANT(0x3, "pata",
821 PINCTRL_SUN4I_A10),
822 SUNXI_FUNCTION(0x4, "uart3"),
823 SUNXI_FUNCTION_IRQ(0x6, 0),
824 SUNXI_FUNCTION(0x7, "csi1")),
825 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
826 SUNXI_FUNCTION(0x0, "gpio_in"),
827 SUNXI_FUNCTION(0x1, "gpio_out"),
828 SUNXI_FUNCTION(0x2, "lcd1"),
829 SUNXI_FUNCTION_VARIANT(0x3, "pata",
830 PINCTRL_SUN4I_A10),
831 SUNXI_FUNCTION(0x4, "uart3"),
832 SUNXI_FUNCTION_IRQ(0x6, 1),
833 SUNXI_FUNCTION(0x7, "csi1")),
834 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
835 SUNXI_FUNCTION(0x0, "gpio_in"),
836 SUNXI_FUNCTION(0x1, "gpio_out"),
837 SUNXI_FUNCTION(0x2, "lcd1"),
838 SUNXI_FUNCTION_VARIANT(0x3, "pata",
839 PINCTRL_SUN4I_A10),
840 SUNXI_FUNCTION(0x4, "uart3"),
841 SUNXI_FUNCTION_IRQ(0x6, 2),
842 SUNXI_FUNCTION(0x7, "csi1")),
843 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
844 SUNXI_FUNCTION(0x0, "gpio_in"),
845 SUNXI_FUNCTION(0x1, "gpio_out"),
846 SUNXI_FUNCTION(0x2, "lcd1"),
847 SUNXI_FUNCTION_VARIANT(0x3, "pata",
848 PINCTRL_SUN4I_A10),
849 SUNXI_FUNCTION(0x4, "uart3"),
850 SUNXI_FUNCTION_IRQ(0x6, 3),
851 SUNXI_FUNCTION(0x7, "csi1")),
852 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
853 SUNXI_FUNCTION(0x0, "gpio_in"),
854 SUNXI_FUNCTION(0x1, "gpio_out"),
855 SUNXI_FUNCTION(0x2, "lcd1"),
856 SUNXI_FUNCTION_VARIANT(0x3, "pata",
857 PINCTRL_SUN4I_A10),
858 SUNXI_FUNCTION(0x4, "uart4"),
859 SUNXI_FUNCTION_IRQ(0x6, 4),
860 SUNXI_FUNCTION(0x7, "csi1")),
861 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
862 SUNXI_FUNCTION(0x0, "gpio_in"),
863 SUNXI_FUNCTION(0x1, "gpio_out"),
864 SUNXI_FUNCTION(0x2, "lcd1"),
865 SUNXI_FUNCTION_VARIANT(0x3, "pata",
866 PINCTRL_SUN4I_A10),
867 SUNXI_FUNCTION(0x4, "uart4"),
868 SUNXI_FUNCTION_IRQ(0x6, 5),
869 SUNXI_FUNCTION(0x7, "csi1")),
870 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
871 SUNXI_FUNCTION(0x0, "gpio_in"),
872 SUNXI_FUNCTION(0x1, "gpio_out"),
873 SUNXI_FUNCTION(0x2, "lcd1"),
874 SUNXI_FUNCTION_VARIANT(0x3, "pata",
875 PINCTRL_SUN4I_A10),
876 SUNXI_FUNCTION(0x4, "uart5"),
877 SUNXI_FUNCTION_VARIANT(0x5, "ms",
878 PINCTRL_SUN4I_A10 |
879 PINCTRL_SUN7I_A20),
880 SUNXI_FUNCTION_IRQ(0x6, 6),
881 SUNXI_FUNCTION(0x7, "csi1")),
882 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
883 SUNXI_FUNCTION(0x0, "gpio_in"),
884 SUNXI_FUNCTION(0x1, "gpio_out"),
885 SUNXI_FUNCTION(0x2, "lcd1"),
886 SUNXI_FUNCTION_VARIANT(0x3, "pata",
887 PINCTRL_SUN4I_A10),
888 SUNXI_FUNCTION(0x4, "uart5"),
889 SUNXI_FUNCTION_VARIANT(0x5, "ms",
890 PINCTRL_SUN4I_A10 |
891 PINCTRL_SUN7I_A20),
892 SUNXI_FUNCTION_IRQ(0x6, 7),
893 SUNXI_FUNCTION(0x7, "csi1")),
894 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
895 SUNXI_FUNCTION(0x0, "gpio_in"),
896 SUNXI_FUNCTION(0x1, "gpio_out"),
897 SUNXI_FUNCTION(0x2, "lcd1"),
898 SUNXI_FUNCTION_VARIANT(0x3, "pata",
899 PINCTRL_SUN4I_A10),
900 SUNXI_FUNCTION_VARIANT(0x3, "emac",
901 PINCTRL_SUN7I_A20 |
902 PINCTRL_SUN8I_R40),
903 SUNXI_FUNCTION(0x4, "keypad"),
904 SUNXI_FUNCTION_VARIANT(0x5, "ms",
905 PINCTRL_SUN4I_A10 |
906 PINCTRL_SUN7I_A20),
907 SUNXI_FUNCTION_IRQ(0x6, 8),
908 SUNXI_FUNCTION(0x7, "csi1")),
909 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
910 SUNXI_FUNCTION(0x0, "gpio_in"),
911 SUNXI_FUNCTION(0x1, "gpio_out"),
912 SUNXI_FUNCTION(0x2, "lcd1"),
913 SUNXI_FUNCTION_VARIANT(0x3, "pata",
914 PINCTRL_SUN4I_A10),
915 SUNXI_FUNCTION_VARIANT(0x3, "emac",
916 PINCTRL_SUN7I_A20 |
917 PINCTRL_SUN8I_R40),
918 SUNXI_FUNCTION(0x4, "keypad"),
919 SUNXI_FUNCTION_VARIANT(0x5, "ms",
920 PINCTRL_SUN4I_A10 |
921 PINCTRL_SUN7I_A20),
922 SUNXI_FUNCTION_IRQ(0x6, 9),
923 SUNXI_FUNCTION(0x7, "csi1")),
924 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
925 SUNXI_FUNCTION(0x0, "gpio_in"),
926 SUNXI_FUNCTION(0x1, "gpio_out"),
927 SUNXI_FUNCTION(0x2, "lcd1"),
928 SUNXI_FUNCTION_VARIANT(0x3, "pata",
929 PINCTRL_SUN4I_A10),
930 SUNXI_FUNCTION_VARIANT(0x3, "emac",
931 PINCTRL_SUN7I_A20 |
932 PINCTRL_SUN8I_R40),
933 SUNXI_FUNCTION(0x4, "keypad"),
934 SUNXI_FUNCTION_VARIANT(0x5, "ms",
935 PINCTRL_SUN4I_A10 |
936 PINCTRL_SUN7I_A20),
937 SUNXI_FUNCTION_IRQ(0x6, 10),
938 SUNXI_FUNCTION(0x7, "csi1")),
939 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
940 SUNXI_FUNCTION(0x0, "gpio_in"),
941 SUNXI_FUNCTION(0x1, "gpio_out"),
942 SUNXI_FUNCTION(0x2, "lcd1"),
943 SUNXI_FUNCTION_VARIANT(0x3, "pata",
944 PINCTRL_SUN4I_A10),
945 SUNXI_FUNCTION_VARIANT(0x3, "emac",
946 PINCTRL_SUN7I_A20 |
947 PINCTRL_SUN8I_R40),
948 SUNXI_FUNCTION(0x4, "keypad"),
949 SUNXI_FUNCTION_VARIANT(0x5, "ms",
950 PINCTRL_SUN4I_A10 |
951 PINCTRL_SUN7I_A20),
952 SUNXI_FUNCTION_IRQ(0x6, 11),
953 SUNXI_FUNCTION(0x7, "csi1")),
954 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12),
955 SUNXI_FUNCTION(0x0, "gpio_in"),
956 SUNXI_FUNCTION(0x1, "gpio_out"),
957 SUNXI_FUNCTION(0x2, "lcd1"),
958 SUNXI_FUNCTION_VARIANT(0x3, "pata",
959 PINCTRL_SUN4I_A10),
960 SUNXI_FUNCTION(0x4, "ps2"),
961 SUNXI_FUNCTION_IRQ(0x6, 12),
962 SUNXI_FUNCTION(0x7, "csi1")),
963 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13),
964 SUNXI_FUNCTION(0x0, "gpio_in"),
965 SUNXI_FUNCTION(0x1, "gpio_out"),
966 SUNXI_FUNCTION(0x2, "lcd1"),
967 SUNXI_FUNCTION_VARIANT(0x3, "pata",
968 PINCTRL_SUN4I_A10),
969 SUNXI_FUNCTION(0x4, "ps2"),
970 SUNXI_FUNCTION(0x5, "sim"),
971 SUNXI_FUNCTION_IRQ(0x6, 13),
972 SUNXI_FUNCTION(0x7, "csi1")),
973 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14),
974 SUNXI_FUNCTION(0x0, "gpio_in"),
975 SUNXI_FUNCTION(0x1, "gpio_out"),
976 SUNXI_FUNCTION(0x2, "lcd1"),
977 SUNXI_FUNCTION_VARIANT(0x3, "pata",
978 PINCTRL_SUN4I_A10),
979 SUNXI_FUNCTION_VARIANT(0x3, "emac",
980 PINCTRL_SUN7I_A20 |
981 PINCTRL_SUN8I_R40),
982 SUNXI_FUNCTION(0x4, "keypad"),
983 SUNXI_FUNCTION(0x5, "sim"),
984 SUNXI_FUNCTION_IRQ(0x6, 14),
985 SUNXI_FUNCTION(0x7, "csi1")),
986 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15),
987 SUNXI_FUNCTION(0x0, "gpio_in"),
988 SUNXI_FUNCTION(0x1, "gpio_out"),
989 SUNXI_FUNCTION(0x2, "lcd1"),
990 SUNXI_FUNCTION_VARIANT(0x3, "pata",
991 PINCTRL_SUN4I_A10),
992 SUNXI_FUNCTION_VARIANT(0x3, "emac",
993 PINCTRL_SUN7I_A20 |
994 PINCTRL_SUN8I_R40),
995 SUNXI_FUNCTION(0x4, "keypad"),
996 SUNXI_FUNCTION(0x5, "sim"),
997 SUNXI_FUNCTION_IRQ(0x6, 15),
998 SUNXI_FUNCTION(0x7, "csi1")),
999 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16),
1000 SUNXI_FUNCTION(0x0, "gpio_in"),
1001 SUNXI_FUNCTION(0x1, "gpio_out"),
1002 SUNXI_FUNCTION(0x2, "lcd1"),
1003 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1004 PINCTRL_SUN4I_A10),
1005 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1006 PINCTRL_SUN7I_A20 |
1007 PINCTRL_SUN8I_R40),
1008 SUNXI_FUNCTION(0x4, "keypad"),
1009 SUNXI_FUNCTION(0x5, "sim"),
1010 SUNXI_FUNCTION_IRQ(0x6, 16),
1011 SUNXI_FUNCTION(0x7, "csi1")),
1012 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
1013 SUNXI_FUNCTION(0x0, "gpio_in"),
1014 SUNXI_FUNCTION(0x1, "gpio_out"),
1015 SUNXI_FUNCTION(0x2, "lcd1"),
1016 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1017 PINCTRL_SUN4I_A10),
1018 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1019 PINCTRL_SUN7I_A20 |
1020 PINCTRL_SUN8I_R40),
1021 SUNXI_FUNCTION(0x4, "keypad"),
1022 SUNXI_FUNCTION(0x5, "sim"),
1023 SUNXI_FUNCTION_IRQ(0x6, 17),
1024 SUNXI_FUNCTION(0x7, "csi1")),
1025 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18),
1026 SUNXI_FUNCTION(0x0, "gpio_in"),
1027 SUNXI_FUNCTION(0x1, "gpio_out"),
1028 SUNXI_FUNCTION(0x2, "lcd1"),
1029 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1030 PINCTRL_SUN4I_A10),
1031 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1032 PINCTRL_SUN7I_A20 |
1033 PINCTRL_SUN8I_R40),
1034 SUNXI_FUNCTION(0x4, "keypad"),
1035 SUNXI_FUNCTION(0x5, "sim"),
1036 SUNXI_FUNCTION_IRQ(0x6, 18),
1037 SUNXI_FUNCTION(0x7, "csi1")),
1038 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19),
1039 SUNXI_FUNCTION(0x0, "gpio_in"),
1040 SUNXI_FUNCTION(0x1, "gpio_out"),
1041 SUNXI_FUNCTION(0x2, "lcd1"),
1042 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1043 PINCTRL_SUN4I_A10),
1044 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1045 PINCTRL_SUN7I_A20 |
1046 PINCTRL_SUN8I_R40),
1047 SUNXI_FUNCTION(0x4, "keypad"),
1048 SUNXI_FUNCTION(0x5, "sim"),
1049 SUNXI_FUNCTION_IRQ(0x6, 19),
1050 SUNXI_FUNCTION(0x7, "csi1")),
1051 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20),
1052 SUNXI_FUNCTION(0x0, "gpio_in"),
1053 SUNXI_FUNCTION(0x1, "gpio_out"),
1054 SUNXI_FUNCTION(0x2, "lcd1"),
1055 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1056 PINCTRL_SUN4I_A10),
1057 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1058 PINCTRL_SUN7I_A20 |
1059 PINCTRL_SUN8I_R40),
1060 SUNXI_FUNCTION(0x4, "can"),
1061 SUNXI_FUNCTION_IRQ(0x6, 20),
1062 SUNXI_FUNCTION(0x7, "csi1")),
1063 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21),
1064 SUNXI_FUNCTION(0x0, "gpio_in"),
1065 SUNXI_FUNCTION(0x1, "gpio_out"),
1066 SUNXI_FUNCTION(0x2, "lcd1"),
1067 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1068 PINCTRL_SUN4I_A10),
1069 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1070 PINCTRL_SUN7I_A20 |
1071 PINCTRL_SUN8I_R40),
1072 SUNXI_FUNCTION(0x4, "can"),
1073 SUNXI_FUNCTION_IRQ(0x6, 21),
1074 SUNXI_FUNCTION(0x7, "csi1")),
1075 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 22),
1076 SUNXI_FUNCTION(0x0, "gpio_in"),
1077 SUNXI_FUNCTION(0x1, "gpio_out"),
1078 SUNXI_FUNCTION(0x2, "lcd1"),
1079 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1080 PINCTRL_SUN4I_A10),
1081 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1082 PINCTRL_SUN7I_A20 |
1083 PINCTRL_SUN8I_R40),
1084 SUNXI_FUNCTION(0x4, "keypad"),
1085 SUNXI_FUNCTION(0x5, "mmc1"),
1086 SUNXI_FUNCTION(0x7, "csi1")),
1087 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 23),
1088 SUNXI_FUNCTION(0x0, "gpio_in"),
1089 SUNXI_FUNCTION(0x1, "gpio_out"),
1090 SUNXI_FUNCTION(0x2, "lcd1"),
1091 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1092 PINCTRL_SUN4I_A10),
1093 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1094 PINCTRL_SUN7I_A20 |
1095 PINCTRL_SUN8I_R40),
1096 SUNXI_FUNCTION(0x4, "keypad"),
1097 SUNXI_FUNCTION(0x5, "mmc1"),
1098 SUNXI_FUNCTION(0x7, "csi1")),
1099 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 24),
1100 SUNXI_FUNCTION(0x0, "gpio_in"),
1101 SUNXI_FUNCTION(0x1, "gpio_out"),
1102 SUNXI_FUNCTION(0x2, "lcd1"),
1103 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1104 PINCTRL_SUN4I_A10),
1105 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1106 PINCTRL_SUN7I_A20 |
1107 PINCTRL_SUN8I_R40),
1108 SUNXI_FUNCTION(0x4, "keypad"),
1109 SUNXI_FUNCTION(0x5, "mmc1"),
1110 SUNXI_FUNCTION(0x7, "csi1")),
1111 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 25),
1112 SUNXI_FUNCTION(0x0, "gpio_in"),
1113 SUNXI_FUNCTION(0x1, "gpio_out"),
1114 SUNXI_FUNCTION(0x2, "lcd1"),
1115 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1116 PINCTRL_SUN4I_A10),
1117 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1118 PINCTRL_SUN7I_A20 |
1119 PINCTRL_SUN8I_R40),
1120 SUNXI_FUNCTION(0x4, "keypad"),
1121 SUNXI_FUNCTION(0x5, "mmc1"),
1122 SUNXI_FUNCTION(0x7, "csi1")),
1123 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 26),
1124 SUNXI_FUNCTION(0x0, "gpio_in"),
1125 SUNXI_FUNCTION(0x1, "gpio_out"),
1126 SUNXI_FUNCTION(0x2, "lcd1"),
1127 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1128 PINCTRL_SUN4I_A10),
1129 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1130 PINCTRL_SUN7I_A20 |
1131 PINCTRL_SUN8I_R40),
1132 SUNXI_FUNCTION(0x4, "keypad"),
1133 SUNXI_FUNCTION(0x5, "mmc1"),
1134 SUNXI_FUNCTION(0x7, "csi1")),
1135 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27),
1136 SUNXI_FUNCTION(0x0, "gpio_in"),
1137 SUNXI_FUNCTION(0x1, "gpio_out"),
1138 SUNXI_FUNCTION(0x2, "lcd1"),
1139 SUNXI_FUNCTION_VARIANT(0x3, "pata",
1140 PINCTRL_SUN4I_A10),
1141 SUNXI_FUNCTION_VARIANT(0x3, "emac",
1142 PINCTRL_SUN7I_A20 |
1143 PINCTRL_SUN8I_R40),
1144 SUNXI_FUNCTION(0x4, "keypad"),
1145 SUNXI_FUNCTION(0x5, "mmc1"),
1146 SUNXI_FUNCTION(0x7, "csi1")),
1147
1148 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 0),
1149 SUNXI_FUNCTION(0x0, "gpio_in"),
1150 SUNXI_FUNCTION(0x1, "gpio_out"),
1151 SUNXI_FUNCTION_VARIANT(0x3, "i2c3",
1152 PINCTRL_SUN7I_A20 |
1153 PINCTRL_SUN8I_R40)),
1154 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 1),
1155 SUNXI_FUNCTION(0x0, "gpio_in"),
1156 SUNXI_FUNCTION(0x1, "gpio_out"),
1157 SUNXI_FUNCTION_VARIANT(0x3, "i2c3",
1158 PINCTRL_SUN7I_A20 |
1159 PINCTRL_SUN8I_R40)),
1160 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 2),
1161 SUNXI_FUNCTION(0x0, "gpio_in"),
1162 SUNXI_FUNCTION(0x1, "gpio_out"),
1163 SUNXI_FUNCTION_VARIANT(0x3, "i2c4",
1164 PINCTRL_SUN7I_A20 |
1165 PINCTRL_SUN8I_R40)),
1166 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 3),
1167 SUNXI_FUNCTION(0x0, "gpio_in"),
1168 SUNXI_FUNCTION(0x1, "gpio_out"),
1169 SUNXI_FUNCTION(0x2, "pwm"),
1170 SUNXI_FUNCTION_VARIANT(0x3, "i2c4",
1171 PINCTRL_SUN7I_A20 |
1172 PINCTRL_SUN8I_R40)),
1173 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 4),
1174 SUNXI_FUNCTION(0x0, "gpio_in"),
1175 SUNXI_FUNCTION(0x1, "gpio_out"),
1176 SUNXI_FUNCTION(0x2, "mmc3")),
1177 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 5),
1178 SUNXI_FUNCTION(0x0, "gpio_in"),
1179 SUNXI_FUNCTION(0x1, "gpio_out"),
1180 SUNXI_FUNCTION(0x2, "mmc3")),
1181 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 6),
1182 SUNXI_FUNCTION(0x0, "gpio_in"),
1183 SUNXI_FUNCTION(0x1, "gpio_out"),
1184 SUNXI_FUNCTION(0x2, "mmc3")),
1185 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 7),
1186 SUNXI_FUNCTION(0x0, "gpio_in"),
1187 SUNXI_FUNCTION(0x1, "gpio_out"),
1188 SUNXI_FUNCTION(0x2, "mmc3")),
1189 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 8),
1190 SUNXI_FUNCTION(0x0, "gpio_in"),
1191 SUNXI_FUNCTION(0x1, "gpio_out"),
1192 SUNXI_FUNCTION(0x2, "mmc3")),
1193 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 9),
1194 SUNXI_FUNCTION(0x0, "gpio_in"),
1195 SUNXI_FUNCTION(0x1, "gpio_out"),
1196 SUNXI_FUNCTION(0x2, "mmc3")),
1197 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 10),
1198 SUNXI_FUNCTION(0x0, "gpio_in"),
1199 SUNXI_FUNCTION(0x1, "gpio_out"),
1200 SUNXI_FUNCTION(0x2, "spi0"),
1201 SUNXI_FUNCTION(0x3, "uart5"),
1202 SUNXI_FUNCTION_IRQ(0x6, 22)),
1203 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 11),
1204 SUNXI_FUNCTION(0x0, "gpio_in"),
1205 SUNXI_FUNCTION(0x1, "gpio_out"),
1206 SUNXI_FUNCTION(0x2, "spi0"),
1207 SUNXI_FUNCTION(0x3, "uart5"),
1208 SUNXI_FUNCTION_IRQ(0x6, 23)),
1209 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 12),
1210 SUNXI_FUNCTION(0x0, "gpio_in"),
1211 SUNXI_FUNCTION(0x1, "gpio_out"),
1212 SUNXI_FUNCTION(0x2, "spi0"),
1213 SUNXI_FUNCTION(0x3, "uart6"),
1214 SUNXI_FUNCTION_VARIANT(0x4, "clk_out_a",
1215 PINCTRL_SUN7I_A20 |
1216 PINCTRL_SUN8I_R40),
1217 SUNXI_FUNCTION_IRQ(0x6, 24)),
1218 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 13),
1219 SUNXI_FUNCTION(0x0, "gpio_in"),
1220 SUNXI_FUNCTION(0x1, "gpio_out"),
1221 SUNXI_FUNCTION(0x2, "spi0"),
1222 SUNXI_FUNCTION(0x3, "uart6"),
1223 SUNXI_FUNCTION_VARIANT(0x4, "clk_out_b",
1224 PINCTRL_SUN7I_A20 |
1225 PINCTRL_SUN8I_R40),
1226 SUNXI_FUNCTION_IRQ(0x6, 25)),
1227 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 14),
1228 SUNXI_FUNCTION(0x0, "gpio_in"),
1229 SUNXI_FUNCTION(0x1, "gpio_out"),
1230 SUNXI_FUNCTION(0x2, "spi0"),
1231 SUNXI_FUNCTION(0x3, "ps2"),
1232 SUNXI_FUNCTION(0x4, "timer4"),
1233 SUNXI_FUNCTION_IRQ(0x6, 26)),
1234 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 15),
1235 SUNXI_FUNCTION(0x0, "gpio_in"),
1236 SUNXI_FUNCTION(0x1, "gpio_out"),
1237 SUNXI_FUNCTION(0x2, "spi1"),
1238 SUNXI_FUNCTION(0x3, "ps2"),
1239 SUNXI_FUNCTION(0x4, "timer5"),
1240 SUNXI_FUNCTION_IRQ(0x6, 27)),
1241 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 16),
1242 SUNXI_FUNCTION(0x0, "gpio_in"),
1243 SUNXI_FUNCTION(0x1, "gpio_out"),
1244 SUNXI_FUNCTION(0x2, "spi1"),
1245 SUNXI_FUNCTION(0x3, "uart2"),
1246 SUNXI_FUNCTION_IRQ(0x6, 28)),
1247 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 17),
1248 SUNXI_FUNCTION(0x0, "gpio_in"),
1249 SUNXI_FUNCTION(0x1, "gpio_out"),
1250 SUNXI_FUNCTION(0x2, "spi1"),
1251 SUNXI_FUNCTION(0x3, "uart2"),
1252 SUNXI_FUNCTION_IRQ(0x6, 29)),
1253 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 18),
1254 SUNXI_FUNCTION(0x0, "gpio_in"),
1255 SUNXI_FUNCTION(0x1, "gpio_out"),
1256 SUNXI_FUNCTION(0x2, "spi1"),
1257 SUNXI_FUNCTION(0x3, "uart2"),
1258 SUNXI_FUNCTION_IRQ(0x6, 30)),
1259 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 19),
1260 SUNXI_FUNCTION(0x0, "gpio_in"),
1261 SUNXI_FUNCTION(0x1, "gpio_out"),
1262 SUNXI_FUNCTION(0x2, "spi1"),
1263 SUNXI_FUNCTION(0x3, "uart2"),
1264 SUNXI_FUNCTION_IRQ(0x6, 31)),
1265 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 20),
1266 SUNXI_FUNCTION(0x0, "gpio_in"),
1267 SUNXI_FUNCTION(0x1, "gpio_out"),
1268 SUNXI_FUNCTION(0x2, "ps2"),
1269 SUNXI_FUNCTION(0x3, "uart7"),
1270 SUNXI_FUNCTION_VARIANT(0x4, "hdmi",
1271 PINCTRL_SUN4I_A10 |
1272 PINCTRL_SUN7I_A20),
1273 SUNXI_FUNCTION_VARIANT(0x6, "pwm",
1274 PINCTRL_SUN8I_R40)),
1275 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 21),
1276 SUNXI_FUNCTION(0x0, "gpio_in"),
1277 SUNXI_FUNCTION(0x1, "gpio_out"),
1278 SUNXI_FUNCTION(0x2, "ps2"),
1279 SUNXI_FUNCTION(0x3, "uart7"),
1280 SUNXI_FUNCTION_VARIANT(0x4, "hdmi",
1281 PINCTRL_SUN4I_A10 |
1282 PINCTRL_SUN7I_A20),
1283 SUNXI_FUNCTION_VARIANT(0x6, "pwm",
1284 PINCTRL_SUN8I_R40)),
1285};
1286
1287static const struct sunxi_pinctrl_desc sun4i_a10_pinctrl_data = {
1288 .pins = sun4i_a10_pins,
1289 .npins = ARRAY_SIZE(sun4i_a10_pins),
1290 .irq_banks = 1,
1291 .irq_read_needs_mux = true,
1292 .disable_strict_mode = true,
1293};
1294
1295static int sun4i_a10_pinctrl_probe(struct platform_device *pdev)
1296{
1297 unsigned long variant = (unsigned long)of_device_get_match_data(&pdev->dev);
1298
1299 return sunxi_pinctrl_init_with_variant(pdev, &sun4i_a10_pinctrl_data,
1300 variant);
1301}
1302
1303static const struct of_device_id sun4i_a10_pinctrl_match[] = {
1304 {
1305 .compatible = "allwinner,sun4i-a10-pinctrl",
1306 .data = (void *)PINCTRL_SUN4I_A10
1307 },
1308 {
1309 .compatible = "allwinner,sun7i-a20-pinctrl",
1310 .data = (void *)PINCTRL_SUN7I_A20
1311 },
1312 {
1313 .compatible = "allwinner,sun8i-r40-pinctrl",
1314 .data = (void *)PINCTRL_SUN8I_R40
1315 },
1316 {}
1317};
1318
1319static struct platform_driver sun4i_a10_pinctrl_driver = {
1320 .probe = sun4i_a10_pinctrl_probe,
1321 .driver = {
1322 .name = "sun4i-pinctrl",
1323 .of_match_table = sun4i_a10_pinctrl_match,
1324 },
1325};
1326builtin_platform_driver(sun4i_a10_pinctrl_driver);
1327