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