2 * VF610 pinctrl driver based on imx pinmux and pinconf core
4 * Copyright 2013 Freescale Semiconductor, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #include <linux/err.h>
13 #include <linux/init.h>
15 #include <linux/module.h>
17 #include <linux/of_device.h>
18 #include <linux/pinctrl/pinctrl.h>
20 #include "pinctrl-imx.h"
100 VF610_PAD_PTD17
= 77,
101 VF610_PAD_PTD16
= 78,
112 VF610_PAD_PTD10
= 89,
113 VF610_PAD_PTD11
= 90,
114 VF610_PAD_PTD12
= 91,
115 VF610_PAD_PTD13
= 92,
116 VF610_PAD_PTB23
= 93,
117 VF610_PAD_PTB24
= 94,
118 VF610_PAD_PTB25
= 95,
119 VF610_PAD_PTB26
= 96,
120 VF610_PAD_PTB27
= 97,
121 VF610_PAD_PTB28
= 98,
122 VF610_PAD_PTC26
= 99,
123 VF610_PAD_PTC27
= 100,
124 VF610_PAD_PTC28
= 101,
125 VF610_PAD_PTC29
= 102,
126 VF610_PAD_PTC30
= 103,
127 VF610_PAD_PTC31
= 104,
128 VF610_PAD_PTE0
= 105,
129 VF610_PAD_PTE1
= 106,
130 VF610_PAD_PTE2
= 107,
131 VF610_PAD_PTE3
= 108,
132 VF610_PAD_PTE4
= 109,
133 VF610_PAD_PTE5
= 110,
134 VF610_PAD_PTE6
= 111,
135 VF610_PAD_PTE7
= 112,
136 VF610_PAD_PTE8
= 113,
137 VF610_PAD_PTE9
= 114,
138 VF610_PAD_PTE10
= 115,
139 VF610_PAD_PTE11
= 116,
140 VF610_PAD_PTE12
= 117,
141 VF610_PAD_PTE13
= 118,
142 VF610_PAD_PTE14
= 119,
143 VF610_PAD_PTE15
= 120,
144 VF610_PAD_PTE16
= 121,
145 VF610_PAD_PTE17
= 122,
146 VF610_PAD_PTE18
= 123,
147 VF610_PAD_PTE19
= 124,
148 VF610_PAD_PTE20
= 125,
149 VF610_PAD_PTE21
= 126,
150 VF610_PAD_PTE22
= 127,
151 VF610_PAD_PTE23
= 128,
152 VF610_PAD_PTE24
= 129,
153 VF610_PAD_PTE25
= 130,
154 VF610_PAD_PTE26
= 131,
155 VF610_PAD_PTE27
= 132,
156 VF610_PAD_PTE28
= 133,
157 VF610_PAD_PTA7
= 134,
160 /* Pad names for the pinmux subsystem */
161 static const struct pinctrl_pin_desc vf610_pinctrl_pads
[] = {
162 IMX_PINCTRL_PIN(VF610_PAD_PTA6
),
163 IMX_PINCTRL_PIN(VF610_PAD_PTA8
),
164 IMX_PINCTRL_PIN(VF610_PAD_PTA9
),
165 IMX_PINCTRL_PIN(VF610_PAD_PTA10
),
166 IMX_PINCTRL_PIN(VF610_PAD_PTA11
),
167 IMX_PINCTRL_PIN(VF610_PAD_PTA12
),
168 IMX_PINCTRL_PIN(VF610_PAD_PTA16
),
169 IMX_PINCTRL_PIN(VF610_PAD_PTA17
),
170 IMX_PINCTRL_PIN(VF610_PAD_PTA18
),
171 IMX_PINCTRL_PIN(VF610_PAD_PTA19
),
172 IMX_PINCTRL_PIN(VF610_PAD_PTA20
),
173 IMX_PINCTRL_PIN(VF610_PAD_PTA21
),
174 IMX_PINCTRL_PIN(VF610_PAD_PTA22
),
175 IMX_PINCTRL_PIN(VF610_PAD_PTA23
),
176 IMX_PINCTRL_PIN(VF610_PAD_PTA24
),
177 IMX_PINCTRL_PIN(VF610_PAD_PTA25
),
178 IMX_PINCTRL_PIN(VF610_PAD_PTA26
),
179 IMX_PINCTRL_PIN(VF610_PAD_PTA27
),
180 IMX_PINCTRL_PIN(VF610_PAD_PTA28
),
181 IMX_PINCTRL_PIN(VF610_PAD_PTA29
),
182 IMX_PINCTRL_PIN(VF610_PAD_PTA30
),
183 IMX_PINCTRL_PIN(VF610_PAD_PTA31
),
184 IMX_PINCTRL_PIN(VF610_PAD_PTB0
),
185 IMX_PINCTRL_PIN(VF610_PAD_PTB1
),
186 IMX_PINCTRL_PIN(VF610_PAD_PTB2
),
187 IMX_PINCTRL_PIN(VF610_PAD_PTB3
),
188 IMX_PINCTRL_PIN(VF610_PAD_PTB4
),
189 IMX_PINCTRL_PIN(VF610_PAD_PTB5
),
190 IMX_PINCTRL_PIN(VF610_PAD_PTB6
),
191 IMX_PINCTRL_PIN(VF610_PAD_PTB7
),
192 IMX_PINCTRL_PIN(VF610_PAD_PTB8
),
193 IMX_PINCTRL_PIN(VF610_PAD_PTB9
),
194 IMX_PINCTRL_PIN(VF610_PAD_PTB10
),
195 IMX_PINCTRL_PIN(VF610_PAD_PTB11
),
196 IMX_PINCTRL_PIN(VF610_PAD_PTB12
),
197 IMX_PINCTRL_PIN(VF610_PAD_PTB13
),
198 IMX_PINCTRL_PIN(VF610_PAD_PTB14
),
199 IMX_PINCTRL_PIN(VF610_PAD_PTB15
),
200 IMX_PINCTRL_PIN(VF610_PAD_PTB16
),
201 IMX_PINCTRL_PIN(VF610_PAD_PTB17
),
202 IMX_PINCTRL_PIN(VF610_PAD_PTB18
),
203 IMX_PINCTRL_PIN(VF610_PAD_PTB19
),
204 IMX_PINCTRL_PIN(VF610_PAD_PTB20
),
205 IMX_PINCTRL_PIN(VF610_PAD_PTB21
),
206 IMX_PINCTRL_PIN(VF610_PAD_PTB22
),
207 IMX_PINCTRL_PIN(VF610_PAD_PTC0
),
208 IMX_PINCTRL_PIN(VF610_PAD_PTC1
),
209 IMX_PINCTRL_PIN(VF610_PAD_PTC2
),
210 IMX_PINCTRL_PIN(VF610_PAD_PTC3
),
211 IMX_PINCTRL_PIN(VF610_PAD_PTC4
),
212 IMX_PINCTRL_PIN(VF610_PAD_PTC5
),
213 IMX_PINCTRL_PIN(VF610_PAD_PTC6
),
214 IMX_PINCTRL_PIN(VF610_PAD_PTC7
),
215 IMX_PINCTRL_PIN(VF610_PAD_PTC8
),
216 IMX_PINCTRL_PIN(VF610_PAD_PTC9
),
217 IMX_PINCTRL_PIN(VF610_PAD_PTC10
),
218 IMX_PINCTRL_PIN(VF610_PAD_PTC11
),
219 IMX_PINCTRL_PIN(VF610_PAD_PTC12
),
220 IMX_PINCTRL_PIN(VF610_PAD_PTC13
),
221 IMX_PINCTRL_PIN(VF610_PAD_PTC14
),
222 IMX_PINCTRL_PIN(VF610_PAD_PTC15
),
223 IMX_PINCTRL_PIN(VF610_PAD_PTC16
),
224 IMX_PINCTRL_PIN(VF610_PAD_PTC17
),
225 IMX_PINCTRL_PIN(VF610_PAD_PTD31
),
226 IMX_PINCTRL_PIN(VF610_PAD_PTD30
),
227 IMX_PINCTRL_PIN(VF610_PAD_PTD29
),
228 IMX_PINCTRL_PIN(VF610_PAD_PTD28
),
229 IMX_PINCTRL_PIN(VF610_PAD_PTD27
),
230 IMX_PINCTRL_PIN(VF610_PAD_PTD26
),
231 IMX_PINCTRL_PIN(VF610_PAD_PTD25
),
232 IMX_PINCTRL_PIN(VF610_PAD_PTD24
),
233 IMX_PINCTRL_PIN(VF610_PAD_PTD23
),
234 IMX_PINCTRL_PIN(VF610_PAD_PTD22
),
235 IMX_PINCTRL_PIN(VF610_PAD_PTD21
),
236 IMX_PINCTRL_PIN(VF610_PAD_PTD20
),
237 IMX_PINCTRL_PIN(VF610_PAD_PTD19
),
238 IMX_PINCTRL_PIN(VF610_PAD_PTD18
),
239 IMX_PINCTRL_PIN(VF610_PAD_PTD17
),
240 IMX_PINCTRL_PIN(VF610_PAD_PTD16
),
241 IMX_PINCTRL_PIN(VF610_PAD_PTD0
),
242 IMX_PINCTRL_PIN(VF610_PAD_PTD1
),
243 IMX_PINCTRL_PIN(VF610_PAD_PTD2
),
244 IMX_PINCTRL_PIN(VF610_PAD_PTD3
),
245 IMX_PINCTRL_PIN(VF610_PAD_PTD4
),
246 IMX_PINCTRL_PIN(VF610_PAD_PTD5
),
247 IMX_PINCTRL_PIN(VF610_PAD_PTD6
),
248 IMX_PINCTRL_PIN(VF610_PAD_PTD7
),
249 IMX_PINCTRL_PIN(VF610_PAD_PTD8
),
250 IMX_PINCTRL_PIN(VF610_PAD_PTD9
),
251 IMX_PINCTRL_PIN(VF610_PAD_PTD10
),
252 IMX_PINCTRL_PIN(VF610_PAD_PTD11
),
253 IMX_PINCTRL_PIN(VF610_PAD_PTD12
),
254 IMX_PINCTRL_PIN(VF610_PAD_PTD13
),
255 IMX_PINCTRL_PIN(VF610_PAD_PTB23
),
256 IMX_PINCTRL_PIN(VF610_PAD_PTB24
),
257 IMX_PINCTRL_PIN(VF610_PAD_PTB25
),
258 IMX_PINCTRL_PIN(VF610_PAD_PTB26
),
259 IMX_PINCTRL_PIN(VF610_PAD_PTB27
),
260 IMX_PINCTRL_PIN(VF610_PAD_PTB28
),
261 IMX_PINCTRL_PIN(VF610_PAD_PTC26
),
262 IMX_PINCTRL_PIN(VF610_PAD_PTC27
),
263 IMX_PINCTRL_PIN(VF610_PAD_PTC28
),
264 IMX_PINCTRL_PIN(VF610_PAD_PTC29
),
265 IMX_PINCTRL_PIN(VF610_PAD_PTC30
),
266 IMX_PINCTRL_PIN(VF610_PAD_PTC31
),
267 IMX_PINCTRL_PIN(VF610_PAD_PTE0
),
268 IMX_PINCTRL_PIN(VF610_PAD_PTE1
),
269 IMX_PINCTRL_PIN(VF610_PAD_PTE2
),
270 IMX_PINCTRL_PIN(VF610_PAD_PTE3
),
271 IMX_PINCTRL_PIN(VF610_PAD_PTE4
),
272 IMX_PINCTRL_PIN(VF610_PAD_PTE5
),
273 IMX_PINCTRL_PIN(VF610_PAD_PTE6
),
274 IMX_PINCTRL_PIN(VF610_PAD_PTE7
),
275 IMX_PINCTRL_PIN(VF610_PAD_PTE8
),
276 IMX_PINCTRL_PIN(VF610_PAD_PTE9
),
277 IMX_PINCTRL_PIN(VF610_PAD_PTE10
),
278 IMX_PINCTRL_PIN(VF610_PAD_PTE11
),
279 IMX_PINCTRL_PIN(VF610_PAD_PTE12
),
280 IMX_PINCTRL_PIN(VF610_PAD_PTE13
),
281 IMX_PINCTRL_PIN(VF610_PAD_PTE14
),
282 IMX_PINCTRL_PIN(VF610_PAD_PTE15
),
283 IMX_PINCTRL_PIN(VF610_PAD_PTE16
),
284 IMX_PINCTRL_PIN(VF610_PAD_PTE17
),
285 IMX_PINCTRL_PIN(VF610_PAD_PTE18
),
286 IMX_PINCTRL_PIN(VF610_PAD_PTE19
),
287 IMX_PINCTRL_PIN(VF610_PAD_PTE20
),
288 IMX_PINCTRL_PIN(VF610_PAD_PTE21
),
289 IMX_PINCTRL_PIN(VF610_PAD_PTE22
),
290 IMX_PINCTRL_PIN(VF610_PAD_PTE23
),
291 IMX_PINCTRL_PIN(VF610_PAD_PTE24
),
292 IMX_PINCTRL_PIN(VF610_PAD_PTE25
),
293 IMX_PINCTRL_PIN(VF610_PAD_PTE26
),
294 IMX_PINCTRL_PIN(VF610_PAD_PTE27
),
295 IMX_PINCTRL_PIN(VF610_PAD_PTE28
),
296 IMX_PINCTRL_PIN(VF610_PAD_PTA7
),
299 static struct imx_pinctrl_soc_info vf610_pinctrl_info
= {
300 .pins
= vf610_pinctrl_pads
,
301 .npins
= ARRAY_SIZE(vf610_pinctrl_pads
),
302 .flags
= SHARE_MUX_CONF_REG
,
305 static const struct of_device_id vf610_pinctrl_of_match
[] = {
306 { .compatible
= "fsl,vf610-iomuxc", },
310 static int vf610_pinctrl_probe(struct platform_device
*pdev
)
312 return imx_pinctrl_probe(pdev
, &vf610_pinctrl_info
);
315 static struct platform_driver vf610_pinctrl_driver
= {
317 .name
= "vf610-pinctrl",
318 .of_match_table
= vf610_pinctrl_of_match
,
320 .probe
= vf610_pinctrl_probe
,
321 .remove
= imx_pinctrl_remove
,
324 static int __init
vf610_pinctrl_init(void)
326 return platform_driver_register(&vf610_pinctrl_driver
);
328 arch_initcall(vf610_pinctrl_init
);
330 static void __exit
vf610_pinctrl_exit(void)
332 platform_driver_unregister(&vf610_pinctrl_driver
);
334 module_exit(vf610_pinctrl_exit
);
336 MODULE_DESCRIPTION("Freescale VF610 pinctrl driver");
337 MODULE_LICENSE("GPL v2");