Commit | Line | Data |
---|---|---|
1c996176 MR |
1 | /* |
2 | * Allwinner A31 SoCs pinctrl driver. | |
3 | * | |
4 | * Copyright (C) 2014 Maxime Ripard | |
5 | * | |
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | |
7 | * | |
8 | * This file is licensed under the terms of the GNU General Public | |
9 | * License version 2. This program is licensed "as is" without any | |
10 | * warranty of any kind, whether express or implied. | |
11 | */ | |
12 | ||
0c8c6ba0 | 13 | #include <linux/init.h> |
1c996176 MR |
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 | ||
21 | static const struct sunxi_desc_pin sun6i_a31_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, "gmac"), /* TXD0 */ | |
4924982e CYT |
26 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
27 | PINCTRL_SUN6I_A31), /* D0 */ | |
c11a33c1 MR |
28 | SUNXI_FUNCTION(0x4, "uart1"), /* DTR */ |
29 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */ | |
1c996176 MR |
30 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1), |
31 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
32 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
33 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD1 */ | |
4924982e CYT |
34 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
35 | PINCTRL_SUN6I_A31), /* D1 */ | |
c11a33c1 MR |
36 | SUNXI_FUNCTION(0x4, "uart1"), /* DSR */ |
37 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */ | |
1c996176 MR |
38 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2), |
39 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
40 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
41 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD2 */ | |
4924982e CYT |
42 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
43 | PINCTRL_SUN6I_A31), /* D2 */ | |
c11a33c1 MR |
44 | SUNXI_FUNCTION(0x4, "uart1"), /* DCD */ |
45 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */ | |
1c996176 MR |
46 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3), |
47 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
48 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
49 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD3 */ | |
4924982e CYT |
50 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
51 | PINCTRL_SUN6I_A31), /* D3 */ | |
c11a33c1 MR |
52 | SUNXI_FUNCTION(0x4, "uart1"), /* RING */ |
53 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */ | |
1c996176 MR |
54 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4), |
55 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
56 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
57 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD4 */ | |
4924982e CYT |
58 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
59 | PINCTRL_SUN6I_A31), /* D4 */ | |
c11a33c1 MR |
60 | SUNXI_FUNCTION(0x4, "uart1"), /* TX */ |
61 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */ | |
1c996176 MR |
62 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5), |
63 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
64 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
65 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD5 */ | |
4924982e CYT |
66 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
67 | PINCTRL_SUN6I_A31), /* D5 */ | |
c11a33c1 MR |
68 | SUNXI_FUNCTION(0x4, "uart1"), /* RX */ |
69 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */ | |
1c996176 MR |
70 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6), |
71 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
72 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
73 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD6 */ | |
4924982e CYT |
74 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
75 | PINCTRL_SUN6I_A31), /* D6 */ | |
c11a33c1 MR |
76 | SUNXI_FUNCTION(0x4, "uart1"), /* RTS */ |
77 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */ | |
1c996176 MR |
78 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7), |
79 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
80 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
81 | SUNXI_FUNCTION(0x2, "gmac"), /* TXD7 */ | |
4924982e CYT |
82 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
83 | PINCTRL_SUN6I_A31), /* D7 */ | |
c11a33c1 MR |
84 | SUNXI_FUNCTION(0x4, "uart1"), /* CTS */ |
85 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */ | |
1c996176 MR |
86 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8), |
87 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
88 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
89 | SUNXI_FUNCTION(0x2, "gmac"), /* TXCLK */ | |
4924982e CYT |
90 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
91 | PINCTRL_SUN6I_A31), /* D8 */ | |
c11a33c1 | 92 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */ |
1c996176 MR |
93 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9), |
94 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
95 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
96 | SUNXI_FUNCTION(0x2, "gmac"), /* TXEN */ | |
4924982e CYT |
97 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
98 | PINCTRL_SUN6I_A31), /* D9 */ | |
1c996176 | 99 | SUNXI_FUNCTION(0x4, "mmc3"), /* CMD */ |
c11a33c1 MR |
100 | SUNXI_FUNCTION(0x5, "mmc2"), /* CMD */ |
101 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */ | |
1c996176 MR |
102 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10), |
103 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
104 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
105 | SUNXI_FUNCTION(0x2, "gmac"), /* GTXCLK */ | |
4924982e CYT |
106 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
107 | PINCTRL_SUN6I_A31), /* D10 */ | |
1c996176 | 108 | SUNXI_FUNCTION(0x4, "mmc3"), /* CLK */ |
c11a33c1 MR |
109 | SUNXI_FUNCTION(0x5, "mmc2"), /* CLK */ |
110 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */ | |
1c996176 MR |
111 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11), |
112 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
113 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
114 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD0 */ | |
4924982e CYT |
115 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
116 | PINCTRL_SUN6I_A31), /* D11 */ | |
1c996176 | 117 | SUNXI_FUNCTION(0x4, "mmc3"), /* D0 */ |
c11a33c1 MR |
118 | SUNXI_FUNCTION(0x5, "mmc2"), /* D0 */ |
119 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */ | |
1c996176 MR |
120 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12), |
121 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
122 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
123 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD1 */ | |
4924982e CYT |
124 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
125 | PINCTRL_SUN6I_A31), /* D12 */ | |
1c996176 | 126 | SUNXI_FUNCTION(0x4, "mmc3"), /* D1 */ |
c11a33c1 MR |
127 | SUNXI_FUNCTION(0x5, "mmc2"), /* D1 */ |
128 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */ | |
1c996176 MR |
129 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13), |
130 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
131 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
132 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD2 */ | |
4924982e CYT |
133 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
134 | PINCTRL_SUN6I_A31), /* D13 */ | |
1c996176 | 135 | SUNXI_FUNCTION(0x4, "mmc3"), /* D2 */ |
c11a33c1 MR |
136 | SUNXI_FUNCTION(0x5, "mmc2"), /* D2 */ |
137 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */ | |
1c996176 MR |
138 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14), |
139 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
140 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
141 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD3 */ | |
4924982e CYT |
142 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
143 | PINCTRL_SUN6I_A31), /* D14 */ | |
1c996176 | 144 | SUNXI_FUNCTION(0x4, "mmc3"), /* D3 */ |
c11a33c1 MR |
145 | SUNXI_FUNCTION(0x5, "mmc2"), /* D3 */ |
146 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */ | |
1c996176 MR |
147 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15), |
148 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
149 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
150 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD4 */ | |
4924982e CYT |
151 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
152 | PINCTRL_SUN6I_A31), /* D15 */ | |
c5abe62b | 153 | SUNXI_FUNCTION(0x4, "clk_out_a"), |
c11a33c1 | 154 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */ |
1c996176 MR |
155 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16), |
156 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
157 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
158 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD5 */ | |
4924982e CYT |
159 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
160 | PINCTRL_SUN6I_A31), /* D16 */ | |
c5abe62b | 161 | SUNXI_FUNCTION(0x4, "dmic"), /* CLK */ |
c11a33c1 | 162 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */ |
1c996176 MR |
163 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17), |
164 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
165 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
166 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD6 */ | |
4924982e CYT |
167 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
168 | PINCTRL_SUN6I_A31), /* D17 */ | |
c5abe62b | 169 | SUNXI_FUNCTION(0x4, "dmic"), /* DIN */ |
c11a33c1 | 170 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */ |
1c996176 MR |
171 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18), |
172 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
173 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
174 | SUNXI_FUNCTION(0x2, "gmac"), /* RXD7 */ | |
4924982e CYT |
175 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
176 | PINCTRL_SUN6I_A31), /* D18 */ | |
c5abe62b | 177 | SUNXI_FUNCTION(0x4, "clk_out_b"), |
c11a33c1 | 178 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */ |
1c996176 MR |
179 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), |
180 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
181 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
182 | SUNXI_FUNCTION(0x2, "gmac"), /* RXDV */ | |
4924982e CYT |
183 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
184 | PINCTRL_SUN6I_A31), /* D19 */ | |
c11a33c1 MR |
185 | SUNXI_FUNCTION(0x4, "pwm3"), /* Positive */ |
186 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 19)), /* PA_EINT19 */ | |
1c996176 MR |
187 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20), |
188 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
189 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
190 | SUNXI_FUNCTION(0x2, "gmac"), /* RXCLK */ | |
4924982e CYT |
191 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
192 | PINCTRL_SUN6I_A31), /* D20 */ | |
c11a33c1 MR |
193 | SUNXI_FUNCTION(0x4, "pwm3"), /* Negative */ |
194 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 20)), /* PA_EINT20 */ | |
1c996176 MR |
195 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21), |
196 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
197 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
198 | SUNXI_FUNCTION(0x2, "gmac"), /* TXERR */ | |
4924982e CYT |
199 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
200 | PINCTRL_SUN6I_A31), /* D21 */ | |
c11a33c1 MR |
201 | SUNXI_FUNCTION(0x4, "spi3"), /* CS0 */ |
202 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 21)), /* PA_EINT21 */ | |
1c996176 MR |
203 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 22), |
204 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
205 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
206 | SUNXI_FUNCTION(0x2, "gmac"), /* RXERR */ | |
4924982e CYT |
207 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
208 | PINCTRL_SUN6I_A31), /* D22 */ | |
c11a33c1 MR |
209 | SUNXI_FUNCTION(0x4, "spi3"), /* CLK */ |
210 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 22)), /* PA_EINT22 */ | |
1c996176 MR |
211 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 23), |
212 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
213 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
214 | SUNXI_FUNCTION(0x2, "gmac"), /* COL */ | |
4924982e CYT |
215 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
216 | PINCTRL_SUN6I_A31), /* D23 */ | |
c11a33c1 MR |
217 | SUNXI_FUNCTION(0x4, "spi3"), /* MOSI */ |
218 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 23)), /* PA_EINT23 */ | |
1c996176 MR |
219 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 24), |
220 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
221 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
222 | SUNXI_FUNCTION(0x2, "gmac"), /* CRS */ | |
4924982e CYT |
223 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
224 | PINCTRL_SUN6I_A31), /* CLK */ | |
c11a33c1 MR |
225 | SUNXI_FUNCTION(0x4, "spi3"), /* MISO */ |
226 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 24)), /* PA_EINT24 */ | |
1c996176 MR |
227 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 25), |
228 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
229 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
230 | SUNXI_FUNCTION(0x2, "gmac"), /* CLKIN */ | |
4924982e CYT |
231 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
232 | PINCTRL_SUN6I_A31), /* DE */ | |
c11a33c1 MR |
233 | SUNXI_FUNCTION(0x4, "spi3"), /* CS1 */ |
234 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 25)), /* PA_EINT25 */ | |
1c996176 MR |
235 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 26), |
236 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
237 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
238 | SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ | |
4924982e CYT |
239 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
240 | PINCTRL_SUN6I_A31), /* HSYNC */ | |
c5abe62b | 241 | SUNXI_FUNCTION(0x4, "clk_out_c"), |
c11a33c1 | 242 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ |
1c996176 MR |
243 | SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), |
244 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
245 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
246 | SUNXI_FUNCTION(0x2, "gmac"), /* MDIO */ | |
4924982e CYT |
247 | SUNXI_FUNCTION_VARIANT(0x3, "lcd1", |
248 | PINCTRL_SUN6I_A31), /* VSYNC */ | |
c11a33c1 | 249 | SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 27)), /* PA_EINT27 */ |
1c996176 MR |
250 | /* Hole */ |
251 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0), | |
252 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
253 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
254 | SUNXI_FUNCTION(0x2, "i2s0"), /* MCLK */ | |
255 | SUNXI_FUNCTION(0x3, "uart3"), /* CTS */ | |
4924982e CYT |
256 | SUNXI_FUNCTION_VARIANT(0x4, "csi", |
257 | PINCTRL_SUN6I_A31), /* MCLK1 */ | |
c11a33c1 | 258 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 0)), /* PB_EINT0 */ |
1c996176 MR |
259 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1), |
260 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
261 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
262 | SUNXI_FUNCTION(0x2, "i2s0"), /* BCLK */ |
263 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 1)), /* PB_EINT1 */ | |
1c996176 MR |
264 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2), |
265 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
266 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
267 | SUNXI_FUNCTION(0x2, "i2s0"), /* LRCK */ |
268 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 2)), /* PB_EINT2 */ | |
1c996176 MR |
269 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3), |
270 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
271 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
272 | SUNXI_FUNCTION(0x2, "i2s0"), /* DO0 */ |
273 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 3)), /* PB_EINT3 */ | |
1c996176 MR |
274 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4), |
275 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
276 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
277 | SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ | |
c11a33c1 MR |
278 | SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ |
279 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */ | |
1c996176 MR |
280 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5), |
281 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
282 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
283 | SUNXI_FUNCTION(0x2, "i2s0"), /* DO2 */ | |
284 | SUNXI_FUNCTION(0x3, "uart3"), /* TX */ | |
c11a33c1 MR |
285 | SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ |
286 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)), /* PB_EINT5 */ | |
1c996176 MR |
287 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6), |
288 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
289 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
290 | SUNXI_FUNCTION(0x2, "i2s0"), /* DO3 */ | |
291 | SUNXI_FUNCTION(0x3, "uart3"), /* RX */ | |
c11a33c1 MR |
292 | SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */ |
293 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 6)), /* PB_EINT6 */ | |
1c996176 MR |
294 | SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7), |
295 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
296 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
297 | SUNXI_FUNCTION(0x3, "i2s0"), /* DI */ |
298 | SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 7)), /* PB_EINT7 */ | |
1c996176 MR |
299 | /* Hole */ |
300 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0), | |
301 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
302 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
303 | SUNXI_FUNCTION(0x2, "nand0"), /* WE */ | |
304 | SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */ | |
305 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1), | |
306 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
307 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
308 | SUNXI_FUNCTION(0x2, "nand0"), /* ALE */ | |
309 | SUNXI_FUNCTION(0x3, "spi0")), /* MISO */ | |
310 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2), | |
311 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
312 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
313 | SUNXI_FUNCTION(0x2, "nand0"), /* CLE */ | |
314 | SUNXI_FUNCTION(0x3, "spi0")), /* CLK */ | |
315 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3), | |
316 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
317 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
318 | SUNXI_FUNCTION(0x2, "nand0")), /* CE1 */ | |
319 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4), | |
320 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
321 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
322 | SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */ | |
323 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5), | |
324 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
325 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
326 | SUNXI_FUNCTION(0x2, "nand0")), /* RE */ | |
327 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6), | |
328 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
329 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
330 | SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */ | |
331 | SUNXI_FUNCTION(0x3, "mmc2"), /* CMD */ | |
332 | SUNXI_FUNCTION(0x4, "mmc3")), /* CMD */ | |
333 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7), | |
334 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
335 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
336 | SUNXI_FUNCTION(0x2, "nand0"), /* RB1 */ | |
337 | SUNXI_FUNCTION(0x3, "mmc2"), /* CLK */ | |
338 | SUNXI_FUNCTION(0x4, "mmc3")), /* CLK */ | |
339 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8), | |
340 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
341 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
342 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */ | |
343 | SUNXI_FUNCTION(0x3, "mmc2"), /* D0 */ | |
344 | SUNXI_FUNCTION(0x4, "mmc3")), /* D0 */ | |
345 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9), | |
346 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
347 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
348 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */ | |
349 | SUNXI_FUNCTION(0x3, "mmc2"), /* D1 */ | |
350 | SUNXI_FUNCTION(0x4, "mmc3")), /* D1 */ | |
351 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10), | |
352 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
353 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
354 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */ | |
355 | SUNXI_FUNCTION(0x3, "mmc2"), /* D2 */ | |
356 | SUNXI_FUNCTION(0x4, "mmc3")), /* D2 */ | |
357 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11), | |
358 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
359 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
360 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */ | |
361 | SUNXI_FUNCTION(0x3, "mmc2"), /* D3 */ | |
362 | SUNXI_FUNCTION(0x4, "mmc3")), /* D3 */ | |
363 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12), | |
364 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
365 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
366 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */ | |
367 | SUNXI_FUNCTION(0x3, "mmc2"), /* D4 */ | |
368 | SUNXI_FUNCTION(0x4, "mmc3")), /* D4 */ | |
369 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13), | |
370 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
371 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
372 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */ | |
373 | SUNXI_FUNCTION(0x3, "mmc2"), /* D5 */ | |
374 | SUNXI_FUNCTION(0x4, "mmc3")), /* D5 */ | |
375 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14), | |
376 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
377 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
378 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */ | |
379 | SUNXI_FUNCTION(0x3, "mmc2"), /* D6 */ | |
380 | SUNXI_FUNCTION(0x4, "mmc3")), /* D6 */ | |
381 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), | |
382 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
383 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
384 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */ | |
385 | SUNXI_FUNCTION(0x3, "mmc2"), /* D7 */ | |
386 | SUNXI_FUNCTION(0x4, "mmc3")), /* D7 */ | |
4924982e CYT |
387 | /* Hole in pin numbering for A31s */ |
388 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 16), PINCTRL_SUN6I_A31, | |
1c996176 MR |
389 | SUNXI_FUNCTION(0x0, "gpio_in"), |
390 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
391 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ8 */ | |
392 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ0 */ | |
4924982e | 393 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 17), PINCTRL_SUN6I_A31, |
1c996176 MR |
394 | SUNXI_FUNCTION(0x0, "gpio_in"), |
395 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
396 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ9 */ | |
397 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ1 */ | |
4924982e | 398 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 18), PINCTRL_SUN6I_A31, |
1c996176 MR |
399 | SUNXI_FUNCTION(0x0, "gpio_in"), |
400 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
401 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ10 */ | |
402 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ2 */ | |
4924982e | 403 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 19), PINCTRL_SUN6I_A31, |
1c996176 MR |
404 | SUNXI_FUNCTION(0x0, "gpio_in"), |
405 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
406 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ11 */ | |
407 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ3 */ | |
4924982e | 408 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 20), PINCTRL_SUN6I_A31, |
1c996176 MR |
409 | SUNXI_FUNCTION(0x0, "gpio_in"), |
410 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
411 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ12 */ | |
412 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ4 */ | |
4924982e | 413 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 21), PINCTRL_SUN6I_A31, |
1c996176 MR |
414 | SUNXI_FUNCTION(0x0, "gpio_in"), |
415 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
416 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ13 */ | |
417 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ5 */ | |
4924982e | 418 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 22), PINCTRL_SUN6I_A31, |
1c996176 MR |
419 | SUNXI_FUNCTION(0x0, "gpio_in"), |
420 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
421 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ14 */ | |
422 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ6 */ | |
4924982e | 423 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 23), PINCTRL_SUN6I_A31, |
1c996176 MR |
424 | SUNXI_FUNCTION(0x0, "gpio_in"), |
425 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
426 | SUNXI_FUNCTION(0x2, "nand0"), /* DQ15 */ | |
427 | SUNXI_FUNCTION(0x3, "nand1")), /* DQ7 */ | |
428 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 24), | |
429 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
430 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
431 | SUNXI_FUNCTION(0x2, "nand0"), /* DQS */ | |
432 | SUNXI_FUNCTION(0x3, "mmc2"), /* RST */ | |
433 | SUNXI_FUNCTION(0x4, "mmc3")), /* RST */ | |
434 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 25), | |
435 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
436 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
437 | SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */ | |
438 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 26), | |
439 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
440 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
441 | SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */ | |
442 | SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 27), | |
443 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
444 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
445 | SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */ | |
446 | /* Hole */ | |
447 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0), | |
448 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
449 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
450 | SUNXI_FUNCTION(0x2, "lcd0"), /* D0 */ | |
451 | SUNXI_FUNCTION(0x3, "lvds0")), /* VP0 */ | |
452 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1), | |
453 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
454 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
455 | SUNXI_FUNCTION(0x2, "lcd0"), /* D1 */ | |
456 | SUNXI_FUNCTION(0x3, "lvds0")), /* VN0 */ | |
457 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2), | |
458 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
459 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
460 | SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */ | |
461 | SUNXI_FUNCTION(0x3, "lvds0")), /* VP1 */ | |
462 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3), | |
463 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
464 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
465 | SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */ | |
466 | SUNXI_FUNCTION(0x3, "lvds0")), /* VN1 */ | |
467 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4), | |
468 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
469 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
470 | SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */ | |
471 | SUNXI_FUNCTION(0x3, "lvds0")), /* VP2 */ | |
472 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5), | |
473 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
474 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
475 | SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */ | |
476 | SUNXI_FUNCTION(0x3, "lvds0")), /* VN2 */ | |
477 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6), | |
478 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
479 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
480 | SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */ | |
481 | SUNXI_FUNCTION(0x3, "lvds0")), /* VPC */ | |
482 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7), | |
483 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
484 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
485 | SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */ | |
486 | SUNXI_FUNCTION(0x3, "lvds0")), /* VNC */ | |
487 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8), | |
488 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
489 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
490 | SUNXI_FUNCTION(0x2, "lcd0"), /* D8 */ | |
491 | SUNXI_FUNCTION(0x3, "lvds0")), /* VP3 */ | |
492 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9), | |
493 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
494 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
495 | SUNXI_FUNCTION(0x2, "lcd0"), /* D9 */ | |
496 | SUNXI_FUNCTION(0x3, "lvds0")), /* VN3 */ | |
497 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10), | |
498 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
499 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
500 | SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */ | |
4924982e CYT |
501 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
502 | PINCTRL_SUN6I_A31)), /* VP0 */ | |
1c996176 MR |
503 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11), |
504 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
505 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
506 | SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */ | |
4924982e CYT |
507 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
508 | PINCTRL_SUN6I_A31)), /* VN0 */ | |
1c996176 MR |
509 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12), |
510 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
511 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
512 | SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */ | |
4924982e CYT |
513 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
514 | PINCTRL_SUN6I_A31)), /* VP1 */ | |
1c996176 MR |
515 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13), |
516 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
517 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
518 | SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */ | |
4924982e CYT |
519 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
520 | PINCTRL_SUN6I_A31)), /* VN1 */ | |
1c996176 MR |
521 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14), |
522 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
523 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
524 | SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */ | |
4924982e CYT |
525 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
526 | PINCTRL_SUN6I_A31)), /* VP2 */ | |
1c996176 MR |
527 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15), |
528 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
529 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
530 | SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */ | |
4924982e CYT |
531 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
532 | PINCTRL_SUN6I_A31)), /* VN2 */ | |
1c996176 MR |
533 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16), |
534 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
535 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
536 | SUNXI_FUNCTION(0x2, "lcd0"), /* D16 */ | |
4924982e CYT |
537 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
538 | PINCTRL_SUN6I_A31)), /* VPC */ | |
1c996176 MR |
539 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17), |
540 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
541 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
542 | SUNXI_FUNCTION(0x2, "lcd0"), /* D17 */ | |
4924982e CYT |
543 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
544 | PINCTRL_SUN6I_A31)), /* VNC */ | |
1c996176 MR |
545 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18), |
546 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
547 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
548 | SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */ | |
4924982e CYT |
549 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
550 | PINCTRL_SUN6I_A31)), /* VP3 */ | |
1c996176 MR |
551 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19), |
552 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
553 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
554 | SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */ | |
4924982e CYT |
555 | SUNXI_FUNCTION_VARIANT(0x3, "lvds1", |
556 | PINCTRL_SUN6I_A31)), /* VN3 */ | |
1c996176 MR |
557 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20), |
558 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
559 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
560 | SUNXI_FUNCTION(0x2, "lcd0")), /* D20 */ | |
561 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21), | |
562 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
563 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
564 | SUNXI_FUNCTION(0x2, "lcd0")), /* D21 */ | |
565 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22), | |
566 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
567 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
568 | SUNXI_FUNCTION(0x2, "lcd0")), /* D22 */ | |
569 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23), | |
570 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
571 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
572 | SUNXI_FUNCTION(0x2, "lcd0")), /* D23 */ | |
573 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24), | |
574 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
575 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
576 | SUNXI_FUNCTION(0x2, "lcd0")), /* CLK */ | |
577 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25), | |
578 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
579 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
580 | SUNXI_FUNCTION(0x2, "lcd0")), /* DE */ | |
581 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26), | |
582 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
583 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
584 | SUNXI_FUNCTION(0x2, "lcd0")), /* HSYNC */ | |
585 | SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27), | |
586 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
587 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
588 | SUNXI_FUNCTION(0x2, "lcd0")), /* VSYNC */ | |
589 | /* Hole */ | |
590 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0), | |
591 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
592 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
593 | SUNXI_FUNCTION(0x2, "csi"), /* PCLK */ | |
c11a33c1 MR |
594 | SUNXI_FUNCTION(0x3, "ts"), /* CLK */ |
595 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 0)), /* PE_EINT0 */ | |
1c996176 MR |
596 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1), |
597 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
598 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
599 | SUNXI_FUNCTION(0x2, "csi"), /* MCLK */ | |
c11a33c1 MR |
600 | SUNXI_FUNCTION(0x3, "ts"), /* ERR */ |
601 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 1)), /* PE_EINT1 */ | |
1c996176 MR |
602 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2), |
603 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
604 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
605 | SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */ | |
c11a33c1 MR |
606 | SUNXI_FUNCTION(0x3, "ts"), /* SYNC */ |
607 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 2)), /* PE_EINT2 */ | |
1c996176 MR |
608 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3), |
609 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
610 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
611 | SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */ | |
c11a33c1 MR |
612 | SUNXI_FUNCTION(0x3, "ts"), /* DVLD */ |
613 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 3)), /* PE_EINT3 */ | |
1c996176 MR |
614 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4), |
615 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
616 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
617 | SUNXI_FUNCTION(0x2, "csi"), /* D0 */ | |
c11a33c1 MR |
618 | SUNXI_FUNCTION(0x3, "uart5"), /* TX */ |
619 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 4)), /* PE_EINT4 */ | |
1c996176 MR |
620 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5), |
621 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
622 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
623 | SUNXI_FUNCTION(0x2, "csi"), /* D1 */ | |
c11a33c1 MR |
624 | SUNXI_FUNCTION(0x3, "uart5"), /* RX */ |
625 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 5)), /* PE_EINT5 */ | |
1c996176 MR |
626 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6), |
627 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
628 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
629 | SUNXI_FUNCTION(0x2, "csi"), /* D2 */ | |
c11a33c1 MR |
630 | SUNXI_FUNCTION(0x3, "uart5"), /* RTS */ |
631 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 6)), /* PE_EINT6 */ | |
1c996176 MR |
632 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7), |
633 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
634 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
635 | SUNXI_FUNCTION(0x2, "csi"), /* D3 */ | |
c11a33c1 MR |
636 | SUNXI_FUNCTION(0x3, "uart5"), /* CTS */ |
637 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 7)), /* PE_EINT7 */ | |
1c996176 MR |
638 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8), |
639 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
640 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
641 | SUNXI_FUNCTION(0x2, "csi"), /* D4 */ | |
c11a33c1 MR |
642 | SUNXI_FUNCTION(0x3, "ts"), /* D0 */ |
643 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 8)), /* PE_EINT8 */ | |
1c996176 MR |
644 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9), |
645 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
646 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
647 | SUNXI_FUNCTION(0x2, "csi"), /* D5 */ | |
c11a33c1 MR |
648 | SUNXI_FUNCTION(0x3, "ts"), /* D1 */ |
649 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 9)), /* PE_EINT9 */ | |
1c996176 MR |
650 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10), |
651 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
652 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
653 | SUNXI_FUNCTION(0x2, "csi"), /* D6 */ | |
c11a33c1 MR |
654 | SUNXI_FUNCTION(0x3, "ts"), /* D2 */ |
655 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 10)), /* PE_EINT10 */ | |
1c996176 MR |
656 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11), |
657 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
658 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
659 | SUNXI_FUNCTION(0x2, "csi"), /* D7 */ | |
c11a33c1 MR |
660 | SUNXI_FUNCTION(0x3, "ts"), /* D3 */ |
661 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 11)), /* PE_EINT11 */ | |
1c996176 MR |
662 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12), |
663 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
664 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
665 | SUNXI_FUNCTION(0x2, "csi"), /* D8 */ | |
c11a33c1 MR |
666 | SUNXI_FUNCTION(0x3, "ts"), /* D4 */ |
667 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 12)), /* PE_EINT12 */ | |
1c996176 MR |
668 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13), |
669 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
670 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
671 | SUNXI_FUNCTION(0x2, "csi"), /* D9 */ | |
c11a33c1 MR |
672 | SUNXI_FUNCTION(0x3, "ts"), /* D5 */ |
673 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 13)), /* PE_EINT13 */ | |
1c996176 MR |
674 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14), |
675 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
676 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
677 | SUNXI_FUNCTION(0x2, "csi"), /* D10 */ | |
c11a33c1 MR |
678 | SUNXI_FUNCTION(0x3, "ts"), /* D6 */ |
679 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 14)), /* PE_EINT14 */ | |
1c996176 MR |
680 | SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15), |
681 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
682 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
683 | SUNXI_FUNCTION(0x2, "csi"), /* D11 */ | |
c11a33c1 MR |
684 | SUNXI_FUNCTION(0x3, "ts"), /* D7 */ |
685 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 15)), /* PE_EINT15 */ | |
4924982e | 686 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(E, 16), PINCTRL_SUN6I_A31, |
1c996176 MR |
687 | SUNXI_FUNCTION(0x0, "gpio_in"), |
688 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
689 | SUNXI_FUNCTION(0x2, "csi"), /* MIPI CSI MCLK */ |
690 | SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 16)), /* PE_EINT16 */ | |
1c996176 MR |
691 | /* Hole */ |
692 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0), | |
693 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
694 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
695 | SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */ | |
696 | SUNXI_FUNCTION(0x4, "jtag")), /* MS1 */ | |
697 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1), | |
698 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
699 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
700 | SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */ | |
701 | SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */ | |
702 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2), | |
703 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
704 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
705 | SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */ | |
706 | SUNXI_FUNCTION(0x4, "uart0")), /* TX */ | |
707 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3), | |
708 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
709 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
710 | SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */ | |
711 | SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */ | |
712 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4), | |
713 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
714 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
715 | SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */ | |
716 | SUNXI_FUNCTION(0x4, "uart0")), /* RX */ | |
717 | SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5), | |
718 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
719 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
720 | SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */ | |
721 | SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */ | |
722 | /* Hole */ | |
723 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0), | |
724 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
725 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
726 | SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */ |
727 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 0)), /* PG_EINT0 */ | |
1c996176 MR |
728 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1), |
729 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
730 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
731 | SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */ |
732 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 1)), /* PG_EINT1 */ | |
1c996176 MR |
733 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2), |
734 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
735 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
736 | SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */ |
737 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 2)), /* PG_EINT2 */ | |
1c996176 MR |
738 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3), |
739 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
740 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
741 | SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */ |
742 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 3)), /* PG_EINT3 */ | |
1c996176 MR |
743 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4), |
744 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
745 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
746 | SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */ |
747 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 4)), /* PG_EINT4 */ | |
1c996176 MR |
748 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5), |
749 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
750 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
751 | SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */ |
752 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 5)), /* PG_EINT5 */ | |
1c996176 MR |
753 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6), |
754 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
755 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
756 | SUNXI_FUNCTION(0x2, "uart2"), /* TX */ |
757 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 6)), /* PG_EINT6 */ | |
1c996176 MR |
758 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7), |
759 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
760 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
761 | SUNXI_FUNCTION(0x2, "uart2"), /* RX */ |
762 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 7)), /* PG_EINT7 */ | |
1c996176 MR |
763 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8), |
764 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
765 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
766 | SUNXI_FUNCTION(0x2, "uart2"), /* RTS */ |
767 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 8)), /* PG_EINT8 */ | |
1c996176 MR |
768 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9), |
769 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
770 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
771 | SUNXI_FUNCTION(0x2, "uart2"), /* CTS */ |
772 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 9)), /* PG_EINT9 */ | |
1c996176 MR |
773 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10), |
774 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
775 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
776 | SUNXI_FUNCTION(0x2, "i2c3"), /* SCK */ | |
4924982e CYT |
777 | SUNXI_FUNCTION_VARIANT(0x3, "usb", |
778 | PINCTRL_SUN6I_A31), /* DP3 */ | |
c11a33c1 | 779 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 10)), /* PG_EINT10 */ |
1c996176 MR |
780 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11), |
781 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
782 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
783 | SUNXI_FUNCTION(0x2, "i2c3"), /* SDA */ | |
4924982e CYT |
784 | SUNXI_FUNCTION_VARIANT(0x3, "usb", |
785 | PINCTRL_SUN6I_A31), /* DM3 */ | |
c11a33c1 | 786 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 11)), /* PG_EINT11 */ |
1c996176 MR |
787 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12), |
788 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
789 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
790 | SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */ | |
c11a33c1 MR |
791 | SUNXI_FUNCTION(0x3, "i2s1"), /* MCLK */ |
792 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 12)), /* PG_EINT12 */ | |
1c996176 MR |
793 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13), |
794 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
795 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
796 | SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */ | |
c11a33c1 MR |
797 | SUNXI_FUNCTION(0x3, "i2s1"), /* BCLK */ |
798 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 13)), /* PG_EINT13 */ | |
1c996176 MR |
799 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 14), |
800 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
801 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
802 | SUNXI_FUNCTION(0x2, "spi1"), /* CLK */ | |
c11a33c1 MR |
803 | SUNXI_FUNCTION(0x3, "i2s1"), /* LRCK */ |
804 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 14)), /* PG_EINT14 */ | |
1c996176 MR |
805 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 15), |
806 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
807 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
808 | SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */ | |
c11a33c1 MR |
809 | SUNXI_FUNCTION(0x3, "i2s1"), /* DIN */ |
810 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 15)), /* PG_EINT15 */ | |
1c996176 MR |
811 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 16), |
812 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
813 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
814 | SUNXI_FUNCTION(0x2, "spi1"), /* MISO */ | |
c11a33c1 MR |
815 | SUNXI_FUNCTION(0x3, "i2s1"), /* DOUT */ |
816 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 16)), /* PG_EINT16 */ | |
1c996176 MR |
817 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 17), |
818 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
819 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
820 | SUNXI_FUNCTION(0x2, "uart4"), /* TX */ |
821 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 17)), /* PG_EINT17 */ | |
1c996176 MR |
822 | SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 18), |
823 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
824 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
c11a33c1 MR |
825 | SUNXI_FUNCTION(0x2, "uart4"), /* RX */ |
826 | SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 18)), /* PG_EINT18 */ | |
4924982e CYT |
827 | /* Hole; H starts at pin 9 for A31s */ |
828 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 0), PINCTRL_SUN6I_A31, | |
1c996176 MR |
829 | SUNXI_FUNCTION(0x0, "gpio_in"), |
830 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
831 | SUNXI_FUNCTION(0x2, "nand1")), /* WE */ | |
4924982e | 832 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 1), PINCTRL_SUN6I_A31, |
1c996176 MR |
833 | SUNXI_FUNCTION(0x0, "gpio_in"), |
834 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
835 | SUNXI_FUNCTION(0x2, "nand1")), /* ALE */ | |
4924982e | 836 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 2), PINCTRL_SUN6I_A31, |
1c996176 MR |
837 | SUNXI_FUNCTION(0x0, "gpio_in"), |
838 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
839 | SUNXI_FUNCTION(0x2, "nand1")), /* CLE */ | |
4924982e | 840 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 3), PINCTRL_SUN6I_A31, |
1c996176 MR |
841 | SUNXI_FUNCTION(0x0, "gpio_in"), |
842 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
843 | SUNXI_FUNCTION(0x2, "nand1")), /* CE1 */ | |
4924982e | 844 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 4), PINCTRL_SUN6I_A31, |
1c996176 MR |
845 | SUNXI_FUNCTION(0x0, "gpio_in"), |
846 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
847 | SUNXI_FUNCTION(0x2, "nand1")), /* CE0 */ | |
4924982e | 848 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 5), PINCTRL_SUN6I_A31, |
1c996176 MR |
849 | SUNXI_FUNCTION(0x0, "gpio_in"), |
850 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
851 | SUNXI_FUNCTION(0x2, "nand1")), /* RE */ | |
4924982e | 852 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 6), PINCTRL_SUN6I_A31, |
1c996176 MR |
853 | SUNXI_FUNCTION(0x0, "gpio_in"), |
854 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
855 | SUNXI_FUNCTION(0x2, "nand1")), /* RB0 */ | |
4924982e | 856 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 7), PINCTRL_SUN6I_A31, |
1c996176 MR |
857 | SUNXI_FUNCTION(0x0, "gpio_in"), |
858 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
859 | SUNXI_FUNCTION(0x2, "nand1")), /* RB1 */ | |
4924982e | 860 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 8), PINCTRL_SUN6I_A31, |
1c996176 MR |
861 | SUNXI_FUNCTION(0x0, "gpio_in"), |
862 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
863 | SUNXI_FUNCTION(0x2, "nand1")), /* DQS */ | |
864 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9), | |
865 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
866 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
867 | SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */ | |
868 | SUNXI_FUNCTION(0x3, "jtag"), /* MS0 */ | |
869 | SUNXI_FUNCTION(0x4, "pwm1")), /* Positive */ | |
870 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10), | |
871 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
872 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
873 | SUNXI_FUNCTION(0x2, "spi2"), /* CLK */ | |
874 | SUNXI_FUNCTION(0x3, "jtag"), /* CK0 */ | |
875 | SUNXI_FUNCTION(0x4, "pwm1")), /* Negative */ | |
876 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11), | |
877 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
878 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
879 | SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */ | |
880 | SUNXI_FUNCTION(0x3, "jtag"), /* DO0 */ | |
881 | SUNXI_FUNCTION(0x4, "pwm2")), /* Positive */ | |
882 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12), | |
883 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
884 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
885 | SUNXI_FUNCTION(0x2, "spi2"), /* MISO */ | |
886 | SUNXI_FUNCTION(0x3, "jtag"), /* DI0 */ | |
887 | SUNXI_FUNCTION(0x4, "pwm2")), /* Negative */ | |
888 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13), | |
889 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
890 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
891 | SUNXI_FUNCTION(0x2, "pwm0")), | |
892 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14), | |
893 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
894 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
895 | SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */ | |
896 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15), | |
897 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
898 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
899 | SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */ | |
900 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16), | |
901 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
902 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
903 | SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */ | |
904 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17), | |
905 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
906 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
907 | SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */ | |
908 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18), | |
909 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
910 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
911 | SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */ | |
912 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19), | |
913 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
914 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
915 | SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */ | |
916 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20), | |
917 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
918 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
919 | SUNXI_FUNCTION(0x2, "uart0")), /* TX */ | |
920 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21), | |
921 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
922 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
923 | SUNXI_FUNCTION(0x2, "uart0")), /* RX */ | |
924 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 22), | |
925 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
926 | SUNXI_FUNCTION(0x1, "gpio_out")), | |
927 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 23), | |
928 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
929 | SUNXI_FUNCTION(0x1, "gpio_out")), | |
930 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 24), | |
931 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
932 | SUNXI_FUNCTION(0x1, "gpio_out")), | |
933 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 25), | |
934 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
935 | SUNXI_FUNCTION(0x1, "gpio_out")), | |
936 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 26), | |
937 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
938 | SUNXI_FUNCTION(0x1, "gpio_out")), | |
939 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27), | |
940 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
2e477079 MC |
941 | SUNXI_FUNCTION(0x1, "gpio_out"), |
942 | /* | |
943 | * The SPDIF block is not referenced at all in the A31 user | |
944 | * manual. However it is described in the code leaked and the | |
945 | * configuration files supplied by vendors. | |
946 | */ | |
947 | SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF IN */ | |
1c996176 MR |
948 | SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 28), |
949 | SUNXI_FUNCTION(0x0, "gpio_in"), | |
2e477079 MC |
950 | SUNXI_FUNCTION(0x1, "gpio_out"), |
951 | /* Undocumented mux function - see above */ | |
952 | SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF OUT */ | |
4924982e CYT |
953 | /* 2 extra pins for A31 */ |
954 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 29), PINCTRL_SUN6I_A31, | |
1c996176 MR |
955 | SUNXI_FUNCTION(0x0, "gpio_in"), |
956 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
957 | SUNXI_FUNCTION(0x2, "nand1")), /* CE2 */ | |
4924982e | 958 | SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(H, 30), PINCTRL_SUN6I_A31, |
1c996176 MR |
959 | SUNXI_FUNCTION(0x0, "gpio_in"), |
960 | SUNXI_FUNCTION(0x1, "gpio_out"), | |
961 | SUNXI_FUNCTION(0x2, "nand1")), /* CE3 */ | |
962 | }; | |
963 | ||
964 | static const struct sunxi_pinctrl_desc sun6i_a31_pinctrl_data = { | |
965 | .pins = sun6i_a31_pins, | |
966 | .npins = ARRAY_SIZE(sun6i_a31_pins), | |
8966ada2 | 967 | .irq_banks = 4, |
cd70387f | 968 | .disable_strict_mode = true, |
1c996176 MR |
969 | }; |
970 | ||
971 | static int sun6i_a31_pinctrl_probe(struct platform_device *pdev) | |
972 | { | |
4924982e CYT |
973 | unsigned long variant = |
974 | (unsigned long)of_device_get_match_data(&pdev->dev); | |
975 | ||
976 | return sunxi_pinctrl_init_with_variant(pdev, | |
977 | &sun6i_a31_pinctrl_data, | |
978 | variant); | |
1c996176 MR |
979 | } |
980 | ||
baa9946e | 981 | static const struct of_device_id sun6i_a31_pinctrl_match[] = { |
4924982e CYT |
982 | { |
983 | .compatible = "allwinner,sun6i-a31-pinctrl", | |
984 | .data = (void *)PINCTRL_SUN6I_A31 | |
985 | }, | |
986 | { | |
987 | .compatible = "allwinner,sun6i-a31s-pinctrl", | |
988 | .data = (void *)PINCTRL_SUN6I_A31S | |
989 | }, | |
1c996176 MR |
990 | {} |
991 | }; | |
1c996176 MR |
992 | |
993 | static struct platform_driver sun6i_a31_pinctrl_driver = { | |
994 | .probe = sun6i_a31_pinctrl_probe, | |
995 | .driver = { | |
996 | .name = "sun6i-a31-pinctrl", | |
1c996176 MR |
997 | .of_match_table = sun6i_a31_pinctrl_match, |
998 | }, | |
999 | }; | |
0c8c6ba0 | 1000 | builtin_platform_driver(sun6i_a31_pinctrl_driver); |