xref: /linux/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c (revision f3a8b6645dc2e60d11f20c1c23afd964ff4e55ae)
1 /*
2  * Copyright (C) 2016 Socionext Inc.
3  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
15 
16 #include <linux/kernel.h>
17 #include <linux/module.h>
18 #include <linux/pinctrl/pinctrl.h>
19 #include <linux/platform_device.h>
20 
21 #include "pinctrl-uniphier.h"
22 
23 static const struct pinctrl_pin_desc uniphier_ld20_pins[] = {
24 	UNIPHIER_PINCTRL_PIN(0, "XECS1", 0,
25 			     0, UNIPHIER_PIN_DRV_3BIT,
26 			     0, UNIPHIER_PIN_PULL_UP),
27 	UNIPHIER_PINCTRL_PIN(1, "ERXW", 1,
28 			     1, UNIPHIER_PIN_DRV_3BIT,
29 			     1, UNIPHIER_PIN_PULL_UP),
30 	UNIPHIER_PINCTRL_PIN(2, "XERWE1", 2,
31 			     2, UNIPHIER_PIN_DRV_3BIT,
32 			     2, UNIPHIER_PIN_PULL_UP),
33 	UNIPHIER_PINCTRL_PIN(3, "XNFWP", 3,
34 			     3, UNIPHIER_PIN_DRV_3BIT,
35 			     3, UNIPHIER_PIN_PULL_DOWN),
36 	UNIPHIER_PINCTRL_PIN(4, "XNFCE0", 4,
37 			     4, UNIPHIER_PIN_DRV_3BIT,
38 			     4, UNIPHIER_PIN_PULL_UP),
39 	UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", 5,
40 			     5, UNIPHIER_PIN_DRV_3BIT,
41 			     5, UNIPHIER_PIN_PULL_UP),
42 	UNIPHIER_PINCTRL_PIN(6, "XNFRE", 6,
43 			     6, UNIPHIER_PIN_DRV_3BIT,
44 			     6, UNIPHIER_PIN_PULL_UP),
45 	UNIPHIER_PINCTRL_PIN(7, "XNFWE", 7,
46 			     7, UNIPHIER_PIN_DRV_3BIT,
47 			     7, UNIPHIER_PIN_PULL_UP),
48 	UNIPHIER_PINCTRL_PIN(8, "NFALE", 8,
49 			     8, UNIPHIER_PIN_DRV_3BIT,
50 			     8, UNIPHIER_PIN_PULL_UP),
51 	UNIPHIER_PINCTRL_PIN(9, "NFCLE", 9,
52 			     9, UNIPHIER_PIN_DRV_3BIT,
53 			     9, UNIPHIER_PIN_PULL_UP),
54 	UNIPHIER_PINCTRL_PIN(10, "NFD0", 10,
55 			     10, UNIPHIER_PIN_DRV_3BIT,
56 			     10, UNIPHIER_PIN_PULL_UP),
57 	UNIPHIER_PINCTRL_PIN(11, "NFD1", 11,
58 			     11, UNIPHIER_PIN_DRV_3BIT,
59 			     11, UNIPHIER_PIN_PULL_UP),
60 	UNIPHIER_PINCTRL_PIN(12, "NFD2", 12,
61 			     12, UNIPHIER_PIN_DRV_3BIT,
62 			     12, UNIPHIER_PIN_PULL_UP),
63 	UNIPHIER_PINCTRL_PIN(13, "NFD3", 13,
64 			     13, UNIPHIER_PIN_DRV_3BIT,
65 			     13, UNIPHIER_PIN_PULL_UP),
66 	UNIPHIER_PINCTRL_PIN(14, "NFD4", 14,
67 			     14, UNIPHIER_PIN_DRV_3BIT,
68 			     14, UNIPHIER_PIN_PULL_UP),
69 	UNIPHIER_PINCTRL_PIN(15, "NFD5", 15,
70 			     15, UNIPHIER_PIN_DRV_3BIT,
71 			     15, UNIPHIER_PIN_PULL_UP),
72 	UNIPHIER_PINCTRL_PIN(16, "NFD6", 16,
73 			     16, UNIPHIER_PIN_DRV_3BIT,
74 			     16, UNIPHIER_PIN_PULL_UP),
75 	UNIPHIER_PINCTRL_PIN(17, "NFD7", 17,
76 			     17, UNIPHIER_PIN_DRV_3BIT,
77 			     17, UNIPHIER_PIN_PULL_UP),
78 	UNIPHIER_PINCTRL_PIN(18, "XERST", 18,
79 			     0, UNIPHIER_PIN_DRV_2BIT,
80 			     18, UNIPHIER_PIN_PULL_UP),
81 	UNIPHIER_PINCTRL_PIN(19, "MMCCLK", 19,
82 			     1, UNIPHIER_PIN_DRV_2BIT,
83 			     19, UNIPHIER_PIN_PULL_UP),
84 	UNIPHIER_PINCTRL_PIN(20, "MMCCMD", 20,
85 			     2, UNIPHIER_PIN_DRV_2BIT,
86 			     20, UNIPHIER_PIN_PULL_UP),
87 	UNIPHIER_PINCTRL_PIN(21, "MMCDS", 21,
88 			     3, UNIPHIER_PIN_DRV_2BIT,
89 			     21, UNIPHIER_PIN_PULL_UP),
90 	UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", 22,
91 			     4, UNIPHIER_PIN_DRV_2BIT,
92 			     22, UNIPHIER_PIN_PULL_UP),
93 	UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", 23,
94 			     5, UNIPHIER_PIN_DRV_2BIT,
95 			     23, UNIPHIER_PIN_PULL_UP),
96 	UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", 24,
97 			     6, UNIPHIER_PIN_DRV_2BIT,
98 			     24, UNIPHIER_PIN_PULL_UP),
99 	UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", 25,
100 			     7, UNIPHIER_PIN_DRV_2BIT,
101 			     25, UNIPHIER_PIN_PULL_UP),
102 	UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", 26,
103 			     8, UNIPHIER_PIN_DRV_2BIT,
104 			     26, UNIPHIER_PIN_PULL_UP),
105 	UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", 27,
106 			     9, UNIPHIER_PIN_DRV_2BIT,
107 			     27, UNIPHIER_PIN_PULL_UP),
108 	UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", 28,
109 			     10, UNIPHIER_PIN_DRV_2BIT,
110 			     28, UNIPHIER_PIN_PULL_UP),
111 	UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", 29,
112 			     11, UNIPHIER_PIN_DRV_2BIT,
113 			     29, UNIPHIER_PIN_PULL_UP),
114 	UNIPHIER_PINCTRL_PIN(30, "MDC", 30,
115 			     18, UNIPHIER_PIN_DRV_3BIT,
116 			     30, UNIPHIER_PIN_PULL_DOWN),
117 	UNIPHIER_PINCTRL_PIN(31, "MDIO", 31,
118 			     19, UNIPHIER_PIN_DRV_3BIT,
119 			     31, UNIPHIER_PIN_PULL_DOWN),
120 	UNIPHIER_PINCTRL_PIN(32, "MDIO_INTL", 32,
121 			     20, UNIPHIER_PIN_DRV_3BIT,
122 			     32, UNIPHIER_PIN_PULL_DOWN),
123 	UNIPHIER_PINCTRL_PIN(33, "PHYRSTL", 33,
124 			     21, UNIPHIER_PIN_DRV_3BIT,
125 			     33, UNIPHIER_PIN_PULL_DOWN),
126 	UNIPHIER_PINCTRL_PIN(34, "RGMII_RXCLK", 34,
127 			     22, UNIPHIER_PIN_DRV_3BIT,
128 			     34, UNIPHIER_PIN_PULL_DOWN),
129 	UNIPHIER_PINCTRL_PIN(35, "RGMII_RXD0", 35,
130 			     23, UNIPHIER_PIN_DRV_3BIT,
131 			     35, UNIPHIER_PIN_PULL_DOWN),
132 	UNIPHIER_PINCTRL_PIN(36, "RGMII_RXD1", 36,
133 			     24, UNIPHIER_PIN_DRV_3BIT,
134 			     36, UNIPHIER_PIN_PULL_DOWN),
135 	UNIPHIER_PINCTRL_PIN(37, "RGMII_RXD2", 37,
136 			     25, UNIPHIER_PIN_DRV_3BIT,
137 			     37, UNIPHIER_PIN_PULL_DOWN),
138 	UNIPHIER_PINCTRL_PIN(38, "RGMII_RXD3", 38,
139 			     26, UNIPHIER_PIN_DRV_3BIT,
140 			     38, UNIPHIER_PIN_PULL_DOWN),
141 	UNIPHIER_PINCTRL_PIN(39, "RGMII_RXCTL", 39,
142 			     27, UNIPHIER_PIN_DRV_3BIT,
143 			     39, UNIPHIER_PIN_PULL_DOWN),
144 	UNIPHIER_PINCTRL_PIN(40, "RGMII_TXCLK", 40,
145 			     28, UNIPHIER_PIN_DRV_3BIT,
146 			     40, UNIPHIER_PIN_PULL_DOWN),
147 	UNIPHIER_PINCTRL_PIN(41, "RGMII_TXD0", 41,
148 			     29, UNIPHIER_PIN_DRV_3BIT,
149 			     41, UNIPHIER_PIN_PULL_DOWN),
150 	UNIPHIER_PINCTRL_PIN(42, "RGMII_TXD1", 42,
151 			     30, UNIPHIER_PIN_DRV_3BIT,
152 			     42, UNIPHIER_PIN_PULL_DOWN),
153 	UNIPHIER_PINCTRL_PIN(43, "RGMII_TXD2", 43,
154 			     31, UNIPHIER_PIN_DRV_3BIT,
155 			     43, UNIPHIER_PIN_PULL_DOWN),
156 	UNIPHIER_PINCTRL_PIN(44, "RGMII_TXD3", 44,
157 			     32, UNIPHIER_PIN_DRV_3BIT,
158 			     44, UNIPHIER_PIN_PULL_DOWN),
159 	UNIPHIER_PINCTRL_PIN(45, "RGMII_TXCTL", 45,
160 			     33, UNIPHIER_PIN_DRV_3BIT,
161 			     45, UNIPHIER_PIN_PULL_DOWN),
162 	UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", 46,
163 			     34, UNIPHIER_PIN_DRV_3BIT,
164 			     46, UNIPHIER_PIN_PULL_DOWN),
165 	UNIPHIER_PINCTRL_PIN(47, "USB0OD", 47,
166 			     35, UNIPHIER_PIN_DRV_3BIT,
167 			     47, UNIPHIER_PIN_PULL_UP),
168 	UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", 48,
169 			     36, UNIPHIER_PIN_DRV_3BIT,
170 			     48, UNIPHIER_PIN_PULL_DOWN),
171 	UNIPHIER_PINCTRL_PIN(49, "USB1OD", 49,
172 			     37, UNIPHIER_PIN_DRV_3BIT,
173 			     49, UNIPHIER_PIN_PULL_UP),
174 	UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", 50,
175 			     38, UNIPHIER_PIN_DRV_3BIT,
176 			     50, UNIPHIER_PIN_PULL_DOWN),
177 	UNIPHIER_PINCTRL_PIN(51, "USB2OD", 51,
178 			     39, UNIPHIER_PIN_DRV_3BIT,
179 			     51, UNIPHIER_PIN_PULL_UP),
180 	UNIPHIER_PINCTRL_PIN(52, "USB3VBUS", 52,
181 			     40, UNIPHIER_PIN_DRV_3BIT,
182 			     52, UNIPHIER_PIN_PULL_DOWN),
183 	UNIPHIER_PINCTRL_PIN(53, "USB3OD", 53,
184 			     41, UNIPHIER_PIN_DRV_3BIT,
185 			     53, UNIPHIER_PIN_PULL_UP),
186 	UNIPHIER_PINCTRL_PIN(54, "TXD0", 54,
187 			     42, UNIPHIER_PIN_DRV_3BIT,
188 			     54, UNIPHIER_PIN_PULL_UP),
189 	UNIPHIER_PINCTRL_PIN(55, "RXD0", 55,
190 			     43, UNIPHIER_PIN_DRV_3BIT,
191 			     55, UNIPHIER_PIN_PULL_UP),
192 	UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", 56,
193 			     44, UNIPHIER_PIN_DRV_3BIT,
194 			     56, UNIPHIER_PIN_PULL_DOWN),
195 	UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", 57,
196 			     45, UNIPHIER_PIN_DRV_3BIT,
197 			     57, UNIPHIER_PIN_PULL_DOWN),
198 	UNIPHIER_PINCTRL_PIN(58, "SPITXD0", 58,
199 			     46, UNIPHIER_PIN_DRV_3BIT,
200 			     58, UNIPHIER_PIN_PULL_DOWN),
201 	UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", 59,
202 			     47, UNIPHIER_PIN_DRV_3BIT,
203 			     59, UNIPHIER_PIN_PULL_DOWN),
204 	UNIPHIER_PINCTRL_PIN(60, "AGCI", 60,
205 			     48, UNIPHIER_PIN_DRV_3BIT,
206 			     60, UNIPHIER_PIN_PULL_DOWN),
207 	UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", 61,
208 			     -1, UNIPHIER_PIN_DRV_FIXED4,
209 			     -1, UNIPHIER_PIN_PULL_NONE),
210 	UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", 62,
211 			     -1, UNIPHIER_PIN_DRV_FIXED4,
212 			     -1, UNIPHIER_PIN_PULL_NONE),
213 	UNIPHIER_PINCTRL_PIN(63, "SDA0", 63,
214 			     -1, UNIPHIER_PIN_DRV_FIXED4,
215 			     -1, UNIPHIER_PIN_PULL_NONE),
216 	UNIPHIER_PINCTRL_PIN(64, "SCL0", 64,
217 			     -1, UNIPHIER_PIN_DRV_FIXED4,
218 			     -1, UNIPHIER_PIN_PULL_NONE),
219 	UNIPHIER_PINCTRL_PIN(65, "SDA1", 65,
220 			     -1, UNIPHIER_PIN_DRV_FIXED4,
221 			     -1, UNIPHIER_PIN_PULL_NONE),
222 	UNIPHIER_PINCTRL_PIN(66, "SCL1", 66,
223 			     -1, UNIPHIER_PIN_DRV_FIXED4,
224 			     -1, UNIPHIER_PIN_PULL_NONE),
225 	UNIPHIER_PINCTRL_PIN(67, "HIN", 67,
226 			     -1, UNIPHIER_PIN_DRV_FIXED4,
227 			     -1, UNIPHIER_PIN_PULL_NONE),
228 	UNIPHIER_PINCTRL_PIN(68, "VIN", 68,
229 			     -1, UNIPHIER_PIN_DRV_FIXED4,
230 			     -1, UNIPHIER_PIN_PULL_NONE),
231 	UNIPHIER_PINCTRL_PIN(69, "PCA00", 69,
232 			     49, UNIPHIER_PIN_DRV_3BIT,
233 			     69, UNIPHIER_PIN_PULL_DOWN),
234 	UNIPHIER_PINCTRL_PIN(70, "PCA01", 70,
235 			     50, UNIPHIER_PIN_DRV_3BIT,
236 			     70, UNIPHIER_PIN_PULL_DOWN),
237 	UNIPHIER_PINCTRL_PIN(71, "PCA02", 71,
238 			     51, UNIPHIER_PIN_DRV_3BIT,
239 			     71, UNIPHIER_PIN_PULL_DOWN),
240 	UNIPHIER_PINCTRL_PIN(72, "PCA03", 72,
241 			     52, UNIPHIER_PIN_DRV_3BIT,
242 			     72, UNIPHIER_PIN_PULL_DOWN),
243 	UNIPHIER_PINCTRL_PIN(73, "PCA04", 73,
244 			     53, UNIPHIER_PIN_DRV_3BIT,
245 			     73, UNIPHIER_PIN_PULL_DOWN),
246 	UNIPHIER_PINCTRL_PIN(74, "PCA05", 74,
247 			     54, UNIPHIER_PIN_DRV_3BIT,
248 			     74, UNIPHIER_PIN_PULL_DOWN),
249 	UNIPHIER_PINCTRL_PIN(75, "PCA06", 75,
250 			     55, UNIPHIER_PIN_DRV_3BIT,
251 			     75, UNIPHIER_PIN_PULL_DOWN),
252 	UNIPHIER_PINCTRL_PIN(76, "PCA07", 76,
253 			     56, UNIPHIER_PIN_DRV_3BIT,
254 			     76, UNIPHIER_PIN_PULL_DOWN),
255 	UNIPHIER_PINCTRL_PIN(77, "PCA08", 77,
256 			     57, UNIPHIER_PIN_DRV_3BIT,
257 			     77, UNIPHIER_PIN_PULL_DOWN),
258 	UNIPHIER_PINCTRL_PIN(78, "PCA09", 78,
259 			     58, UNIPHIER_PIN_DRV_3BIT,
260 			     78, UNIPHIER_PIN_PULL_DOWN),
261 	UNIPHIER_PINCTRL_PIN(79, "PCA10", 79,
262 			     59, UNIPHIER_PIN_DRV_3BIT,
263 			     79, UNIPHIER_PIN_PULL_DOWN),
264 	UNIPHIER_PINCTRL_PIN(80, "PCA11", 80,
265 			     60, UNIPHIER_PIN_DRV_3BIT,
266 			     80, UNIPHIER_PIN_PULL_DOWN),
267 	UNIPHIER_PINCTRL_PIN(81, "PCA12", 81,
268 			     61, UNIPHIER_PIN_DRV_3BIT,
269 			     81, UNIPHIER_PIN_PULL_DOWN),
270 	UNIPHIER_PINCTRL_PIN(82, "PCA13", 82,
271 			     62, UNIPHIER_PIN_DRV_3BIT,
272 			     82, UNIPHIER_PIN_PULL_DOWN),
273 	UNIPHIER_PINCTRL_PIN(83, "PCA14", 83,
274 			     63, UNIPHIER_PIN_DRV_3BIT,
275 			     83, UNIPHIER_PIN_PULL_DOWN),
276 	UNIPHIER_PINCTRL_PIN(84, "PC0READY", 84,
277 			     0, UNIPHIER_PIN_DRV_1BIT,
278 			     84, UNIPHIER_PIN_PULL_DOWN),
279 	UNIPHIER_PINCTRL_PIN(85, "PC0CD1", 85,
280 			     1, UNIPHIER_PIN_DRV_1BIT,
281 			     85, UNIPHIER_PIN_PULL_DOWN),
282 	UNIPHIER_PINCTRL_PIN(86, "PC0CD2", 86,
283 			     2, UNIPHIER_PIN_DRV_1BIT,
284 			     86, UNIPHIER_PIN_PULL_DOWN),
285 	UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", 87,
286 			     3, UNIPHIER_PIN_DRV_1BIT,
287 			     87, UNIPHIER_PIN_PULL_DOWN),
288 	UNIPHIER_PINCTRL_PIN(88, "PC0RESET", 88,
289 			     4, UNIPHIER_PIN_DRV_1BIT,
290 			     88, UNIPHIER_PIN_PULL_DOWN),
291 	UNIPHIER_PINCTRL_PIN(89, "PC0CE1", 89,
292 			     5, UNIPHIER_PIN_DRV_1BIT,
293 			     89, UNIPHIER_PIN_PULL_DOWN),
294 	UNIPHIER_PINCTRL_PIN(90, "PC0WE", 90,
295 			     6, UNIPHIER_PIN_DRV_1BIT,
296 			     90, UNIPHIER_PIN_PULL_DOWN),
297 	UNIPHIER_PINCTRL_PIN(91, "PC0OE", 91,
298 			     7, UNIPHIER_PIN_DRV_1BIT,
299 			     91, UNIPHIER_PIN_PULL_DOWN),
300 	UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", 92,
301 			     8, UNIPHIER_PIN_DRV_1BIT,
302 			     92, UNIPHIER_PIN_PULL_DOWN),
303 	UNIPHIER_PINCTRL_PIN(93, "PC0IORD", 93,
304 			     9, UNIPHIER_PIN_DRV_1BIT,
305 			     93, UNIPHIER_PIN_PULL_DOWN),
306 	UNIPHIER_PINCTRL_PIN(94, "PCD00", 94,
307 			     10, UNIPHIER_PIN_DRV_1BIT,
308 			     94, UNIPHIER_PIN_PULL_DOWN),
309 	UNIPHIER_PINCTRL_PIN(95, "PCD01", 95,
310 			     11, UNIPHIER_PIN_DRV_1BIT,
311 			     95, UNIPHIER_PIN_PULL_DOWN),
312 	UNIPHIER_PINCTRL_PIN(96, "PCD02", 96,
313 			     12, UNIPHIER_PIN_DRV_1BIT,
314 			     96, UNIPHIER_PIN_PULL_DOWN),
315 	UNIPHIER_PINCTRL_PIN(97, "PCD03", 97,
316 			     13, UNIPHIER_PIN_DRV_1BIT,
317 			     97, UNIPHIER_PIN_PULL_DOWN),
318 	UNIPHIER_PINCTRL_PIN(98, "PCD04", 98,
319 			     14, UNIPHIER_PIN_DRV_1BIT,
320 			     98, UNIPHIER_PIN_PULL_DOWN),
321 	UNIPHIER_PINCTRL_PIN(99, "PCD05", 99,
322 			     15, UNIPHIER_PIN_DRV_1BIT,
323 			     99, UNIPHIER_PIN_PULL_DOWN),
324 	UNIPHIER_PINCTRL_PIN(100, "PCD06", 100,
325 			     16, UNIPHIER_PIN_DRV_1BIT,
326 			     100, UNIPHIER_PIN_PULL_DOWN),
327 	UNIPHIER_PINCTRL_PIN(101, "PCD07", 101,
328 			     17, UNIPHIER_PIN_DRV_1BIT,
329 			     101, UNIPHIER_PIN_PULL_DOWN),
330 	UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", 102,
331 			     18, UNIPHIER_PIN_DRV_1BIT,
332 			     102, UNIPHIER_PIN_PULL_DOWN),
333 	UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", 103,
334 			     19, UNIPHIER_PIN_DRV_1BIT,
335 			     103, UNIPHIER_PIN_PULL_DOWN),
336 	UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", 104,
337 			     20, UNIPHIER_PIN_DRV_1BIT,
338 			     104, UNIPHIER_PIN_PULL_DOWN),
339 	UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", 105,
340 			     21, UNIPHIER_PIN_DRV_1BIT,
341 			     105, UNIPHIER_PIN_PULL_DOWN),
342 	UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", 106,
343 			     22, UNIPHIER_PIN_DRV_1BIT,
344 			     106, UNIPHIER_PIN_PULL_DOWN),
345 	UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", 107,
346 			     23, UNIPHIER_PIN_DRV_1BIT,
347 			     107, UNIPHIER_PIN_PULL_DOWN),
348 	UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", 108,
349 			     24, UNIPHIER_PIN_DRV_1BIT,
350 			     108, UNIPHIER_PIN_PULL_DOWN),
351 	UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", 109,
352 			     25, UNIPHIER_PIN_DRV_1BIT,
353 			     109, UNIPHIER_PIN_PULL_DOWN),
354 	UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", 110,
355 			     26, UNIPHIER_PIN_DRV_1BIT,
356 			     110, UNIPHIER_PIN_PULL_DOWN),
357 	UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", 111,
358 			     27, UNIPHIER_PIN_DRV_1BIT,
359 			     111, UNIPHIER_PIN_PULL_DOWN),
360 	UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", 112,
361 			     28, UNIPHIER_PIN_DRV_1BIT,
362 			     112, UNIPHIER_PIN_PULL_DOWN),
363 	UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", 113,
364 			     64, UNIPHIER_PIN_DRV_3BIT,
365 			     113, UNIPHIER_PIN_PULL_DOWN),
366 	UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", 114,
367 			     65, UNIPHIER_PIN_DRV_3BIT,
368 			     114, UNIPHIER_PIN_PULL_DOWN),
369 	UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", 115,
370 			     66, UNIPHIER_PIN_DRV_3BIT,
371 			     115, UNIPHIER_PIN_PULL_DOWN),
372 	UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", 116,
373 			     67, UNIPHIER_PIN_DRV_3BIT,
374 			     116, UNIPHIER_PIN_PULL_DOWN),
375 	UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", 117,
376 			     68, UNIPHIER_PIN_DRV_3BIT,
377 			     117, UNIPHIER_PIN_PULL_DOWN),
378 	UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", 118,
379 			     69, UNIPHIER_PIN_DRV_3BIT,
380 			     118, UNIPHIER_PIN_PULL_DOWN),
381 	UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", 119,
382 			     70, UNIPHIER_PIN_DRV_3BIT,
383 			     119, UNIPHIER_PIN_PULL_DOWN),
384 	UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", 120,
385 			     71, UNIPHIER_PIN_DRV_3BIT,
386 			     120, UNIPHIER_PIN_PULL_DOWN),
387 	UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", 121,
388 			     72, UNIPHIER_PIN_DRV_3BIT,
389 			     121, UNIPHIER_PIN_PULL_DOWN),
390 	UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", 122,
391 			     73, UNIPHIER_PIN_DRV_3BIT,
392 			     122, UNIPHIER_PIN_PULL_DOWN),
393 	UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", 123,
394 			     74, UNIPHIER_PIN_DRV_3BIT,
395 			     123, UNIPHIER_PIN_PULL_DOWN),
396 	UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", 124,
397 			     75, UNIPHIER_PIN_DRV_3BIT,
398 			     124, UNIPHIER_PIN_PULL_DOWN),
399 	UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", 125,
400 			     76, UNIPHIER_PIN_DRV_3BIT,
401 			     125, UNIPHIER_PIN_PULL_DOWN),
402 	UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", 126,
403 			     77, UNIPHIER_PIN_DRV_3BIT,
404 			     126, UNIPHIER_PIN_PULL_DOWN),
405 	UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", 127,
406 			     78, UNIPHIER_PIN_DRV_3BIT,
407 			     127, UNIPHIER_PIN_PULL_DOWN),
408 	UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", 128,
409 			     79, UNIPHIER_PIN_DRV_3BIT,
410 			     128, UNIPHIER_PIN_PULL_DOWN),
411 	UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", 129,
412 			     80, UNIPHIER_PIN_DRV_3BIT,
413 			     129, UNIPHIER_PIN_PULL_DOWN),
414 	UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", 130,
415 			     81, UNIPHIER_PIN_DRV_3BIT,
416 			     130, UNIPHIER_PIN_PULL_DOWN),
417 	UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", 131,
418 			     82, UNIPHIER_PIN_DRV_3BIT,
419 			     131, UNIPHIER_PIN_PULL_DOWN),
420 	UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", 132,
421 			     83, UNIPHIER_PIN_DRV_3BIT,
422 			     132, UNIPHIER_PIN_PULL_DOWN),
423 	UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", 133,
424 			     84, UNIPHIER_PIN_DRV_3BIT,
425 			     133, UNIPHIER_PIN_PULL_DOWN),
426 	UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", 134,
427 			     85, UNIPHIER_PIN_DRV_3BIT,
428 			     134, UNIPHIER_PIN_PULL_DOWN),
429 	UNIPHIER_PINCTRL_PIN(135, "AO1IEC", 135,
430 			     86, UNIPHIER_PIN_DRV_3BIT,
431 			     135, UNIPHIER_PIN_PULL_DOWN),
432 	UNIPHIER_PINCTRL_PIN(136, "AO1ARC", 136,
433 			     87, UNIPHIER_PIN_DRV_3BIT,
434 			     136, UNIPHIER_PIN_PULL_DOWN),
435 	UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", 137,
436 			     88, UNIPHIER_PIN_DRV_3BIT,
437 			     137, UNIPHIER_PIN_PULL_DOWN),
438 	UNIPHIER_PINCTRL_PIN(138, "AO1BCK", 138,
439 			     89, UNIPHIER_PIN_DRV_3BIT,
440 			     138, UNIPHIER_PIN_PULL_DOWN),
441 	UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", 139,
442 			     90, UNIPHIER_PIN_DRV_3BIT,
443 			     139, UNIPHIER_PIN_PULL_DOWN),
444 	UNIPHIER_PINCTRL_PIN(140, "AO1D0", 140,
445 			     91, UNIPHIER_PIN_DRV_3BIT,
446 			     140, UNIPHIER_PIN_PULL_DOWN),
447 	UNIPHIER_PINCTRL_PIN(141, "AO1D1", 141,
448 			     92, UNIPHIER_PIN_DRV_3BIT,
449 			     141, UNIPHIER_PIN_PULL_DOWN),
450 	UNIPHIER_PINCTRL_PIN(142, "AO1D2", 142,
451 			     93, UNIPHIER_PIN_DRV_3BIT,
452 			     142, UNIPHIER_PIN_PULL_DOWN),
453 	UNIPHIER_PINCTRL_PIN(143, "HTPDN0", 143,
454 			     94, UNIPHIER_PIN_DRV_3BIT,
455 			     143, UNIPHIER_PIN_PULL_DOWN),
456 	UNIPHIER_PINCTRL_PIN(144, "LOCKN0", 144,
457 			     95, UNIPHIER_PIN_DRV_3BIT,
458 			     144, UNIPHIER_PIN_PULL_DOWN),
459 	UNIPHIER_PINCTRL_PIN(145, "HTPDN1", 145,
460 			     96, UNIPHIER_PIN_DRV_3BIT,
461 			     145, UNIPHIER_PIN_PULL_DOWN),
462 	UNIPHIER_PINCTRL_PIN(146, "LOCKN1", 146,
463 			     97, UNIPHIER_PIN_DRV_3BIT,
464 			     146, UNIPHIER_PIN_PULL_DOWN),
465 	UNIPHIER_PINCTRL_PIN(147, "PWMA", 147,
466 			     98, UNIPHIER_PIN_DRV_3BIT,
467 			     147, UNIPHIER_PIN_PULL_DOWN),
468 	UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", 148,
469 			     99, UNIPHIER_PIN_DRV_3BIT,
470 			     148, UNIPHIER_PIN_PULL_DOWN),
471 	UNIPHIER_PINCTRL_PIN(149, "XIRQ0", 149,
472 			     100, UNIPHIER_PIN_DRV_3BIT,
473 			     149, UNIPHIER_PIN_PULL_DOWN),
474 	UNIPHIER_PINCTRL_PIN(150, "XIRQ1", 150,
475 			     101, UNIPHIER_PIN_DRV_3BIT,
476 			     150, UNIPHIER_PIN_PULL_DOWN),
477 	UNIPHIER_PINCTRL_PIN(151, "XIRQ2", 151,
478 			     102, UNIPHIER_PIN_DRV_3BIT,
479 			     151, UNIPHIER_PIN_PULL_DOWN),
480 	UNIPHIER_PINCTRL_PIN(152, "XIRQ3", 152,
481 			     103, UNIPHIER_PIN_DRV_3BIT,
482 			     152, UNIPHIER_PIN_PULL_DOWN),
483 	UNIPHIER_PINCTRL_PIN(153, "XIRQ4", 153,
484 			     104, UNIPHIER_PIN_DRV_3BIT,
485 			     153, UNIPHIER_PIN_PULL_DOWN),
486 	UNIPHIER_PINCTRL_PIN(154, "XIRQ5", 154,
487 			     105, UNIPHIER_PIN_DRV_3BIT,
488 			     154, UNIPHIER_PIN_PULL_DOWN),
489 	UNIPHIER_PINCTRL_PIN(155, "XIRQ6", 155,
490 			     106, UNIPHIER_PIN_DRV_3BIT,
491 			     155, UNIPHIER_PIN_PULL_DOWN),
492 	UNIPHIER_PINCTRL_PIN(156, "XIRQ7", 156,
493 			     107, UNIPHIER_PIN_DRV_3BIT,
494 			     156, UNIPHIER_PIN_PULL_DOWN),
495 	UNIPHIER_PINCTRL_PIN(157, "XIRQ8", 157,
496 			     108, UNIPHIER_PIN_DRV_3BIT,
497 			     157, UNIPHIER_PIN_PULL_DOWN),
498 	UNIPHIER_PINCTRL_PIN(158, "XIRQ9", 158,
499 			     109, UNIPHIER_PIN_DRV_3BIT,
500 			     158, UNIPHIER_PIN_PULL_DOWN),
501 	UNIPHIER_PINCTRL_PIN(159, "XIRQ10", 159,
502 			     110, UNIPHIER_PIN_DRV_3BIT,
503 			     159, UNIPHIER_PIN_PULL_DOWN),
504 	UNIPHIER_PINCTRL_PIN(160, "XIRQ11", 160,
505 			     111, UNIPHIER_PIN_DRV_3BIT,
506 			     160, UNIPHIER_PIN_PULL_DOWN),
507 	UNIPHIER_PINCTRL_PIN(161, "XIRQ13", 161,
508 			     112, UNIPHIER_PIN_DRV_3BIT,
509 			     161, UNIPHIER_PIN_PULL_DOWN),
510 	UNIPHIER_PINCTRL_PIN(162, "XIRQ14", 162,
511 			     113, UNIPHIER_PIN_DRV_3BIT,
512 			     162, UNIPHIER_PIN_PULL_DOWN),
513 	UNIPHIER_PINCTRL_PIN(163, "XIRQ16", 163,
514 			     114, UNIPHIER_PIN_DRV_3BIT,
515 			     163, UNIPHIER_PIN_PULL_DOWN),
516 	UNIPHIER_PINCTRL_PIN(164, "XIRQ17", 164,
517 			     115, UNIPHIER_PIN_DRV_3BIT,
518 			     164, UNIPHIER_PIN_PULL_DOWN),
519 	UNIPHIER_PINCTRL_PIN(165, "XIRQ18", 165,
520 			     116, UNIPHIER_PIN_DRV_3BIT,
521 			     165, UNIPHIER_PIN_PULL_DOWN),
522 	UNIPHIER_PINCTRL_PIN(166, "XIRQ19", 166,
523 			     117, UNIPHIER_PIN_DRV_3BIT,
524 			     166, UNIPHIER_PIN_PULL_DOWN),
525 	UNIPHIER_PINCTRL_PIN(167, "XIRQ20", 167,
526 			     118, UNIPHIER_PIN_DRV_3BIT,
527 			     167, UNIPHIER_PIN_PULL_DOWN),
528 	UNIPHIER_PINCTRL_PIN(168, "PORT00", 168,
529 			     119, UNIPHIER_PIN_DRV_3BIT,
530 			     168, UNIPHIER_PIN_PULL_DOWN),
531 	UNIPHIER_PINCTRL_PIN(169, "PORT01", 169,
532 			     120, UNIPHIER_PIN_DRV_3BIT,
533 			     169, UNIPHIER_PIN_PULL_DOWN),
534 	UNIPHIER_PINCTRL_PIN(170, "PORT02", 170,
535 			     121, UNIPHIER_PIN_DRV_3BIT,
536 			     170, UNIPHIER_PIN_PULL_DOWN),
537 	UNIPHIER_PINCTRL_PIN(171, "PORT03", 171,
538 			     122, UNIPHIER_PIN_DRV_3BIT,
539 			     171, UNIPHIER_PIN_PULL_DOWN),
540 	UNIPHIER_PINCTRL_PIN(172, "PORT04", 172,
541 			     123, UNIPHIER_PIN_DRV_3BIT,
542 			     172, UNIPHIER_PIN_PULL_DOWN),
543 	UNIPHIER_PINCTRL_PIN(173, "CK27FO", 173,
544 			     124, UNIPHIER_PIN_DRV_3BIT,
545 			     173, UNIPHIER_PIN_PULL_DOWN),
546 	UNIPHIER_PINCTRL_PIN(174, "PHSYNCO", 174,
547 			     125, UNIPHIER_PIN_DRV_3BIT,
548 			     174, UNIPHIER_PIN_PULL_DOWN),
549 	UNIPHIER_PINCTRL_PIN(175, "PVSYNCO", 175,
550 			     126, UNIPHIER_PIN_DRV_3BIT,
551 			     175, UNIPHIER_PIN_PULL_DOWN),
552 };
553 
554 static const unsigned emmc_pins[] = {18, 19, 20, 21, 22, 23, 24, 25};
555 static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0};
556 static const unsigned emmc_dat8_pins[] = {26, 27, 28, 29};
557 static const int emmc_dat8_muxvals[] = {0, 0, 0, 0};
558 static const unsigned ether_rgmii_pins[] = {30, 31, 32, 33, 34, 35, 36, 37, 38,
559 					    39, 40, 41, 42, 43, 44, 45};
560 static const int ether_rgmii_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
561 					  0, 0, 0, 0};
562 static const unsigned ether_rmii_pins[] = {30, 31, 32, 33, 34, 35, 36, 37, 39,
563 					   41, 42, 45};
564 static const int ether_rmii_muxvals[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
565 static const unsigned i2c0_pins[] = {63, 64};
566 static const int i2c0_muxvals[] = {0, 0};
567 static const unsigned i2c1_pins[] = {65, 66};
568 static const int i2c1_muxvals[] = {0, 0};
569 static const unsigned i2c3_pins[] = {67, 68};
570 static const int i2c3_muxvals[] = {1, 1};
571 static const unsigned i2c4_pins[] = {61, 62};
572 static const int i2c4_muxvals[] = {1, 1};
573 static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
574 				     15, 16, 17};
575 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
576 static const unsigned sd_pins[] = {10, 11, 12, 13, 14, 15, 16, 17};
577 static const int sd_muxvals[] = {3, 3, 3, 3, 3, 3, 3, 3};  /* No SDVOLC */
578 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
579 					   14, 15, 16, 17};
580 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581 					 2};
582 static const unsigned system_bus_cs1_pins[] = {0};
583 static const int system_bus_cs1_muxvals[] = {0};
584 static const unsigned uart0_pins[] = {54, 55};
585 static const int uart0_muxvals[] = {0, 0};
586 static const unsigned uart1_pins[] = {58, 59};
587 static const int uart1_muxvals[] = {1, 1};
588 static const unsigned uart2_pins[] = {90, 91};
589 static const int uart2_muxvals[] = {1, 1};
590 static const unsigned uart3_pins[] = {94, 95};
591 static const int uart3_muxvals[] = {1, 1};
592 static const unsigned usb0_pins[] = {46, 47};
593 static const int usb0_muxvals[] = {0, 0};
594 static const unsigned usb1_pins[] = {48, 49};
595 static const int usb1_muxvals[] = {0, 0};
596 static const unsigned usb2_pins[] = {50, 51};
597 static const int usb2_muxvals[] = {0, 0};
598 static const unsigned usb3_pins[] = {52, 53};
599 static const int usb3_muxvals[] = {0, 0};
600 static const unsigned port_range_pins[] = {
601 	168, 169, 170, 171, 172, 173, 174, 175,		/* PORT0x */
602 	0, 1, 2, 3, 4, 5, 6, 7,				/* PORT1x */
603 	8, 9, 10, 11, 12, 13, 14, 15,			/* PORT2x */
604 	16, 17, 18, 30, 31, 32, 33, 34,			/* PORT3x */
605 	35, 36, 37, 38, 39, 40, 41, 42,			/* PORT4x */
606 	43, 44, 45, 46, 47, 48, 49, 50,			/* PORT5x */
607 	51, 52, 53, 54, 55, 56, 57, 58,			/* PORT6x */
608 	59, 60, 69, 70, 71, 72, 73, 74,			/* PORT7x */
609 	75, 76, 77, 78, 79, 80, 81, 82,			/* PORT8x */
610 	83, 84, 85, 86, 87, 88, 89, 90,			/* PORT9x */
611 	91, 92, 93, 94, 95, 96, 97, 98,			/* PORT10x */
612 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT11x */
613 	99, 100, 101, 102, 103, 104, 105, 106,		/* PORT12x */
614 	107, 108, 109, 110, 111, 112, 113, 114,		/* PORT13x */
615 	115, 116, 117, 118, 119, 120, 121, 122,		/* PORT14x */
616 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT15x */
617 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT16x */
618 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT17x */
619 	61, 62, 63, 64, 65, 66, 67, 68,			/* PORT18x */
620 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT19x */
621 	123, 124, 125, 126, 127, 128, 129, 130,		/* PORT20x */
622 	131, 132, 133, 134, 135, 136, 137, 138,		/* PORT21x */
623 	139, 140, 141, 142, 143, 144, 145, 146,		/* PORT22x */
624 	147, 148, 149, 150, 151, 152, 153, 154,		/* PORT23x */
625 	155, 156, 157, 158, 159, 160, 161, 162,		/* PORT24x */
626 	163, 164, 165, 166, 167,			/* PORT25x */
627 };
628 static const int port_range_muxvals[] = {
629 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT0x */
630 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT1x */
631 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT2x */
632 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT3x */
633 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT4x */
634 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT5x */
635 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT6x */
636 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT7x */
637 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT8x */
638 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT9x */
639 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT10x */
640 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT11x */
641 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT12x */
642 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT13x */
643 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT14x */
644 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT15x */
645 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT16x */
646 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT17x */
647 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT18x */
648 	-1, -1, -1, -1, -1, -1, -1, -1,			/* PORT19x */
649 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT20x */
650 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT21x */
651 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT22x */
652 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT23x */
653 	15, 15, 15, 15, 15, 15, 15, 15,			/* PORT24x */
654 	15, 15, 15, 15, 15,				/* PORT25x */
655 };
656 static const unsigned xirq_pins[] = {
657 	149, 150, 151, 152, 153, 154, 155, 156,		/* XIRQ0-7 */
658 	157, 158, 159, 160, 85, 161, 162, 84,		/* XIRQ8-15 */
659 	163, 164, 165, 166, 167, 146, 52, 53,		/* XIRQ16-23 */
660 };
661 static const int xirq_muxvals[] = {
662 	14, 14, 14, 14, 14, 14, 14, 14,			/* XIRQ0-7 */
663 	14, 14, 14, 14, 13, 14, 14, 13,			/* XIRQ8-15 */
664 	14, 14, 14, 14, 14, 14, 14, 14,			/* XIRQ16-23 */
665 };
666 static const unsigned xirq_alternatives_pins[] = {
667 	94, 95, 96, 97, 98, 99, 100, 101,		/* XIRQ0-7 */
668 	102, 103, 104, 105, 106, 107,			/* XIRQ8-11,13,14 */
669 	108, 109, 110, 111, 112, 147, 141, 142,		/* XIRQ16-23 */
670 };
671 static const int xirq_alternatives_muxvals[] = {
672 	14, 14, 14, 14, 14, 14, 14, 14,			/* XIRQ0-7 */
673 	14, 14, 14, 14, 14, 14,				/* XIRQ8-11,13,14 */
674 	14, 14, 14, 14, 14, 14, 14, 14,			/* XIRQ16-23 */
675 };
676 
677 static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = {
678 	UNIPHIER_PINCTRL_GROUP(emmc),
679 	UNIPHIER_PINCTRL_GROUP(emmc_dat8),
680 	UNIPHIER_PINCTRL_GROUP(ether_rgmii),
681 	UNIPHIER_PINCTRL_GROUP(ether_rmii),
682 	UNIPHIER_PINCTRL_GROUP(i2c0),
683 	UNIPHIER_PINCTRL_GROUP(i2c1),
684 	UNIPHIER_PINCTRL_GROUP(i2c3),
685 	UNIPHIER_PINCTRL_GROUP(i2c4),
686 	UNIPHIER_PINCTRL_GROUP(nand),
687 	UNIPHIER_PINCTRL_GROUP(sd),
688 	UNIPHIER_PINCTRL_GROUP(system_bus),
689 	UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
690 	UNIPHIER_PINCTRL_GROUP(uart0),
691 	UNIPHIER_PINCTRL_GROUP(uart1),
692 	UNIPHIER_PINCTRL_GROUP(uart2),
693 	UNIPHIER_PINCTRL_GROUP(uart3),
694 	UNIPHIER_PINCTRL_GROUP(usb0),
695 	UNIPHIER_PINCTRL_GROUP(usb1),
696 	UNIPHIER_PINCTRL_GROUP(usb2),
697 	UNIPHIER_PINCTRL_GROUP(usb3),
698 	UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range),
699 	UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq),
700 	UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives),
701 	UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range, 0),
702 	UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range, 1),
703 	UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range, 2),
704 	UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range, 3),
705 	UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range, 4),
706 	UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range, 5),
707 	UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range, 6),
708 	UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range, 7),
709 	UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range, 8),
710 	UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range, 9),
711 	UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range, 10),
712 	UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range, 11),
713 	UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range, 12),
714 	UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range, 13),
715 	UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range, 14),
716 	UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range, 15),
717 	UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range, 16),
718 	UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range, 17),
719 	UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range, 18),
720 	UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range, 19),
721 	UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range, 20),
722 	UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range, 21),
723 	UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range, 22),
724 	UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range, 23),
725 	UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range, 24),
726 	UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range, 25),
727 	UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range, 26),
728 	UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range, 27),
729 	UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range, 28),
730 	UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range, 29),
731 	UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range, 30),
732 	UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range, 31),
733 	UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range, 32),
734 	UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range, 33),
735 	UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range, 34),
736 	UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range, 35),
737 	UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range, 36),
738 	UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range, 37),
739 	UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range, 38),
740 	UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range, 39),
741 	UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range, 40),
742 	UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range, 41),
743 	UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range, 42),
744 	UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range, 43),
745 	UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range, 44),
746 	UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range, 45),
747 	UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range, 46),
748 	UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range, 47),
749 	UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range, 48),
750 	UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range, 49),
751 	UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range, 50),
752 	UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range, 51),
753 	UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range, 52),
754 	UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range, 53),
755 	UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range, 54),
756 	UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range, 55),
757 	UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range, 56),
758 	UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range, 57),
759 	UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range, 58),
760 	UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range, 59),
761 	UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range, 60),
762 	UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range, 61),
763 	UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range, 62),
764 	UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range, 63),
765 	UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range, 64),
766 	UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range, 65),
767 	UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range, 66),
768 	UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range, 67),
769 	UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range, 68),
770 	UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range, 69),
771 	UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range, 70),
772 	UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range, 71),
773 	UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range, 72),
774 	UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range, 73),
775 	UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range, 74),
776 	UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range, 75),
777 	UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range, 76),
778 	UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range, 77),
779 	UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range, 78),
780 	UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range, 79),
781 	UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range, 80),
782 	UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range, 81),
783 	UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range, 82),
784 	UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range, 83),
785 	UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range, 84),
786 	UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range, 85),
787 	UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range, 86),
788 	UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range, 87),
789 	UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range, 96),
790 	UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range, 97),
791 	UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range, 98),
792 	UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range, 99),
793 	UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range, 100),
794 	UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range, 101),
795 	UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range, 102),
796 	UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range, 103),
797 	UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range, 104),
798 	UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range, 105),
799 	UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range, 106),
800 	UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range, 107),
801 	UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range, 108),
802 	UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range, 109),
803 	UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range, 110),
804 	UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range, 111),
805 	UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range, 112),
806 	UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range, 113),
807 	UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range, 114),
808 	UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range, 115),
809 	UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range, 116),
810 	UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range, 117),
811 	UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range, 118),
812 	UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range, 119),
813 	UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range, 144),
814 	UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range, 145),
815 	UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range, 146),
816 	UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range, 147),
817 	UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range, 148),
818 	UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range, 149),
819 	UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range, 150),
820 	UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range, 151),
821 	UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range, 160),
822 	UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range, 161),
823 	UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range, 162),
824 	UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range, 163),
825 	UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range, 164),
826 	UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range, 165),
827 	UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range, 166),
828 	UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range, 167),
829 	UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range, 168),
830 	UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range, 169),
831 	UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range, 170),
832 	UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range, 171),
833 	UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range, 172),
834 	UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range, 173),
835 	UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range, 174),
836 	UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range, 175),
837 	UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range, 176),
838 	UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range, 177),
839 	UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range, 178),
840 	UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range, 179),
841 	UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range, 180),
842 	UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range, 181),
843 	UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range, 182),
844 	UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range, 183),
845 	UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range, 184),
846 	UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range, 185),
847 	UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range, 186),
848 	UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range, 187),
849 	UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range, 188),
850 	UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range, 189),
851 	UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range, 190),
852 	UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range, 191),
853 	UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range, 192),
854 	UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range, 193),
855 	UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range, 194),
856 	UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range, 195),
857 	UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range, 196),
858 	UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range, 197),
859 	UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range, 198),
860 	UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range, 199),
861 	UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range, 200),
862 	UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range, 201),
863 	UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range, 202),
864 	UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range, 203),
865 	UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range, 204),
866 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0),
867 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1),
868 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2),
869 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3, xirq, 3),
870 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4, xirq, 4),
871 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5, xirq, 5),
872 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6, xirq, 6),
873 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7, xirq, 7),
874 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8, xirq, 8),
875 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9, xirq, 9),
876 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10, xirq, 10),
877 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11, xirq, 11),
878 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq12, xirq, 12),
879 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13, xirq, 13),
880 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14, xirq, 14),
881 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq15, xirq, 15),
882 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16, xirq, 16),
883 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17, xirq, 17),
884 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18, xirq, 18),
885 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19, xirq, 19),
886 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20, xirq, 20),
887 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21, xirq, 21),
888 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22, xirq, 22),
889 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23, xirq, 23),
890 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0b, xirq_alternatives, 0),
891 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1b, xirq_alternatives, 1),
892 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2b, xirq_alternatives, 2),
893 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq3b, xirq_alternatives, 3),
894 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq4b, xirq_alternatives, 4),
895 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq5b, xirq_alternatives, 5),
896 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq6b, xirq_alternatives, 6),
897 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq7b, xirq_alternatives, 7),
898 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq8b, xirq_alternatives, 8),
899 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq9b, xirq_alternatives, 9),
900 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq10b, xirq_alternatives, 10),
901 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq11b, xirq_alternatives, 11),
902 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq13b, xirq_alternatives, 12),
903 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq14b, xirq_alternatives, 13),
904 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq16b, xirq_alternatives, 14),
905 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq17b, xirq_alternatives, 15),
906 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq18b, xirq_alternatives, 16),
907 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq19b, xirq_alternatives, 17),
908 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq20b, xirq_alternatives, 18),
909 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq21b, xirq_alternatives, 19),
910 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq22b, xirq_alternatives, 20),
911 	UNIPHIER_PINCTRL_GROUP_SINGLE(xirq23b, xirq_alternatives, 21),
912 };
913 
914 static const char * const emmc_groups[] = {"emmc", "emmc_dat8"};
915 static const char * const ether_rgmii_groups[] = {"ether_rgmii"};
916 static const char * const ether_rmii_groups[] = {"ether_rmii"};
917 static const char * const i2c0_groups[] = {"i2c0"};
918 static const char * const i2c1_groups[] = {"i2c1"};
919 static const char * const i2c3_groups[] = {"i2c3"};
920 static const char * const i2c4_groups[] = {"i2c4"};
921 static const char * const nand_groups[] = {"nand"};
922 static const char * const sd_groups[] = {"sd"};
923 static const char * const system_bus_groups[] = {"system_bus",
924 						 "system_bus_cs1"};
925 static const char * const uart0_groups[] = {"uart0"};
926 static const char * const uart1_groups[] = {"uart1"};
927 static const char * const uart2_groups[] = {"uart2"};
928 static const char * const uart3_groups[] = {"uart3"};
929 static const char * const usb0_groups[] = {"usb0"};
930 static const char * const usb1_groups[] = {"usb1"};
931 static const char * const usb2_groups[] = {"usb2"};
932 static const char * const usb3_groups[] = {"usb3"};
933 static const char * const port_groups[] = {
934 	"port00", "port01", "port02", "port03",
935 	"port04", "port05", "port06", "port07",
936 	"port10", "port11", "port12", "port13",
937 	"port14", "port15", "port16", "port17",
938 	"port20", "port21", "port22", "port23",
939 	"port24", "port25", "port26", "port27",
940 	"port30", "port31", "port32", "port33",
941 	"port34", "port35", "port36", "port37",
942 	"port40", "port41", "port42", "port43",
943 	"port44", "port45", "port46", "port47",
944 	"port50", "port51", "port52", "port53",
945 	"port54", "port55", "port56", "port57",
946 	"port60", "port61", "port62", "port63",
947 	"port64", "port65", "port66", "port67",
948 	"port70", "port71", "port72", "port73",
949 	"port74", "port75", "port76", "port77",
950 	"port80", "port81", "port82", "port83",
951 	"port84", "port85", "port86", "port87",
952 	"port90", "port91", "port92", "port93",
953 	"port94", "port95", "port96", "port97",
954 	"port100", "port101", "port102", "port103",
955 	"port104", "port105", "port106", "port107",
956 	/* port110-117 missing */
957 	"port120", "port121", "port122", "port123",
958 	"port124", "port125", "port126", "port127",
959 	"port130", "port131", "port132", "port133",
960 	"port134", "port135", "port136", "port137",
961 	"port140", "port141", "port142", "port143",
962 	"port144", "port145", "port146", "port147",
963 	/* port150-177 missing */
964 	"port180", "port181", "port182", "port183",
965 	"port184", "port185", "port186", "port187",
966 	/* port190-197 missing */
967 	"port200", "port201", "port202", "port203",
968 	"port204", "port205", "port206", "port207",
969 	"port210", "port211", "port212", "port213",
970 	"port214", "port215", "port216", "port217",
971 	"port220", "port221", "port222", "port223",
972 	"port224", "port225", "port226", "port227",
973 	"port230", "port231", "port232", "port233",
974 	"port234", "port235", "port236", "port237",
975 	"port240", "port241", "port242", "port243",
976 	"port244", "port245", "port246", "port247",
977 	"port250", "port251", "port252", "port253",
978 	"port254",
979 };
980 static const char * const xirq_groups[] = {
981 	"xirq0",  "xirq1",  "xirq2",  "xirq3",
982 	"xirq4",  "xirq5",  "xirq6",  "xirq7",
983 	"xirq8",  "xirq9",  "xirq10", "xirq11",
984 	"xirq12", "xirq13", "xirq14", "xirq15",
985 	"xirq16", "xirq17", "xirq18", "xirq19",
986 	"xirq20", "xirq21", "xirq22", "xirq23",
987 	"xirq0b",  "xirq1b",  "xirq2b",  "xirq3b",
988 	"xirq4b",  "xirq5b",  "xirq6b",  "xirq7b",
989 	"xirq8b",  "xirq9b",  "xirq10b", "xirq11b",
990 	/* none */ "xirq13b", "xirq14b", /* none */
991 	"xirq16b", "xirq17b", "xirq18b", "xirq19b",
992 	"xirq20b", "xirq21b", "xirq22b", "xirq23b",
993 };
994 
995 static const struct uniphier_pinmux_function uniphier_ld20_functions[] = {
996 	UNIPHIER_PINMUX_FUNCTION(emmc),
997 	UNIPHIER_PINMUX_FUNCTION(ether_rgmii),
998 	UNIPHIER_PINMUX_FUNCTION(ether_rmii),
999 	UNIPHIER_PINMUX_FUNCTION(i2c0),
1000 	UNIPHIER_PINMUX_FUNCTION(i2c1),
1001 	UNIPHIER_PINMUX_FUNCTION(i2c3),
1002 	UNIPHIER_PINMUX_FUNCTION(i2c4),
1003 	UNIPHIER_PINMUX_FUNCTION(nand),
1004 	UNIPHIER_PINMUX_FUNCTION(sd),
1005 	UNIPHIER_PINMUX_FUNCTION(system_bus),
1006 	UNIPHIER_PINMUX_FUNCTION(uart0),
1007 	UNIPHIER_PINMUX_FUNCTION(uart1),
1008 	UNIPHIER_PINMUX_FUNCTION(uart2),
1009 	UNIPHIER_PINMUX_FUNCTION(uart3),
1010 	UNIPHIER_PINMUX_FUNCTION(usb0),
1011 	UNIPHIER_PINMUX_FUNCTION(usb1),
1012 	UNIPHIER_PINMUX_FUNCTION(usb2),
1013 	UNIPHIER_PINMUX_FUNCTION(usb3),
1014 	UNIPHIER_PINMUX_FUNCTION(port),
1015 	UNIPHIER_PINMUX_FUNCTION(xirq),
1016 };
1017 
1018 static struct uniphier_pinctrl_socdata uniphier_ld20_pindata = {
1019 	.pins = uniphier_ld20_pins,
1020 	.npins = ARRAY_SIZE(uniphier_ld20_pins),
1021 	.groups = uniphier_ld20_groups,
1022 	.groups_count = ARRAY_SIZE(uniphier_ld20_groups),
1023 	.functions = uniphier_ld20_functions,
1024 	.functions_count = ARRAY_SIZE(uniphier_ld20_functions),
1025 	.caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL,
1026 };
1027 
1028 static int uniphier_ld20_pinctrl_probe(struct platform_device *pdev)
1029 {
1030 	return uniphier_pinctrl_probe(pdev, &uniphier_ld20_pindata);
1031 }
1032 
1033 static const struct of_device_id uniphier_ld20_pinctrl_match[] = {
1034 	{ .compatible = "socionext,uniphier-ld20-pinctrl" },
1035 	{ /* sentinel */ }
1036 };
1037 MODULE_DEVICE_TABLE(of, uniphier_ld20_pinctrl_match);
1038 
1039 static struct platform_driver uniphier_ld20_pinctrl_driver = {
1040 	.probe = uniphier_ld20_pinctrl_probe,
1041 	.driver = {
1042 		.name = "uniphier-ld20-pinctrl",
1043 		.of_match_table = uniphier_ld20_pinctrl_match,
1044 	},
1045 };
1046 module_platform_driver(uniphier_ld20_pinctrl_driver);
1047 
1048 MODULE_AUTHOR("Masahiro Yamada <yamada.masahiro@socionext.com>");
1049 MODULE_DESCRIPTION("UniPhier PH1-LD20 pinctrl driver");
1050 MODULE_LICENSE("GPL");
1051