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