1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun * Allwinner A80 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 sun9i_a80_pins[] = {
22*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
23*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
24*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
25*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXD3 */
26*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* TX */
27*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */
28*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
29*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
30*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
31*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXD2 */
32*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* RX */
33*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */
34*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
35*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
36*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
37*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXD1 */
38*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* RTS */
39*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */
40*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
41*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
42*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
43*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXD0 */
44*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* CTS */
45*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */
46*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
47*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
48*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
49*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXCK */
50*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* DTR */
51*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */
52*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
53*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
54*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
55*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXCTL */
56*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* DSR */
57*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */
58*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
59*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
60*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
61*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RXERR */
62*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* DCD */
63*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */
64*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
65*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
66*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
67*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* TXD3 */
68*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart1"), /* RING */
69*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */
70*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
71*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
72*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
73*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* TXD2 */
74*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "eclk"), /* IN0 */
75*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */
76*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
77*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
78*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
79*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* TXEN */
80*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "eclk"), /* IN1 */
81*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */
82*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
83*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
84*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
85*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* TXD0 */
86*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "clk_out_a"),
87*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */
88*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
89*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
90*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
91*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* MII-CRS */
92*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "clk_out_b"),
93*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */
94*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
95*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
96*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
97*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* TXCK */
98*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "pwm3"), /* PWM_P */
99*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */
100*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
101*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
102*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
103*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RGMII-TXCK / GMII-TXEN */
104*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "pwm3"), /* PWM_N */
105*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */
106*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
107*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
108*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
109*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* MII-TXERR */
110*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "spi1"), /* CS0 */
111*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */
112*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
113*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
114*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
115*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* RGMII-CLKIN / MII-COL */
116*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "spi1"), /* CLK */
117*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */
118*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
119*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
120*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
121*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* EMDC */
122*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "spi1"), /* MOSI */
123*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */
124*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
125*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
126*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
127*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "gmac"), /* EMDIO */
128*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "spi1"), /* MISO */
129*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun /* Hole */
132*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
133*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
134*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
135*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "uart3"), /* TX */
136*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)), /* PB_EINT5 */
137*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
138*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
139*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
140*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "uart3"), /* RX */
141*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 6)), /* PB_EINT6 */
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun /* Hole */
144*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
145*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
146*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
147*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mcsi"), /* MCLK */
148*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 14)), /* PB_EINT14 */
149*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
150*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
151*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
152*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mcsi"), /* SCK */
153*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "i2c4"), /* SCK */
154*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 15)), /* PB_EINT15 */
155*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
156*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
157*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
158*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mcsi"), /* SDA */
159*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "i2c4"), /* SDA */
160*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 16)), /* PB_EINT16 */
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun /* Hole */
163*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
164*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
165*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
166*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* WE */
167*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
168*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
169*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
170*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
171*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* ALE */
172*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
173*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
174*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
175*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
176*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* CLE */
177*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
178*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
179*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
180*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
181*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0")), /* CE1 */
182*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
183*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
184*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
185*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */
186*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
187*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
188*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
189*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0")), /* RE */
190*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
191*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
192*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
193*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */
194*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
195*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
196*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
197*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
198*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* RB1 */
199*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
200*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
201*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
202*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
203*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */
204*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
205*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
206*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
207*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
208*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */
209*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
210*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
211*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
212*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
213*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */
214*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
215*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
216*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
217*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
218*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */
219*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
220*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
221*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
222*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
223*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */
224*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */
225*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
226*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
227*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
228*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */
229*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */
230*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
231*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
232*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
233*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */
234*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
235*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
236*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
237*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
238*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */
239*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
240*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
241*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
242*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
243*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* DQS */
244*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "mmc2")), /* RST */
245*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
246*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
247*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
248*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* CE2 */
249*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "nand0_b")), /* RE */
250*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
251*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
252*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
253*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "nand0"), /* CE3 */
254*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "nand0_b")), /* DQS */
255*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
256*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
257*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
258*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun /* Hole */
261*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
262*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
263*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
264*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D0 */
265*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VP0 */
266*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
267*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
268*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
269*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D1 */
270*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VN0 */
271*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
272*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
273*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
274*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */
275*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VP1 */
276*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
277*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
278*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
279*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */
280*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VN1 */
281*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
282*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
283*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
284*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */
285*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VP2 */
286*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
287*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
288*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
289*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */
290*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VN2 */
291*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
292*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
293*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
294*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */
295*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VPC */
296*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
297*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
298*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
299*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */
300*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VNC */
301*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
302*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
303*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
304*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D8 */
305*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VP3 */
306*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
307*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
308*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
309*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D9 */
310*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds0")), /* VN3 */
311*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
312*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
313*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
314*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */
315*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VP0 */
316*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
317*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
318*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
319*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */
320*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VN0 */
321*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
322*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
323*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
324*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */
325*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VP1 */
326*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
327*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
328*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
329*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */
330*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VN1 */
331*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
332*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
333*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
334*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */
335*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VP2 */
336*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
337*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
338*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
339*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */
340*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VN2 */
341*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
342*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
343*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
344*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D16 */
345*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VPC */
346*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
347*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
348*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
349*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D17 */
350*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VNC */
351*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
352*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
353*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
354*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */
355*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VP3 */
356*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
357*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
358*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
359*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */
360*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "lvds1")), /* VN3 */
361*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
362*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
363*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
364*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* D20 */
365*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
366*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
367*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
368*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* D21 */
369*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
370*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
371*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
372*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* D22 */
373*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
374*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
375*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
376*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* D23 */
377*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
378*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
379*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
380*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* CLK */
381*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
382*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
383*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
384*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* DE */
385*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
386*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
387*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
388*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* HSYNC */
389*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
390*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
391*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
392*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "lcd0")), /* VSYNC */
393*4882a593Smuzhiyun
394*4882a593Smuzhiyun /* Hole */
395*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
396*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
397*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
398*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* PCLK */
399*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* CLK */
400*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 0)), /* PE_EINT0 */
401*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
402*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
403*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
404*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* MCLK */
405*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* ERR */
406*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 1)), /* PE_EINT1 */
407*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
408*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
409*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
410*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */
411*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* SYNC */
412*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 2)), /* PE_EINT2 */
413*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
414*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
415*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
416*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */
417*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* DVLD */
418*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 3)), /* PE_EINT3 */
419*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
420*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
421*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
422*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D0 */
423*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi2"), /* CS0 */
424*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart5"), /* TX */
425*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 4)), /* PE_EINT4 */
426*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
427*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
428*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
429*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D1 */
430*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi2"), /* CLK */
431*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart5"), /* RX */
432*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 5)), /* PE_EINT5 */
433*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
434*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
435*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
436*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D2 */
437*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi2"), /* MOSI */
438*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart5"), /* RTS */
439*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 6)), /* PE_EINT6 */
440*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
441*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
442*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
443*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D3 */
444*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi2"), /* MISO */
445*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart5"), /* CTS */
446*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 7)), /* PE_EINT7 */
447*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
448*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
449*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
450*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D4 */
451*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D0 */
452*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 8)), /* PE_EINT8 */
453*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
454*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
455*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
456*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D5 */
457*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D1 */
458*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 9)), /* PE_EINT9 */
459*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
460*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
461*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
462*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D6 */
463*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D2 */
464*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 10)), /* PE_EINT10 */
465*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
466*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
467*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
468*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D7 */
469*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D3 */
470*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 11)), /* PE_EINT11 */
471*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
472*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
473*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
474*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D8 */
475*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D4 */
476*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 12)), /* PE_EINT12 */
477*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
478*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
479*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
480*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D9 */
481*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D5 */
482*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 13)), /* PE_EINT13 */
483*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
484*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
485*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
486*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D10 */
487*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D6 */
488*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 14)), /* PE_EINT14 */
489*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
490*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
491*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
492*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* D11 */
493*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "ts"), /* D7 */
494*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 15)), /* PE_EINT15 */
495*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 16),
496*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
497*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
498*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* SCK */
499*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "i2c4"), /* SCK */
500*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 16)), /* PE_EINT16 */
501*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 17),
502*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
503*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
504*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "csi"), /* SDA */
505*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "i2c4"), /* SDA */
506*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 17)), /* PE_EINT17 */
507*4882a593Smuzhiyun
508*4882a593Smuzhiyun /* Hole */
509*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
510*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
511*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
512*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0")), /* D1 */
513*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
514*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
515*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
516*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0")), /* D0 */
517*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
518*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
519*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
520*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
521*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart0")), /* TX */
522*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
523*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
524*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
525*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0")), /* CMD */
526*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
527*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
528*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
529*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
530*4882a593Smuzhiyun SUNXI_FUNCTION(0x4, "uart0")), /* RX */
531*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
532*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
533*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
534*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc0")), /* D2 */
535*4882a593Smuzhiyun
536*4882a593Smuzhiyun /* Hole */
537*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
538*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
539*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
540*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
541*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 0)), /* PG_EINT0 */
542*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
543*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
544*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
545*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
546*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 1)), /* PG_EINT1 */
547*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
548*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
549*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
550*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */
551*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 2)), /* PG_EINT2 */
552*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
553*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
554*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
555*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */
556*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 3)), /* PG_EINT3 */
557*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
558*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
559*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
560*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */
561*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 4)), /* PG_EINT4 */
562*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
563*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
564*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
565*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */
566*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 5)), /* PG_EINT5 */
567*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
568*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
569*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
570*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart2"), /* TX */
571*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 6)), /* PG_EINT6 */
572*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
573*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
574*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
575*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart2"), /* RX */
576*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 7)), /* PG_EINT7 */
577*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
578*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
579*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
580*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart2"), /* RTS */
581*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 8)), /* PG_EINT8 */
582*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
583*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
584*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
585*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart2"), /* CTS */
586*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 9)), /* PG_EINT9 */
587*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
588*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
589*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
590*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c3"), /* SCK */
591*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 10)), /* PG_EINT10 */
592*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
593*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
594*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
595*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c3"), /* SDA */
596*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 11)), /* PG_EINT11 */
597*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
598*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
599*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
600*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart4"), /* TX */
601*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 12)), /* PG_EINT12 */
602*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
603*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
604*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
605*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart4"), /* RX */
606*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 13)), /* PG_EINT13 */
607*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 14),
608*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
609*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
610*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart4"), /* RTS */
611*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 14)), /* PG_EINT14 */
612*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 15),
613*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
614*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
615*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart4"), /* CTS */
616*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 15)), /* PG_EINT15 */
617*4882a593Smuzhiyun
618*4882a593Smuzhiyun /* Hole */
619*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
620*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
621*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
622*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
623*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
624*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
625*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
626*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
627*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
628*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
629*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
630*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
631*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
632*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
633*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
634*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
635*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
636*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
637*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
638*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
639*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
640*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
641*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
642*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
643*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
644*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
645*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
646*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "pwm0")),
647*4882a593Smuzhiyun
648*4882a593Smuzhiyun /* Hole */
649*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
650*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
651*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
652*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "pwm1"), /* Positive */
653*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 8)), /* PH_EINT8 */
654*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
655*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
656*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
657*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "pwm1"), /* Negative */
658*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 9)), /* PH_EINT9 */
659*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
660*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
661*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
662*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "pwm2"), /* Positive */
663*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 10)), /* PH_EINT10 */
664*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
665*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
666*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
667*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "pwm2"), /* Negative */
668*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 11)), /* PH_EINT12 */
669*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12),
670*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
671*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
672*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart0"), /* TX */
673*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi3"), /* CS2 */
674*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 12)), /* PH_EINT12 */
675*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13),
676*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
677*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
678*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "uart0"), /* RX */
679*4882a593Smuzhiyun SUNXI_FUNCTION(0x3, "spi3"), /* CS2 */
680*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 13)), /* PH_EINT13 */
681*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14),
682*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
683*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
684*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "spi3"), /* CLK */
685*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 14)), /* PH_EINT14 */
686*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15),
687*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
688*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
689*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "spi3"), /* MOSI */
690*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 15)), /* PH_EINT15 */
691*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16),
692*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
693*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
694*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "spi3"), /* MISO */
695*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 16)), /* PH_EINT16 */
696*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
697*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
698*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
699*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "spi3"), /* CS0 */
700*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 17)), /* PH_EINT17 */
701*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18),
702*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
703*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
704*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "spi3"), /* CS1 */
705*4882a593Smuzhiyun SUNXI_FUNCTION_IRQ_BANK(0x6, 4, 18)), /* PH_EINT18 */
706*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19),
707*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
708*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
709*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "hdmi")), /* SCL */
710*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20),
711*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
712*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
713*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "hdmi")), /* SDA */
714*4882a593Smuzhiyun SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21),
715*4882a593Smuzhiyun SUNXI_FUNCTION(0x0, "gpio_in"),
716*4882a593Smuzhiyun SUNXI_FUNCTION(0x1, "gpio_out"),
717*4882a593Smuzhiyun SUNXI_FUNCTION(0x2, "hdmi")), /* CEC */
718*4882a593Smuzhiyun };
719*4882a593Smuzhiyun
720*4882a593Smuzhiyun static const struct sunxi_pinctrl_desc sun9i_a80_pinctrl_data = {
721*4882a593Smuzhiyun .pins = sun9i_a80_pins,
722*4882a593Smuzhiyun .npins = ARRAY_SIZE(sun9i_a80_pins),
723*4882a593Smuzhiyun .irq_banks = 5,
724*4882a593Smuzhiyun .disable_strict_mode = true,
725*4882a593Smuzhiyun .io_bias_cfg_variant = BIAS_VOLTAGE_GRP_CONFIG,
726*4882a593Smuzhiyun };
727*4882a593Smuzhiyun
sun9i_a80_pinctrl_probe(struct platform_device * pdev)728*4882a593Smuzhiyun static int sun9i_a80_pinctrl_probe(struct platform_device *pdev)
729*4882a593Smuzhiyun {
730*4882a593Smuzhiyun return sunxi_pinctrl_init(pdev,
731*4882a593Smuzhiyun &sun9i_a80_pinctrl_data);
732*4882a593Smuzhiyun }
733*4882a593Smuzhiyun
734*4882a593Smuzhiyun static const struct of_device_id sun9i_a80_pinctrl_match[] = {
735*4882a593Smuzhiyun { .compatible = "allwinner,sun9i-a80-pinctrl", },
736*4882a593Smuzhiyun {}
737*4882a593Smuzhiyun };
738*4882a593Smuzhiyun
739*4882a593Smuzhiyun static struct platform_driver sun9i_a80_pinctrl_driver = {
740*4882a593Smuzhiyun .probe = sun9i_a80_pinctrl_probe,
741*4882a593Smuzhiyun .driver = {
742*4882a593Smuzhiyun .name = "sun9i-a80-pinctrl",
743*4882a593Smuzhiyun .of_match_table = sun9i_a80_pinctrl_match,
744*4882a593Smuzhiyun },
745*4882a593Smuzhiyun };
746*4882a593Smuzhiyun builtin_platform_driver(sun9i_a80_pinctrl_driver);
747