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