xref: /OK3568_Linux_fs/kernel/drivers/pinctrl/sunxi/pinctrl-sun5i.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Allwinner sun5i SoCs pinctrl driver.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2014-2016 Maxime Ripard <maxime.ripard@free-electrons.com>
5*4882a593Smuzhiyun  * Copyright (C) 2016 Mylene Josserand <mylene.josserand@free-electrons.com>
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * This file is licensed under the terms of the GNU General Public
8*4882a593Smuzhiyun  * License version 2.  This program is licensed "as is" without any
9*4882a593Smuzhiyun  * warranty of any kind, whether express or implied.
10*4882a593Smuzhiyun  */
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/init.h>
13*4882a593Smuzhiyun #include <linux/platform_device.h>
14*4882a593Smuzhiyun #include <linux/of.h>
15*4882a593Smuzhiyun #include <linux/of_device.h>
16*4882a593Smuzhiyun #include <linux/pinctrl/pinctrl.h>
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #include "pinctrl-sunxi.h"
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun static const struct sunxi_desc_pin sun5i_pins[] = {
21*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 0),
22*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
23*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
24*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
25*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXD3 */
26*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* CLK */
27*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN0 */
28*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 1),
29*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
30*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
31*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
32*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXD2 */
33*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* ERR */
34*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN1 */
35*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 2),
36*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
37*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
38*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
39*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXD1 */
40*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* SYNC */
41*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN2 */
42*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 3),
43*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
44*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
45*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
46*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXD0 */
47*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* DLVD */
48*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN3 */
49*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 4),
50*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
51*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
52*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
53*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXD3 */
54*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D0 */
55*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN4 */
56*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 5),
57*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
58*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
59*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
60*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXD2 */
61*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D1 */
62*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN5 */
63*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 6),
64*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
65*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
66*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
67*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXD1 */
68*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D2 */
69*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN6 */
70*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 7),
71*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
72*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
73*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
74*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXD0 */
75*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D3 */
76*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* IN7 */
77*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 8),
78*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
79*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
80*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
81*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXCK */
82*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D4 */
83*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* DTR */
84*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT0 */
85*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 9),
86*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
87*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
88*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
89*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXERR */
90*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D5 */
91*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* DSR */
92*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT1 */
93*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 10),
94*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
95*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
96*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
97*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ERXDV */
98*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D6 */
99*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* DCD */
100*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT2 */
101*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 11),
102*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
103*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
104*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
105*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* EMDC */
106*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "ts0"),		/* D7 */
107*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* RING */
108*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT3 */
109*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 12),
110*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
111*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
112*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
113*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* EMDIO */
114*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart1"),		/* TX */
115*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT4 */
116*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 13),
117*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
118*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
119*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
120*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXEN */
121*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart1"),		/* RX */
122*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT5 */
123*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 14),
124*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
125*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
126*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
127*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXCK */
128*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart1"),		/* CTS */
129*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3"),		/* TX */
130*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT6 */
131*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 15),
132*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
133*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
134*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
135*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ECRS */
136*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart1"),		/* RTS */
137*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3"),		/* RX */
138*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "keypad")),	/* OUT7 */
139*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 16),
140*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
141*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
142*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
143*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ECOL */
144*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2")),	/* TX */
145*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(A, 17),
146*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
147*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
148*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
149*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "emac"),		/* ETXERR */
150*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2"),		/* RX */
151*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 31)),		/* EINT31 */
152*4882a593Smuzhiyun 	/* Hole */
153*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
154*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
155*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
156*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c0")),		/* SCK */
157*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
158*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
159*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
160*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c0")),		/* SDA */
161*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
162*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
163*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
164*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "pwm"),		/* PWM0 */
165*4882a593Smuzhiyun 		  SUNXI_FUNCTION_VARIANT(0x3,
166*4882a593Smuzhiyun 					 "spdif",	/* DO */
167*4882a593Smuzhiyun 					 PINCTRL_SUN5I_GR8),
168*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 16)),		/* EINT16 */
169*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
170*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
171*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
172*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ir0"),		/* TX */
173*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 17)),		/* EINT17 */
174*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
175*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
176*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
177*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ir0"),		/* RX */
178*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 18)),		/* EINT18 */
179*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 5),
180*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
181*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
182*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
183*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2s"),		/* MCLK */
184*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 19)),		/* EINT19 */
185*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 6),
186*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
187*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
188*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
189*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2s"),		/* BCLK */
190*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 20)),		/* EINT20 */
191*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 7),
192*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
193*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
194*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
195*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2s"),		/* LRCK */
196*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 21)),		/* EINT21 */
197*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 8),
198*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
199*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
200*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
201*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2s"),		/* DO */
202*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 22)),		/* EINT22 */
203*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 9),
204*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
205*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
206*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
207*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2s"),		/* DI */
208*4882a593Smuzhiyun 		  SUNXI_FUNCTION_VARIANT(0x3,
209*4882a593Smuzhiyun 					 "spdif",	/* DI */
210*4882a593Smuzhiyun 					 PINCTRL_SUN5I_GR8),
211*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 23)),		/* EINT23 */
212*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
213*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
214*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
215*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi2"),		/* CS1 */
216*4882a593Smuzhiyun 		  SUNXI_FUNCTION_VARIANT(0x3,
217*4882a593Smuzhiyun 					 "spdif",	/* DO */
218*4882a593Smuzhiyun 					 PINCTRL_SUN5I_GR8),
219*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 24)),		/* EINT24 */
220*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 11),
221*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
222*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
223*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
224*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi2"),		/* CS0 */
225*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "jtag"),		/* MS0 */
226*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 25)),		/* EINT25 */
227*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 12),
228*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
229*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
230*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
231*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi2"),		/* CLK */
232*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "jtag"),		/* CK0 */
233*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 26)),		/* EINT26 */
234*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 13),
235*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
236*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
237*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
238*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi2"),		/* MOSI */
239*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "jtag"),		/* DO0 */
240*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 27)),		/* EINT27 */
241*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 14),
242*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
243*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
244*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
245*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi2"),		/* MISO */
246*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "jtag"),		/* DI0 */
247*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 28)),		/* EINT28 */
248*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
249*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
250*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
251*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c1")),		/* SCK */
252*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
253*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
254*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
255*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c1")),		/* SDA */
256*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17),
257*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
258*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
259*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c2")),		/* SCK */
260*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18),
261*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
262*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
263*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "i2c2")),		/* SDA */
264*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 19),
265*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
266*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
267*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
268*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "uart0"),		/* TX */
269*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 29)),		/* EINT29 */
270*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(B, 20),
271*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
272*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
273*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
274*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "uart0"),		/* RX */
275*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 30)),		/* EINT30 */
276*4882a593Smuzhiyun 	/* Hole */
277*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
278*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
279*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
280*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NWE */
281*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "spi0")),		/* MOSI */
282*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
283*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
284*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
285*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NALE */
286*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "spi0")),		/* MISO */
287*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
288*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
289*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
290*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NCLE */
291*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "spi0")),		/* CLK */
292*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
293*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
294*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
295*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NCE1 */
296*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "spi0")),		/* CS0 */
297*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
298*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
299*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
300*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0")),	/* NCE0 */
301*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
302*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
303*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
304*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0")),	/* NRE */
305*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
306*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
307*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
308*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NRB0 */
309*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* CMD */
310*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
311*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
312*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
313*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NRB1 */
314*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* CLK */
315*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
316*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
317*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
318*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ0 */
319*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D0 */
320*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
321*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
322*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
323*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ1 */
324*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D1 */
325*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
326*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
327*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
328*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ2 */
329*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D2 */
330*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
331*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
332*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
333*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ3 */
334*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D3 */
335*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
336*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
337*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
338*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ4 */
339*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D4 */
340*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
341*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
342*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
343*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ5 */
344*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D5 */
345*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
346*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
347*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
348*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ6 */
349*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D6 */
350*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
351*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
352*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
353*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NDQ7 */
354*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "mmc2")),		/* D7 */
355*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 16),
356*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
357*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
358*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
359*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NWP */
360*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3")),	/* TX */
361*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 17),
362*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
363*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
364*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
365*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NCE2 */
366*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3")),	/* RX */
367*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(C, 18),
368*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
369*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
370*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
371*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NCE3 */
372*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2"),		/* TX */
373*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3")),	/* CTS */
374*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
375*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
376*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
377*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "nand0"),		/* NCE4 */
378*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2"),		/* RX */
379*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart3")),	/* RTS */
380*4882a593Smuzhiyun 	/* Hole */
381*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 0),
382*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
383*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
384*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
385*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D0 */
386*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 1),
387*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
388*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
389*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
390*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D1 */
391*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
392*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
393*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
394*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D2 */
395*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2")),	/* TX */
396*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
397*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
398*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
399*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D3 */
400*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2")),	/* RX */
401*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
402*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
403*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
404*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D4 */
405*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2")),	/* CTS */
406*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
407*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
408*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
409*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D5 */
410*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart2")),	/* RTS */
411*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
412*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
413*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
414*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D6 */
415*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ECRS */
416*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
417*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
418*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
419*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D7 */
420*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ECOL */
421*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 8),
422*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
423*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
424*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
425*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D8 */
426*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 9),
427*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
428*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
429*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
430*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D9 */
431*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
432*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
433*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
434*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D10 */
435*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXD0 */
436*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
437*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
438*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
439*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D11 */
440*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXD1 */
441*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
442*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
443*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
444*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D12 */
445*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXD2 */
446*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
447*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
448*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
449*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D13 */
450*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXD3 */
451*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
452*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
453*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
454*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D14 */
455*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXCK */
456*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
457*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
458*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
459*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D15 */
460*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXERR */
461*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 16),
462*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
463*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
464*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
465*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D16 */
466*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(D, 17),
467*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S,
468*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
469*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
470*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0")),		/* D17 */
471*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
472*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
473*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
474*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D18 */
475*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ERXDV */
476*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
477*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
478*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
479*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D19 */
480*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXD0 */
481*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
482*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
483*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
484*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D20 */
485*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXD1 */
486*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
487*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
488*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
489*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D21 */
490*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXD2 */
491*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
492*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
493*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
494*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D22 */
495*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXD3 */
496*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
497*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
498*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
499*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* D23 */
500*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXEN */
501*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
502*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
503*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
504*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* CLK */
505*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXCK */
506*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
507*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
508*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
509*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* DE */
510*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* ETXERR */
511*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
512*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
513*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
514*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* HSYNC */
515*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* EMDC */
516*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
517*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
518*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
519*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "lcd0"),		/* VSYNC */
520*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "emac")),		/* EMDIO */
521*4882a593Smuzhiyun 	/* Hole */
522*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
523*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
524*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* CLK */
525*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* PCK */
526*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "spi2"),		/* CS0 */
527*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 14)),		/* EINT14 */
528*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
529*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
530*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* ERR */
531*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* CK */
532*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "spi2"),		/* CLK */
533*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 15)),		/* EINT15 */
534*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
535*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
536*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* SYNC */
537*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* HSYNC */
538*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "spi2")),		/* MOSI */
539*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
540*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
541*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
542*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* DVLD */
543*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* VSYNC */
544*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "spi2")),		/* MISO */
545*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
546*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
547*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
548*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D0 */
549*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D0 */
550*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* D0 */
551*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
552*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
553*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
554*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D1 */
555*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D1 */
556*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* D1 */
557*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
558*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
559*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
560*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D2 */
561*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D2 */
562*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* D2 */
563*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
564*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
565*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
566*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D3 */
567*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D3 */
568*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* D3 */
569*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
570*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
571*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
572*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D4 */
573*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D4 */
574*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* CMD */
575*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
576*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
577*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
578*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D5 */
579*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D5 */
580*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "mmc2")),		/* CLK */
581*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
582*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
583*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
584*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D6 */
585*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D6 */
586*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1")),	/* TX */
587*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
588*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
589*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
590*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "ts0"),		/* D7 */
591*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "csi0"),		/* D7 */
592*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1")),	/* RX */
593*4882a593Smuzhiyun 	/* Hole */
594*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
595*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
596*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
597*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* D1 */
598*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "jtag")),		/* MS1 */
599*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
600*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
601*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
602*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* D0 */
603*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "jtag")),		/* DI1 */
604*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
605*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
606*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
607*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* CLK */
608*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart0")),	/* TX */
609*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
610*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
611*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
612*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* CMD */
613*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "jtag")),		/* DO1 */
614*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
615*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
616*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
617*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* D3 */
618*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart0")),	/* RX */
619*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
620*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
621*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
622*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc0"),		/* D2 */
623*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "jtag")),		/* CK1 */
624*4882a593Smuzhiyun 	/* Hole */
625*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
626*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
627*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "gps"),		/* CLK */
628*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 0)),		/* EINT0 */
629*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
630*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
631*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "gps"),		/* SIGN */
632*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 1)),		/* EINT1 */
633*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
634*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
635*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "gps"),		/* MAG */
636*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 2)),		/* EINT2 */
637*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
638*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
639*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
640*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* CMD */
641*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* TX */
642*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 3)),		/* EINT3 */
643*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
644*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
645*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
646*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* CLK */
647*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* RX */
648*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 4)),		/* EINT4 */
649*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(G, 5),
650*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
651*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
652*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
653*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* DO */
654*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* CTS */
655*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 5)),		/* EINT5 */
656*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(G, 6),
657*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
658*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
659*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
660*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* D1 */
661*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x4, "uart1"),		/* RTS */
662*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "uart2"),		/* RTS */
663*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 6)),		/* EINT6 */
664*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(G, 7),
665*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
666*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
667*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
668*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* D2 */
669*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "uart2"),		/* TX */
670*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 7)),		/* EINT7 */
671*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(G, 8),
672*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
673*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
674*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
675*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "mmc1"),		/* D3 */
676*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "uart2"),		/* RX */
677*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 8)),		/* EINT8 */
678*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
679*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
680*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
681*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi1"),		/* CS0 */
682*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart3"),		/* TX */
683*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 9)),		/* EINT9 */
684*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
685*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
686*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
687*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi1"),		/* CLK */
688*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart3"),		/* RX */
689*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 10)),		/* EINT10 */
690*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
691*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
692*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
693*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi1"),		/* MOSI */
694*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart3"),		/* CTS */
695*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 11)),		/* EINT11 */
696*4882a593Smuzhiyun 	SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
697*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
698*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
699*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi1"),		/* MISO */
700*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "uart3"),		/* RTS */
701*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 12)),		/* EINT12 */
702*4882a593Smuzhiyun 	SUNXI_PIN_VARIANT(SUNXI_PINCTRL_PIN(G, 13),
703*4882a593Smuzhiyun 		  PINCTRL_SUN5I_A10S | PINCTRL_SUN5I_GR8,
704*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x0, "gpio_in"),
705*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x1, "gpio_out"),
706*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x2, "spi1"),		/* CS1 */
707*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x3, "pwm"),		/* PWM1 */
708*4882a593Smuzhiyun 		  SUNXI_FUNCTION(0x5, "uart2"),		/* CTS */
709*4882a593Smuzhiyun 		  SUNXI_FUNCTION_IRQ(0x6, 13)),		/* EINT13 */
710*4882a593Smuzhiyun };
711*4882a593Smuzhiyun 
712*4882a593Smuzhiyun static const struct sunxi_pinctrl_desc sun5i_pinctrl_data = {
713*4882a593Smuzhiyun 	.pins = sun5i_pins,
714*4882a593Smuzhiyun 	.npins = ARRAY_SIZE(sun5i_pins),
715*4882a593Smuzhiyun 	.irq_banks = 1,
716*4882a593Smuzhiyun 	.disable_strict_mode = true,
717*4882a593Smuzhiyun };
718*4882a593Smuzhiyun 
sun5i_pinctrl_probe(struct platform_device * pdev)719*4882a593Smuzhiyun static int sun5i_pinctrl_probe(struct platform_device *pdev)
720*4882a593Smuzhiyun {
721*4882a593Smuzhiyun 	unsigned long variant = (unsigned long)of_device_get_match_data(&pdev->dev);
722*4882a593Smuzhiyun 
723*4882a593Smuzhiyun 	return sunxi_pinctrl_init_with_variant(pdev, &sun5i_pinctrl_data,
724*4882a593Smuzhiyun 					       variant);
725*4882a593Smuzhiyun }
726*4882a593Smuzhiyun 
727*4882a593Smuzhiyun static const struct of_device_id sun5i_pinctrl_match[] = {
728*4882a593Smuzhiyun 	{
729*4882a593Smuzhiyun 		.compatible = "allwinner,sun5i-a10s-pinctrl",
730*4882a593Smuzhiyun 		.data = (void *)PINCTRL_SUN5I_A10S
731*4882a593Smuzhiyun 	},
732*4882a593Smuzhiyun 	{
733*4882a593Smuzhiyun 		.compatible = "allwinner,sun5i-a13-pinctrl",
734*4882a593Smuzhiyun 		.data = (void *)PINCTRL_SUN5I_A13
735*4882a593Smuzhiyun 	},
736*4882a593Smuzhiyun 	{
737*4882a593Smuzhiyun 		.compatible = "nextthing,gr8-pinctrl",
738*4882a593Smuzhiyun 		.data = (void *)PINCTRL_SUN5I_GR8
739*4882a593Smuzhiyun 	},
740*4882a593Smuzhiyun 	{ },
741*4882a593Smuzhiyun };
742*4882a593Smuzhiyun 
743*4882a593Smuzhiyun static struct platform_driver sun5i_pinctrl_driver = {
744*4882a593Smuzhiyun 	.probe	= sun5i_pinctrl_probe,
745*4882a593Smuzhiyun 	.driver	= {
746*4882a593Smuzhiyun 		.name		= "sun5i-pinctrl",
747*4882a593Smuzhiyun 		.of_match_table	= sun5i_pinctrl_match,
748*4882a593Smuzhiyun 	},
749*4882a593Smuzhiyun };
750*4882a593Smuzhiyun builtin_platform_driver(sun5i_pinctrl_driver);
751