GNU Linux-libre 5.10.219-gnu1
[releases.git] / drivers / pinctrl / uniphier / pinctrl-uniphier-pxs3.c
1 // SPDX-License-Identifier: GPL-2.0+
2 //
3 // Copyright (C) 2017 Socionext Inc.
4 //   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
5
6 #include <linux/init.h>
7 #include <linux/kernel.h>
8 #include <linux/mod_devicetable.h>
9 #include <linux/pinctrl/pinctrl.h>
10 #include <linux/platform_device.h>
11
12 #include "pinctrl-uniphier.h"
13
14 static const struct pinctrl_pin_desc uniphier_pxs3_pins[] = {
15         UNIPHIER_PINCTRL_PIN(0, "LPST", UNIPHIER_PIN_IECTRL_EXIST,
16                              0, UNIPHIER_PIN_DRV_3BIT,
17                              0, UNIPHIER_PIN_PULL_DOWN),
18         UNIPHIER_PINCTRL_PIN(1, "ED0", UNIPHIER_PIN_IECTRL_EXIST,
19                              1, UNIPHIER_PIN_DRV_3BIT,
20                              1, UNIPHIER_PIN_PULL_DOWN),
21         UNIPHIER_PINCTRL_PIN(2, "ED1", UNIPHIER_PIN_IECTRL_EXIST,
22                              2, UNIPHIER_PIN_DRV_3BIT,
23                              2, UNIPHIER_PIN_PULL_DOWN),
24         UNIPHIER_PINCTRL_PIN(3, "ED2", UNIPHIER_PIN_IECTRL_EXIST,
25                              3, UNIPHIER_PIN_DRV_3BIT,
26                              3, UNIPHIER_PIN_PULL_DOWN),
27         UNIPHIER_PINCTRL_PIN(4, "ED3", UNIPHIER_PIN_IECTRL_EXIST,
28                              4, UNIPHIER_PIN_DRV_3BIT,
29                              4, UNIPHIER_PIN_PULL_DOWN),
30         UNIPHIER_PINCTRL_PIN(5, "ED4", UNIPHIER_PIN_IECTRL_EXIST,
31                              5, UNIPHIER_PIN_DRV_3BIT,
32                              5, UNIPHIER_PIN_PULL_DOWN),
33         UNIPHIER_PINCTRL_PIN(6, "ED5", UNIPHIER_PIN_IECTRL_EXIST,
34                              6, UNIPHIER_PIN_DRV_3BIT,
35                              6, UNIPHIER_PIN_PULL_DOWN),
36         UNIPHIER_PINCTRL_PIN(7, "ED6", UNIPHIER_PIN_IECTRL_EXIST,
37                              7, UNIPHIER_PIN_DRV_3BIT,
38                              7, UNIPHIER_PIN_PULL_DOWN),
39         UNIPHIER_PINCTRL_PIN(8, "ED7", UNIPHIER_PIN_IECTRL_EXIST,
40                              8, UNIPHIER_PIN_DRV_3BIT,
41                              8, UNIPHIER_PIN_PULL_DOWN),
42         UNIPHIER_PINCTRL_PIN(9, "XERWE0", UNIPHIER_PIN_IECTRL_EXIST,
43                              9, UNIPHIER_PIN_DRV_3BIT,
44                              9, UNIPHIER_PIN_PULL_DOWN),
45         UNIPHIER_PINCTRL_PIN(10, "XERWE1", UNIPHIER_PIN_IECTRL_EXIST,
46                              10, UNIPHIER_PIN_DRV_3BIT,
47                              10, UNIPHIER_PIN_PULL_DOWN),
48         UNIPHIER_PINCTRL_PIN(11, "ERXW", UNIPHIER_PIN_IECTRL_EXIST,
49                              11, UNIPHIER_PIN_DRV_3BIT,
50                              11, UNIPHIER_PIN_PULL_DOWN),
51         UNIPHIER_PINCTRL_PIN(12, "ES0", UNIPHIER_PIN_IECTRL_EXIST,
52                              12, UNIPHIER_PIN_DRV_3BIT,
53                              12, UNIPHIER_PIN_PULL_DOWN),
54         UNIPHIER_PINCTRL_PIN(13, "ES1", UNIPHIER_PIN_IECTRL_EXIST,
55                              13, UNIPHIER_PIN_DRV_3BIT,
56                              13, UNIPHIER_PIN_PULL_DOWN),
57         UNIPHIER_PINCTRL_PIN(14, "ES2", UNIPHIER_PIN_IECTRL_EXIST,
58                              14, UNIPHIER_PIN_DRV_3BIT,
59                              14, UNIPHIER_PIN_PULL_DOWN),
60         UNIPHIER_PINCTRL_PIN(15, "XECS1", UNIPHIER_PIN_IECTRL_EXIST,
61                              15, UNIPHIER_PIN_DRV_3BIT,
62                              15, UNIPHIER_PIN_PULL_UP),
63         UNIPHIER_PINCTRL_PIN(16, "XNFWP", UNIPHIER_PIN_IECTRL_EXIST,
64                              16, UNIPHIER_PIN_DRV_3BIT,
65                              16, UNIPHIER_PIN_PULL_DOWN),
66         UNIPHIER_PINCTRL_PIN(17, "XNFCE0", UNIPHIER_PIN_IECTRL_EXIST,
67                              17, UNIPHIER_PIN_DRV_3BIT,
68                              17, UNIPHIER_PIN_PULL_UP),
69         UNIPHIER_PINCTRL_PIN(18, "NFRYBY0", UNIPHIER_PIN_IECTRL_EXIST,
70                              18, UNIPHIER_PIN_DRV_3BIT,
71                              18, UNIPHIER_PIN_PULL_UP),
72         UNIPHIER_PINCTRL_PIN(19, "XNFRE", UNIPHIER_PIN_IECTRL_EXIST,
73                              19, UNIPHIER_PIN_DRV_3BIT,
74                              19, UNIPHIER_PIN_PULL_UP),
75         UNIPHIER_PINCTRL_PIN(20, "XNFWE", UNIPHIER_PIN_IECTRL_EXIST,
76                              20, UNIPHIER_PIN_DRV_3BIT,
77                              20, UNIPHIER_PIN_PULL_UP),
78         UNIPHIER_PINCTRL_PIN(21, "NFALE", UNIPHIER_PIN_IECTRL_EXIST,
79                              21, UNIPHIER_PIN_DRV_3BIT,
80                              21, UNIPHIER_PIN_PULL_UP),
81         UNIPHIER_PINCTRL_PIN(22, "NFCLE", UNIPHIER_PIN_IECTRL_EXIST,
82                              22, UNIPHIER_PIN_DRV_3BIT,
83                              22, UNIPHIER_PIN_PULL_UP),
84         UNIPHIER_PINCTRL_PIN(23, "NFD0", UNIPHIER_PIN_IECTRL_EXIST,
85                              23, UNIPHIER_PIN_DRV_3BIT,
86                              23, UNIPHIER_PIN_PULL_UP),
87         UNIPHIER_PINCTRL_PIN(24, "NFD1", UNIPHIER_PIN_IECTRL_EXIST,
88                              24, UNIPHIER_PIN_DRV_3BIT,
89                              24, UNIPHIER_PIN_PULL_UP),
90         UNIPHIER_PINCTRL_PIN(25, "NFD2", UNIPHIER_PIN_IECTRL_EXIST,
91                              25, UNIPHIER_PIN_DRV_3BIT,
92                              25, UNIPHIER_PIN_PULL_UP),
93         UNIPHIER_PINCTRL_PIN(26, "NFD3", UNIPHIER_PIN_IECTRL_EXIST,
94                              26, UNIPHIER_PIN_DRV_3BIT,
95                              26, UNIPHIER_PIN_PULL_UP),
96         UNIPHIER_PINCTRL_PIN(27, "NFD4", UNIPHIER_PIN_IECTRL_EXIST,
97                              27, UNIPHIER_PIN_DRV_3BIT,
98                              27, UNIPHIER_PIN_PULL_UP),
99         UNIPHIER_PINCTRL_PIN(28, "NFD5", UNIPHIER_PIN_IECTRL_EXIST,
100                              28, UNIPHIER_PIN_DRV_3BIT,
101                              28, UNIPHIER_PIN_PULL_UP),
102         UNIPHIER_PINCTRL_PIN(29, "NFD6", UNIPHIER_PIN_IECTRL_EXIST,
103                              29, UNIPHIER_PIN_DRV_3BIT,
104                              29, UNIPHIER_PIN_PULL_UP),
105         UNIPHIER_PINCTRL_PIN(30, "NFD7", UNIPHIER_PIN_IECTRL_EXIST,
106                              30, UNIPHIER_PIN_DRV_3BIT,
107                              30, UNIPHIER_PIN_PULL_UP),
108         UNIPHIER_PINCTRL_PIN(31, "XERST", UNIPHIER_PIN_IECTRL_EXIST,
109                              0, UNIPHIER_PIN_DRV_2BIT,
110                              31, UNIPHIER_PIN_PULL_DOWN),
111         UNIPHIER_PINCTRL_PIN(32, "MMCCLK", UNIPHIER_PIN_IECTRL_EXIST,
112                              1, UNIPHIER_PIN_DRV_2BIT,
113                              32, UNIPHIER_PIN_PULL_DOWN),
114         UNIPHIER_PINCTRL_PIN(33, "MMCCMD", UNIPHIER_PIN_IECTRL_EXIST,
115                              2, UNIPHIER_PIN_DRV_2BIT,
116                              33, UNIPHIER_PIN_PULL_UP),
117         UNIPHIER_PINCTRL_PIN(34, "MMCDS", UNIPHIER_PIN_IECTRL_EXIST,
118                              3, UNIPHIER_PIN_DRV_2BIT,
119                              34, UNIPHIER_PIN_PULL_DOWN),
120         UNIPHIER_PINCTRL_PIN(35, "MMCDAT0", UNIPHIER_PIN_IECTRL_EXIST,
121                              4, UNIPHIER_PIN_DRV_2BIT,
122                              35, UNIPHIER_PIN_PULL_UP),
123         UNIPHIER_PINCTRL_PIN(36, "MMCDAT1", UNIPHIER_PIN_IECTRL_EXIST,
124                              5, UNIPHIER_PIN_DRV_2BIT,
125                              36, UNIPHIER_PIN_PULL_UP),
126         UNIPHIER_PINCTRL_PIN(37, "MMCDAT2", UNIPHIER_PIN_IECTRL_EXIST,
127                              6, UNIPHIER_PIN_DRV_2BIT,
128                              37, UNIPHIER_PIN_PULL_UP),
129         UNIPHIER_PINCTRL_PIN(38, "MMCDAT3", UNIPHIER_PIN_IECTRL_EXIST,
130                              7, UNIPHIER_PIN_DRV_2BIT,
131                              38, UNIPHIER_PIN_PULL_UP),
132         UNIPHIER_PINCTRL_PIN(39, "MMCDAT4", UNIPHIER_PIN_IECTRL_EXIST,
133                              8, UNIPHIER_PIN_DRV_2BIT,
134                              39, UNIPHIER_PIN_PULL_UP),
135         UNIPHIER_PINCTRL_PIN(40, "MMCDAT5", UNIPHIER_PIN_IECTRL_EXIST,
136                              9, UNIPHIER_PIN_DRV_2BIT,
137                              40, UNIPHIER_PIN_PULL_UP),
138         UNIPHIER_PINCTRL_PIN(41, "MMCDAT6", UNIPHIER_PIN_IECTRL_EXIST,
139                              10, UNIPHIER_PIN_DRV_2BIT,
140                              41, UNIPHIER_PIN_PULL_UP),
141         UNIPHIER_PINCTRL_PIN(42, "MMCDAT7", UNIPHIER_PIN_IECTRL_EXIST,
142                              11, UNIPHIER_PIN_DRV_2BIT,
143                              42, UNIPHIER_PIN_PULL_UP),
144         UNIPHIER_PINCTRL_PIN(43, "SDCLK", UNIPHIER_PIN_IECTRL_EXIST,
145                              12, UNIPHIER_PIN_DRV_2BIT,
146                              43, UNIPHIER_PIN_PULL_UP),
147         UNIPHIER_PINCTRL_PIN(44, "SDCMD", UNIPHIER_PIN_IECTRL_EXIST,
148                              13, UNIPHIER_PIN_DRV_2BIT,
149                              44, UNIPHIER_PIN_PULL_UP),
150         UNIPHIER_PINCTRL_PIN(45, "SDDAT0", UNIPHIER_PIN_IECTRL_EXIST,
151                              14, UNIPHIER_PIN_DRV_2BIT,
152                              45, UNIPHIER_PIN_PULL_UP),
153         UNIPHIER_PINCTRL_PIN(46, "SDDAT1", UNIPHIER_PIN_IECTRL_EXIST,
154                              15, UNIPHIER_PIN_DRV_2BIT,
155                              46, UNIPHIER_PIN_PULL_UP),
156         UNIPHIER_PINCTRL_PIN(47, "SDDAT2", UNIPHIER_PIN_IECTRL_EXIST,
157                              16, UNIPHIER_PIN_DRV_2BIT,
158                              47, UNIPHIER_PIN_PULL_UP),
159         UNIPHIER_PINCTRL_PIN(48, "SDDAT3", UNIPHIER_PIN_IECTRL_EXIST,
160                              17, UNIPHIER_PIN_DRV_2BIT,
161                              48, UNIPHIER_PIN_PULL_UP),
162         UNIPHIER_PINCTRL_PIN(49, "SDCD", UNIPHIER_PIN_IECTRL_EXIST,
163                              31, UNIPHIER_PIN_DRV_3BIT,
164                              49, UNIPHIER_PIN_PULL_UP),
165         UNIPHIER_PINCTRL_PIN(50, "SDWP", UNIPHIER_PIN_IECTRL_EXIST,
166                              32, UNIPHIER_PIN_DRV_3BIT,
167                              50, UNIPHIER_PIN_PULL_UP),
168         UNIPHIER_PINCTRL_PIN(51, "SDVOLC", UNIPHIER_PIN_IECTRL_EXIST,
169                              33, UNIPHIER_PIN_DRV_3BIT,
170                              51, UNIPHIER_PIN_PULL_UP),
171         UNIPHIER_PINCTRL_PIN(52, "MDC0", UNIPHIER_PIN_IECTRL_EXIST,
172                              18, UNIPHIER_PIN_DRV_2BIT,
173                              52, UNIPHIER_PIN_PULL_UP),
174         UNIPHIER_PINCTRL_PIN(53, "MDIO0", UNIPHIER_PIN_IECTRL_EXIST,
175                              19, UNIPHIER_PIN_DRV_2BIT,
176                              53, UNIPHIER_PIN_PULL_UP),
177         UNIPHIER_PINCTRL_PIN(54, "MDIO0_INTL", UNIPHIER_PIN_IECTRL_EXIST,
178                              20, UNIPHIER_PIN_DRV_2BIT,
179                              54, UNIPHIER_PIN_PULL_UP),
180         UNIPHIER_PINCTRL_PIN(55, "PHYRSTL0", UNIPHIER_PIN_IECTRL_EXIST,
181                              21, UNIPHIER_PIN_DRV_2BIT,
182                              55, UNIPHIER_PIN_PULL_UP),
183         UNIPHIER_PINCTRL_PIN(56, "RGMII0_RXCLK", UNIPHIER_PIN_IECTRL_EXIST,
184                              22, UNIPHIER_PIN_DRV_2BIT,
185                              56, UNIPHIER_PIN_PULL_UP),
186         UNIPHIER_PINCTRL_PIN(57, "RGMII0_RXD0", UNIPHIER_PIN_IECTRL_EXIST,
187                              23, UNIPHIER_PIN_DRV_2BIT,
188                              57, UNIPHIER_PIN_PULL_UP),
189         UNIPHIER_PINCTRL_PIN(58, "RGMII0_RXD1", UNIPHIER_PIN_IECTRL_EXIST,
190                              24, UNIPHIER_PIN_DRV_2BIT,
191                              58, UNIPHIER_PIN_PULL_UP),
192         UNIPHIER_PINCTRL_PIN(59, "RGMII0_RXD2", UNIPHIER_PIN_IECTRL_EXIST,
193                              25, UNIPHIER_PIN_DRV_2BIT,
194                              59, UNIPHIER_PIN_PULL_UP),
195         UNIPHIER_PINCTRL_PIN(60, "RGMII0_RXD3", UNIPHIER_PIN_IECTRL_EXIST,
196                              26, UNIPHIER_PIN_DRV_2BIT,
197                              60, UNIPHIER_PIN_PULL_UP),
198         UNIPHIER_PINCTRL_PIN(61, "RGMII0_RXCTL", UNIPHIER_PIN_IECTRL_EXIST,
199                              27, UNIPHIER_PIN_DRV_2BIT,
200                              61, UNIPHIER_PIN_PULL_UP),
201         UNIPHIER_PINCTRL_PIN(62, "RGMII0_TXCLK", UNIPHIER_PIN_IECTRL_EXIST,
202                              28, UNIPHIER_PIN_DRV_2BIT,
203                              62, UNIPHIER_PIN_PULL_DOWN),
204         UNIPHIER_PINCTRL_PIN(63, "RGMII0_TXD0", UNIPHIER_PIN_IECTRL_EXIST,
205                              29, UNIPHIER_PIN_DRV_2BIT,
206                              63, UNIPHIER_PIN_PULL_DOWN),
207         UNIPHIER_PINCTRL_PIN(64, "RGMII0_TXD1", UNIPHIER_PIN_IECTRL_EXIST,
208                              30, UNIPHIER_PIN_DRV_2BIT,
209                              64, UNIPHIER_PIN_PULL_DOWN),
210         UNIPHIER_PINCTRL_PIN(65, "RGMII0_TXD2", UNIPHIER_PIN_IECTRL_EXIST,
211                              31, UNIPHIER_PIN_DRV_2BIT,
212                              65, UNIPHIER_PIN_PULL_DOWN),
213         UNIPHIER_PINCTRL_PIN(66, "RGMII0_TXD3", UNIPHIER_PIN_IECTRL_EXIST,
214                              32, UNIPHIER_PIN_DRV_2BIT,
215                              66, UNIPHIER_PIN_PULL_DOWN),
216         UNIPHIER_PINCTRL_PIN(67, "RGMII0_TXCTL", UNIPHIER_PIN_IECTRL_EXIST,
217                              33, UNIPHIER_PIN_DRV_2BIT,
218                              67, UNIPHIER_PIN_PULL_DOWN),
219         UNIPHIER_PINCTRL_PIN(68, "MDC1", UNIPHIER_PIN_IECTRL_EXIST,
220                              34, UNIPHIER_PIN_DRV_2BIT,
221                              68, UNIPHIER_PIN_PULL_UP),
222         UNIPHIER_PINCTRL_PIN(69, "MDIO1", UNIPHIER_PIN_IECTRL_EXIST,
223                              35, UNIPHIER_PIN_DRV_2BIT,
224                              69, UNIPHIER_PIN_PULL_UP),
225         UNIPHIER_PINCTRL_PIN(70, "MDIO1_INTL", UNIPHIER_PIN_IECTRL_EXIST,
226                              36, UNIPHIER_PIN_DRV_2BIT,
227                              70, UNIPHIER_PIN_PULL_UP),
228         UNIPHIER_PINCTRL_PIN(71, "PHYRSTL1", UNIPHIER_PIN_IECTRL_EXIST,
229                              37, UNIPHIER_PIN_DRV_2BIT,
230                              71, UNIPHIER_PIN_PULL_UP),
231         UNIPHIER_PINCTRL_PIN(72, "RGMII1_RXCLK", UNIPHIER_PIN_IECTRL_EXIST,
232                              38, UNIPHIER_PIN_DRV_2BIT,
233                              72, UNIPHIER_PIN_PULL_UP),
234         UNIPHIER_PINCTRL_PIN(73, "RGMII1_RXD0", UNIPHIER_PIN_IECTRL_EXIST,
235                              39, UNIPHIER_PIN_DRV_2BIT,
236                              73, UNIPHIER_PIN_PULL_UP),
237         UNIPHIER_PINCTRL_PIN(74, "RGMII1_RXD1", UNIPHIER_PIN_IECTRL_EXIST,
238                              40, UNIPHIER_PIN_DRV_2BIT,
239                              74, UNIPHIER_PIN_PULL_UP),
240         UNIPHIER_PINCTRL_PIN(75, "RGMII1_RXD2", UNIPHIER_PIN_IECTRL_EXIST,
241                              41, UNIPHIER_PIN_DRV_2BIT,
242                              75, UNIPHIER_PIN_PULL_UP),
243         UNIPHIER_PINCTRL_PIN(76, "RGMII1_RXD3", UNIPHIER_PIN_IECTRL_EXIST,
244                              42, UNIPHIER_PIN_DRV_2BIT,
245                              76, UNIPHIER_PIN_PULL_UP),
246         UNIPHIER_PINCTRL_PIN(77, "RGMII1_RXCTL", UNIPHIER_PIN_IECTRL_EXIST,
247                              43, UNIPHIER_PIN_DRV_2BIT,
248                              77, UNIPHIER_PIN_PULL_UP),
249         UNIPHIER_PINCTRL_PIN(78, "RGMII1_TXCLK", UNIPHIER_PIN_IECTRL_EXIST,
250                              44, UNIPHIER_PIN_DRV_2BIT,
251                              78, UNIPHIER_PIN_PULL_DOWN),
252         UNIPHIER_PINCTRL_PIN(79, "RGMII1_TXD0", UNIPHIER_PIN_IECTRL_EXIST,
253                              45, UNIPHIER_PIN_DRV_2BIT,
254                              79, UNIPHIER_PIN_PULL_DOWN),
255         UNIPHIER_PINCTRL_PIN(80, "RGMII1_TXD1", UNIPHIER_PIN_IECTRL_EXIST,
256                              46, UNIPHIER_PIN_DRV_2BIT,
257                              80, UNIPHIER_PIN_PULL_DOWN),
258         UNIPHIER_PINCTRL_PIN(81, "RGMII1_TXD2", UNIPHIER_PIN_IECTRL_EXIST,
259                              47, UNIPHIER_PIN_DRV_2BIT,
260                              81, UNIPHIER_PIN_PULL_DOWN),
261         UNIPHIER_PINCTRL_PIN(82, "RGMII1_TXD3", UNIPHIER_PIN_IECTRL_EXIST,
262                              48, UNIPHIER_PIN_DRV_2BIT,
263                              82, UNIPHIER_PIN_PULL_DOWN),
264         UNIPHIER_PINCTRL_PIN(83, "RGMII1_TXCTL", UNIPHIER_PIN_IECTRL_EXIST,
265                              49, UNIPHIER_PIN_DRV_2BIT,
266                              83, UNIPHIER_PIN_PULL_DOWN),
267         UNIPHIER_PINCTRL_PIN(84, "USB0VBUS", UNIPHIER_PIN_IECTRL_EXIST,
268                              34, UNIPHIER_PIN_DRV_3BIT,
269                              84, UNIPHIER_PIN_PULL_DOWN),
270         UNIPHIER_PINCTRL_PIN(85, "USB0OD", UNIPHIER_PIN_IECTRL_EXIST,
271                              35, UNIPHIER_PIN_DRV_3BIT,
272                              85, UNIPHIER_PIN_PULL_UP),
273         UNIPHIER_PINCTRL_PIN(86, "USB1VBUS", UNIPHIER_PIN_IECTRL_EXIST,
274                              36, UNIPHIER_PIN_DRV_3BIT,
275                              86, UNIPHIER_PIN_PULL_DOWN),
276         UNIPHIER_PINCTRL_PIN(87, "USB1OD", UNIPHIER_PIN_IECTRL_EXIST,
277                              37, UNIPHIER_PIN_DRV_3BIT,
278                              87, UNIPHIER_PIN_PULL_UP),
279         UNIPHIER_PINCTRL_PIN(88, "USB2VBUS", UNIPHIER_PIN_IECTRL_EXIST,
280                              38, UNIPHIER_PIN_DRV_3BIT,
281                              88, UNIPHIER_PIN_PULL_DOWN),
282         UNIPHIER_PINCTRL_PIN(89, "USB2OD", UNIPHIER_PIN_IECTRL_EXIST,
283                              39, UNIPHIER_PIN_DRV_3BIT,
284                              89, UNIPHIER_PIN_PULL_UP),
285         UNIPHIER_PINCTRL_PIN(90, "USB3VBUS", UNIPHIER_PIN_IECTRL_EXIST,
286                              40, UNIPHIER_PIN_DRV_3BIT,
287                              90, UNIPHIER_PIN_PULL_DOWN),
288         UNIPHIER_PINCTRL_PIN(91, "USB3OD", UNIPHIER_PIN_IECTRL_EXIST,
289                              41, UNIPHIER_PIN_DRV_3BIT,
290                              91, UNIPHIER_PIN_PULL_UP),
291         UNIPHIER_PINCTRL_PIN(92, "TXD0", UNIPHIER_PIN_IECTRL_EXIST,
292                              42, UNIPHIER_PIN_DRV_3BIT,
293                              92, UNIPHIER_PIN_PULL_UP),
294         UNIPHIER_PINCTRL_PIN(93, "RXD0", UNIPHIER_PIN_IECTRL_EXIST,
295                              43, UNIPHIER_PIN_DRV_3BIT,
296                              93, UNIPHIER_PIN_PULL_UP),
297         UNIPHIER_PINCTRL_PIN(94, "TXD1", UNIPHIER_PIN_IECTRL_EXIST,
298                              44, UNIPHIER_PIN_DRV_3BIT,
299                              94, UNIPHIER_PIN_PULL_UP),
300         UNIPHIER_PINCTRL_PIN(95, "RXD1", UNIPHIER_PIN_IECTRL_EXIST,
301                              45, UNIPHIER_PIN_DRV_3BIT,
302                              95, UNIPHIER_PIN_PULL_UP),
303         UNIPHIER_PINCTRL_PIN(96, "TXD2", UNIPHIER_PIN_IECTRL_EXIST,
304                              46, UNIPHIER_PIN_DRV_3BIT,
305                              96, UNIPHIER_PIN_PULL_UP),
306         UNIPHIER_PINCTRL_PIN(97, "RXD2", UNIPHIER_PIN_IECTRL_EXIST,
307                              47, UNIPHIER_PIN_DRV_3BIT,
308                              97, UNIPHIER_PIN_PULL_UP),
309         UNIPHIER_PINCTRL_PIN(98, "TXD3", UNIPHIER_PIN_IECTRL_EXIST,
310                              48, UNIPHIER_PIN_DRV_3BIT,
311                              98, UNIPHIER_PIN_PULL_UP),
312         UNIPHIER_PINCTRL_PIN(99, "RXD3", UNIPHIER_PIN_IECTRL_EXIST,
313                              49, UNIPHIER_PIN_DRV_3BIT,
314                              99, UNIPHIER_PIN_PULL_UP),
315         UNIPHIER_PINCTRL_PIN(100, "SPISYNC0", UNIPHIER_PIN_IECTRL_EXIST,
316                              50, UNIPHIER_PIN_DRV_3BIT,
317                              100, UNIPHIER_PIN_PULL_DOWN),
318         UNIPHIER_PINCTRL_PIN(101, "SPISCLK0", UNIPHIER_PIN_IECTRL_EXIST,
319                              51, UNIPHIER_PIN_DRV_3BIT,
320                              101, UNIPHIER_PIN_PULL_DOWN),
321         UNIPHIER_PINCTRL_PIN(102, "SPITXD0", UNIPHIER_PIN_IECTRL_EXIST,
322                              52, UNIPHIER_PIN_DRV_3BIT,
323                              102, UNIPHIER_PIN_PULL_DOWN),
324         UNIPHIER_PINCTRL_PIN(103, "SPIRXD0", UNIPHIER_PIN_IECTRL_EXIST,
325                              53, UNIPHIER_PIN_DRV_3BIT,
326                              103, UNIPHIER_PIN_PULL_DOWN),
327         UNIPHIER_PINCTRL_PIN(104, "SDA0", UNIPHIER_PIN_IECTRL_EXIST,
328                              -1, UNIPHIER_PIN_DRV_FIXED4,
329                              -1, UNIPHIER_PIN_PULL_NONE),
330         UNIPHIER_PINCTRL_PIN(105, "SCL0", UNIPHIER_PIN_IECTRL_EXIST,
331                              -1, UNIPHIER_PIN_DRV_FIXED4,
332                              -1, UNIPHIER_PIN_PULL_NONE),
333         UNIPHIER_PINCTRL_PIN(106, "SDA1", UNIPHIER_PIN_IECTRL_EXIST,
334                              -1, UNIPHIER_PIN_DRV_FIXED4,
335                              -1, UNIPHIER_PIN_PULL_NONE),
336         UNIPHIER_PINCTRL_PIN(107, "SCL1", UNIPHIER_PIN_IECTRL_EXIST,
337                              -1, UNIPHIER_PIN_DRV_FIXED4,
338                              -1, UNIPHIER_PIN_PULL_NONE),
339         UNIPHIER_PINCTRL_PIN(108, "SDA2", UNIPHIER_PIN_IECTRL_EXIST,
340                              -1, UNIPHIER_PIN_DRV_FIXED4,
341                              -1, UNIPHIER_PIN_PULL_NONE),
342         UNIPHIER_PINCTRL_PIN(109, "SCL2", UNIPHIER_PIN_IECTRL_EXIST,
343                              -1, UNIPHIER_PIN_DRV_FIXED4,
344                              -1, UNIPHIER_PIN_PULL_NONE),
345         UNIPHIER_PINCTRL_PIN(110, "SDA3", UNIPHIER_PIN_IECTRL_EXIST,
346                              -1, UNIPHIER_PIN_DRV_FIXED4,
347                              -1, UNIPHIER_PIN_PULL_NONE),
348         UNIPHIER_PINCTRL_PIN(111, "SCL3", UNIPHIER_PIN_IECTRL_EXIST,
349                              -1, UNIPHIER_PIN_DRV_FIXED4,
350                              -1, UNIPHIER_PIN_PULL_NONE),
351         UNIPHIER_PINCTRL_PIN(112, "SMTRST0", UNIPHIER_PIN_IECTRL_EXIST,
352                              54, UNIPHIER_PIN_DRV_3BIT,
353                              112, UNIPHIER_PIN_PULL_DOWN),
354         UNIPHIER_PINCTRL_PIN(113, "SMTCMD0", UNIPHIER_PIN_IECTRL_EXIST,
355                              55, UNIPHIER_PIN_DRV_3BIT,
356                              113, UNIPHIER_PIN_PULL_DOWN),
357         UNIPHIER_PINCTRL_PIN(114, "SMTD0", UNIPHIER_PIN_IECTRL_EXIST,
358                              56, UNIPHIER_PIN_DRV_3BIT,
359                              114, UNIPHIER_PIN_PULL_DOWN),
360         UNIPHIER_PINCTRL_PIN(115, "SMTSEL0", UNIPHIER_PIN_IECTRL_EXIST,
361                              57, UNIPHIER_PIN_DRV_3BIT,
362                              115, UNIPHIER_PIN_PULL_DOWN),
363         UNIPHIER_PINCTRL_PIN(116, "SMTCLK0CG", UNIPHIER_PIN_IECTRL_EXIST,
364                              58, UNIPHIER_PIN_DRV_3BIT,
365                              116, UNIPHIER_PIN_PULL_DOWN),
366         UNIPHIER_PINCTRL_PIN(117, "SMTDET0", UNIPHIER_PIN_IECTRL_EXIST,
367                              59, UNIPHIER_PIN_DRV_3BIT,
368                              117, UNIPHIER_PIN_PULL_DOWN),
369         UNIPHIER_PINCTRL_PIN(118, "SMTRST1", UNIPHIER_PIN_IECTRL_EXIST,
370                              60, UNIPHIER_PIN_DRV_3BIT,
371                              118, UNIPHIER_PIN_PULL_DOWN),
372         UNIPHIER_PINCTRL_PIN(119, "SMTCMD1", UNIPHIER_PIN_IECTRL_EXIST,
373                              61, UNIPHIER_PIN_DRV_3BIT,
374                              119, UNIPHIER_PIN_PULL_DOWN),
375         UNIPHIER_PINCTRL_PIN(120, "SMTD1", UNIPHIER_PIN_IECTRL_EXIST,
376                              62, UNIPHIER_PIN_DRV_3BIT,
377                              120, UNIPHIER_PIN_PULL_DOWN),
378         UNIPHIER_PINCTRL_PIN(121, "SMTSEL1", UNIPHIER_PIN_IECTRL_EXIST,
379                              63, UNIPHIER_PIN_DRV_3BIT,
380                              121, UNIPHIER_PIN_PULL_DOWN),
381         UNIPHIER_PINCTRL_PIN(122, "SMTCLK1CG", UNIPHIER_PIN_IECTRL_EXIST,
382                              64, UNIPHIER_PIN_DRV_3BIT,
383                              122, UNIPHIER_PIN_PULL_DOWN),
384         UNIPHIER_PINCTRL_PIN(123, "SMTDET1", UNIPHIER_PIN_IECTRL_EXIST,
385                              65, UNIPHIER_PIN_DRV_3BIT,
386                              123, UNIPHIER_PIN_PULL_DOWN),
387         UNIPHIER_PINCTRL_PIN(124, "SMTRST2", UNIPHIER_PIN_IECTRL_EXIST,
388                              66, UNIPHIER_PIN_DRV_3BIT,
389                              124, UNIPHIER_PIN_PULL_DOWN),
390         UNIPHIER_PINCTRL_PIN(125, "SMTCMD2", UNIPHIER_PIN_IECTRL_EXIST,
391                              67, UNIPHIER_PIN_DRV_3BIT,
392                              125, UNIPHIER_PIN_PULL_DOWN),
393         UNIPHIER_PINCTRL_PIN(126, "SMTD2", UNIPHIER_PIN_IECTRL_EXIST,
394                              68, UNIPHIER_PIN_DRV_3BIT,
395                              126, UNIPHIER_PIN_PULL_DOWN),
396         UNIPHIER_PINCTRL_PIN(127, "SMTSEL2", UNIPHIER_PIN_IECTRL_EXIST,
397                              69, UNIPHIER_PIN_DRV_3BIT,
398                              127, UNIPHIER_PIN_PULL_DOWN),
399         UNIPHIER_PINCTRL_PIN(128, "SMTCLK2CG", UNIPHIER_PIN_IECTRL_EXIST,
400                              70, UNIPHIER_PIN_DRV_3BIT,
401                              128, UNIPHIER_PIN_PULL_DOWN),
402         UNIPHIER_PINCTRL_PIN(129, "SMTDET2", UNIPHIER_PIN_IECTRL_EXIST,
403                              71, UNIPHIER_PIN_DRV_3BIT,
404                              129, UNIPHIER_PIN_PULL_DOWN),
405         UNIPHIER_PINCTRL_PIN(130, "CH0CLK", UNIPHIER_PIN_IECTRL_EXIST,
406                              72, UNIPHIER_PIN_DRV_3BIT,
407                              130, UNIPHIER_PIN_PULL_DOWN),
408         UNIPHIER_PINCTRL_PIN(131, "CH0PSYNC", UNIPHIER_PIN_IECTRL_EXIST,
409                              73, UNIPHIER_PIN_DRV_3BIT,
410                              131, UNIPHIER_PIN_PULL_DOWN),
411         UNIPHIER_PINCTRL_PIN(132, "CH0VAL", UNIPHIER_PIN_IECTRL_EXIST,
412                              74, UNIPHIER_PIN_DRV_3BIT,
413                              132, UNIPHIER_PIN_PULL_DOWN),
414         UNIPHIER_PINCTRL_PIN(133, "CH0DATA", UNIPHIER_PIN_IECTRL_EXIST,
415                              75, UNIPHIER_PIN_DRV_3BIT,
416                              133, UNIPHIER_PIN_PULL_DOWN),
417         UNIPHIER_PINCTRL_PIN(134, "CH1CLK", UNIPHIER_PIN_IECTRL_EXIST,
418                              76, UNIPHIER_PIN_DRV_3BIT,
419                              134, UNIPHIER_PIN_PULL_DOWN),
420         UNIPHIER_PINCTRL_PIN(135, "CH1PSYNC", UNIPHIER_PIN_IECTRL_EXIST,
421                              77, UNIPHIER_PIN_DRV_3BIT,
422                              135, UNIPHIER_PIN_PULL_DOWN),
423         UNIPHIER_PINCTRL_PIN(136, "CH1VAL", UNIPHIER_PIN_IECTRL_EXIST,
424                              78, UNIPHIER_PIN_DRV_3BIT,
425                              136, UNIPHIER_PIN_PULL_DOWN),
426         UNIPHIER_PINCTRL_PIN(137, "CH1DATA", UNIPHIER_PIN_IECTRL_EXIST,
427                              79, UNIPHIER_PIN_DRV_3BIT,
428                              137, UNIPHIER_PIN_PULL_DOWN),
429         UNIPHIER_PINCTRL_PIN(138, "CH2CLK", UNIPHIER_PIN_IECTRL_EXIST,
430                              80, UNIPHIER_PIN_DRV_3BIT,
431                              138, UNIPHIER_PIN_PULL_DOWN),
432         UNIPHIER_PINCTRL_PIN(139, "CH2PSYNC", UNIPHIER_PIN_IECTRL_EXIST,
433                              81, UNIPHIER_PIN_DRV_3BIT,
434                              139, UNIPHIER_PIN_PULL_DOWN),
435         UNIPHIER_PINCTRL_PIN(140, "CH2VAL", UNIPHIER_PIN_IECTRL_EXIST,
436                              82, UNIPHIER_PIN_DRV_3BIT,
437                              140, UNIPHIER_PIN_PULL_DOWN),
438         UNIPHIER_PINCTRL_PIN(141, "CH2DATA", UNIPHIER_PIN_IECTRL_EXIST,
439                              83, UNIPHIER_PIN_DRV_3BIT,
440                              141, UNIPHIER_PIN_PULL_DOWN),
441         UNIPHIER_PINCTRL_PIN(142, "HS0BCLKIN", UNIPHIER_PIN_IECTRL_EXIST,
442                              84, UNIPHIER_PIN_DRV_3BIT,
443                              142, UNIPHIER_PIN_PULL_DOWN),
444         UNIPHIER_PINCTRL_PIN(143, "HS0SYNCIN", UNIPHIER_PIN_IECTRL_EXIST,
445                              85, UNIPHIER_PIN_DRV_3BIT,
446                              143, UNIPHIER_PIN_PULL_DOWN),
447         UNIPHIER_PINCTRL_PIN(144, "HS0VALIN", UNIPHIER_PIN_IECTRL_EXIST,
448                              86, UNIPHIER_PIN_DRV_3BIT,
449                              144, UNIPHIER_PIN_PULL_DOWN),
450         UNIPHIER_PINCTRL_PIN(145, "HS0DIN0", UNIPHIER_PIN_IECTRL_EXIST,
451                              87, UNIPHIER_PIN_DRV_3BIT,
452                              145, UNIPHIER_PIN_PULL_DOWN),
453         UNIPHIER_PINCTRL_PIN(146, "HS0DIN1", UNIPHIER_PIN_IECTRL_EXIST,
454                              88, UNIPHIER_PIN_DRV_3BIT,
455                              146, UNIPHIER_PIN_PULL_DOWN),
456         UNIPHIER_PINCTRL_PIN(147, "HS0DIN2", UNIPHIER_PIN_IECTRL_EXIST,
457                              89, UNIPHIER_PIN_DRV_3BIT,
458                              147, UNIPHIER_PIN_PULL_DOWN),
459         UNIPHIER_PINCTRL_PIN(148, "HS0DIN3", UNIPHIER_PIN_IECTRL_EXIST,
460                              90, UNIPHIER_PIN_DRV_3BIT,
461                              148, UNIPHIER_PIN_PULL_DOWN),
462         UNIPHIER_PINCTRL_PIN(149, "HS0DIN4", UNIPHIER_PIN_IECTRL_EXIST,
463                              91, UNIPHIER_PIN_DRV_3BIT,
464                              149, UNIPHIER_PIN_PULL_DOWN),
465         UNIPHIER_PINCTRL_PIN(150, "HS0DIN5", UNIPHIER_PIN_IECTRL_EXIST,
466                              92, UNIPHIER_PIN_DRV_3BIT,
467                              150, UNIPHIER_PIN_PULL_DOWN),
468         UNIPHIER_PINCTRL_PIN(151, "HS0DIN6", UNIPHIER_PIN_IECTRL_EXIST,
469                              93, UNIPHIER_PIN_DRV_3BIT,
470                              151, UNIPHIER_PIN_PULL_DOWN),
471         UNIPHIER_PINCTRL_PIN(152, "HS0DIN7", UNIPHIER_PIN_IECTRL_EXIST,
472                              94, UNIPHIER_PIN_DRV_3BIT,
473                              152, UNIPHIER_PIN_PULL_DOWN),
474         UNIPHIER_PINCTRL_PIN(153, "HS1BCLKIN", UNIPHIER_PIN_IECTRL_EXIST,
475                              95, UNIPHIER_PIN_DRV_3BIT,
476                              153, UNIPHIER_PIN_PULL_DOWN),
477         UNIPHIER_PINCTRL_PIN(154, "HS1SYNCIN", UNIPHIER_PIN_IECTRL_EXIST,
478                              96, UNIPHIER_PIN_DRV_3BIT,
479                              154, UNIPHIER_PIN_PULL_DOWN),
480         UNIPHIER_PINCTRL_PIN(155, "HS1VALIN", UNIPHIER_PIN_IECTRL_EXIST,
481                              97, UNIPHIER_PIN_DRV_3BIT,
482                              155, UNIPHIER_PIN_PULL_DOWN),
483         UNIPHIER_PINCTRL_PIN(156, "HS1DIN0", UNIPHIER_PIN_IECTRL_EXIST,
484                              98, UNIPHIER_PIN_DRV_3BIT,
485                              156, UNIPHIER_PIN_PULL_DOWN),
486         UNIPHIER_PINCTRL_PIN(157, "HS1DIN1", UNIPHIER_PIN_IECTRL_EXIST,
487                              99, UNIPHIER_PIN_DRV_3BIT,
488                              157, UNIPHIER_PIN_PULL_DOWN),
489         UNIPHIER_PINCTRL_PIN(158, "HS1DIN2", UNIPHIER_PIN_IECTRL_EXIST,
490                              100, UNIPHIER_PIN_DRV_3BIT,
491                              158, UNIPHIER_PIN_PULL_DOWN),
492         UNIPHIER_PINCTRL_PIN(159, "HS1DIN3", UNIPHIER_PIN_IECTRL_EXIST,
493                              101, UNIPHIER_PIN_DRV_3BIT,
494                              159, UNIPHIER_PIN_PULL_DOWN),
495         UNIPHIER_PINCTRL_PIN(160, "HS1DIN4", UNIPHIER_PIN_IECTRL_EXIST,
496                              102, UNIPHIER_PIN_DRV_3BIT,
497                              160, UNIPHIER_PIN_PULL_DOWN),
498         UNIPHIER_PINCTRL_PIN(161, "HS1DIN5", UNIPHIER_PIN_IECTRL_EXIST,
499                              103, UNIPHIER_PIN_DRV_3BIT,
500                              161, UNIPHIER_PIN_PULL_DOWN),
501         UNIPHIER_PINCTRL_PIN(162, "HS1DIN6", UNIPHIER_PIN_IECTRL_EXIST,
502                              104, UNIPHIER_PIN_DRV_3BIT,
503                              162, UNIPHIER_PIN_PULL_DOWN),
504         UNIPHIER_PINCTRL_PIN(163, "HS1DIN7", UNIPHIER_PIN_IECTRL_EXIST,
505                              105, UNIPHIER_PIN_DRV_3BIT,
506                              163, UNIPHIER_PIN_PULL_DOWN),
507         UNIPHIER_PINCTRL_PIN(164, "LINKCLK", UNIPHIER_PIN_IECTRL_EXIST,
508                              106, UNIPHIER_PIN_DRV_3BIT,
509                              164, UNIPHIER_PIN_PULL_DOWN),
510         UNIPHIER_PINCTRL_PIN(165, "LINKREQ", UNIPHIER_PIN_IECTRL_EXIST,
511                              107, UNIPHIER_PIN_DRV_3BIT,
512                              165, UNIPHIER_PIN_PULL_DOWN),
513         UNIPHIER_PINCTRL_PIN(166, "LINKCTL0", UNIPHIER_PIN_IECTRL_EXIST,
514                              108, UNIPHIER_PIN_DRV_3BIT,
515                              166, UNIPHIER_PIN_PULL_DOWN),
516         UNIPHIER_PINCTRL_PIN(167, "LINKCTL1", UNIPHIER_PIN_IECTRL_EXIST,
517                              109, UNIPHIER_PIN_DRV_3BIT,
518                              167, UNIPHIER_PIN_PULL_DOWN),
519         UNIPHIER_PINCTRL_PIN(168, "LINKDT0", UNIPHIER_PIN_IECTRL_EXIST,
520                              110, UNIPHIER_PIN_DRV_3BIT,
521                              168, UNIPHIER_PIN_PULL_DOWN),
522         UNIPHIER_PINCTRL_PIN(169, "LINKDT1", UNIPHIER_PIN_IECTRL_EXIST,
523                              111, UNIPHIER_PIN_DRV_3BIT,
524                              169, UNIPHIER_PIN_PULL_DOWN),
525         UNIPHIER_PINCTRL_PIN(170, "LINKDT2", UNIPHIER_PIN_IECTRL_EXIST,
526                              112, UNIPHIER_PIN_DRV_3BIT,
527                              170, UNIPHIER_PIN_PULL_DOWN),
528         UNIPHIER_PINCTRL_PIN(171, "LINKDT3", UNIPHIER_PIN_IECTRL_EXIST,
529                              113, UNIPHIER_PIN_DRV_3BIT,
530                              171, UNIPHIER_PIN_PULL_DOWN),
531         UNIPHIER_PINCTRL_PIN(172, "LINKDT4", UNIPHIER_PIN_IECTRL_EXIST,
532                              114, UNIPHIER_PIN_DRV_3BIT,
533                              172, UNIPHIER_PIN_PULL_DOWN),
534         UNIPHIER_PINCTRL_PIN(173, "LINKDT5", UNIPHIER_PIN_IECTRL_EXIST,
535                              115, UNIPHIER_PIN_DRV_3BIT,
536                              173, UNIPHIER_PIN_PULL_DOWN),
537         UNIPHIER_PINCTRL_PIN(174, "LINKDT6", UNIPHIER_PIN_IECTRL_EXIST,
538                              116, UNIPHIER_PIN_DRV_3BIT,
539                              174, UNIPHIER_PIN_PULL_DOWN),
540         UNIPHIER_PINCTRL_PIN(175, "LINKDT7", UNIPHIER_PIN_IECTRL_EXIST,
541                              117, UNIPHIER_PIN_DRV_3BIT,
542                              175, UNIPHIER_PIN_PULL_DOWN),
543         UNIPHIER_PINCTRL_PIN(176, "H0RXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST,
544                              -1, UNIPHIER_PIN_DRV_FIXED4,
545                              -1, UNIPHIER_PIN_PULL_NONE),
546         UNIPHIER_PINCTRL_PIN(177, "H0RXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST,
547                              -1, UNIPHIER_PIN_DRV_FIXED4,
548                              -1, UNIPHIER_PIN_PULL_NONE),
549         UNIPHIER_PINCTRL_PIN(178, "H0RXHPDO", UNIPHIER_PIN_IECTRL_EXIST,
550                              -1, UNIPHIER_PIN_DRV_FIXED4,
551                              -1, UNIPHIER_PIN_PULL_NONE),
552         UNIPHIER_PINCTRL_PIN(179, "H0RX5VDETI", UNIPHIER_PIN_IECTRL_EXIST,
553                              -1, UNIPHIER_PIN_DRV_FIXED4,
554                              -1, UNIPHIER_PIN_PULL_NONE),
555         UNIPHIER_PINCTRL_PIN(180, "H0TXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST,
556                              -1, UNIPHIER_PIN_DRV_FIXED4,
557                              -1, UNIPHIER_PIN_PULL_NONE),
558         UNIPHIER_PINCTRL_PIN(181, "H0TXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST,
559                              -1, UNIPHIER_PIN_DRV_FIXED4,
560                              -1, UNIPHIER_PIN_PULL_NONE),
561         UNIPHIER_PINCTRL_PIN(182, "H0TXHPDI", UNIPHIER_PIN_IECTRL_EXIST,
562                              -1, UNIPHIER_PIN_DRV_FIXED4,
563                              -1, UNIPHIER_PIN_PULL_NONE),
564         UNIPHIER_PINCTRL_PIN(183, "H1TXDDCSDA", UNIPHIER_PIN_IECTRL_EXIST,
565                              -1, UNIPHIER_PIN_DRV_FIXED4,
566                              -1, UNIPHIER_PIN_PULL_NONE),
567         UNIPHIER_PINCTRL_PIN(184, "H1TXDDCSCL", UNIPHIER_PIN_IECTRL_EXIST,
568                              -1, UNIPHIER_PIN_DRV_FIXED4,
569                              -1, UNIPHIER_PIN_PULL_NONE),
570         UNIPHIER_PINCTRL_PIN(185, "H1TXHPDI", UNIPHIER_PIN_IECTRL_EXIST,
571                              -1, UNIPHIER_PIN_DRV_FIXED4,
572                              -1, UNIPHIER_PIN_PULL_NONE),
573         UNIPHIER_PINCTRL_PIN(186, "AI1ADCCK", UNIPHIER_PIN_IECTRL_EXIST,
574                              118, UNIPHIER_PIN_DRV_3BIT,
575                              186, UNIPHIER_PIN_PULL_DOWN),
576         UNIPHIER_PINCTRL_PIN(187, "AI1BCK", UNIPHIER_PIN_IECTRL_EXIST,
577                              119, UNIPHIER_PIN_DRV_3BIT,
578                              187, UNIPHIER_PIN_PULL_DOWN),
579         UNIPHIER_PINCTRL_PIN(188, "AI1LRCK", UNIPHIER_PIN_IECTRL_EXIST,
580                              120, UNIPHIER_PIN_DRV_3BIT,
581                              188, UNIPHIER_PIN_PULL_DOWN),
582         UNIPHIER_PINCTRL_PIN(189, "AI1D0", UNIPHIER_PIN_IECTRL_EXIST,
583                              121, UNIPHIER_PIN_DRV_3BIT,
584                              189, UNIPHIER_PIN_PULL_DOWN),
585         UNIPHIER_PINCTRL_PIN(190, "AO1IEC", UNIPHIER_PIN_IECTRL_EXIST,
586                              122, UNIPHIER_PIN_DRV_3BIT,
587                              190, UNIPHIER_PIN_PULL_DOWN),
588         UNIPHIER_PINCTRL_PIN(191, "AO2IEC", UNIPHIER_PIN_IECTRL_EXIST,
589                              123, UNIPHIER_PIN_DRV_3BIT,
590                              191, UNIPHIER_PIN_PULL_DOWN),
591         UNIPHIER_PINCTRL_PIN(192, "AO2DACCK", UNIPHIER_PIN_IECTRL_EXIST,
592                              124, UNIPHIER_PIN_DRV_3BIT,
593                              192, UNIPHIER_PIN_PULL_DOWN),
594         UNIPHIER_PINCTRL_PIN(193, "AO2BCK", UNIPHIER_PIN_IECTRL_EXIST,
595                              125, UNIPHIER_PIN_DRV_3BIT,
596                              193, UNIPHIER_PIN_PULL_DOWN),
597         UNIPHIER_PINCTRL_PIN(194, "AO2LRCK", UNIPHIER_PIN_IECTRL_EXIST,
598                              126, UNIPHIER_PIN_DRV_3BIT,
599                              194, UNIPHIER_PIN_PULL_DOWN),
600         UNIPHIER_PINCTRL_PIN(195, "AO2D0", UNIPHIER_PIN_IECTRL_EXIST,
601                              127, UNIPHIER_PIN_DRV_3BIT,
602                              195, UNIPHIER_PIN_PULL_DOWN),
603         UNIPHIER_PINCTRL_PIN(196, "AO2D1", UNIPHIER_PIN_IECTRL_EXIST,
604                              128, UNIPHIER_PIN_DRV_3BIT,
605                              196, UNIPHIER_PIN_PULL_DOWN),
606         UNIPHIER_PINCTRL_PIN(197, "AO2D2", UNIPHIER_PIN_IECTRL_EXIST,
607                              129, UNIPHIER_PIN_DRV_3BIT,
608                              197, UNIPHIER_PIN_PULL_DOWN),
609         UNIPHIER_PINCTRL_PIN(198, "AO2D3", UNIPHIER_PIN_IECTRL_EXIST,
610                              130, UNIPHIER_PIN_DRV_3BIT,
611                              198, UNIPHIER_PIN_PULL_DOWN),
612         UNIPHIER_PINCTRL_PIN(199, "AO3DACCK", UNIPHIER_PIN_IECTRL_EXIST,
613                              131, UNIPHIER_PIN_DRV_3BIT,
614                              199, UNIPHIER_PIN_PULL_DOWN),
615         UNIPHIER_PINCTRL_PIN(200, "AO3BCK", UNIPHIER_PIN_IECTRL_EXIST,
616                              132, UNIPHIER_PIN_DRV_3BIT,
617                              200, UNIPHIER_PIN_PULL_DOWN),
618         UNIPHIER_PINCTRL_PIN(201, "AO3LRCK", UNIPHIER_PIN_IECTRL_EXIST,
619                              133, UNIPHIER_PIN_DRV_3BIT,
620                              201, UNIPHIER_PIN_PULL_DOWN),
621         UNIPHIER_PINCTRL_PIN(202, "AO3D0", UNIPHIER_PIN_IECTRL_EXIST,
622                              134, UNIPHIER_PIN_DRV_3BIT,
623                              202, UNIPHIER_PIN_PULL_DOWN),
624         UNIPHIER_PINCTRL_PIN(203, "VI1CLK", UNIPHIER_PIN_IECTRL_EXIST,
625                              135, UNIPHIER_PIN_DRV_3BIT,
626                              203, UNIPHIER_PIN_PULL_DOWN),
627         UNIPHIER_PINCTRL_PIN(204, "VI1G2", UNIPHIER_PIN_IECTRL_EXIST,
628                              136, UNIPHIER_PIN_DRV_3BIT,
629                              204, UNIPHIER_PIN_PULL_DOWN),
630         UNIPHIER_PINCTRL_PIN(205, "VI1G3", UNIPHIER_PIN_IECTRL_EXIST,
631                              137, UNIPHIER_PIN_DRV_3BIT,
632                              205, UNIPHIER_PIN_PULL_DOWN),
633         UNIPHIER_PINCTRL_PIN(206, "VI1G4", UNIPHIER_PIN_IECTRL_EXIST,
634                              138, UNIPHIER_PIN_DRV_3BIT,
635                              206, UNIPHIER_PIN_PULL_DOWN),
636         UNIPHIER_PINCTRL_PIN(207, "VI1G5", UNIPHIER_PIN_IECTRL_EXIST,
637                              139, UNIPHIER_PIN_DRV_3BIT,
638                              207, UNIPHIER_PIN_PULL_DOWN),
639         UNIPHIER_PINCTRL_PIN(208, "VI1G6", UNIPHIER_PIN_IECTRL_EXIST,
640                              140, UNIPHIER_PIN_DRV_3BIT,
641                              208, UNIPHIER_PIN_PULL_DOWN),
642         UNIPHIER_PINCTRL_PIN(209, "VI1G7", UNIPHIER_PIN_IECTRL_EXIST,
643                              141, UNIPHIER_PIN_DRV_3BIT,
644                              209, UNIPHIER_PIN_PULL_DOWN),
645         UNIPHIER_PINCTRL_PIN(210, "VI1G8", UNIPHIER_PIN_IECTRL_EXIST,
646                              142, UNIPHIER_PIN_DRV_3BIT,
647                              210, UNIPHIER_PIN_PULL_DOWN),
648         UNIPHIER_PINCTRL_PIN(211, "VI1G9", UNIPHIER_PIN_IECTRL_EXIST,
649                              143, UNIPHIER_PIN_DRV_3BIT,
650                              211, UNIPHIER_PIN_PULL_DOWN),
651         UNIPHIER_PINCTRL_PIN(212, "FANPWM", UNIPHIER_PIN_IECTRL_EXIST,
652                              144, UNIPHIER_PIN_DRV_3BIT,
653                              212, UNIPHIER_PIN_PULL_DOWN),
654         UNIPHIER_PINCTRL_PIN(213, "CK27EXO", UNIPHIER_PIN_IECTRL_EXIST,
655                              145, UNIPHIER_PIN_DRV_3BIT,
656                              213, UNIPHIER_PIN_PULL_DOWN),
657         UNIPHIER_PINCTRL_PIN(214, "CK27AO", UNIPHIER_PIN_IECTRL_EXIST,
658                              146, UNIPHIER_PIN_DRV_3BIT,
659                              214, UNIPHIER_PIN_PULL_DOWN),
660         UNIPHIER_PINCTRL_PIN(215, "CK27EXI", UNIPHIER_PIN_IECTRL_EXIST,
661                              147, UNIPHIER_PIN_DRV_3BIT,
662                              215, UNIPHIER_PIN_PULL_DOWN),
663         UNIPHIER_PINCTRL_PIN(216, "VEXCKA", UNIPHIER_PIN_IECTRL_EXIST,
664                              148, UNIPHIER_PIN_DRV_3BIT,
665                              216, UNIPHIER_PIN_PULL_DOWN),
666         UNIPHIER_PINCTRL_PIN(217, "AEXCKA", UNIPHIER_PIN_IECTRL_EXIST,
667                              149, UNIPHIER_PIN_DRV_3BIT,
668                              217, UNIPHIER_PIN_PULL_DOWN),
669         UNIPHIER_PINCTRL_PIN(218, "ASEL", UNIPHIER_PIN_IECTRL_EXIST,
670                              150, UNIPHIER_PIN_DRV_3BIT,
671                              218, UNIPHIER_PIN_PULL_DOWN),
672         UNIPHIER_PINCTRL_PIN(219, "XIRQ0", UNIPHIER_PIN_IECTRL_EXIST,
673                              151, UNIPHIER_PIN_DRV_3BIT,
674                              219, UNIPHIER_PIN_PULL_DOWN),
675         UNIPHIER_PINCTRL_PIN(220, "XIRQ1", UNIPHIER_PIN_IECTRL_EXIST,
676                              152, UNIPHIER_PIN_DRV_3BIT,
677                              220, UNIPHIER_PIN_PULL_DOWN),
678         UNIPHIER_PINCTRL_PIN(221, "XIRQ2", UNIPHIER_PIN_IECTRL_EXIST,
679                              153, UNIPHIER_PIN_DRV_3BIT,
680                              221, UNIPHIER_PIN_PULL_DOWN),
681         UNIPHIER_PINCTRL_PIN(222, "XIRQ3", UNIPHIER_PIN_IECTRL_EXIST,
682                              154, UNIPHIER_PIN_DRV_3BIT,
683                              222, UNIPHIER_PIN_PULL_DOWN),
684         UNIPHIER_PINCTRL_PIN(223, "XIRQ4", UNIPHIER_PIN_IECTRL_EXIST,
685                              155, UNIPHIER_PIN_DRV_3BIT,
686                              223, UNIPHIER_PIN_PULL_DOWN),
687         UNIPHIER_PINCTRL_PIN(224, "XIRQ5", UNIPHIER_PIN_IECTRL_EXIST,
688                              156, UNIPHIER_PIN_DRV_3BIT,
689                              224, UNIPHIER_PIN_PULL_DOWN),
690         UNIPHIER_PINCTRL_PIN(225, "XIRQ6", UNIPHIER_PIN_IECTRL_EXIST,
691                              157, UNIPHIER_PIN_DRV_3BIT,
692                              225, UNIPHIER_PIN_PULL_DOWN),
693         UNIPHIER_PINCTRL_PIN(226, "XIRQ7", UNIPHIER_PIN_IECTRL_EXIST,
694                              158, UNIPHIER_PIN_DRV_3BIT,
695                              226, UNIPHIER_PIN_PULL_DOWN),
696         UNIPHIER_PINCTRL_PIN(227, "XIRQ8", UNIPHIER_PIN_IECTRL_EXIST,
697                              159, UNIPHIER_PIN_DRV_3BIT,
698                              227, UNIPHIER_PIN_PULL_DOWN),
699         UNIPHIER_PINCTRL_PIN(228, "XIRQ9", UNIPHIER_PIN_IECTRL_EXIST,
700                              160, UNIPHIER_PIN_DRV_3BIT,
701                              228, UNIPHIER_PIN_PULL_DOWN),
702         UNIPHIER_PINCTRL_PIN(229, "XIRQ10", UNIPHIER_PIN_IECTRL_EXIST,
703                              161, UNIPHIER_PIN_DRV_3BIT,
704                              229, UNIPHIER_PIN_PULL_DOWN),
705         UNIPHIER_PINCTRL_PIN(230, "XIRQ11", UNIPHIER_PIN_IECTRL_EXIST,
706                              162, UNIPHIER_PIN_DRV_3BIT,
707                              230, UNIPHIER_PIN_PULL_DOWN),
708         UNIPHIER_PINCTRL_PIN(231, "XIRQ12", UNIPHIER_PIN_IECTRL_EXIST,
709                              163, UNIPHIER_PIN_DRV_3BIT,
710                              231, UNIPHIER_PIN_PULL_DOWN),
711         UNIPHIER_PINCTRL_PIN(232, "XIRQ13", UNIPHIER_PIN_IECTRL_EXIST,
712                              164, UNIPHIER_PIN_DRV_3BIT,
713                              232, UNIPHIER_PIN_PULL_DOWN),
714         UNIPHIER_PINCTRL_PIN(233, "XIRQ14", UNIPHIER_PIN_IECTRL_EXIST,
715                              165, UNIPHIER_PIN_DRV_3BIT,
716                              233, UNIPHIER_PIN_PULL_DOWN),
717         UNIPHIER_PINCTRL_PIN(234, "XIRQ15", UNIPHIER_PIN_IECTRL_EXIST,
718                              166, UNIPHIER_PIN_DRV_3BIT,
719                              234, UNIPHIER_PIN_PULL_DOWN),
720         UNIPHIER_PINCTRL_PIN(235, "PORT00", UNIPHIER_PIN_IECTRL_EXIST,
721                              167, UNIPHIER_PIN_DRV_3BIT,
722                              235, UNIPHIER_PIN_PULL_DOWN),
723         UNIPHIER_PINCTRL_PIN(236, "PORT01", UNIPHIER_PIN_IECTRL_EXIST,
724                              168, UNIPHIER_PIN_DRV_3BIT,
725                              236, UNIPHIER_PIN_PULL_DOWN),
726         UNIPHIER_PINCTRL_PIN(237, "PORT02", UNIPHIER_PIN_IECTRL_EXIST,
727                              169, UNIPHIER_PIN_DRV_3BIT,
728                              237, UNIPHIER_PIN_PULL_DOWN),
729         UNIPHIER_PINCTRL_PIN(238, "PORT03", UNIPHIER_PIN_IECTRL_EXIST,
730                              170, UNIPHIER_PIN_DRV_3BIT,
731                              238, UNIPHIER_PIN_PULL_DOWN),
732         UNIPHIER_PINCTRL_PIN(239, "PORT04", UNIPHIER_PIN_IECTRL_EXIST,
733                              171, UNIPHIER_PIN_DRV_3BIT,
734                              239, UNIPHIER_PIN_PULL_DOWN),
735         UNIPHIER_PINCTRL_PIN(240, "PORT05", UNIPHIER_PIN_IECTRL_EXIST,
736                              172, UNIPHIER_PIN_DRV_3BIT,
737                              240, UNIPHIER_PIN_PULL_DOWN),
738         UNIPHIER_PINCTRL_PIN(241, "PORT06", UNIPHIER_PIN_IECTRL_EXIST,
739                              173, UNIPHIER_PIN_DRV_3BIT,
740                              241, UNIPHIER_PIN_PULL_DOWN),
741         UNIPHIER_PINCTRL_PIN(242, "PORT07", UNIPHIER_PIN_IECTRL_EXIST,
742                              174, UNIPHIER_PIN_DRV_3BIT,
743                              242, UNIPHIER_PIN_PULL_DOWN),
744         UNIPHIER_PINCTRL_PIN(243, "PORT10", UNIPHIER_PIN_IECTRL_EXIST,
745                              175, UNIPHIER_PIN_DRV_3BIT,
746                              243, UNIPHIER_PIN_PULL_DOWN),
747         UNIPHIER_PINCTRL_PIN(244, "PORT11", UNIPHIER_PIN_IECTRL_EXIST,
748                              176, UNIPHIER_PIN_DRV_3BIT,
749                              244, UNIPHIER_PIN_PULL_DOWN),
750         UNIPHIER_PINCTRL_PIN(245, "PORT12", UNIPHIER_PIN_IECTRL_EXIST,
751                              177, UNIPHIER_PIN_DRV_3BIT,
752                              245, UNIPHIER_PIN_PULL_DOWN),
753         UNIPHIER_PINCTRL_PIN(246, "PORT13", UNIPHIER_PIN_IECTRL_EXIST,
754                              178, UNIPHIER_PIN_DRV_3BIT,
755                              246, UNIPHIER_PIN_PULL_DOWN),
756         UNIPHIER_PINCTRL_PIN(247, "PORT14", UNIPHIER_PIN_IECTRL_EXIST,
757                              179, UNIPHIER_PIN_DRV_3BIT,
758                              247, UNIPHIER_PIN_PULL_DOWN),
759         UNIPHIER_PINCTRL_PIN(248, "PORT15", UNIPHIER_PIN_IECTRL_EXIST,
760                              180, UNIPHIER_PIN_DRV_3BIT,
761                              248, UNIPHIER_PIN_PULL_DOWN),
762         UNIPHIER_PINCTRL_PIN(249, "PORT16", UNIPHIER_PIN_IECTRL_EXIST,
763                              181, UNIPHIER_PIN_DRV_3BIT,
764                              249, UNIPHIER_PIN_PULL_DOWN),
765         UNIPHIER_PINCTRL_PIN(250, "PORT17", UNIPHIER_PIN_IECTRL_EXIST,
766                              182, UNIPHIER_PIN_DRV_3BIT,
767                              250, UNIPHIER_PIN_PULL_DOWN),
768 };
769
770 static const unsigned int emmc_pins[] = {32, 33, 34, 35, 36, 37, 38};
771 static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0};
772 static const unsigned int emmc_dat8_pins[] = {39, 40, 41, 42};
773 static const int emmc_dat8_muxvals[] = {0, 0, 0, 0};
774 static const unsigned int ether_rgmii_pins[] = {52, 53, 54, 55, 56, 57, 58, 59,
775                                                 60, 61, 62, 63, 64, 65, 66, 67};
776 static const int ether_rgmii_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
777                                           0, 0, 0};
778 static const unsigned int ether_rmii_pins[] = {52, 53, 54, 55, 56, 57, 58, 59,
779                                                61, 63, 64, 67};
780 static const int ether_rmii_muxvals[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1};
781 static const unsigned int ether1_rgmii_pins[] = {68, 69, 70, 71, 72, 73, 74,
782                                                  75, 76, 77, 78, 79, 80, 81,
783                                                  82, 83};
784 static const int ether1_rgmii_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
785                                            0, 0, 0, 0};
786 static const unsigned int ether1_rmii_pins[] = {68, 69, 70, 71, 72, 73, 74, 75,
787                                                 77, 79, 80, 83};
788 static const int ether1_rmii_muxvals[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1};
789 static const unsigned int i2c0_pins[] = {104, 105};
790 static const int i2c0_muxvals[] = {0, 0};
791 static const unsigned int i2c1_pins[] = {106, 107};
792 static const int i2c1_muxvals[] = {0, 0};
793 static const unsigned int i2c2_pins[] = {108, 109};
794 static const int i2c2_muxvals[] = {0, 0};
795 static const unsigned int i2c3_pins[] = {110, 111};
796 static const int i2c3_muxvals[] = {0, 0};
797 static const unsigned int nand_pins[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
798                                          26, 27, 28, 29, 30};
799 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
800 static const unsigned int sd_pins[] = {43, 44, 45, 46, 47, 48, 49, 50, 51};
801 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
802 static const unsigned spi0_pins[] = {100, 101, 102, 103};
803 static const int spi0_muxvals[] = {0, 0, 0, 0};
804 static const unsigned spi1_pins[] = {112, 113, 114, 115};
805 static const int spi1_muxvals[] = {2, 2, 2, 2};
806 static const unsigned int system_bus_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
807                                                11, 12, 13, 14};
808 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
809                                          0};
810 static const unsigned int system_bus_cs1_pins[] = {15};
811 static const int system_bus_cs1_muxvals[] = {0};
812 static const unsigned int uart0_pins[] = {92, 93};
813 static const int uart0_muxvals[] = {0, 0};
814 static const unsigned int uart0_ctsrts_pins[] = {243, 247};
815 static const int uart0_ctsrts_muxvals[] = {3, 3};
816 static const unsigned int uart0_modem_pins[] = {244, 245, 246, 248};
817 static const int uart0_modem_muxvals[] = {3, 3, 3, 3};
818 static const unsigned int uart1_pins[] = {94, 95};
819 static const int uart1_muxvals[] = {0, 0};
820 static const unsigned int uart2_pins[] = {96, 97};
821 static const int uart2_muxvals[] = {0, 0};
822 static const unsigned int uart3_pins[] = {98, 99};
823 static const int uart3_muxvals[] = {0, 0};
824 static const unsigned int usb0_pins[] = {84, 85};
825 static const int usb0_muxvals[] = {0, 0};
826 static const unsigned int usb1_pins[] = {86, 87};
827 static const int usb1_muxvals[] = {0, 0};
828 static const unsigned int usb2_pins[] = {88, 89};
829 static const int usb2_muxvals[] = {0, 0};
830 static const unsigned int usb3_pins[] = {90, 91};
831 static const int usb3_muxvals[] = {0, 0};
832 static const unsigned int gpio_range0_pins[] = {
833         235, 236, 237, 238, 239, 240, 241, 242,         /* PORT0x */
834         243, 244, 245, 246, 247, 248, 249, 250,         /* PORT1x */
835         0, 1, 2, 3, 4, 5, 6, 7,                         /* PORT2x */
836         8, 9, 10, 11, 12, 13, 14, 15,                   /* PORT3x */
837         16, 17, 18, 19, 20, 21, 22, 23,                 /* PORT4x */
838         24, 25, 26, 27, 28, 29, 30, 31,                 /* PORT5x */
839         43, 44, 45, 46, 47, 48, 49, 50,                 /* PORT6x */
840         51, 52, 53, 54, 55, 56, 57, 58,                 /* PORT7x */
841         59, 60, 61, 62, 63, 64, 65, 66,                 /* PORT8x */
842         67, 68, 69, 70, 71, 72, 73, 74,                 /* PORT9x */
843         75, 76, 77, 78, 79, 80, 81, 82,                 /* PORT10x */
844 };
845 static const unsigned int gpio_range1_pins[] = {
846         83, 84, 85, 86, 87, 88, 89, 90,                 /* PORT13x */
847         91, 92, 93, 94, 95, 96, 97, 98,                 /* PORT14x */
848         219, 220, 221, 222, 223, 224, 225, 226,         /* XIRQ0-7 */
849         227, 228, 229, 230, 231, 232, 233, 234,         /* XIRQ8-15 */
850         215, 216, 217, 218, 164, 165, 166, 167,         /* XIRQ16-23 */
851         104, 105, 106, 107, 108, 109, 110, 111,         /* PORT18x */
852         176, 177, 178, 179, 180, 181, 182, 183,         /* PORT19x */
853         184, 185,                                       /* PORT200-201 */
854 };
855 static const unsigned int gpio_range2_pins[] = {
856         99, 100, 101, 102, 103, 112, 113, 114,          /* PORT21x */
857         115, 116, 117, 118, 119, 120, 121, 122,         /* PORT22x */
858         123, 124, 125, 126, 127, 128, 129, 130,         /* PORT23x */
859         131, 132, 133, 134, 135, 136, 137, 138,         /* PORT24x */
860         139, 140, 141, 142, 143, 144, 145, 146,         /* PORT25x */
861         147, 148, 149, 150, 151, 152, 153, 154,         /* PORT26x */
862         155, 156, 157, 158, 159, 160, 161, 162,         /* PORT27x */
863         163, 164, 165, 166, 167, 168, 169, 170,         /* PORT28x */
864         171, 172, 173, 174, 175, 186, 187, 188,         /* PORT29x */
865         189, 190, 191, 192, 193, 194, 195, 196,         /* PORT30x */
866         197, 198, 199, 200, 201, 202, 203, 204,         /* PORT31x */
867         205, 206, 207, 208, 209, 210, 211, 212,         /* PORT32x */
868         213, 214, 215, 216, 217, 218, 219, 220,         /* PORT33x */
869         221, 222, 223, 224, 225, 226, 227, 228,         /* PORT34x */
870         229, 230, 231, 232, 233, 234,                   /* PORT350-355 */
871 };
872
873 static const struct uniphier_pinctrl_group uniphier_pxs3_groups[] = {
874         UNIPHIER_PINCTRL_GROUP(emmc),
875         UNIPHIER_PINCTRL_GROUP(emmc_dat8),
876         UNIPHIER_PINCTRL_GROUP(ether_rgmii),
877         UNIPHIER_PINCTRL_GROUP(ether_rmii),
878         UNIPHIER_PINCTRL_GROUP(ether1_rgmii),
879         UNIPHIER_PINCTRL_GROUP(ether1_rmii),
880         UNIPHIER_PINCTRL_GROUP(i2c0),
881         UNIPHIER_PINCTRL_GROUP(i2c1),
882         UNIPHIER_PINCTRL_GROUP(i2c2),
883         UNIPHIER_PINCTRL_GROUP(i2c3),
884         UNIPHIER_PINCTRL_GROUP(nand),
885         UNIPHIER_PINCTRL_GROUP(sd),
886         UNIPHIER_PINCTRL_GROUP(spi0),
887         UNIPHIER_PINCTRL_GROUP(spi1),
888         UNIPHIER_PINCTRL_GROUP(system_bus),
889         UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
890         UNIPHIER_PINCTRL_GROUP(uart0),
891         UNIPHIER_PINCTRL_GROUP(uart0_ctsrts),
892         UNIPHIER_PINCTRL_GROUP(uart0_modem),
893         UNIPHIER_PINCTRL_GROUP(uart1),
894         UNIPHIER_PINCTRL_GROUP(uart2),
895         UNIPHIER_PINCTRL_GROUP(uart3),
896         UNIPHIER_PINCTRL_GROUP(usb0),
897         UNIPHIER_PINCTRL_GROUP(usb1),
898         UNIPHIER_PINCTRL_GROUP(usb2),
899         UNIPHIER_PINCTRL_GROUP(usb3),
900         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0),
901         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1),
902         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2),
903 };
904
905 static const char * const emmc_groups[] = {"emmc", "emmc_dat8"};
906 static const char * const ether_rgmii_groups[] = {"ether_rgmii"};
907 static const char * const ether_rmii_groups[] = {"ether_rmii"};
908 static const char * const ether1_rgmii_groups[] = {"ether1_rgmii"};
909 static const char * const ether1_rmii_groups[] = {"ether1_rmii"};
910 static const char * const i2c0_groups[] = {"i2c0"};
911 static const char * const i2c1_groups[] = {"i2c1"};
912 static const char * const i2c2_groups[] = {"i2c2"};
913 static const char * const i2c3_groups[] = {"i2c3"};
914 static const char * const nand_groups[] = {"nand"};
915 static const char * const sd_groups[] = {"sd"};
916 static const char * const spi0_groups[] = {"spi0"};
917 static const char * const spi1_groups[] = {"spi1"};
918 static const char * const system_bus_groups[] = {"system_bus",
919                                                  "system_bus_cs1"};
920 static const char * const uart0_groups[] = {"uart0", "uart0_ctsrts",
921                                             "uart0_modem"};
922 static const char * const uart1_groups[] = {"uart1"};
923 static const char * const uart2_groups[] = {"uart2"};
924 static const char * const uart3_groups[] = {"uart3"};
925 static const char * const usb0_groups[] = {"usb0"};
926 static const char * const usb1_groups[] = {"usb1"};
927 static const char * const usb2_groups[] = {"usb2"};
928 static const char * const usb3_groups[] = {"usb3"};
929
930 static const struct uniphier_pinmux_function uniphier_pxs3_functions[] = {
931         UNIPHIER_PINMUX_FUNCTION(emmc),
932         UNIPHIER_PINMUX_FUNCTION(ether_rgmii),
933         UNIPHIER_PINMUX_FUNCTION(ether_rmii),
934         UNIPHIER_PINMUX_FUNCTION(ether1_rgmii),
935         UNIPHIER_PINMUX_FUNCTION(ether1_rmii),
936         UNIPHIER_PINMUX_FUNCTION(i2c0),
937         UNIPHIER_PINMUX_FUNCTION(i2c1),
938         UNIPHIER_PINMUX_FUNCTION(i2c2),
939         UNIPHIER_PINMUX_FUNCTION(i2c3),
940         UNIPHIER_PINMUX_FUNCTION(nand),
941         UNIPHIER_PINMUX_FUNCTION(sd),
942         UNIPHIER_PINMUX_FUNCTION(spi0),
943         UNIPHIER_PINMUX_FUNCTION(spi1),
944         UNIPHIER_PINMUX_FUNCTION(system_bus),
945         UNIPHIER_PINMUX_FUNCTION(uart0),
946         UNIPHIER_PINMUX_FUNCTION(uart1),
947         UNIPHIER_PINMUX_FUNCTION(uart2),
948         UNIPHIER_PINMUX_FUNCTION(uart3),
949         UNIPHIER_PINMUX_FUNCTION(usb0),
950         UNIPHIER_PINMUX_FUNCTION(usb1),
951         UNIPHIER_PINMUX_FUNCTION(usb2),
952         UNIPHIER_PINMUX_FUNCTION(usb3),
953 };
954
955 static int uniphier_pxs3_get_gpio_muxval(unsigned int pin,
956                                          unsigned int gpio_offset)
957 {
958         if (gpio_offset >= 120 && gpio_offset <= 143) { /* XIRQx */
959                 if (pin >= 219 && pin <= 234)
960                         return 0;
961
962                 return 14;
963         }
964
965         return 15;
966 }
967
968 static const struct uniphier_pinctrl_socdata uniphier_pxs3_pindata = {
969         .pins = uniphier_pxs3_pins,
970         .npins = ARRAY_SIZE(uniphier_pxs3_pins),
971         .groups = uniphier_pxs3_groups,
972         .groups_count = ARRAY_SIZE(uniphier_pxs3_groups),
973         .functions = uniphier_pxs3_functions,
974         .functions_count = ARRAY_SIZE(uniphier_pxs3_functions),
975         .get_gpio_muxval = uniphier_pxs3_get_gpio_muxval,
976         .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL,
977 };
978
979 static int uniphier_pxs3_pinctrl_probe(struct platform_device *pdev)
980 {
981         return uniphier_pinctrl_probe(pdev, &uniphier_pxs3_pindata);
982 }
983
984 static const struct of_device_id uniphier_pxs3_pinctrl_match[] = {
985         { .compatible = "socionext,uniphier-pxs3-pinctrl" },
986         { /* sentinel */ }
987 };
988
989 static struct platform_driver uniphier_pxs3_pinctrl_driver = {
990         .probe = uniphier_pxs3_pinctrl_probe,
991         .driver = {
992                 .name = "uniphier-pxs3-pinctrl",
993                 .of_match_table = uniphier_pxs3_pinctrl_match,
994                 .pm = &uniphier_pinctrl_pm_ops,
995         },
996 };
997 builtin_platform_driver(uniphier_pxs3_pinctrl_driver);