1 /*
2  * imx53 pinctrl driver based on imx pinmux core
3  *
4  * Copyright (C) 2012 Freescale Semiconductor, Inc.
5  * Copyright (C) 2012 Linaro, Inc.
6  *
7  * Author: Dong Aisheng <dong.aisheng@linaro.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  */
14 
15 #include <linux/err.h>
16 #include <linux/init.h>
17 #include <linux/io.h>
18 #include <linux/of.h>
19 #include <linux/of_device.h>
20 #include <linux/pinctrl/pinctrl.h>
21 
22 #include "pinctrl-imx.h"
23 
24 enum imx53_pads {
25 	MX53_PAD_RESERVE0 = 0,
26 	MX53_PAD_RESERVE1 = 1,
27 	MX53_PAD_RESERVE2 = 2,
28 	MX53_PAD_RESERVE3 = 3,
29 	MX53_PAD_RESERVE4 = 4,
30 	MX53_PAD_RESERVE5 = 5,
31 	MX53_PAD_RESERVE6 = 6,
32 	MX53_PAD_RESERVE7 = 7,
33 	MX53_PAD_GPIO_19 = 8,
34 	MX53_PAD_KEY_COL0 = 9,
35 	MX53_PAD_KEY_ROW0 = 10,
36 	MX53_PAD_KEY_COL1 = 11,
37 	MX53_PAD_KEY_ROW1 = 12,
38 	MX53_PAD_KEY_COL2 = 13,
39 	MX53_PAD_KEY_ROW2 = 14,
40 	MX53_PAD_KEY_COL3 = 15,
41 	MX53_PAD_KEY_ROW3 = 16,
42 	MX53_PAD_KEY_COL4 = 17,
43 	MX53_PAD_KEY_ROW4 = 18,
44 	MX53_PAD_DI0_DISP_CLK = 19,
45 	MX53_PAD_DI0_PIN15 = 20,
46 	MX53_PAD_DI0_PIN2 = 21,
47 	MX53_PAD_DI0_PIN3 = 22,
48 	MX53_PAD_DI0_PIN4 = 23,
49 	MX53_PAD_DISP0_DAT0 = 24,
50 	MX53_PAD_DISP0_DAT1 = 25,
51 	MX53_PAD_DISP0_DAT2 = 26,
52 	MX53_PAD_DISP0_DAT3 = 27,
53 	MX53_PAD_DISP0_DAT4 = 28,
54 	MX53_PAD_DISP0_DAT5 = 29,
55 	MX53_PAD_DISP0_DAT6 = 30,
56 	MX53_PAD_DISP0_DAT7 = 31,
57 	MX53_PAD_DISP0_DAT8 = 32,
58 	MX53_PAD_DISP0_DAT9 = 33,
59 	MX53_PAD_DISP0_DAT10 = 34,
60 	MX53_PAD_DISP0_DAT11 = 35,
61 	MX53_PAD_DISP0_DAT12 = 36,
62 	MX53_PAD_DISP0_DAT13 = 37,
63 	MX53_PAD_DISP0_DAT14 = 38,
64 	MX53_PAD_DISP0_DAT15 = 39,
65 	MX53_PAD_DISP0_DAT16 = 40,
66 	MX53_PAD_DISP0_DAT17 = 41,
67 	MX53_PAD_DISP0_DAT18 = 42,
68 	MX53_PAD_DISP0_DAT19 = 43,
69 	MX53_PAD_DISP0_DAT20 = 44,
70 	MX53_PAD_DISP0_DAT21 = 45,
71 	MX53_PAD_DISP0_DAT22 = 46,
72 	MX53_PAD_DISP0_DAT23 = 47,
73 	MX53_PAD_CSI0_PIXCLK = 48,
74 	MX53_PAD_CSI0_MCLK = 49,
75 	MX53_PAD_CSI0_DATA_EN = 50,
76 	MX53_PAD_CSI0_VSYNC = 51,
77 	MX53_PAD_CSI0_DAT4 = 52,
78 	MX53_PAD_CSI0_DAT5 = 53,
79 	MX53_PAD_CSI0_DAT6 = 54,
80 	MX53_PAD_CSI0_DAT7 = 55,
81 	MX53_PAD_CSI0_DAT8 = 56,
82 	MX53_PAD_CSI0_DAT9 = 57,
83 	MX53_PAD_CSI0_DAT10 = 58,
84 	MX53_PAD_CSI0_DAT11 = 59,
85 	MX53_PAD_CSI0_DAT12 = 60,
86 	MX53_PAD_CSI0_DAT13 = 61,
87 	MX53_PAD_CSI0_DAT14 = 62,
88 	MX53_PAD_CSI0_DAT15 = 63,
89 	MX53_PAD_CSI0_DAT16 = 64,
90 	MX53_PAD_CSI0_DAT17 = 65,
91 	MX53_PAD_CSI0_DAT18 = 66,
92 	MX53_PAD_CSI0_DAT19 = 67,
93 	MX53_PAD_EIM_A25 = 68,
94 	MX53_PAD_EIM_EB2 = 69,
95 	MX53_PAD_EIM_D16 = 70,
96 	MX53_PAD_EIM_D17 = 71,
97 	MX53_PAD_EIM_D18 = 72,
98 	MX53_PAD_EIM_D19 = 73,
99 	MX53_PAD_EIM_D20 = 74,
100 	MX53_PAD_EIM_D21 = 75,
101 	MX53_PAD_EIM_D22 = 76,
102 	MX53_PAD_EIM_D23 = 77,
103 	MX53_PAD_EIM_EB3 = 78,
104 	MX53_PAD_EIM_D24 = 79,
105 	MX53_PAD_EIM_D25 = 80,
106 	MX53_PAD_EIM_D26 = 81,
107 	MX53_PAD_EIM_D27 = 82,
108 	MX53_PAD_EIM_D28 = 83,
109 	MX53_PAD_EIM_D29 = 84,
110 	MX53_PAD_EIM_D30 = 85,
111 	MX53_PAD_EIM_D31 = 86,
112 	MX53_PAD_EIM_A24 = 87,
113 	MX53_PAD_EIM_A23 = 88,
114 	MX53_PAD_EIM_A22 = 89,
115 	MX53_PAD_EIM_A21 = 90,
116 	MX53_PAD_EIM_A20 = 91,
117 	MX53_PAD_EIM_A19 = 92,
118 	MX53_PAD_EIM_A18 = 93,
119 	MX53_PAD_EIM_A17 = 94,
120 	MX53_PAD_EIM_A16 = 95,
121 	MX53_PAD_EIM_CS0 = 96,
122 	MX53_PAD_EIM_CS1 = 97,
123 	MX53_PAD_EIM_OE = 98,
124 	MX53_PAD_EIM_RW = 99,
125 	MX53_PAD_EIM_LBA = 100,
126 	MX53_PAD_EIM_EB0 = 101,
127 	MX53_PAD_EIM_EB1 = 102,
128 	MX53_PAD_EIM_DA0 = 103,
129 	MX53_PAD_EIM_DA1 = 104,
130 	MX53_PAD_EIM_DA2 = 105,
131 	MX53_PAD_EIM_DA3 = 106,
132 	MX53_PAD_EIM_DA4 = 107,
133 	MX53_PAD_EIM_DA5 = 108,
134 	MX53_PAD_EIM_DA6 = 109,
135 	MX53_PAD_EIM_DA7 = 110,
136 	MX53_PAD_EIM_DA8 = 111,
137 	MX53_PAD_EIM_DA9 = 112,
138 	MX53_PAD_EIM_DA10 = 113,
139 	MX53_PAD_EIM_DA11 = 114,
140 	MX53_PAD_EIM_DA12 = 115,
141 	MX53_PAD_EIM_DA13 = 116,
142 	MX53_PAD_EIM_DA14 = 117,
143 	MX53_PAD_EIM_DA15 = 118,
144 	MX53_PAD_NANDF_WE_B = 119,
145 	MX53_PAD_NANDF_RE_B = 120,
146 	MX53_PAD_EIM_WAIT = 121,
147 	MX53_PAD_RESERVE8 = 122,
148 	MX53_PAD_LVDS1_TX3_P = 123,
149 	MX53_PAD_LVDS1_TX2_P = 124,
150 	MX53_PAD_LVDS1_CLK_P = 125,
151 	MX53_PAD_LVDS1_TX1_P = 126,
152 	MX53_PAD_LVDS1_TX0_P = 127,
153 	MX53_PAD_LVDS0_TX3_P = 128,
154 	MX53_PAD_LVDS0_CLK_P = 129,
155 	MX53_PAD_LVDS0_TX2_P = 130,
156 	MX53_PAD_LVDS0_TX1_P = 131,
157 	MX53_PAD_LVDS0_TX0_P = 132,
158 	MX53_PAD_GPIO_10 = 133,
159 	MX53_PAD_GPIO_11 = 134,
160 	MX53_PAD_GPIO_12 = 135,
161 	MX53_PAD_GPIO_13 = 136,
162 	MX53_PAD_GPIO_14 = 137,
163 	MX53_PAD_NANDF_CLE = 138,
164 	MX53_PAD_NANDF_ALE = 139,
165 	MX53_PAD_NANDF_WP_B = 140,
166 	MX53_PAD_NANDF_RB0 = 141,
167 	MX53_PAD_NANDF_CS0 = 142,
168 	MX53_PAD_NANDF_CS1 = 143,
169 	MX53_PAD_NANDF_CS2 = 144,
170 	MX53_PAD_NANDF_CS3 = 145,
171 	MX53_PAD_FEC_MDIO = 146,
172 	MX53_PAD_FEC_REF_CLK = 147,
173 	MX53_PAD_FEC_RX_ER = 148,
174 	MX53_PAD_FEC_CRS_DV = 149,
175 	MX53_PAD_FEC_RXD1 = 150,
176 	MX53_PAD_FEC_RXD0 = 151,
177 	MX53_PAD_FEC_TX_EN = 152,
178 	MX53_PAD_FEC_TXD1 = 153,
179 	MX53_PAD_FEC_TXD0 = 154,
180 	MX53_PAD_FEC_MDC = 155,
181 	MX53_PAD_PATA_DIOW = 156,
182 	MX53_PAD_PATA_DMACK = 157,
183 	MX53_PAD_PATA_DMARQ = 158,
184 	MX53_PAD_PATA_BUFFER_EN = 159,
185 	MX53_PAD_PATA_INTRQ = 160,
186 	MX53_PAD_PATA_DIOR = 161,
187 	MX53_PAD_PATA_RESET_B = 162,
188 	MX53_PAD_PATA_IORDY = 163,
189 	MX53_PAD_PATA_DA_0 = 164,
190 	MX53_PAD_PATA_DA_1 = 165,
191 	MX53_PAD_PATA_DA_2 = 166,
192 	MX53_PAD_PATA_CS_0 = 167,
193 	MX53_PAD_PATA_CS_1 = 168,
194 	MX53_PAD_PATA_DATA0 = 169,
195 	MX53_PAD_PATA_DATA1 = 170,
196 	MX53_PAD_PATA_DATA2 = 171,
197 	MX53_PAD_PATA_DATA3 = 172,
198 	MX53_PAD_PATA_DATA4 = 173,
199 	MX53_PAD_PATA_DATA5 = 174,
200 	MX53_PAD_PATA_DATA6 = 175,
201 	MX53_PAD_PATA_DATA7 = 176,
202 	MX53_PAD_PATA_DATA8 = 177,
203 	MX53_PAD_PATA_DATA9 = 178,
204 	MX53_PAD_PATA_DATA10 = 179,
205 	MX53_PAD_PATA_DATA11 = 180,
206 	MX53_PAD_PATA_DATA12 = 181,
207 	MX53_PAD_PATA_DATA13 = 182,
208 	MX53_PAD_PATA_DATA14 = 183,
209 	MX53_PAD_PATA_DATA15 = 184,
210 	MX53_PAD_SD1_DATA0 = 185,
211 	MX53_PAD_SD1_DATA1 = 186,
212 	MX53_PAD_SD1_CMD = 187,
213 	MX53_PAD_SD1_DATA2 = 188,
214 	MX53_PAD_SD1_CLK = 189,
215 	MX53_PAD_SD1_DATA3 = 190,
216 	MX53_PAD_SD2_CLK = 191,
217 	MX53_PAD_SD2_CMD = 192,
218 	MX53_PAD_SD2_DATA3 = 193,
219 	MX53_PAD_SD2_DATA2 = 194,
220 	MX53_PAD_SD2_DATA1 = 195,
221 	MX53_PAD_SD2_DATA0 = 196,
222 	MX53_PAD_GPIO_0 = 197,
223 	MX53_PAD_GPIO_1 = 198,
224 	MX53_PAD_GPIO_9 = 199,
225 	MX53_PAD_GPIO_3 = 200,
226 	MX53_PAD_GPIO_6 = 201,
227 	MX53_PAD_GPIO_2 = 202,
228 	MX53_PAD_GPIO_4 = 203,
229 	MX53_PAD_GPIO_5 = 204,
230 	MX53_PAD_GPIO_7 = 205,
231 	MX53_PAD_GPIO_8 = 206,
232 	MX53_PAD_GPIO_16 = 207,
233 	MX53_PAD_GPIO_17 = 208,
234 	MX53_PAD_GPIO_18 = 209,
235 };
236 
237 /* Pad names for the pinmux subsystem */
238 static const struct pinctrl_pin_desc imx53_pinctrl_pads[] = {
239 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE0),
240 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE1),
241 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE2),
242 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE3),
243 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE4),
244 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE5),
245 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE6),
246 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE7),
247 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_19),
248 	IMX_PINCTRL_PIN(MX53_PAD_KEY_COL0),
249 	IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW0),
250 	IMX_PINCTRL_PIN(MX53_PAD_KEY_COL1),
251 	IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW1),
252 	IMX_PINCTRL_PIN(MX53_PAD_KEY_COL2),
253 	IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW2),
254 	IMX_PINCTRL_PIN(MX53_PAD_KEY_COL3),
255 	IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW3),
256 	IMX_PINCTRL_PIN(MX53_PAD_KEY_COL4),
257 	IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW4),
258 	IMX_PINCTRL_PIN(MX53_PAD_DI0_DISP_CLK),
259 	IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN15),
260 	IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN2),
261 	IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN3),
262 	IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN4),
263 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT0),
264 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT1),
265 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT2),
266 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT3),
267 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT4),
268 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT5),
269 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT6),
270 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT7),
271 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT8),
272 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT9),
273 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT10),
274 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT11),
275 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT12),
276 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT13),
277 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT14),
278 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT15),
279 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT16),
280 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT17),
281 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT18),
282 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT19),
283 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT20),
284 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT21),
285 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT22),
286 	IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT23),
287 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_PIXCLK),
288 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_MCLK),
289 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DATA_EN),
290 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_VSYNC),
291 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT4),
292 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT5),
293 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT6),
294 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT7),
295 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT8),
296 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT9),
297 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT10),
298 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT11),
299 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT12),
300 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT13),
301 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT14),
302 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT15),
303 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT16),
304 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT17),
305 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT18),
306 	IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT19),
307 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A25),
308 	IMX_PINCTRL_PIN(MX53_PAD_EIM_EB2),
309 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D16),
310 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D17),
311 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D18),
312 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D19),
313 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D20),
314 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D21),
315 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D22),
316 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D23),
317 	IMX_PINCTRL_PIN(MX53_PAD_EIM_EB3),
318 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D24),
319 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D25),
320 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D26),
321 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D27),
322 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D28),
323 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D29),
324 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D30),
325 	IMX_PINCTRL_PIN(MX53_PAD_EIM_D31),
326 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A24),
327 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A23),
328 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A22),
329 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A21),
330 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A20),
331 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A19),
332 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A18),
333 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A17),
334 	IMX_PINCTRL_PIN(MX53_PAD_EIM_A16),
335 	IMX_PINCTRL_PIN(MX53_PAD_EIM_CS0),
336 	IMX_PINCTRL_PIN(MX53_PAD_EIM_CS1),
337 	IMX_PINCTRL_PIN(MX53_PAD_EIM_OE),
338 	IMX_PINCTRL_PIN(MX53_PAD_EIM_RW),
339 	IMX_PINCTRL_PIN(MX53_PAD_EIM_LBA),
340 	IMX_PINCTRL_PIN(MX53_PAD_EIM_EB0),
341 	IMX_PINCTRL_PIN(MX53_PAD_EIM_EB1),
342 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA0),
343 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA1),
344 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA2),
345 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA3),
346 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA4),
347 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA5),
348 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA6),
349 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA7),
350 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA8),
351 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA9),
352 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA10),
353 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA11),
354 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA12),
355 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA13),
356 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA14),
357 	IMX_PINCTRL_PIN(MX53_PAD_EIM_DA15),
358 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_WE_B),
359 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_RE_B),
360 	IMX_PINCTRL_PIN(MX53_PAD_EIM_WAIT),
361 	IMX_PINCTRL_PIN(MX53_PAD_RESERVE8),
362 	IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX3_P),
363 	IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX2_P),
364 	IMX_PINCTRL_PIN(MX53_PAD_LVDS1_CLK_P),
365 	IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX1_P),
366 	IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX0_P),
367 	IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX3_P),
368 	IMX_PINCTRL_PIN(MX53_PAD_LVDS0_CLK_P),
369 	IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX2_P),
370 	IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX1_P),
371 	IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX0_P),
372 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_10),
373 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_11),
374 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_12),
375 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_13),
376 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_14),
377 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_CLE),
378 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_ALE),
379 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_WP_B),
380 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_RB0),
381 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS0),
382 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS1),
383 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS2),
384 	IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS3),
385 	IMX_PINCTRL_PIN(MX53_PAD_FEC_MDIO),
386 	IMX_PINCTRL_PIN(MX53_PAD_FEC_REF_CLK),
387 	IMX_PINCTRL_PIN(MX53_PAD_FEC_RX_ER),
388 	IMX_PINCTRL_PIN(MX53_PAD_FEC_CRS_DV),
389 	IMX_PINCTRL_PIN(MX53_PAD_FEC_RXD1),
390 	IMX_PINCTRL_PIN(MX53_PAD_FEC_RXD0),
391 	IMX_PINCTRL_PIN(MX53_PAD_FEC_TX_EN),
392 	IMX_PINCTRL_PIN(MX53_PAD_FEC_TXD1),
393 	IMX_PINCTRL_PIN(MX53_PAD_FEC_TXD0),
394 	IMX_PINCTRL_PIN(MX53_PAD_FEC_MDC),
395 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DIOW),
396 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DMACK),
397 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DMARQ),
398 	IMX_PINCTRL_PIN(MX53_PAD_PATA_BUFFER_EN),
399 	IMX_PINCTRL_PIN(MX53_PAD_PATA_INTRQ),
400 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DIOR),
401 	IMX_PINCTRL_PIN(MX53_PAD_PATA_RESET_B),
402 	IMX_PINCTRL_PIN(MX53_PAD_PATA_IORDY),
403 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_0),
404 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_1),
405 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_2),
406 	IMX_PINCTRL_PIN(MX53_PAD_PATA_CS_0),
407 	IMX_PINCTRL_PIN(MX53_PAD_PATA_CS_1),
408 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA0),
409 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA1),
410 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA2),
411 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA3),
412 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA4),
413 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA5),
414 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA6),
415 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA7),
416 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA8),
417 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA9),
418 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA10),
419 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA11),
420 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA12),
421 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA13),
422 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA14),
423 	IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA15),
424 	IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA0),
425 	IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA1),
426 	IMX_PINCTRL_PIN(MX53_PAD_SD1_CMD),
427 	IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA2),
428 	IMX_PINCTRL_PIN(MX53_PAD_SD1_CLK),
429 	IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA3),
430 	IMX_PINCTRL_PIN(MX53_PAD_SD2_CLK),
431 	IMX_PINCTRL_PIN(MX53_PAD_SD2_CMD),
432 	IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA3),
433 	IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA2),
434 	IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA1),
435 	IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA0),
436 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_0),
437 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_1),
438 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_9),
439 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_3),
440 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_6),
441 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_2),
442 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_4),
443 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_5),
444 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_7),
445 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_8),
446 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_16),
447 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_17),
448 	IMX_PINCTRL_PIN(MX53_PAD_GPIO_18),
449 };
450 
451 static const struct imx_pinctrl_soc_info imx53_pinctrl_info = {
452 	.pins = imx53_pinctrl_pads,
453 	.npins = ARRAY_SIZE(imx53_pinctrl_pads),
454 	.gpr_compatible = "fsl,imx53-iomuxc-gpr",
455 };
456 
457 static const struct of_device_id imx53_pinctrl_of_match[] = {
458 	{ .compatible = "fsl,imx53-iomuxc", },
459 	{ /* sentinel */ }
460 };
461 
462 static int imx53_pinctrl_probe(struct platform_device *pdev)
463 {
464 	return imx_pinctrl_probe(pdev, &imx53_pinctrl_info);
465 }
466 
467 static struct platform_driver imx53_pinctrl_driver = {
468 	.driver = {
469 		.name = "imx53-pinctrl",
470 		.of_match_table = imx53_pinctrl_of_match,
471 	},
472 	.probe = imx53_pinctrl_probe,
473 };
474 
475 static int __init imx53_pinctrl_init(void)
476 {
477 	return platform_driver_register(&imx53_pinctrl_driver);
478 }
479 arch_initcall(imx53_pinctrl_init);
480