This source file includes following definitions.
- zx296718_pinctrl_probe
1
2
3
4
5
6
7 #include <linux/module.h>
8 #include <linux/of.h>
9 #include <linux/of_address.h>
10 #include <linux/of_device.h>
11 #include <linux/pinctrl/pinctrl.h>
12 #include <linux/platform_device.h>
13
14 #include "pinctrl-zx.h"
15
16 #define TOP_REG0 0x00
17 #define TOP_REG1 0x04
18 #define TOP_REG2 0x08
19 #define TOP_REG3 0x0c
20 #define TOP_REG4 0x10
21 #define TOP_REG5 0x14
22 #define TOP_REG6 0x18
23 #define TOP_REG7 0x1c
24 #define TOP_REG8 0x20
25
26
27
28
29
30
31 enum zx296718_pin {
32
33 I2C3_SCL = 0,
34 I2C3_SDA = 1,
35 AON_RESERVED0 = 2,
36 AON_RESERVED1 = 3,
37 SEC_EN = 4,
38 UART0_RXD = 5,
39 UART0_TXD = 6,
40 IR_IN = 7,
41 SPI0_CLK = 8,
42 SPI0_CS = 9,
43 SPI0_TXD = 10,
44 SPI0_RXD = 11,
45 KEY_COL0 = 12,
46 KEY_COL1 = 13,
47 KEY_COL2 = 14,
48 KEY_ROW0 = 15,
49
50
51 KEY_ROW1 = 16,
52 KEY_ROW2 = 17,
53 HDMI_SCL = 18,
54 HDMI_SDA = 19,
55 JTAG_TCK = 20,
56 JTAG_TRSTN = 21,
57 JTAG_TMS = 22,
58 JTAG_TDI = 23,
59 JTAG_TDO = 24,
60 I2C0_SCL = 25,
61 I2C0_SDA = 26,
62 I2C1_SCL = 27,
63 I2C1_SDA = 28,
64 AON_RESERVED2 = 29,
65 AON_RESERVED3 = 30,
66 AON_RESERVED4 = 31,
67
68
69 SPI1_CLK = 32,
70 SPI1_CS = 33,
71 SPI1_TXD = 34,
72 SPI1_RXD = 35,
73 AON_RESERVED5 = 36,
74 AON_RESERVED6 = 37,
75 AUDIO_DET = 38,
76 SPDIF_OUT = 39,
77 HDMI_CEC = 40,
78 HDMI_HPD = 41,
79 GMAC_25M_OUT = 42,
80 BOOT_SEL0 = 43,
81 BOOT_SEL1 = 44,
82 BOOT_SEL2 = 45,
83 DEEP_SLEEP_OUT_N = 46,
84 AON_RESERVED7 = 47,
85
86
87 GMII_GTX_CLK = 48,
88 GMII_TX_CLK = 49,
89 GMII_TXD0 = 50,
90 GMII_TXD1 = 51,
91 GMII_TXD2 = 52,
92 GMII_TXD3 = 53,
93 GMII_TXD4 = 54,
94 GMII_TXD5 = 55,
95 GMII_TXD6 = 56,
96 GMII_TXD7 = 57,
97 GMII_TX_ER = 58,
98 GMII_TX_EN = 59,
99 GMII_RX_CLK = 60,
100 GMII_RXD0 = 61,
101 GMII_RXD1 = 62,
102 GMII_RXD2 = 63,
103
104
105 GMII_RXD3 = 64,
106 GMII_RXD4 = 65,
107 GMII_RXD5 = 66,
108 GMII_RXD6 = 67,
109 GMII_RXD7 = 68,
110 GMII_RX_ER = 69,
111 GMII_RX_DV = 70,
112 GMII_COL = 71,
113 GMII_CRS = 72,
114 GMII_MDC = 73,
115 GMII_MDIO = 74,
116 SDIO1_CLK = 75,
117 SDIO1_CMD = 76,
118 SDIO1_DATA0 = 77,
119 SDIO1_DATA1 = 78,
120 SDIO1_DATA2 = 79,
121
122
123 SDIO1_DATA3 = 80,
124 SDIO1_CD = 81,
125 SDIO1_WP = 82,
126 USIM1_CD = 83,
127 USIM1_CLK = 84,
128 USIM1_RST = 85,
129
130
131 USIM1_DATA = 86,
132 SDIO0_CLK = 87,
133 SDIO0_CMD = 88,
134 SDIO0_DATA0 = 89,
135 SDIO0_DATA1 = 90,
136 SDIO0_DATA2 = 91,
137 SDIO0_DATA3 = 92,
138 SDIO0_CD = 93,
139 SDIO0_WP = 94,
140
141
142 TSI0_DATA0 = 95,
143 SPINOR_CLK = 96,
144 TSI2_DATA = 97,
145 TSI2_CLK = 98,
146 TSI2_SYNC = 99,
147 TSI2_VALID = 100,
148 SPINOR_CS = 101,
149 SPINOR_DQ0 = 102,
150 SPINOR_DQ1 = 103,
151 SPINOR_DQ2 = 104,
152 SPINOR_DQ3 = 105,
153 VGA_HS = 106,
154 VGA_VS = 107,
155 TSI3_DATA = 108,
156
157
158 TSI3_CLK = 109,
159 TSI3_SYNC = 110,
160 TSI3_VALID = 111,
161 I2S1_WS = 112,
162 I2S1_BCLK = 113,
163 I2S1_MCLK = 114,
164 I2S1_DIN0 = 115,
165 I2S1_DOUT0 = 116,
166 SPI3_CLK = 117,
167 SPI3_CS = 118,
168 SPI3_TXD = 119,
169 NAND_LDO_MS18_SEL = 120,
170
171
172 SPI3_RXD = 121,
173 I2S0_MCLK = 122,
174 I2S0_BCLK = 123,
175 I2S0_WS = 124,
176 I2S0_DIN0 = 125,
177 I2S0_DOUT0 = 126,
178 I2C5_SCL = 127,
179 I2C5_SDA = 128,
180 SPI2_CLK = 129,
181 SPI2_CS = 130,
182 SPI2_TXD = 131,
183
184
185 SPI2_RXD = 132,
186 NAND_WP_N = 133,
187 NAND_PAGE_SIZE0 = 134,
188 NAND_PAGE_SIZE1 = 135,
189 NAND_ADDR_CYCLE = 136,
190 NAND_RB0 = 137,
191 NAND_RB1 = 138,
192 NAND_RB2 = 139,
193 NAND_RB3 = 140,
194
195
196 GMAC_125M_IN = 141,
197 GMAC_50M_OUT = 142,
198 SPINOR_SSCLK_LOOPBACK = 143,
199 SPINOR_SDIO1CLK_LOOPBACK = 144,
200 };
201
202 static const struct pinctrl_pin_desc zx296718_pins[] = {
203
204 AON_PIN(I2C3_SCL, TOP_REG2, 18, 2, 0x48, 0,
205 AON_MUX(0x0, "ANMI"),
206 AON_MUX(0x1, "AGPIO"),
207 AON_MUX(0x2, "nonAON"),
208 AON_MUX(0x3, "EXT_INT"),
209 TOP_MUX(0x0, "I2C3"),
210 TOP_MUX(0x1, "SPI2"),
211 TOP_MUX(0x2, "I2S1")),
212 AON_PIN(I2C3_SDA, TOP_REG2, 20, 2, 0x48, 9,
213 AON_MUX(0x0, "WD"),
214 AON_MUX(0x1, "AGPIO"),
215 AON_MUX(0x2, "nonAON"),
216 AON_MUX(0x3, "EXT_INT"),
217 TOP_MUX(0x0, "I2C3"),
218 TOP_MUX(0x1, "SPI2"),
219 TOP_MUX(0x2, "I2S0")),
220 ZX_RESERVED(AON_RESERVED0),
221 ZX_RESERVED(AON_RESERVED1),
222 AON_PIN(SEC_EN, TOP_REG3, 5, 1, 0x50, 0,
223 AON_MUX(0x0, "SEC"),
224 AON_MUX(0x1, "AGPIO"),
225 AON_MUX(0x2, "nonAON"),
226 AON_MUX(0x3, "EXT_INT"),
227 TOP_MUX(0x0, "I2C2"),
228 TOP_MUX(0x1, "SPI2")),
229 AON_PIN(UART0_RXD, 0, 0, 0, 0x50, 9,
230 AON_MUX(0x0, "UART0"),
231 AON_MUX(0x1, "AGPIO"),
232 AON_MUX(0x2, "nonAON")),
233 AON_PIN(UART0_TXD, 0, 0, 0, 0x50, 18,
234 AON_MUX(0x0, "UART0"),
235 AON_MUX(0x1, "AGPIO"),
236 AON_MUX(0x2, "nonAON")),
237 AON_PIN(IR_IN, 0, 0, 0, 0x64, 0,
238 AON_MUX(0x0, "IR"),
239 AON_MUX(0x1, "AGPIO"),
240 AON_MUX(0x2, "nonAON")),
241 AON_PIN(SPI0_CLK, TOP_REG3, 16, 1, 0x64, 9,
242 AON_MUX(0x0, "EXT_INT"),
243 AON_MUX(0x1, "AGPIO"),
244 AON_MUX(0x2, "nonAON"),
245 AON_MUX(0x3, "PCU"),
246 TOP_MUX(0x0, "SPI0"),
247 TOP_MUX(0x1, "ISP")),
248 AON_PIN(SPI0_CS, TOP_REG3, 17, 1, 0x64, 18,
249 AON_MUX(0x0, "EXT_INT"),
250 AON_MUX(0x1, "AGPIO"),
251 AON_MUX(0x2, "nonAON"),
252 AON_MUX(0x3, "PCU"),
253 TOP_MUX(0x0, "SPI0"),
254 TOP_MUX(0x1, "ISP")),
255 AON_PIN(SPI0_TXD, TOP_REG3, 18, 1, 0x68, 0,
256 AON_MUX(0x0, "EXT_INT"),
257 AON_MUX(0x1, "AGPIO"),
258 AON_MUX(0x2, "nonAON"),
259 AON_MUX(0x3, "PCU"),
260 TOP_MUX(0x0, "SPI0"),
261 TOP_MUX(0x1, "ISP")),
262 AON_PIN(SPI0_RXD, TOP_REG3, 19, 1, 0x68, 9,
263 AON_MUX(0x0, "EXT_INT"),
264 AON_MUX(0x1, "AGPIO"),
265 AON_MUX(0x2, "nonAON"),
266 AON_MUX(0x3, "PCU"),
267 TOP_MUX(0x0, "SPI0"),
268 TOP_MUX(0x1, "ISP")),
269 AON_PIN(KEY_COL0, TOP_REG3, 20, 1, 0x68, 18,
270 AON_MUX(0x0, "KEY"),
271 AON_MUX(0x1, "AGPIO"),
272 AON_MUX(0x2, "nonAON"),
273 AON_MUX(0x3, "PCU"),
274 TOP_MUX(0x0, "UART3"),
275 TOP_MUX(0x1, "I2S0")),
276 AON_PIN(KEY_COL1, TOP_REG3, 21, 2, 0x6c, 0,
277 AON_MUX(0x0, "KEY"),
278 AON_MUX(0x1, "AGPIO"),
279 AON_MUX(0x2, "nonAON"),
280 TOP_MUX(0x0, "UART3"),
281 TOP_MUX(0x1, "I2S0"),
282 TOP_MUX(0x2, "VGA")),
283 AON_PIN(KEY_COL2, TOP_REG3, 23, 2, 0x6c, 9,
284 AON_MUX(0x0, "KEY"),
285 AON_MUX(0x1, "AGPIO"),
286 AON_MUX(0x2, "nonAON"),
287 TOP_MUX(0x0, "PWM"),
288 TOP_MUX(0x1, "I2S0"),
289 TOP_MUX(0x2, "VGA")),
290 AON_PIN(KEY_ROW0, 0, 0, 0, 0x6c, 18,
291 AON_MUX(0x0, "KEY"),
292 AON_MUX(0x1, "AGPIO"),
293 AON_MUX(0x2, "nonAON"),
294 AON_MUX(0x3, "WD")),
295
296
297 AON_PIN(KEY_ROW1, TOP_REG3, 25, 2, 0x70, 0,
298 AON_MUX(0x0, "KEY"),
299 AON_MUX(0x1, "AGPIO"),
300 AON_MUX(0x2, "nonAON"),
301 TOP_MUX(0x0, "LCD"),
302 TOP_MUX(0x1, "I2S0"),
303 TOP_MUX(0x2, "PWM"),
304 TOP_MUX(0x3, "VGA")),
305 AON_PIN(KEY_ROW2, TOP_REG3, 27, 2, 0x70, 9,
306 AON_MUX(0x0, "KEY"),
307 AON_MUX(0x1, "AGPIO"),
308 AON_MUX(0x2, "nonAON"),
309 TOP_MUX(0x0, "LCD"),
310 TOP_MUX(0x1, "I2S0"),
311 TOP_MUX(0x2, "PWM"),
312 TOP_MUX(0x3, "VGA")),
313 AON_PIN(HDMI_SCL, TOP_REG3, 29, 1, 0x70, 18,
314 AON_MUX(0x0, "PCU"),
315 AON_MUX(0x1, "AGPIO"),
316 AON_MUX(0x2, "nonAON"),
317 TOP_MUX(0x0, "HDMI"),
318 TOP_MUX(0x1, "UART3")),
319 AON_PIN(HDMI_SDA, TOP_REG3, 30, 1, 0x74, 0,
320 AON_MUX(0x0, "PCU"),
321 AON_MUX(0x1, "AGPIO"),
322 AON_MUX(0x2, "nonAON"),
323 TOP_MUX(0x0, "HDMI"),
324 TOP_MUX(0x1, "UART3")),
325 AON_PIN(JTAG_TCK, TOP_REG7, 3, 1, 0x78, 18,
326 AON_MUX(0x0, "JTAG"),
327 AON_MUX(0x1, "AGPIO"),
328 AON_MUX(0x2, "nonAON"),
329 AON_MUX(0x3, "EXT_INT"),
330 TOP_MUX(0x0, "SPI4"),
331 TOP_MUX(0x1, "UART1")),
332 AON_PIN(JTAG_TRSTN, TOP_REG7, 4, 1, 0xac, 0,
333 AON_MUX(0x0, "JTAG"),
334 AON_MUX(0x1, "AGPIO"),
335 AON_MUX(0x2, "nonAON"),
336 AON_MUX(0x3, "EXT_INT"),
337 TOP_MUX(0x0, "SPI4"),
338 TOP_MUX(0x1, "UART1")),
339 AON_PIN(JTAG_TMS, TOP_REG7, 5, 1, 0xac, 9,
340 AON_MUX(0x0, "JTAG"),
341 AON_MUX(0x1, "AGPIO"),
342 AON_MUX(0x2, "nonAON"),
343 AON_MUX(0x3, "EXT_INT"),
344 TOP_MUX(0x0, "SPI4"),
345 TOP_MUX(0x1, "UART2")),
346 AON_PIN(JTAG_TDI, TOP_REG7, 6, 1, 0xac, 18,
347 AON_MUX(0x0, "JTAG"),
348 AON_MUX(0x1, "AGPIO"),
349 AON_MUX(0x2, "nonAON"),
350 AON_MUX(0x3, "EXT_INT"),
351 TOP_MUX(0x0, "SPI4"),
352 TOP_MUX(0x1, "UART2")),
353 AON_PIN(JTAG_TDO, 0, 0, 0, 0xb0, 0,
354 AON_MUX(0x0, "JTAG"),
355 AON_MUX(0x1, "AGPIO"),
356 AON_MUX(0x2, "nonAON")),
357 AON_PIN(I2C0_SCL, 0, 0, 0, 0xb0, 9,
358 AON_MUX(0x0, "I2C0"),
359 AON_MUX(0x1, "AGPIO"),
360 AON_MUX(0x2, "nonAON")),
361 AON_PIN(I2C0_SDA, 0, 0, 0, 0xb0, 18,
362 AON_MUX(0x0, "I2C0"),
363 AON_MUX(0x1, "AGPIO"),
364 AON_MUX(0x2, "nonAON")),
365 AON_PIN(I2C1_SCL, TOP_REG8, 4, 1, 0xb4, 0,
366 AON_MUX(0x0, "I2C1"),
367 AON_MUX(0x1, "AGPIO"),
368 AON_MUX(0x2, "nonAON"),
369 TOP_MUX(0x0, "LCD")),
370 AON_PIN(I2C1_SDA, TOP_REG8, 5, 1, 0xb4, 9,
371 AON_MUX(0x0, "I2C1"),
372 AON_MUX(0x1, "AGPIO"),
373 AON_MUX(0x2, "nonAON"),
374 TOP_MUX(0x0, "LCD")),
375 ZX_RESERVED(AON_RESERVED2),
376 ZX_RESERVED(AON_RESERVED3),
377 ZX_RESERVED(AON_RESERVED4),
378
379
380 AON_PIN(SPI1_CLK, TOP_REG2, 6, 3, 0x40, 9,
381 AON_MUX(0x0, "EXT_INT"),
382 AON_MUX(0x1, "PCU"),
383 AON_MUX(0x2, "nonAON"),
384 TOP_MUX(0x0, "SPI1"),
385 TOP_MUX(0x1, "PCM"),
386 TOP_MUX(0x2, "BGPIO"),
387 TOP_MUX(0x3, "I2C4"),
388 TOP_MUX(0x4, "I2S1"),
389 TOP_MUX(0x5, "ISP")),
390 AON_PIN(SPI1_CS, TOP_REG2, 9, 3, 0x40, 18,
391 AON_MUX(0x0, "EXT_INT"),
392 AON_MUX(0x1, "PCU"),
393 AON_MUX(0x2, "nonAON"),
394 TOP_MUX(0x0, "SPI1"),
395 TOP_MUX(0x1, "PCM"),
396 TOP_MUX(0x2, "BGPIO"),
397 TOP_MUX(0x3, "I2C4"),
398 TOP_MUX(0x4, "I2S1"),
399 TOP_MUX(0x5, "ISP")),
400 AON_PIN(SPI1_TXD, TOP_REG2, 12, 3, 0x44, 0,
401 AON_MUX(0x0, "EXT_INT"),
402 AON_MUX(0x1, "PCU"),
403 AON_MUX(0x2, "nonAON"),
404 TOP_MUX(0x0, "SPI1"),
405 TOP_MUX(0x1, "PCM"),
406 TOP_MUX(0x2, "BGPIO"),
407 TOP_MUX(0x3, "UART5"),
408 TOP_MUX(0x4, "I2S1"),
409 TOP_MUX(0x5, "ISP")),
410 AON_PIN(SPI1_RXD, TOP_REG2, 15, 3, 0x44, 9,
411 AON_MUX(0x0, "EXT_INT"),
412 AON_MUX(0x1, "PCU"),
413 AON_MUX(0x2, "nonAON"),
414 TOP_MUX(0x0, "SPI1"),
415 TOP_MUX(0x1, "PCM"),
416 TOP_MUX(0x2, "BGPIO"),
417 TOP_MUX(0x3, "UART5"),
418 TOP_MUX(0x4, "I2S1"),
419 TOP_MUX(0x5, "ISP")),
420 ZX_RESERVED(AON_RESERVED5),
421 ZX_RESERVED(AON_RESERVED6),
422 AON_PIN(AUDIO_DET, TOP_REG3, 3, 2, 0x48, 18,
423 AON_MUX(0x0, "PCU"),
424 AON_MUX(0x1, "AGPIO"),
425 AON_MUX(0x2, "nonAON"),
426 AON_MUX(0x3, "EXT_INT"),
427 TOP_MUX(0x0, "AUDIO"),
428 TOP_MUX(0x1, "I2C2"),
429 TOP_MUX(0x2, "SPI2")),
430 AON_PIN(SPDIF_OUT, TOP_REG3, 14, 2, 0x78, 9,
431 AON_MUX(0x0, "PCU"),
432 AON_MUX(0x1, "AGPIO"),
433 AON_MUX(0x2, "nonAON"),
434 TOP_MUX(0x0, "SPDIF"),
435 TOP_MUX(0x1, "PWM"),
436 TOP_MUX(0x2, "ISP")),
437 AON_PIN(HDMI_CEC, 0, 0, 0, 0x74, 9,
438 AON_MUX(0x0, "PCU"),
439 AON_MUX(0x1, "AGPIO"),
440 AON_MUX(0x2, "nonAON")),
441 AON_PIN(HDMI_HPD, 0, 0, 0, 0x74, 18,
442 AON_MUX(0x0, "PCU"),
443 AON_MUX(0x1, "AGPIO"),
444 AON_MUX(0x2, "nonAON")),
445 AON_PIN(GMAC_25M_OUT, 0, 0, 0, 0x78, 0,
446 AON_MUX(0x0, "PCU"),
447 AON_MUX(0x1, "AGPIO"),
448 AON_MUX(0x2, "nonAON")),
449 AON_PIN(BOOT_SEL0, 0, 0, 0, 0xc0, 9,
450 AON_MUX(0x0, "BOOT"),
451 AON_MUX(0x1, "AGPIO"),
452 AON_MUX(0x2, "nonAON")),
453 AON_PIN(BOOT_SEL1, 0, 0, 0, 0xc0, 18,
454 AON_MUX(0x0, "BOOT"),
455 AON_MUX(0x1, "AGPIO"),
456 AON_MUX(0x2, "nonAON")),
457 AON_PIN(BOOT_SEL2, 0, 0, 0, 0xc4, 0,
458 AON_MUX(0x0, "BOOT"),
459 AON_MUX(0x1, "AGPIO"),
460 AON_MUX(0x2, "nonAON")),
461 AON_PIN(DEEP_SLEEP_OUT_N, 0, 0, 0, 0xc4, 9,
462 AON_MUX(0x0, "DEEPSLP"),
463 AON_MUX(0x1, "AGPIO"),
464 AON_MUX(0x2, "nonAON")),
465 ZX_RESERVED(AON_RESERVED7),
466
467
468 TOP_PIN(GMII_GTX_CLK, TOP_REG0, 0, 2, 0x10, 0,
469 TOP_MUX(0x0, "GMII"),
470 TOP_MUX(0x1, "DVI0"),
471 TOP_MUX(0x2, "BGPIO")),
472 TOP_PIN(GMII_TX_CLK, TOP_REG0, 2, 2, 0x10, 9,
473 TOP_MUX(0x0, "GMII"),
474 TOP_MUX(0x1, "DVI0"),
475 TOP_MUX(0x2, "BGPIO")),
476 TOP_PIN(GMII_TXD0, TOP_REG0, 4, 2, 0x10, 18,
477 TOP_MUX(0x0, "GMII"),
478 TOP_MUX(0x1, "DVI0"),
479 TOP_MUX(0x2, "BGPIO")),
480 TOP_PIN(GMII_TXD1, TOP_REG0, 6, 2, 0x14, 0,
481 TOP_MUX(0x0, "GMII"),
482 TOP_MUX(0x1, "DVI0"),
483 TOP_MUX(0x2, "BGPIO")),
484 TOP_PIN(GMII_TXD2, TOP_REG0, 8, 2, 0x14, 9,
485 TOP_MUX(0x0, "GMII"),
486 TOP_MUX(0x1, "DVI0"),
487 TOP_MUX(0x2, "BGPIO")),
488 TOP_PIN(GMII_TXD3, TOP_REG0, 10, 2, 0x14, 18,
489 TOP_MUX(0x0, "GMII"),
490 TOP_MUX(0x1, "DVI0"),
491 TOP_MUX(0x2, "BGPIO")),
492 TOP_PIN(GMII_TXD4, TOP_REG0, 12, 2, 0x18, 0,
493 TOP_MUX(0x0, "GMII"),
494 TOP_MUX(0x1, "DVI0"),
495 TOP_MUX(0x2, "BGPIO")),
496 TOP_PIN(GMII_TXD5, TOP_REG0, 14, 2, 0x18, 9,
497 TOP_MUX(0x0, "GMII"),
498 TOP_MUX(0x1, "DVI0"),
499 TOP_MUX(0x2, "BGPIO")),
500 TOP_PIN(GMII_TXD6, TOP_REG0, 16, 2, 0x18, 18,
501 TOP_MUX(0x0, "GMII"),
502 TOP_MUX(0x1, "DVI0"),
503 TOP_MUX(0x2, "BGPIO")),
504 TOP_PIN(GMII_TXD7, TOP_REG0, 18, 2, 0x1c, 0,
505 TOP_MUX(0x0, "GMII"),
506 TOP_MUX(0x1, "DVI0"),
507 TOP_MUX(0x2, "BGPIO")),
508 TOP_PIN(GMII_TX_ER, TOP_REG0, 20, 2, 0x1c, 9,
509 TOP_MUX(0x0, "GMII"),
510 TOP_MUX(0x1, "DVI0"),
511 TOP_MUX(0x2, "BGPIO")),
512 TOP_PIN(GMII_TX_EN, TOP_REG0, 22, 2, 0x1c, 18,
513 TOP_MUX(0x0, "GMII"),
514 TOP_MUX(0x1, "DVI0"),
515 TOP_MUX(0x3, "BGPIO")),
516 TOP_PIN(GMII_RX_CLK, TOP_REG0, 24, 2, 0x20, 0,
517 TOP_MUX(0x0, "GMII"),
518 TOP_MUX(0x1, "DVI0"),
519 TOP_MUX(0x3, "BGPIO")),
520 TOP_PIN(GMII_RXD0, TOP_REG0, 26, 2, 0x20, 9,
521 TOP_MUX(0x0, "GMII"),
522 TOP_MUX(0x1, "DVI0"),
523 TOP_MUX(0x3, "BGPIO")),
524 TOP_PIN(GMII_RXD1, TOP_REG0, 28, 2, 0x20, 18,
525 TOP_MUX(0x0, "GMII"),
526 TOP_MUX(0x1, "DVI0"),
527 TOP_MUX(0x2, "BGPIO")),
528 TOP_PIN(GMII_RXD2, TOP_REG0, 30, 2, 0x24, 0,
529 TOP_MUX(0x0, "GMII"),
530 TOP_MUX(0x1, "DVI1"),
531 TOP_MUX(0x2, "BGPIO")),
532
533
534 TOP_PIN(GMII_RXD3, TOP_REG1, 0, 2, 0x24, 9,
535 TOP_MUX(0x0, "GMII"),
536 TOP_MUX(0x1, "DVI1"),
537 TOP_MUX(0x2, "BGPIO")),
538 TOP_PIN(GMII_RXD4, TOP_REG1, 2, 2, 0x24, 18,
539 TOP_MUX(0x0, "GMII"),
540 TOP_MUX(0x1, "DVI1"),
541 TOP_MUX(0x2, "BGPIO")),
542 TOP_PIN(GMII_RXD5, TOP_REG1, 4, 2, 0x28, 0,
543 TOP_MUX(0x0, "GMII"),
544 TOP_MUX(0x1, "DVI1"),
545 TOP_MUX(0x2, "BGPIO"),
546 TOP_MUX(0x3, "TSI0")),
547 TOP_PIN(GMII_RXD6, TOP_REG1, 6, 2, 0x28, 9,
548 TOP_MUX(0x0, "GMII"),
549 TOP_MUX(0x1, "DVI1"),
550 TOP_MUX(0x2, "BGPIO"),
551 TOP_MUX(0x3, "TSI0")),
552 TOP_PIN(GMII_RXD7, TOP_REG1, 8, 2, 0x28, 18,
553 TOP_MUX(0x0, "GMII"),
554 TOP_MUX(0x1, "DVI1"),
555 TOP_MUX(0x2, "BGPIO"),
556 TOP_MUX(0x3, "TSI0")),
557 TOP_PIN(GMII_RX_ER, TOP_REG1, 10, 2, 0x2c, 0,
558 TOP_MUX(0x0, "GMII"),
559 TOP_MUX(0x1, "DVI1"),
560 TOP_MUX(0x2, "BGPIO"),
561 TOP_MUX(0x3, "TSI0")),
562 TOP_PIN(GMII_RX_DV, TOP_REG1, 12, 2, 0x2c, 9,
563 TOP_MUX(0x0, "GMII"),
564 TOP_MUX(0x1, "DVI1"),
565 TOP_MUX(0x2, "BGPIO"),
566 TOP_MUX(0x3, "TSI1")),
567 TOP_PIN(GMII_COL, TOP_REG1, 14, 2, 0x2c, 18,
568 TOP_MUX(0x0, "GMII"),
569 TOP_MUX(0x1, "DVI1"),
570 TOP_MUX(0x2, "BGPIO"),
571 TOP_MUX(0x3, "TSI1")),
572 TOP_PIN(GMII_CRS, TOP_REG1, 16, 2, 0x30, 0,
573 TOP_MUX(0x0, "GMII"),
574 TOP_MUX(0x1, "DVI1"),
575 TOP_MUX(0x2, "BGPIO"),
576 TOP_MUX(0x3, "TSI1")),
577 TOP_PIN(GMII_MDC, TOP_REG1, 18, 2, 0x30, 9,
578 TOP_MUX(0x0, "GMII"),
579 TOP_MUX(0x1, "DVI1"),
580 TOP_MUX(0x2, "BGPIO"),
581 TOP_MUX(0x3, "TSI1")),
582 TOP_PIN(GMII_MDIO, TOP_REG1, 20, 1, 0x30, 18,
583 TOP_MUX(0x0, "GMII"),
584 TOP_MUX(0x2, "BGPIO")),
585 TOP_PIN(SDIO1_CLK, TOP_REG1, 21, 2, 0x34, 18,
586 TOP_MUX(0x0, "SDIO1"),
587 TOP_MUX(0x1, "USIM0"),
588 TOP_MUX(0x2, "BGPIO"),
589 TOP_MUX(0x3, "SPINOR")),
590 TOP_PIN(SDIO1_CMD, TOP_REG1, 23, 2, 0x38, 0,
591 TOP_MUX(0x0, "SDIO1"),
592 TOP_MUX(0x1, "USIM0"),
593 TOP_MUX(0x2, "BGPIO"),
594 TOP_MUX(0x3, "SPINOR")),
595 TOP_PIN(SDIO1_DATA0, TOP_REG1, 25, 2, 0x38, 9,
596 TOP_MUX(0x0, "SDIO1"),
597 TOP_MUX(0x1, "USIM0"),
598 TOP_MUX(0x2, "BGPIO"),
599 TOP_MUX(0x3, "SPINOR")),
600 TOP_PIN(SDIO1_DATA1, TOP_REG1, 27, 2, 0x38, 18,
601 TOP_MUX(0x0, "SDIO1"),
602 TOP_MUX(0x1, "USIM0"),
603 TOP_MUX(0x2, "BGPIO"),
604 TOP_MUX(0x3, "SPINOR")),
605 TOP_PIN(SDIO1_DATA2, TOP_REG1, 29, 2, 0x3c, 0,
606 TOP_MUX(0x0, "SDIO1"),
607 TOP_MUX(0x1, "BGPIO"),
608 TOP_MUX(0x2, "SPINOR")),
609
610
611 TOP_PIN(SDIO1_DATA3, TOP_REG2, 0, 2, 0x3c, 9,
612 TOP_MUX(0x0, "SDIO1"),
613 TOP_MUX(0x1, "BGPIO"),
614 TOP_MUX(0x2, "SPINOR")),
615 TOP_PIN(SDIO1_CD, TOP_REG2, 2, 2, 0x3c, 18,
616 TOP_MUX(0x0, "SDIO1"),
617 TOP_MUX(0x1, "BGPIO"),
618 TOP_MUX(0x2, "ISP")),
619 TOP_PIN(SDIO1_WP, TOP_REG2, 4, 2, 0x40, 0,
620 TOP_MUX(0x0, "SDIO1"),
621 TOP_MUX(0x1, "BGPIO"),
622 TOP_MUX(0x2, "ISP")),
623 TOP_PIN(USIM1_CD, TOP_REG2, 22, 3, 0x44, 18,
624 TOP_MUX(0x0, "USIM1"),
625 TOP_MUX(0x1, "UART4"),
626 TOP_MUX(0x2, "BGPIO"),
627 TOP_MUX(0x3, "SPI3"),
628 TOP_MUX(0x4, "I2S0"),
629 TOP_MUX(0x5, "B_DVI0")),
630 TOP_PIN(USIM1_CLK, TOP_REG2, 25, 3, 0x4c, 18,
631 TOP_MUX(0x0, "USIM1"),
632 TOP_MUX(0x1, "UART4"),
633 TOP_MUX(0x2, "BGPIO"),
634 TOP_MUX(0x3, "SPI3"),
635 TOP_MUX(0x4, "I2S0"),
636 TOP_MUX(0x5, "B_DVI0")),
637 TOP_PIN(USIM1_RST, TOP_REG2, 28, 3, 0x4c, 0,
638 TOP_MUX(0x0, "USIM1"),
639 TOP_MUX(0x1, "UART4"),
640 TOP_MUX(0x2, "BGPIO"),
641 TOP_MUX(0x3, "SPI3"),
642 TOP_MUX(0x4, "I2S0"),
643 TOP_MUX(0x5, "B_DVI0")),
644
645
646 TOP_PIN(USIM1_DATA, TOP_REG3, 0, 3, 0x4c, 9,
647 TOP_MUX(0x0, "USIM1"),
648 TOP_MUX(0x1, "UART4"),
649 TOP_MUX(0x2, "BGPIO"),
650 TOP_MUX(0x3, "SPI3"),
651 TOP_MUX(0x4, "I2S0"),
652 TOP_MUX(0x5, "B_DVI0")),
653 TOP_PIN(SDIO0_CLK, TOP_REG3, 6, 1, 0x58, 0,
654 TOP_MUX(0x0, "SDIO0"),
655 TOP_MUX(0x1, "GPIO")),
656 TOP_PIN(SDIO0_CMD, TOP_REG3, 7, 1, 0x58, 9,
657 TOP_MUX(0x0, "SDIO0"),
658 TOP_MUX(0x1, "GPIO")),
659 TOP_PIN(SDIO0_DATA0, TOP_REG3, 8, 1, 0x58, 18,
660 TOP_MUX(0x0, "SDIO0"),
661 TOP_MUX(0x1, "GPIO")),
662 TOP_PIN(SDIO0_DATA1, TOP_REG3, 9, 1, 0x5c, 0,
663 TOP_MUX(0x0, "SDIO0"),
664 TOP_MUX(0x1, "GPIO")),
665 TOP_PIN(SDIO0_DATA2, TOP_REG3, 10, 1, 0x5c, 9,
666 TOP_MUX(0x0, "SDIO0"),
667 TOP_MUX(0x1, "GPIO")),
668 TOP_PIN(SDIO0_DATA3, TOP_REG3, 11, 1, 0x5c, 18,
669 TOP_MUX(0x0, "SDIO0"),
670 TOP_MUX(0x1, "GPIO")),
671 TOP_PIN(SDIO0_CD, TOP_REG3, 12, 1, 0x60, 0,
672 TOP_MUX(0x0, "SDIO0"),
673 TOP_MUX(0x1, "GPIO")),
674 TOP_PIN(SDIO0_WP, TOP_REG3, 13, 1, 0x60, 9,
675 TOP_MUX(0x0, "SDIO0"),
676 TOP_MUX(0x1, "GPIO")),
677
678
679 TOP_PIN(TSI0_DATA0, TOP_REG4, 0, 2, 0x60, 18,
680 TOP_MUX(0x0, "TSI0"),
681 TOP_MUX(0x1, "LCD"),
682 TOP_MUX(0x2, "BGPIO")),
683 TOP_PIN(SPINOR_CLK, TOP_REG4, 2, 2, 0xa8, 18,
684 TOP_MUX(0x0, "SPINOR"),
685 TOP_MUX(0x1, "TSI0"),
686 TOP_MUX(0x2, "LCD"),
687 TOP_MUX(0x3, "BGPIO")),
688 TOP_PIN(TSI2_DATA, TOP_REG4, 4, 2, 0x7c, 0,
689 TOP_MUX(0x0, "TSI2"),
690 TOP_MUX(0x1, "TSI0"),
691 TOP_MUX(0x2, "LCD"),
692 TOP_MUX(0x3, "BGPIO")),
693 TOP_PIN(TSI2_CLK, TOP_REG4, 6, 2, 0x7c, 9,
694 TOP_MUX(0x0, "TSI2"),
695 TOP_MUX(0x1, "TSI0"),
696 TOP_MUX(0x2, "LCD"),
697 TOP_MUX(0x3, "BGPIO")),
698 TOP_PIN(TSI2_SYNC, TOP_REG4, 8, 2, 0x7c, 18,
699 TOP_MUX(0x0, "TSI2"),
700 TOP_MUX(0x1, "TSI0"),
701 TOP_MUX(0x2, "LCD"),
702 TOP_MUX(0x3, "BGPIO")),
703 TOP_PIN(TSI2_VALID, TOP_REG4, 10, 2, 0x80, 0,
704 TOP_MUX(0x0, "TSI2"),
705 TOP_MUX(0x1, "TSI0"),
706 TOP_MUX(0x2, "LCD"),
707 TOP_MUX(0x3, "BGPIO")),
708 TOP_PIN(SPINOR_CS, TOP_REG4, 12, 2, 0x80, 9,
709 TOP_MUX(0x0, "SPINOR"),
710 TOP_MUX(0x1, "TSI0"),
711 TOP_MUX(0x2, "LCD"),
712 TOP_MUX(0x3, "BGPIO")),
713 TOP_PIN(SPINOR_DQ0, TOP_REG4, 14, 2, 0x80, 18,
714 TOP_MUX(0x0, "SPINOR"),
715 TOP_MUX(0x1, "TSI0"),
716 TOP_MUX(0x2, "LCD"),
717 TOP_MUX(0x3, "BGPIO")),
718 TOP_PIN(SPINOR_DQ1, TOP_REG4, 16, 2, 0x84, 0,
719 TOP_MUX(0x0, "SPINOR"),
720 TOP_MUX(0x1, "TSI0"),
721 TOP_MUX(0x2, "LCD"),
722 TOP_MUX(0x3, "BGPIO")),
723 TOP_PIN(SPINOR_DQ2, TOP_REG4, 18, 2, 0x84, 9,
724 TOP_MUX(0x0, "SPINOR"),
725 TOP_MUX(0x1, "TSI0"),
726 TOP_MUX(0x2, "LCD"),
727 TOP_MUX(0x3, "BGPIO")),
728 TOP_PIN(SPINOR_DQ3, TOP_REG4, 20, 2, 0x84, 18,
729 TOP_MUX(0x0, "SPINOR"),
730 TOP_MUX(0x1, "TSI0"),
731 TOP_MUX(0x2, "LCD"),
732 TOP_MUX(0x3, "BGPIO")),
733 TOP_PIN(VGA_HS, TOP_REG4, 22, 3, 0x88, 0,
734 TOP_MUX(0x0, "VGA"),
735 TOP_MUX(0x1, "TSI1"),
736 TOP_MUX(0x2, "LCD"),
737 TOP_MUX(0x3, "BGPIO"),
738 TOP_MUX(0x4, "I2S1"),
739 TOP_MUX(0x5, "B_DVI0")),
740 TOP_PIN(VGA_VS, TOP_REG4, 25, 3, 0x88, 9,
741 TOP_MUX(0x0, "VGA"),
742 TOP_MUX(0x1, "TSI1"),
743 TOP_MUX(0x2, "LCD"),
744 TOP_MUX(0x3, "BGPIO"),
745 TOP_MUX(0x4, "I2S1"),
746 TOP_MUX(0x5, "B_DVI0")),
747 TOP_PIN(TSI3_DATA, TOP_REG4, 28, 3, 0x88, 18,
748 TOP_MUX(0x0, "TSI3"),
749 TOP_MUX(0x1, "TSI1"),
750 TOP_MUX(0x2, "LCD"),
751 TOP_MUX(0x3, "BGPIO"),
752 TOP_MUX(0x4, "I2S1"),
753 TOP_MUX(0x5, "B_DVI0")),
754
755
756 TOP_PIN(TSI3_CLK, TOP_REG5, 0, 3, 0x8c, 0,
757 TOP_MUX(0x0, "TSI3"),
758 TOP_MUX(0x1, "TSI1"),
759 TOP_MUX(0x2, "LCD"),
760 TOP_MUX(0x3, "BGPIO"),
761 TOP_MUX(0x4, "I2S1"),
762 TOP_MUX(0x5, "B_DVI0")),
763 TOP_PIN(TSI3_SYNC, TOP_REG5, 3, 3, 0x8c, 9,
764 TOP_MUX(0x0, "TSI3"),
765 TOP_MUX(0x1, "TSI1"),
766 TOP_MUX(0x2, "LCD"),
767 TOP_MUX(0x3, "BGPIO"),
768 TOP_MUX(0x4, "I2S1"),
769 TOP_MUX(0x5, "B_DVI0")),
770 TOP_PIN(TSI3_VALID, TOP_REG5, 6, 3, 0x8c, 18,
771 TOP_MUX(0x0, "TSI3"),
772 TOP_MUX(0x1, "TSI1"),
773 TOP_MUX(0x2, "LCD"),
774 TOP_MUX(0x3, "BGPIO"),
775 TOP_MUX(0x4, "I2S1"),
776 TOP_MUX(0x5, "B_DVI0")),
777 TOP_PIN(I2S1_WS, TOP_REG5, 9, 3, 0x90, 0,
778 TOP_MUX(0x0, "I2S1"),
779 TOP_MUX(0x1, "TSI1"),
780 TOP_MUX(0x2, "LCD"),
781 TOP_MUX(0x3, "BGPIO"),
782 TOP_MUX(0x4, "VGA"),
783 TOP_MUX(0x5, "B_DVI0")),
784 TOP_PIN(I2S1_BCLK, TOP_REG5, 12, 3, 0x90, 9,
785 TOP_MUX(0x0, "I2S1"),
786 TOP_MUX(0x1, "TSI1"),
787 TOP_MUX(0x2, "LCD"),
788 TOP_MUX(0x3, "BGPIO"),
789 TOP_MUX(0x4, "VGA"),
790 TOP_MUX(0x5, "B_DVI0")),
791 TOP_PIN(I2S1_MCLK, TOP_REG5, 15, 2, 0x90, 18,
792 TOP_MUX(0x0, "I2S1"),
793 TOP_MUX(0x1, "TSI1"),
794 TOP_MUX(0x2, "LCD"),
795 TOP_MUX(0x3, "BGPIO")),
796 TOP_PIN(I2S1_DIN0, TOP_REG5, 17, 2, 0x94, 0,
797 TOP_MUX(0x0, "I2S1"),
798 TOP_MUX(0x1, "TSI1"),
799 TOP_MUX(0x2, "LCD"),
800 TOP_MUX(0x3, "BGPIO")),
801 TOP_PIN(I2S1_DOUT0, TOP_REG5, 19, 2, 0x94, 9,
802 TOP_MUX(0x0, "I2S1"),
803 TOP_MUX(0x1, "TSI1"),
804 TOP_MUX(0x2, "LCD"),
805 TOP_MUX(0x3, "BGPIO")),
806 TOP_PIN(SPI3_CLK, TOP_REG5, 21, 3, 0x94, 18,
807 TOP_MUX(0x0, "SPI3"),
808 TOP_MUX(0x1, "TSO1"),
809 TOP_MUX(0x2, "LCD"),
810 TOP_MUX(0x3, "BGPIO"),
811 TOP_MUX(0x4, "UART5"),
812 TOP_MUX(0x5, "PCM"),
813 TOP_MUX(0x6, "I2S0"),
814 TOP_MUX(0x7, "B_DVI0")),
815 TOP_PIN(SPI3_CS, TOP_REG5, 24, 3, 0x98, 0,
816 TOP_MUX(0x0, "SPI3"),
817 TOP_MUX(0x1, "TSO1"),
818 TOP_MUX(0x2, "LCD"),
819 TOP_MUX(0x3, "BGPIO"),
820 TOP_MUX(0x4, "UART5"),
821 TOP_MUX(0x5, "PCM"),
822 TOP_MUX(0x6, "I2S0"),
823 TOP_MUX(0x7, "B_DVI0")),
824 TOP_PIN(SPI3_TXD, TOP_REG5, 27, 3, 0x98, 9,
825 TOP_MUX(0x0, "SPI3"),
826 TOP_MUX(0x1, "TSO1"),
827 TOP_MUX(0x2, "LCD"),
828 TOP_MUX(0x3, "BGPIO"),
829 TOP_MUX(0x4, "UART5"),
830 TOP_MUX(0x5, "PCM"),
831 TOP_MUX(0x6, "I2S0"),
832 TOP_MUX(0x7, "B_DVI0")),
833 TOP_PIN(NAND_LDO_MS18_SEL, TOP_REG5, 30, 1, 0xe4, 0,
834 TOP_MUX(0x0, "NAND"),
835 TOP_MUX(0x1, "BGPIO")),
836
837
838 TOP_PIN(SPI3_RXD, TOP_REG6, 0, 3, 0x98, 18,
839 TOP_MUX(0x0, "SPI3"),
840 TOP_MUX(0x1, "TSO1"),
841 TOP_MUX(0x2, "LCD"),
842 TOP_MUX(0x3, "BGPIO"),
843 TOP_MUX(0x4, "UART5"),
844 TOP_MUX(0x5, "PCM"),
845 TOP_MUX(0x6, "I2S0"),
846 TOP_MUX(0x7, "B_DVI1")),
847 TOP_PIN(I2S0_MCLK, TOP_REG6, 3, 3, 0x9c, 0,
848 TOP_MUX(0x0, "I2S0"),
849 TOP_MUX(0x1, "TSO1"),
850 TOP_MUX(0x2, "LCD"),
851 TOP_MUX(0x3, "BGPIO"),
852 TOP_MUX(0x4, "USIM0"),
853 TOP_MUX(0x5, "B_DVI1")),
854 TOP_PIN(I2S0_BCLK, TOP_REG6, 6, 3, 0x9c, 9,
855 TOP_MUX(0x0, "I2S0"),
856 TOP_MUX(0x1, "TSO1"),
857 TOP_MUX(0x2, "LCD"),
858 TOP_MUX(0x3, "BGPIO"),
859 TOP_MUX(0x4, "USIM0"),
860 TOP_MUX(0x5, "B_DVI1")),
861 TOP_PIN(I2S0_WS, TOP_REG6, 9, 3, 0x9c, 18,
862 TOP_MUX(0x0, "I2S0"),
863 TOP_MUX(0x1, "TSO1"),
864 TOP_MUX(0x2, "LCD"),
865 TOP_MUX(0x3, "BGPIO"),
866 TOP_MUX(0x4, "USIM0"),
867 TOP_MUX(0x5, "B_DVI1")),
868 TOP_PIN(I2S0_DIN0, TOP_REG6, 12, 3, 0xa0, 0,
869 TOP_MUX(0x0, "I2S0"),
870 TOP_MUX(0x1, "TSO1"),
871 TOP_MUX(0x2, "LCD"),
872 TOP_MUX(0x3, "BGPIO"),
873 TOP_MUX(0x4, "USIM0"),
874 TOP_MUX(0x5, "B_DVI1")),
875 TOP_PIN(I2S0_DOUT0, TOP_REG6, 15, 2, 0xa0, 9,
876 TOP_MUX(0x0, "I2S0"),
877 TOP_MUX(0x1, "TSO1"),
878 TOP_MUX(0x2, "LCD"),
879 TOP_MUX(0x3, "BGPIO")),
880 TOP_PIN(I2C5_SCL, TOP_REG6, 17, 3, 0xa0, 18,
881 TOP_MUX(0x0, "I2C5"),
882 TOP_MUX(0x1, "TSO1"),
883 TOP_MUX(0x2, "LCD"),
884 TOP_MUX(0x3, "BGPIO"),
885 TOP_MUX(0x4, "PWM"),
886 TOP_MUX(0x5, "I2S0"),
887 TOP_MUX(0x6, "B_DVI1")),
888 TOP_PIN(I2C5_SDA, TOP_REG6, 20, 3, 0xa4, 0,
889 TOP_MUX(0x0, "I2C5"),
890 TOP_MUX(0x1, "TSO1"),
891 TOP_MUX(0x2, "LCD"),
892 TOP_MUX(0x3, "BGPIO"),
893 TOP_MUX(0x4, "PWM"),
894 TOP_MUX(0x5, "I2S0"),
895 TOP_MUX(0x6, "B_DVI1")),
896 TOP_PIN(SPI2_CLK, TOP_REG6, 23, 3, 0xa4, 9,
897 TOP_MUX(0x0, "SPI2"),
898 TOP_MUX(0x1, "TSO0"),
899 TOP_MUX(0x2, "LCD"),
900 TOP_MUX(0x3, "BGPIO"),
901 TOP_MUX(0x4, "I2C4"),
902 TOP_MUX(0x5, "B_DVI1")),
903 TOP_PIN(SPI2_CS, TOP_REG6, 26, 3, 0xa4, 18,
904 TOP_MUX(0x0, "SPI2"),
905 TOP_MUX(0x1, "TSO0"),
906 TOP_MUX(0x2, "LCD"),
907 TOP_MUX(0x3, "BGPIO"),
908 TOP_MUX(0x4, "I2C4"),
909 TOP_MUX(0x5, "B_DVI1")),
910 TOP_PIN(SPI2_TXD, TOP_REG6, 29, 3, 0xa8, 0,
911 TOP_MUX(0x0, "SPI2"),
912 TOP_MUX(0x1, "TSO0"),
913 TOP_MUX(0x2, "LCD"),
914 TOP_MUX(0x3, "BGPIO"),
915 TOP_MUX(0x4, "I2C4"),
916 TOP_MUX(0x5, "B_DVI1")),
917
918
919 TOP_PIN(SPI2_RXD, TOP_REG7, 0, 3, 0xa8, 9,
920 TOP_MUX(0x0, "SPI2"),
921 TOP_MUX(0x1, "TSO0"),
922 TOP_MUX(0x2, "LCD"),
923 TOP_MUX(0x3, "BGPIO"),
924 TOP_MUX(0x4, "I2C3"),
925 TOP_MUX(0x5, "B_DVI1")),
926 TOP_PIN(NAND_WP_N, TOP_REG7, 7, 3, 0x54, 9,
927 TOP_MUX(0x0, "NAND"),
928 TOP_MUX(0x1, "PWM"),
929 TOP_MUX(0x2, "SPI2"),
930 TOP_MUX(0x3, "BGPIO"),
931 TOP_MUX(0x4, "TSI0"),
932 TOP_MUX(0x5, "I2S1")),
933 TOP_PIN(NAND_PAGE_SIZE0, TOP_REG7, 10, 3, 0xb8, 0,
934 TOP_MUX(0x0, "NAND"),
935 TOP_MUX(0x1, "PWM"),
936 TOP_MUX(0x2, "SPI2"),
937 TOP_MUX(0x3, "BGPIO"),
938 TOP_MUX(0x4, "TSI0"),
939 TOP_MUX(0x5, "I2S1")),
940 TOP_PIN(NAND_PAGE_SIZE1, TOP_REG7, 13, 3, 0xb8, 9,
941 TOP_MUX(0x0, "NAND"),
942 TOP_MUX(0x1, "I2C4"),
943 TOP_MUX(0x2, "SPI2"),
944 TOP_MUX(0x3, "BGPIO"),
945 TOP_MUX(0x4, "TSI0"),
946 TOP_MUX(0x5, "I2S1")),
947 TOP_PIN(NAND_ADDR_CYCLE, TOP_REG7, 16, 3, 0xb8, 18,
948 TOP_MUX(0x0, "NAND"),
949 TOP_MUX(0x1, "I2C4"),
950 TOP_MUX(0x2, "SPI2"),
951 TOP_MUX(0x3, "BGPIO"),
952 TOP_MUX(0x4, "TSI0"),
953 TOP_MUX(0x5, "I2S1")),
954 TOP_PIN(NAND_RB0, TOP_REG7, 19, 3, 0xbc, 0,
955 TOP_MUX(0x0, "NAND"),
956 TOP_MUX(0x1, "I2C2"),
957 TOP_MUX(0x2, "USIM0"),
958 TOP_MUX(0x3, "BGPIO"),
959 TOP_MUX(0x4, "TSI1")),
960 TOP_PIN(NAND_RB1, TOP_REG7, 22, 3, 0xbc, 9,
961 TOP_MUX(0x0, "NAND"),
962 TOP_MUX(0x1, "I2C2"),
963 TOP_MUX(0x2, "USIM0"),
964 TOP_MUX(0x3, "BGPIO"),
965 TOP_MUX(0x4, "TSI1")),
966 TOP_PIN(NAND_RB2, TOP_REG7, 25, 3, 0xbc, 18,
967 TOP_MUX(0x0, "NAND"),
968 TOP_MUX(0x1, "UART5"),
969 TOP_MUX(0x2, "USIM0"),
970 TOP_MUX(0x3, "BGPIO"),
971 TOP_MUX(0x4, "TSI1"),
972 TOP_MUX(0x4, "I2S1")),
973 TOP_PIN(NAND_RB3, TOP_REG7, 28, 3, 0x54, 18,
974 TOP_MUX(0x0, "NAND"),
975 TOP_MUX(0x1, "UART5"),
976 TOP_MUX(0x2, "USIM0"),
977 TOP_MUX(0x3, "BGPIO"),
978 TOP_MUX(0x4, "TSI1"),
979 TOP_MUX(0x4, "I2S1")),
980
981
982 TOP_PIN(GMAC_125M_IN, TOP_REG8, 0, 2, 0x34, 0,
983 TOP_MUX(0x0, "GMII"),
984 TOP_MUX(0x1, "USB2"),
985 TOP_MUX(0x2, "ISP"),
986 TOP_MUX(0x3, "BGPIO")),
987 TOP_PIN(GMAC_50M_OUT, TOP_REG8, 2, 2, 0x34, 9,
988 TOP_MUX(0x0, "GMII"),
989 TOP_MUX(0x1, "USB2"),
990 TOP_MUX(0x2, "BGPIO"),
991 TOP_MUX(0x3, "USB2")),
992 TOP_PIN(SPINOR_SSCLK_LOOPBACK, TOP_REG8, 6, 1, 0xc8, 9,
993 TOP_MUX(0x0, "SPINOR")),
994 TOP_PIN(SPINOR_SDIO1CLK_LOOPBACK, TOP_REG8, 7, 1, 0xc8, 18,
995 TOP_MUX(0x0, "SPINOR")),
996 };
997
998 static struct zx_pinctrl_soc_info zx296718_pinctrl_info = {
999 .pins = zx296718_pins,
1000 .npins = ARRAY_SIZE(zx296718_pins),
1001 };
1002
1003 static int zx296718_pinctrl_probe(struct platform_device *pdev)
1004 {
1005 return zx_pinctrl_init(pdev, &zx296718_pinctrl_info);
1006 }
1007
1008 static const struct of_device_id zx296718_pinctrl_match[] = {
1009 { .compatible = "zte,zx296718-pmm", },
1010 {}
1011 };
1012 MODULE_DEVICE_TABLE(of, zx296718_pinctrl_match);
1013
1014 static struct platform_driver zx296718_pinctrl_driver = {
1015 .probe = zx296718_pinctrl_probe,
1016 .driver = {
1017 .name = "zx296718-pinctrl",
1018 .of_match_table = zx296718_pinctrl_match,
1019 },
1020 };
1021 builtin_platform_driver(zx296718_pinctrl_driver);
1022
1023 MODULE_DESCRIPTION("ZTE ZX296718 pinctrl driver");
1024 MODULE_LICENSE("GPL");