blob: d9cd2b457484d53159b09c88c669663211e627e1 [file] [log] [blame]
Haojian Zhuangf4e66982012-01-04 10:26:33 +08001/*
2 * linux/drivers/pinctrl/pinmux-pxa168.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * publishhed by the Free Software Foundation.
7 *
8 * Copyright (C) 2011, Marvell Technology Group Ltd.
9 *
10 * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
11 *
12 */
13
14#include <linux/device.h>
15#include <linux/module.h>
16#include <linux/io.h>
17#include <linux/platform_device.h>
18#include "pinctrl-pxa3xx.h"
19
20#define PXA168_DS_MASK 0x1800
21#define PXA168_DS_SHIFT 11
22#define PXA168_SLEEP_MASK 0x38
23#define PXA168_SLEEP_SELECT (1 << 9)
24#define PXA168_SLEEP_DATA (1 << 8)
25#define PXA168_SLEEP_DIR (1 << 7)
26
27#define MFPR_168(a, r, f0, f1, f2, f3, f4, f5, f6, f7) \
28 { \
29 .name = #a, \
30 .pin = a, \
31 .mfpr = r, \
32 .func = { \
33 PXA168_MUX_##f0, \
34 PXA168_MUX_##f1, \
35 PXA168_MUX_##f2, \
36 PXA168_MUX_##f3, \
37 PXA168_MUX_##f4, \
38 PXA168_MUX_##f5, \
39 PXA168_MUX_##f6, \
40 PXA168_MUX_##f7, \
41 }, \
42 }
43
44#define GRP_168(a, m, p) \
45 { .name = a, .mux = PXA168_MUX_##m, .pins = p, .npins = ARRAY_SIZE(p), }
46
47/* 131 pins */
48enum pxa168_pin_list {
49 /* 0~122: GPIO0~GPIO122 */
50 PWR_SCL = 123,
51 PWR_SDA,
52 TDI,
53 TMS,
54 TCK,
55 TDO,
56 TRST,
57 WAKEUP = 130,
58};
59
60enum pxa168_mux {
61 /* PXA3xx_MUX_GPIO = 0 (predefined in pinctrl-pxa3xx.h) */
62 PXA168_MUX_GPIO = 0,
63 PXA168_MUX_DFIO,
64 PXA168_MUX_NAND,
65 PXA168_MUX_SMC,
66 PXA168_MUX_SMC_CS0,
67 PXA168_MUX_SMC_CS1,
68 PXA168_MUX_SMC_INT,
69 PXA168_MUX_SMC_RDY,
70 PXA168_MUX_MMC1,
71 PXA168_MUX_MMC2,
72 PXA168_MUX_MMC2_CMD,
73 PXA168_MUX_MMC2_CLK,
74 PXA168_MUX_MMC3,
75 PXA168_MUX_MMC3_CMD,
76 PXA168_MUX_MMC3_CLK,
77 PXA168_MUX_MMC4,
78 PXA168_MUX_MSP,
79 PXA168_MUX_MSP_DAT3,
80 PXA168_MUX_MSP_INS,
81 PXA168_MUX_I2C,
82 PXA168_MUX_PWRI2C,
83 PXA168_MUX_AC97,
84 PXA168_MUX_AC97_SYSCLK,
85 PXA168_MUX_PWM,
86 PXA168_MUX_PWM1,
87 PXA168_MUX_XD,
88 PXA168_MUX_XP,
89 PXA168_MUX_LCD,
90 PXA168_MUX_CCIC,
91 PXA168_MUX_CF,
92 PXA168_MUX_CF_RDY,
93 PXA168_MUX_CF_nINPACK,
94 PXA168_MUX_CF_nWAIT,
95 PXA168_MUX_KP_MKOUT,
96 PXA168_MUX_KP_MKIN,
97 PXA168_MUX_KP_DK,
98 PXA168_MUX_ETH,
99 PXA168_MUX_ETH_TX,
100 PXA168_MUX_ETH_RX,
101 PXA168_MUX_ONE_WIRE,
102 PXA168_MUX_UART1,
103 PXA168_MUX_UART1_TX,
104 PXA168_MUX_UART1_CTS,
105 PXA168_MUX_UART1_nRI,
106 PXA168_MUX_UART1_DTR,
107 PXA168_MUX_UART2,
108 PXA168_MUX_UART2_TX,
109 PXA168_MUX_UART3,
110 PXA168_MUX_UART3_TX,
111 PXA168_MUX_UART3_CTS,
112 PXA168_MUX_SSP1,
113 PXA168_MUX_SSP1_TX,
114 PXA168_MUX_SSP2,
115 PXA168_MUX_SSP2_TX,
116 PXA168_MUX_SSP3,
117 PXA168_MUX_SSP3_TX,
118 PXA168_MUX_SSP4,
119 PXA168_MUX_SSP4_TX,
120 PXA168_MUX_SSP5,
121 PXA168_MUX_SSP5_TX,
122 PXA168_MUX_USB,
123 PXA168_MUX_JTAG,
124 PXA168_MUX_RESET,
125 PXA168_MUX_WAKEUP,
126 PXA168_MUX_EXT_32K_IN,
127 PXA168_MUX_NONE = 0xffff,
128};
129
130static struct pinctrl_pin_desc pxa168_pads[] = {
131 PINCTRL_PIN(GPIO0, "GPIO0"),
132 PINCTRL_PIN(GPIO1, "GPIO1"),
133 PINCTRL_PIN(GPIO2, "GPIO2"),
134 PINCTRL_PIN(GPIO3, "GPIO3"),
135 PINCTRL_PIN(GPIO4, "GPIO4"),
136 PINCTRL_PIN(GPIO5, "GPIO5"),
137 PINCTRL_PIN(GPIO6, "GPIO6"),
138 PINCTRL_PIN(GPIO7, "GPIO7"),
139 PINCTRL_PIN(GPIO8, "GPIO8"),
140 PINCTRL_PIN(GPIO9, "GPIO9"),
141 PINCTRL_PIN(GPIO10, "GPIO10"),
142 PINCTRL_PIN(GPIO11, "GPIO11"),
143 PINCTRL_PIN(GPIO12, "GPIO12"),
144 PINCTRL_PIN(GPIO13, "GPIO13"),
145 PINCTRL_PIN(GPIO14, "GPIO14"),
146 PINCTRL_PIN(GPIO15, "GPIO15"),
147 PINCTRL_PIN(GPIO16, "GPIO16"),
148 PINCTRL_PIN(GPIO17, "GPIO17"),
149 PINCTRL_PIN(GPIO18, "GPIO18"),
150 PINCTRL_PIN(GPIO19, "GPIO19"),
151 PINCTRL_PIN(GPIO20, "GPIO20"),
152 PINCTRL_PIN(GPIO21, "GPIO21"),
153 PINCTRL_PIN(GPIO22, "GPIO22"),
154 PINCTRL_PIN(GPIO23, "GPIO23"),
155 PINCTRL_PIN(GPIO24, "GPIO24"),
156 PINCTRL_PIN(GPIO25, "GPIO25"),
157 PINCTRL_PIN(GPIO26, "GPIO26"),
158 PINCTRL_PIN(GPIO27, "GPIO27"),
159 PINCTRL_PIN(GPIO28, "GPIO28"),
160 PINCTRL_PIN(GPIO29, "GPIO29"),
161 PINCTRL_PIN(GPIO30, "GPIO30"),
162 PINCTRL_PIN(GPIO31, "GPIO31"),
163 PINCTRL_PIN(GPIO32, "GPIO32"),
164 PINCTRL_PIN(GPIO33, "GPIO33"),
165 PINCTRL_PIN(GPIO34, "GPIO34"),
166 PINCTRL_PIN(GPIO35, "GPIO35"),
167 PINCTRL_PIN(GPIO36, "GPIO36"),
168 PINCTRL_PIN(GPIO37, "GPIO37"),
169 PINCTRL_PIN(GPIO38, "GPIO38"),
170 PINCTRL_PIN(GPIO39, "GPIO39"),
171 PINCTRL_PIN(GPIO40, "GPIO40"),
172 PINCTRL_PIN(GPIO41, "GPIO41"),
173 PINCTRL_PIN(GPIO42, "GPIO42"),
174 PINCTRL_PIN(GPIO43, "GPIO43"),
175 PINCTRL_PIN(GPIO44, "GPIO44"),
176 PINCTRL_PIN(GPIO45, "GPIO45"),
177 PINCTRL_PIN(GPIO46, "GPIO46"),
178 PINCTRL_PIN(GPIO47, "GPIO47"),
179 PINCTRL_PIN(GPIO48, "GPIO48"),
180 PINCTRL_PIN(GPIO49, "GPIO49"),
181 PINCTRL_PIN(GPIO50, "GPIO50"),
182 PINCTRL_PIN(GPIO51, "GPIO51"),
183 PINCTRL_PIN(GPIO52, "GPIO52"),
184 PINCTRL_PIN(GPIO53, "GPIO53"),
185 PINCTRL_PIN(GPIO54, "GPIO54"),
186 PINCTRL_PIN(GPIO55, "GPIO55"),
187 PINCTRL_PIN(GPIO56, "GPIO56"),
188 PINCTRL_PIN(GPIO57, "GPIO57"),
189 PINCTRL_PIN(GPIO58, "GPIO58"),
190 PINCTRL_PIN(GPIO59, "GPIO59"),
191 PINCTRL_PIN(GPIO60, "GPIO60"),
192 PINCTRL_PIN(GPIO61, "GPIO61"),
193 PINCTRL_PIN(GPIO62, "GPIO62"),
194 PINCTRL_PIN(GPIO63, "GPIO63"),
195 PINCTRL_PIN(GPIO64, "GPIO64"),
196 PINCTRL_PIN(GPIO65, "GPIO65"),
197 PINCTRL_PIN(GPIO66, "GPIO66"),
198 PINCTRL_PIN(GPIO67, "GPIO67"),
199 PINCTRL_PIN(GPIO68, "GPIO68"),
200 PINCTRL_PIN(GPIO69, "GPIO69"),
201 PINCTRL_PIN(GPIO70, "GPIO70"),
202 PINCTRL_PIN(GPIO71, "GPIO71"),
203 PINCTRL_PIN(GPIO72, "GPIO72"),
204 PINCTRL_PIN(GPIO73, "GPIO73"),
205 PINCTRL_PIN(GPIO74, "GPIO74"),
206 PINCTRL_PIN(GPIO75, "GPIO75"),
207 PINCTRL_PIN(GPIO76, "GPIO76"),
208 PINCTRL_PIN(GPIO77, "GPIO77"),
209 PINCTRL_PIN(GPIO78, "GPIO78"),
210 PINCTRL_PIN(GPIO79, "GPIO79"),
211 PINCTRL_PIN(GPIO80, "GPIO80"),
212 PINCTRL_PIN(GPIO81, "GPIO81"),
213 PINCTRL_PIN(GPIO82, "GPIO82"),
214 PINCTRL_PIN(GPIO83, "GPIO83"),
215 PINCTRL_PIN(GPIO84, "GPIO84"),
216 PINCTRL_PIN(GPIO85, "GPIO85"),
217 PINCTRL_PIN(GPIO86, "GPIO86"),
218 PINCTRL_PIN(GPIO87, "GPIO87"),
219 PINCTRL_PIN(GPIO88, "GPIO88"),
220 PINCTRL_PIN(GPIO89, "GPIO89"),
221 PINCTRL_PIN(GPIO90, "GPIO90"),
222 PINCTRL_PIN(GPIO91, "GPIO91"),
223 PINCTRL_PIN(GPIO92, "GPIO92"),
224 PINCTRL_PIN(GPIO93, "GPIO93"),
225 PINCTRL_PIN(GPIO94, "GPIO94"),
226 PINCTRL_PIN(GPIO95, "GPIO95"),
227 PINCTRL_PIN(GPIO96, "GPIO96"),
228 PINCTRL_PIN(GPIO97, "GPIO97"),
229 PINCTRL_PIN(GPIO98, "GPIO98"),
230 PINCTRL_PIN(GPIO99, "GPIO99"),
231 PINCTRL_PIN(GPIO100, "GPIO100"),
232 PINCTRL_PIN(GPIO101, "GPIO101"),
233 PINCTRL_PIN(GPIO102, "GPIO102"),
234 PINCTRL_PIN(GPIO103, "GPIO103"),
235 PINCTRL_PIN(GPIO104, "GPIO104"),
236 PINCTRL_PIN(GPIO105, "GPIO105"),
237 PINCTRL_PIN(GPIO106, "GPIO106"),
238 PINCTRL_PIN(GPIO107, "GPIO107"),
239 PINCTRL_PIN(GPIO108, "GPIO108"),
240 PINCTRL_PIN(GPIO109, "GPIO109"),
241 PINCTRL_PIN(GPIO110, "GPIO110"),
242 PINCTRL_PIN(GPIO111, "GPIO111"),
243 PINCTRL_PIN(GPIO112, "GPIO112"),
244 PINCTRL_PIN(GPIO113, "GPIO113"),
245 PINCTRL_PIN(GPIO114, "GPIO114"),
246 PINCTRL_PIN(GPIO115, "GPIO115"),
247 PINCTRL_PIN(GPIO116, "GPIO116"),
248 PINCTRL_PIN(GPIO117, "GPIO117"),
249 PINCTRL_PIN(GPIO118, "GPIO118"),
250 PINCTRL_PIN(GPIO119, "GPIO119"),
251 PINCTRL_PIN(GPIO120, "GPIO120"),
252 PINCTRL_PIN(GPIO121, "GPIO121"),
253 PINCTRL_PIN(GPIO122, "GPIO122"),
254 PINCTRL_PIN(PWR_SCL, "PWR_SCL"),
255 PINCTRL_PIN(PWR_SDA, "PWR_SDA"),
256 PINCTRL_PIN(TDI, "TDI"),
257 PINCTRL_PIN(TMS, "TMS"),
258 PINCTRL_PIN(TCK, "TCK"),
259 PINCTRL_PIN(TDO, "TDO"),
260 PINCTRL_PIN(TRST, "TRST"),
261 PINCTRL_PIN(WAKEUP, "WAKEUP"),
262};
263
264struct pxa3xx_mfp_pin pxa168_mfp[] = {
265 /* pin offs f0 f1 f2 f3 f4 f5 f6 f7 */
266 MFPR_168(GPIO0, 0x04C, DFIO, NONE, NONE, MSP, MMC3_CMD, GPIO, MMC3, NONE),
267 MFPR_168(GPIO1, 0x050, DFIO, NONE, NONE, MSP, MMC3_CLK, GPIO, MMC3, NONE),
268 MFPR_168(GPIO2, 0x054, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
269 MFPR_168(GPIO3, 0x058, DFIO, NONE, NONE, NONE, NONE, GPIO, MMC3, NONE),
270 MFPR_168(GPIO4, 0x05C, DFIO, NONE, NONE, MSP_DAT3, NONE, GPIO, MMC3, NONE),
271 MFPR_168(GPIO5, 0x060, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
272 MFPR_168(GPIO6, 0x064, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
273 MFPR_168(GPIO7, 0x068, DFIO, NONE, NONE, MSP, NONE, GPIO, MMC3, NONE),
274 MFPR_168(GPIO8, 0x06C, DFIO, MMC2, UART3_TX, NONE, MMC2_CMD, GPIO, MMC3_CLK, NONE),
275 MFPR_168(GPIO9, 0x070, DFIO, MMC2, UART3, NONE, MMC2_CLK, GPIO, MMC3_CMD, NONE),
276 MFPR_168(GPIO10, 0x074, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP_DAT3, NONE),
277 MFPR_168(GPIO11, 0x078, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
278 MFPR_168(GPIO12, 0x07C, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
279 MFPR_168(GPIO13, 0x080, DFIO, MMC2, UART3, NONE, NONE, GPIO, MSP, NONE),
280 MFPR_168(GPIO14, 0x084, DFIO, MMC2, NONE, NONE, NONE, GPIO, MSP, NONE),
281 MFPR_168(GPIO15, 0x088, DFIO, MMC2, NONE, NONE, NONE, GPIO, MSP, NONE),
282 MFPR_168(GPIO16, 0x08C, GPIO, NAND, SMC_CS0, SMC_CS1, NONE, NONE, MMC3, NONE),
283 MFPR_168(GPIO17, 0x090, NAND, NONE, NONE, NONE, NONE, GPIO, MSP, NONE),
284 MFPR_168(GPIO18, 0x094, GPIO, NAND, SMC_CS1, SMC_CS0, NONE, NONE, NONE, NONE),
285 MFPR_168(GPIO19, 0x098, SMC_CS0, NONE, NONE, CF, NONE, GPIO, NONE, NONE),
286 MFPR_168(GPIO20, 0x09C, GPIO, NONE, SMC_CS1, CF, CF_RDY, NONE, NONE, NONE),
287 MFPR_168(GPIO21, 0x0A0, NAND, MMC2_CLK, NONE, NONE, NONE, GPIO, NONE, NONE),
288 MFPR_168(GPIO22, 0x0A4, NAND, MMC2_CMD, NONE, NONE, NONE, GPIO, NONE, NONE),
289 MFPR_168(GPIO23, 0x0A8, SMC, NAND, NONE, CF, NONE, GPIO, NONE, NONE),
290 MFPR_168(GPIO24, 0x0AC, NAND, NONE, NONE, NONE, NONE, GPIO, NONE, NONE),
291 MFPR_168(GPIO25, 0x0B0, SMC, NAND, NONE, CF, NONE, GPIO, NONE, NONE),
292 MFPR_168(GPIO26, 0x0B4, GPIO, NAND, NONE, NONE, CF, NONE, NONE, NONE),
293 MFPR_168(GPIO27, 0x0B8, SMC_INT, NAND, SMC, NONE, SMC_RDY, GPIO, NONE, NONE),
294 MFPR_168(GPIO28, 0x0BC, SMC_RDY, MMC4, SMC, CF_RDY, NONE, GPIO, MMC2_CMD, NONE),
295 MFPR_168(GPIO29, 0x0C0, SMC, MMC4, NONE, CF, NONE, GPIO, MMC2_CLK, KP_DK),
296 MFPR_168(GPIO30, 0x0C4, SMC, MMC4, UART3_TX, CF, NONE, GPIO, MMC2, KP_DK),
297 MFPR_168(GPIO31, 0x0C8, SMC, MMC4, UART3, CF, NONE, GPIO, MMC2, KP_DK),
298 MFPR_168(GPIO32, 0x0CC, SMC, MMC4, UART3, CF, NONE, GPIO, MMC2, KP_DK),
299 MFPR_168(GPIO33, 0x0D0, SMC, MMC4, UART3, CF, CF_nINPACK, GPIO, MMC2, KP_DK),
300 MFPR_168(GPIO34, 0x0D4, GPIO, NONE, SMC_CS1, CF, CF_nWAIT, NONE, MMC3, KP_DK),
301 MFPR_168(GPIO35, 0x0D8, GPIO, NONE, SMC, CF_nINPACK, NONE, NONE, MMC3_CMD, KP_DK),
302 MFPR_168(GPIO36, 0x0DC, GPIO, NONE, SMC, CF_nWAIT, NONE, NONE, MMC3_CLK, KP_DK),
303 MFPR_168(GPIO37, 0x000, GPIO, MMC1, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
304 MFPR_168(GPIO38, 0x004, GPIO, MMC1, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
305 MFPR_168(GPIO39, 0x008, GPIO, NONE, NONE, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
306 MFPR_168(GPIO40, 0x00C, GPIO, MMC1, MSP, KP_MKOUT, CCIC, XP, KP_MKIN, KP_DK),
307 MFPR_168(GPIO41, 0x010, GPIO, MMC1, MSP, NONE, CCIC, XP, KP_MKIN, KP_DK),
308 MFPR_168(GPIO42, 0x014, GPIO, I2C, NONE, MSP, CCIC, XP, KP_MKIN, KP_DK),
309 MFPR_168(GPIO43, 0x018, GPIO, MMC1, MSP, MSP_INS, NONE, NONE, KP_MKIN, KP_DK),
310 MFPR_168(GPIO44, 0x01C, GPIO, MMC1, MSP_DAT3, MSP, CCIC, XP, KP_MKIN, KP_DK),
311 MFPR_168(GPIO45, 0x020, GPIO, NONE, NONE, MSP, CCIC, XP, NONE, KP_DK),
312 MFPR_168(GPIO46, 0x024, GPIO, MMC1, MSP_INS, MSP, CCIC, NONE, KP_MKOUT, KP_DK),
313 MFPR_168(GPIO47, 0x028, GPIO, NONE, NONE, MSP_INS, NONE, XP, NONE, KP_DK),
314 MFPR_168(GPIO48, 0x02C, GPIO, MMC1, NONE, MSP_DAT3, CCIC, NONE, NONE, KP_DK),
315 MFPR_168(GPIO49, 0x030, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
316 MFPR_168(GPIO50, 0x034, GPIO, I2C, NONE, MSP, CCIC, XD, KP_MKOUT, NONE),
317 MFPR_168(GPIO51, 0x038, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
318 MFPR_168(GPIO52, 0x03C, GPIO, MMC1, NONE, MSP, NONE, XD, KP_MKOUT, NONE),
319 MFPR_168(GPIO53, 0x040, GPIO, MMC1, NONE, NONE, NONE, XD, KP_MKOUT, NONE),
320 MFPR_168(GPIO54, 0x044, GPIO, MMC1, NONE, NONE, CCIC, XD, KP_MKOUT, NONE),
321 MFPR_168(GPIO55, 0x048, GPIO, NONE, NONE, MSP, CCIC, XD, KP_MKOUT, NONE),
322 MFPR_168(GPIO56, 0x0E0, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
323 MFPR_168(GPIO57, 0x0E4, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
324 MFPR_168(GPIO58, 0x0E8, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
325 MFPR_168(GPIO59, 0x0EC, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
326 MFPR_168(GPIO60, 0x0F0, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
327 MFPR_168(GPIO61, 0x0F4, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
328 MFPR_168(GPIO62, 0x0F8, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
329 MFPR_168(GPIO63, 0x0FC, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
330 MFPR_168(GPIO64, 0x100, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
331 MFPR_168(GPIO65, 0x104, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
332 MFPR_168(GPIO66, 0x108, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
333 MFPR_168(GPIO67, 0x10C, GPIO, LCD, NONE, NONE, NONE, NONE, NONE, NONE),
334 MFPR_168(GPIO68, 0x110, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
335 MFPR_168(GPIO69, 0x114, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
336 MFPR_168(GPIO70, 0x118, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
337 MFPR_168(GPIO71, 0x11C, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
338 MFPR_168(GPIO72, 0x120, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
339 MFPR_168(GPIO73, 0x124, GPIO, LCD, NONE, XD, NONE, NONE, NONE, NONE),
340 MFPR_168(GPIO74, 0x128, GPIO, LCD, PWM, XD, NONE, NONE, NONE, NONE),
341 MFPR_168(GPIO75, 0x12C, GPIO, LCD, PWM, XD, ONE_WIRE, NONE, NONE, NONE),
342 MFPR_168(GPIO76, 0x130, GPIO, LCD, PWM, I2C, NONE, NONE, MSP_INS, NONE),
343 MFPR_168(GPIO77, 0x134, GPIO, LCD, PWM1, I2C, ONE_WIRE, NONE, XD, NONE),
344 MFPR_168(GPIO78, 0x138, GPIO, LCD, NONE, NONE, NONE, MMC4, NONE, NONE),
345 MFPR_168(GPIO79, 0x13C, GPIO, LCD, NONE, NONE, ONE_WIRE, MMC4, NONE, NONE),
346 MFPR_168(GPIO80, 0x140, GPIO, LCD, NONE, I2C, NONE, MMC4, NONE, NONE),
347 MFPR_168(GPIO81, 0x144, GPIO, LCD, NONE, I2C, ONE_WIRE, MMC4, NONE, NONE),
348 MFPR_168(GPIO82, 0x148, GPIO, LCD, PWM, NONE, NONE, MMC4, NONE, NONE),
349 MFPR_168(GPIO83, 0x14C, GPIO, LCD, PWM, NONE, RESET, MMC4, NONE, NONE),
350 MFPR_168(GPIO84, 0x150, GPIO, NONE, PWM, ONE_WIRE, PWM1, NONE, NONE, EXT_32K_IN),
351 MFPR_168(GPIO85, 0x154, GPIO, NONE, PWM1, NONE, NONE, NONE, NONE, USB),
352 MFPR_168(GPIO86, 0x158, GPIO, MMC2, UART2, NONE, JTAG, ETH_TX, SSP5_TX, SSP5),
353 MFPR_168(GPIO87, 0x15C, GPIO, MMC2, UART2, NONE, JTAG, ETH_TX, SSP5, SSP5_TX),
354 MFPR_168(GPIO88, 0x160, GPIO, MMC2, UART2, UART2_TX, JTAG, ETH_TX, ETH_RX, SSP5),
355 MFPR_168(GPIO89, 0x164, GPIO, MMC2, UART2_TX, UART2, JTAG, ETH_TX, ETH_RX, SSP5),
356 MFPR_168(GPIO90, 0x168, GPIO, MMC2, NONE, SSP3, JTAG, ETH_TX, ETH_RX, NONE),
357 MFPR_168(GPIO91, 0x16C, GPIO, MMC2, NONE, SSP3, SSP4, ETH_TX, ETH_RX, NONE),
358 MFPR_168(GPIO92, 0x170, GPIO, MMC2, NONE, SSP3, SSP3_TX, ETH, NONE, NONE),
359 MFPR_168(GPIO93, 0x174, GPIO, MMC2, NONE, SSP3_TX, SSP3, ETH, NONE, NONE),
360 MFPR_168(GPIO94, 0x178, GPIO, MMC2_CMD, SSP3, AC97_SYSCLK, AC97, ETH, NONE, NONE),
361 MFPR_168(GPIO95, 0x17C, GPIO, MMC2_CLK, NONE, NONE, AC97, ETH, NONE, NONE),
362 MFPR_168(GPIO96, 0x180, GPIO, PWM, NONE, MMC2, NONE, ETH_RX, ETH_TX, NONE),
363 MFPR_168(GPIO97, 0x184, GPIO, PWM, ONE_WIRE, NONE, NONE, ETH_RX, ETH_TX, NONE),
364 MFPR_168(GPIO98, 0x188, GPIO, PWM1, UART3_TX, UART3, NONE, ETH_RX, ETH_TX, NONE),
365 MFPR_168(GPIO99, 0x18C, GPIO, ONE_WIRE, UART3, UART3_TX, NONE, ETH_RX, ETH_TX, NONE),
366 MFPR_168(GPIO100, 0x190, GPIO, NONE, UART3_CTS, UART3, NONE, ETH, NONE, NONE),
367 MFPR_168(GPIO101, 0x194, GPIO, NONE, UART3, UART3_CTS, NONE, ETH, NONE, NONE),
368 MFPR_168(GPIO102, 0x198, GPIO, I2C, UART3, SSP4, NONE, NONE, NONE, NONE),
369 MFPR_168(GPIO103, 0x19C, GPIO, I2C, UART3, SSP4, SSP2, ETH, NONE, NONE),
370 MFPR_168(GPIO104, 0x1A0, GPIO, PWM, UART1, SSP4, SSP4_TX, AC97, KP_MKOUT, NONE),
371 MFPR_168(GPIO105, 0x1A4, GPIO, I2C, UART1, SSP4_TX, SSP4, AC97, KP_MKOUT, NONE),
372 MFPR_168(GPIO106, 0x1A8, GPIO, I2C, PWM1, AC97_SYSCLK, MMC2, NONE, KP_MKOUT, NONE),
373 MFPR_168(GPIO107, 0x1AC, GPIO, UART1_TX, UART1, NONE, SSP2, MSP_DAT3, NONE, KP_MKIN),
374 MFPR_168(GPIO108, 0x1B0, GPIO, UART1, UART1_TX, NONE, SSP2_TX, MSP, NONE, KP_MKIN),
375 MFPR_168(GPIO109, 0x1B4, GPIO, UART1_CTS, UART1, NONE, AC97_SYSCLK, MSP, NONE, KP_MKIN),
376 MFPR_168(GPIO110, 0x1B8, GPIO, UART1, UART1_CTS, NONE, SMC_RDY, MSP, NONE, KP_MKIN),
377 MFPR_168(GPIO111, 0x1BC, GPIO, UART1_nRI, UART1, SSP3, SSP2, MSP, XD, KP_MKOUT),
378 MFPR_168(GPIO112, 0x1C0, GPIO, UART1_DTR, UART1, ONE_WIRE, SSP2, MSP, XD, KP_MKOUT),
379 MFPR_168(GPIO113, 0x1C4, GPIO, NONE, NONE, NONE, NONE, NONE, AC97_SYSCLK, NONE),
380 MFPR_168(GPIO114, 0x1C8, GPIO, SSP1, NONE, NONE, NONE, NONE, AC97, NONE),
381 MFPR_168(GPIO115, 0x1CC, GPIO, SSP1, NONE, NONE, NONE, NONE, AC97, NONE),
382 MFPR_168(GPIO116, 0x1D0, GPIO, SSP1_TX, SSP1, NONE, NONE, NONE, AC97, NONE),
383 MFPR_168(GPIO117, 0x1D4, GPIO, SSP1, SSP1_TX, NONE, MMC2_CMD, NONE, AC97, NONE),
384 MFPR_168(GPIO118, 0x1D8, GPIO, SSP2, NONE, NONE, MMC2_CLK, NONE, AC97, KP_MKIN),
385 MFPR_168(GPIO119, 0x1DC, GPIO, SSP2, NONE, NONE, MMC2, NONE, AC97, KP_MKIN),
386 MFPR_168(GPIO120, 0x1E0, GPIO, SSP2, SSP2_TX, NONE, MMC2, NONE, NONE, KP_MKIN),
387 MFPR_168(GPIO121, 0x1E4, GPIO, SSP2_TX, SSP2, NONE, MMC2, NONE, NONE, KP_MKIN),
388 MFPR_168(GPIO122, 0x1E8, GPIO, AC97_SYSCLK, SSP2, PWM, MMC2, NONE, NONE, NONE),
389 MFPR_168(PWR_SCL, 0x1EC, PWRI2C, NONE, NONE, NONE, NONE, NONE, GPIO, MMC4),
390 MFPR_168(PWR_SDA, 0x1F0, PWRI2C, NONE, NONE, NONE, NONE, NONE, GPIO, NONE),
391 MFPR_168(TDI, 0x1F4, JTAG, PWM1, UART2, MMC4, SSP5, NONE, XD, MMC4),
392 MFPR_168(TMS, 0x1F8, JTAG, PWM, UART2, NONE, SSP5, NONE, XD, MMC4),
393 MFPR_168(TCK, 0x1FC, JTAG, PWM, UART2, UART2_TX, SSP5, NONE, XD, MMC4),
394 MFPR_168(TDO, 0x200, JTAG, PWM, UART2_TX, UART2, SSP5_TX, NONE, XD, MMC4),
395 MFPR_168(TRST, 0x204, JTAG, ONE_WIRE, SSP2, SSP3, AC97_SYSCLK, NONE, XD, MMC4),
396 MFPR_168(WAKEUP, 0x208, WAKEUP, ONE_WIRE, PWM1, PWM, SSP2, NONE, GPIO, MMC4),
397};
398
399static const unsigned p168_jtag_pin1[] = {TDI, TMS, TCK, TDO, TRST};
400static const unsigned p168_wakeup_pin1[] = {WAKEUP};
401static const unsigned p168_ssp1rx_pin1[] = {GPIO114, GPIO115, GPIO116};
402static const unsigned p168_ssp1tx_pin1[] = {GPIO117};
403static const unsigned p168_ssp4rx_pin1[] = {GPIO102, GPIO103, GPIO104};
404static const unsigned p168_ssp4tx_pin1[] = {GPIO105};
405static const unsigned p168_ssp5rx_pin1[] = {GPIO86, GPIO88, GPIO89};
406static const unsigned p168_ssp5tx_pin1[] = {GPIO87};
407static const unsigned p168_i2c_pin1[] = {GPIO105, GPIO106};
408static const unsigned p168_pwri2c_pin1[] = {PWR_SCL, PWR_SDA};
409static const unsigned p168_mmc1_pin1[] = {GPIO40, GPIO41, GPIO43, GPIO46,
410 GPIO49, GPIO51, GPIO52, GPIO53};
411static const unsigned p168_mmc2_data_pin1[] = {GPIO90, GPIO91, GPIO92, GPIO93};
412static const unsigned p168_mmc2_cmd_pin1[] = {GPIO94};
413static const unsigned p168_mmc2_clk_pin1[] = {GPIO95};
414static const unsigned p168_mmc3_data_pin1[] = {GPIO0, GPIO1, GPIO2, GPIO3,
415 GPIO4, GPIO5, GPIO6, GPIO7};
416static const unsigned p168_mmc3_cmd_pin1[] = {GPIO9};
417static const unsigned p168_mmc3_clk_pin1[] = {GPIO8};
418static const unsigned p168_eth_pin1[] = {GPIO92, GPIO93, GPIO100, GPIO101,
419 GPIO103};
420static const unsigned p168_ethtx_pin1[] = {GPIO86, GPIO87, GPIO88, GPIO89,
421 GPIO90, GPIO91};
422static const unsigned p168_ethrx_pin1[] = {GPIO94, GPIO95, GPIO96, GPIO97,
423 GPIO98, GPIO99};
424static const unsigned p168_uart1rx_pin1[] = {GPIO107};
425static const unsigned p168_uart1tx_pin1[] = {GPIO108};
426static const unsigned p168_uart3rx_pin1[] = {GPIO98, GPIO100, GPIO101};
427static const unsigned p168_uart3tx_pin1[] = {GPIO99};
428static const unsigned p168_msp_pin1[] = {GPIO40, GPIO41, GPIO42, GPIO43,
429 GPIO44, GPIO50};
430static const unsigned p168_ccic_pin1[] = {GPIO37, GPIO38, GPIO39, GPIO40,
431 GPIO41, GPIO42, GPIO44, GPIO45, GPIO46, GPIO48, GPIO54, GPIO55};
432static const unsigned p168_xd_pin1[] = {GPIO37, GPIO38, GPIO39, GPIO40,
433 GPIO41, GPIO42, GPIO44, GPIO45, GPIO47, GPIO48, GPIO49, GPIO50,
434 GPIO51, GPIO52};
435static const unsigned p168_lcd_pin1[] = {GPIO56, GPIO57, GPIO58, GPIO59,
436 GPIO60, GPIO61, GPIO62, GPIO63, GPIO64, GPIO65, GPIO66, GPIO67,
437 GPIO68, GPIO69, GPIO70, GPIO71, GPIO72, GPIO73, GPIO74, GPIO75,
438 GPIO76, GPIO77, GPIO78, GPIO79, GPIO80, GPIO81, GPIO82, GPIO83};
439static const unsigned p168_dfio_pin1[] = {GPIO0, GPIO1, GPIO2, GPIO3,
440 GPIO4, GPIO5, GPIO6, GPIO7, GPIO8, GPIO9, GPIO10, GPIO11, GPIO12,
441 GPIO13, GPIO14, GPIO15};
442static const unsigned p168_nand_pin1[] = {GPIO16, GPIO17, GPIO21, GPIO22,
443 GPIO24, GPIO26};
444static const unsigned p168_smc_pin1[] = {GPIO23, GPIO25, GPIO29, GPIO35,
445 GPIO36};
446static const unsigned p168_smccs0_pin1[] = {GPIO18};
447static const unsigned p168_smccs1_pin1[] = {GPIO34};
448static const unsigned p168_smcrdy_pin1[] = {GPIO28};
449static const unsigned p168_ac97sysclk_pin1[] = {GPIO113};
450static const unsigned p168_ac97_pin1[] = {GPIO114, GPIO115, GPIO117, GPIO118,
451 GPIO119};
452static const unsigned p168_cf_pin1[] = {GPIO19, GPIO20, GPIO23, GPIO25,
453 GPIO28, GPIO29, GPIO30, GPIO31, GPIO32, GPIO33, GPIO34, GPIO35,
454 GPIO36};
455static const unsigned p168_kpmkin_pin1[] = {GPIO109, GPIO110, GPIO121};
456static const unsigned p168_kpmkout_pin1[] = {GPIO111, GPIO112};
457static const unsigned p168_gpio86_pin1[] = {WAKEUP};
458static const unsigned p168_gpio86_pin2[] = {GPIO86};
459static const unsigned p168_gpio87_pin1[] = {GPIO87};
460static const unsigned p168_gpio87_pin2[] = {PWR_SDA};
461static const unsigned p168_gpio88_pin1[] = {GPIO88};
462static const unsigned p168_gpio88_pin2[] = {PWR_SCL};
463
464static struct pxa3xx_pin_group pxa168_grps[] = {
465 GRP_168("uart1rx-1", UART1, p168_uart1rx_pin1),
466 GRP_168("uart1tx-1", UART1_TX, p168_uart1tx_pin1),
467 GRP_168("uart3rx-1", UART3, p168_uart3rx_pin1),
468 GRP_168("uart3tx-1", UART3_TX, p168_uart3tx_pin1),
469 GRP_168("ssp1rx-1", SSP1, p168_ssp1rx_pin1),
470 GRP_168("ssp1tx-1", SSP1_TX, p168_ssp1tx_pin1),
471 GRP_168("ssp4rx-1", SSP4, p168_ssp4rx_pin1),
472 GRP_168("ssp4tx-1", SSP4_TX, p168_ssp4tx_pin1),
473 GRP_168("ssp5rx-1", SSP5, p168_ssp5rx_pin1),
474 GRP_168("ssp5tx-1", SSP5_TX, p168_ssp5tx_pin1),
475 GRP_168("jtag", JTAG, p168_jtag_pin1),
476 GRP_168("wakeup", WAKEUP, p168_wakeup_pin1),
477 GRP_168("i2c", I2C, p168_i2c_pin1),
478 GRP_168("pwri2c", PWRI2C, p168_pwri2c_pin1),
479 GRP_168("mmc1 8p1", MMC1, p168_mmc1_pin1),
480 GRP_168("mmc2 4p1", MMC2, p168_mmc2_data_pin1),
481 GRP_168("mmc2 cmd1", MMC2_CMD, p168_mmc2_cmd_pin1),
482 GRP_168("mmc2 clk1", MMC2_CLK, p168_mmc2_clk_pin1),
483 GRP_168("mmc3 8p1", MMC3, p168_mmc3_data_pin1),
484 GRP_168("mmc3 cmd1", MMC3_CMD, p168_mmc3_cmd_pin1),
485 GRP_168("mmc3 clk1", MMC3_CLK, p168_mmc3_clk_pin1),
486 GRP_168("eth", ETH, p168_eth_pin1),
487 GRP_168("eth rx", ETH_RX, p168_ethrx_pin1),
488 GRP_168("eth tx", ETH_TX, p168_ethtx_pin1),
489 GRP_168("msp", MSP, p168_msp_pin1),
490 GRP_168("ccic", CCIC, p168_ccic_pin1),
491 GRP_168("xd", XD, p168_xd_pin1),
492 GRP_168("lcd", LCD, p168_lcd_pin1),
493 GRP_168("dfio", DFIO, p168_dfio_pin1),
494 GRP_168("nand", NAND, p168_nand_pin1),
495 GRP_168("smc", SMC, p168_smc_pin1),
496 GRP_168("smc cs0", SMC_CS0, p168_smccs0_pin1),
497 GRP_168("smc cs1", SMC_CS1, p168_smccs1_pin1),
498 GRP_168("smc rdy", SMC_RDY, p168_smcrdy_pin1),
499 GRP_168("ac97 sysclk", AC97_SYSCLK, p168_ac97sysclk_pin1),
500 GRP_168("ac97", AC97, p168_ac97_pin1),
501 GRP_168("cf", CF, p168_cf_pin1),
502 GRP_168("kp mkin 3p1", KP_MKIN, p168_kpmkin_pin1),
503 GRP_168("kp mkout 2p1", KP_MKOUT, p168_kpmkout_pin1),
504 GRP_168("gpio86-1", GPIO, p168_gpio86_pin1),
505 GRP_168("gpio86-2", GPIO, p168_gpio86_pin2),
506 GRP_168("gpio87-1", GPIO, p168_gpio87_pin1),
507 GRP_168("gpio87-2", GPIO, p168_gpio87_pin2),
508 GRP_168("gpio88-1", GPIO, p168_gpio88_pin1),
509 GRP_168("gpio88-2", GPIO, p168_gpio88_pin2),
510};
511
512static const char * const p168_uart1rx_grps[] = {"uart1rx-1"};
513static const char * const p168_uart1tx_grps[] = {"uart1tx-1"};
514static const char * const p168_uart3rx_grps[] = {"uart3rx-1"};
515static const char * const p168_uart3tx_grps[] = {"uart3tx-1"};
516static const char * const p168_ssp1rx_grps[] = {"ssp1rx-1"};
517static const char * const p168_ssp1tx_grps[] = {"ssp1tx-1"};
518static const char * const p168_ssp4rx_grps[] = {"ssp4rx-1"};
519static const char * const p168_ssp4tx_grps[] = {"ssp4tx-1"};
520static const char * const p168_ssp5rx_grps[] = {"ssp5rx-1"};
521static const char * const p168_ssp5tx_grps[] = {"ssp5tx-1"};
522static const char * const p168_i2c_grps[] = {"i2c"};
523static const char * const p168_pwri2c_grps[] = {"pwri2c"};
524static const char * const p168_mmc1_grps[] = {"mmc1 8p1"};
525static const char * const p168_mmc2_data_grps[] = {"mmc2 4p1"};
526static const char * const p168_mmc2_cmd_grps[] = {"mmc2 cmd1"};
527static const char * const p168_mmc2_clk_grps[] = {"mmc2 clk1"};
528static const char * const p168_mmc3_data_grps[] = {"mmc3 8p1"};
529static const char * const p168_mmc3_cmd_grps[] = {"mmc3 cmd1"};
530static const char * const p168_mmc3_clk_grps[] = {"mmc3 clk1"};
531static const char * const p168_eth_grps[] = {"eth"};
532static const char * const p168_ethrx_grps[] = {"eth rx"};
533static const char * const p168_ethtx_grps[] = {"eth tx"};
534static const char * const p168_msp_grps[] = {"msp"};
535static const char * const p168_ccic_grps[] = {"ccic"};
536static const char * const p168_xd_grps[] = {"xd"};
537static const char * const p168_lcd_grps[] = {"lcd"};
538static const char * const p168_dfio_grps[] = {"dfio"};
539static const char * const p168_nand_grps[] = {"nand"};
540static const char * const p168_smc_grps[] = {"smc"};
541static const char * const p168_smccs0_grps[] = {"smc cs0"};
542static const char * const p168_smccs1_grps[] = {"smc cs1"};
543static const char * const p168_smcrdy_grps[] = {"smc rdy"};
544static const char * const p168_ac97sysclk_grps[] = {"ac97 sysclk"};
545static const char * const p168_ac97_grps[] = {"ac97"};
546static const char * const p168_cf_grps[] = {"cf"};
547static const char * const p168_kpmkin_grps[] = {"kp mkin 3p1"};
548static const char * const p168_kpmkout_grps[] = {"kp mkout 2p1"};
549static const char * const p168_gpio86_grps[] = {"gpio86-1", "gpio86-2"};
550static const char * const p168_gpio87_grps[] = {"gpio87-1", "gpio87-2"};
551static const char * const p168_gpio88_grps[] = {"gpio88-1", "gpio88-2"};
552
553static struct pxa3xx_pmx_func pxa168_funcs[] = {
554 {"uart1 rx", ARRAY_AND_SIZE(p168_uart1rx_grps)},
555 {"uart1 tx", ARRAY_AND_SIZE(p168_uart1tx_grps)},
556 {"uart3 rx", ARRAY_AND_SIZE(p168_uart3rx_grps)},
557 {"uart3 tx", ARRAY_AND_SIZE(p168_uart3tx_grps)},
558 {"ssp1 rx", ARRAY_AND_SIZE(p168_ssp1rx_grps)},
559 {"ssp1 tx", ARRAY_AND_SIZE(p168_ssp1tx_grps)},
560 {"ssp4 rx", ARRAY_AND_SIZE(p168_ssp4rx_grps)},
561 {"ssp4 tx", ARRAY_AND_SIZE(p168_ssp4tx_grps)},
562 {"ssp5 rx", ARRAY_AND_SIZE(p168_ssp5rx_grps)},
563 {"ssp5 tx", ARRAY_AND_SIZE(p168_ssp5tx_grps)},
564 {"i2c", ARRAY_AND_SIZE(p168_i2c_grps)},
565 {"pwri2c", ARRAY_AND_SIZE(p168_pwri2c_grps)},
566 {"mmc1", ARRAY_AND_SIZE(p168_mmc1_grps)},
567 {"mmc2", ARRAY_AND_SIZE(p168_mmc2_data_grps)},
568 {"mmc2 cmd", ARRAY_AND_SIZE(p168_mmc2_cmd_grps)},
569 {"mmc2 clk", ARRAY_AND_SIZE(p168_mmc2_clk_grps)},
570 {"mmc3", ARRAY_AND_SIZE(p168_mmc3_data_grps)},
571 {"mmc3 cmd", ARRAY_AND_SIZE(p168_mmc3_cmd_grps)},
572 {"mmc3 clk", ARRAY_AND_SIZE(p168_mmc3_clk_grps)},
573 {"eth", ARRAY_AND_SIZE(p168_eth_grps)},
574 {"eth rx", ARRAY_AND_SIZE(p168_ethrx_grps)},
575 {"eth tx", ARRAY_AND_SIZE(p168_ethtx_grps)},
576 {"msp", ARRAY_AND_SIZE(p168_msp_grps)},
577 {"ccic", ARRAY_AND_SIZE(p168_ccic_grps)},
578 {"xd", ARRAY_AND_SIZE(p168_xd_grps)},
579 {"lcd", ARRAY_AND_SIZE(p168_lcd_grps)},
580 {"dfio", ARRAY_AND_SIZE(p168_dfio_grps)},
581 {"nand", ARRAY_AND_SIZE(p168_nand_grps)},
582 {"smc", ARRAY_AND_SIZE(p168_smc_grps)},
583 {"smc cs0", ARRAY_AND_SIZE(p168_smccs0_grps)},
584 {"smc cs1", ARRAY_AND_SIZE(p168_smccs1_grps)},
585 {"smc rdy", ARRAY_AND_SIZE(p168_smcrdy_grps)},
586 {"ac97", ARRAY_AND_SIZE(p168_ac97_grps)},
587 {"ac97 sysclk", ARRAY_AND_SIZE(p168_ac97sysclk_grps)},
588 {"cf", ARRAY_AND_SIZE(p168_cf_grps)},
589 {"kpmkin", ARRAY_AND_SIZE(p168_kpmkin_grps)},
590 {"kpmkout", ARRAY_AND_SIZE(p168_kpmkout_grps)},
591 {"gpio86", ARRAY_AND_SIZE(p168_gpio86_grps)},
592 {"gpio87", ARRAY_AND_SIZE(p168_gpio87_grps)},
593 {"gpio88", ARRAY_AND_SIZE(p168_gpio88_grps)},
594};
595
596static struct pinctrl_desc pxa168_pctrl_desc = {
597 .name = "pxa168-pinctrl",
598 .owner = THIS_MODULE,
599};
600
601static struct pxa3xx_pinmux_info pxa168_info = {
602 .mfp = pxa168_mfp,
603 .num_mfp = ARRAY_SIZE(pxa168_mfp),
604 .grps = pxa168_grps,
605 .num_grps = ARRAY_SIZE(pxa168_grps),
606 .funcs = pxa168_funcs,
607 .num_funcs = ARRAY_SIZE(pxa168_funcs),
608 .num_gpio = 128,
609 .desc = &pxa168_pctrl_desc,
610 .pads = pxa168_pads,
611 .num_pads = ARRAY_SIZE(pxa168_pads),
612
613 .cputype = PINCTRL_PXA168,
614 .ds_mask = PXA168_DS_MASK,
615 .ds_shift = PXA168_DS_SHIFT,
616};
617
Greg Kroah-Hartman150632b2012-12-21 13:10:23 -0800618static int pxa168_pinmux_probe(struct platform_device *pdev)
Haojian Zhuangf4e66982012-01-04 10:26:33 +0800619{
620 return pxa3xx_pinctrl_register(pdev, &pxa168_info);
621}
622
Bill Pembertonf90f54b2012-11-19 13:26:06 -0500623static int pxa168_pinmux_remove(struct platform_device *pdev)
Haojian Zhuangf4e66982012-01-04 10:26:33 +0800624{
625 return pxa3xx_pinctrl_unregister(pdev);
626}
627
628static struct platform_driver pxa168_pinmux_driver = {
629 .driver = {
630 .name = "pxa168-pinmux",
631 .owner = THIS_MODULE,
632 },
633 .probe = pxa168_pinmux_probe,
Bill Pemberton2a36f082012-11-19 13:21:27 -0500634 .remove = pxa168_pinmux_remove,
Haojian Zhuangf4e66982012-01-04 10:26:33 +0800635};
636
637static int __init pxa168_pinmux_init(void)
638{
639 return platform_driver_register(&pxa168_pinmux_driver);
640}
641core_initcall_sync(pxa168_pinmux_init);
642
643static void __exit pxa168_pinmux_exit(void)
644{
645 platform_driver_unregister(&pxa168_pinmux_driver);
646}
647module_exit(pxa168_pinmux_exit);
648
649MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
650MODULE_DESCRIPTION("PXA3xx pin control driver");
651MODULE_LICENSE("GPL v2");