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