blob: 8ab7898d21be3872dde3f5a70ed75c58c588023c [file] [log] [blame]
Barry Song3370dc92013-05-14 22:17:58 +08001/*
2 * pinctrl pads, groups, functions for CSR SiRFatlasVI
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <linux/pinctrl/pinctrl.h>
10#include <linux/bitops.h>
11
12#include "pinctrl-sirf.h"
13
14/*
15 * pad list for the pinmux subsystem
16 * refer to atlasVI_io_table_v0.93.xls
17 */
18static const struct pinctrl_pin_desc sirfsoc_pads[] = {
19 PINCTRL_PIN(0, "gpio0-0"),
20 PINCTRL_PIN(1, "gpio0-1"),
21 PINCTRL_PIN(2, "gpio0-2"),
22 PINCTRL_PIN(3, "gpio0-3"),
23 PINCTRL_PIN(4, "pwm0"),
24 PINCTRL_PIN(5, "pwm1"),
25 PINCTRL_PIN(6, "pwm2"),
26 PINCTRL_PIN(7, "pwm3"),
27 PINCTRL_PIN(8, "warm_rst_b"),
28 PINCTRL_PIN(9, "odo_0"),
29 PINCTRL_PIN(10, "odo_1"),
30 PINCTRL_PIN(11, "dr_dir"),
31 PINCTRL_PIN(12, "rts_0"),
32 PINCTRL_PIN(13, "scl_1"),
33 PINCTRL_PIN(14, "ntrst"),
34 PINCTRL_PIN(15, "sda_1"),
35 PINCTRL_PIN(16, "x_ldd[16]"),
36 PINCTRL_PIN(17, "x_ldd[17]"),
37 PINCTRL_PIN(18, "x_ldd[18]"),
38 PINCTRL_PIN(19, "x_ldd[19]"),
39 PINCTRL_PIN(20, "x_ldd[20]"),
40 PINCTRL_PIN(21, "x_ldd[21]"),
41 PINCTRL_PIN(22, "x_ldd[22]"),
42 PINCTRL_PIN(23, "x_ldd[23]"),
43 PINCTRL_PIN(24, "gps_sgn"),
44 PINCTRL_PIN(25, "gps_mag"),
45 PINCTRL_PIN(26, "gps_clk"),
46 PINCTRL_PIN(27, "sd_cd_b_2"),
47 PINCTRL_PIN(28, "sd_vcc_on_2"),
48 PINCTRL_PIN(29, "sd_wp_b_2"),
49 PINCTRL_PIN(30, "sd_clk_3"),
50 PINCTRL_PIN(31, "sd_cmd_3"),
51
52 PINCTRL_PIN(32, "x_sd_dat_3[0]"),
53 PINCTRL_PIN(33, "x_sd_dat_3[1]"),
54 PINCTRL_PIN(34, "x_sd_dat_3[2]"),
55 PINCTRL_PIN(35, "x_sd_dat_3[3]"),
56 PINCTRL_PIN(36, "usb_clk"),
57 PINCTRL_PIN(37, "usb_dir"),
58 PINCTRL_PIN(38, "usb_nxt"),
59 PINCTRL_PIN(39, "usb_stp"),
60 PINCTRL_PIN(40, "usb_dat[7]"),
61 PINCTRL_PIN(41, "usb_dat[6]"),
62 PINCTRL_PIN(42, "x_cko_1"),
63 PINCTRL_PIN(43, "spi_clk_1"),
64 PINCTRL_PIN(44, "spi_dout_1"),
65 PINCTRL_PIN(45, "spi_din_1"),
66 PINCTRL_PIN(46, "spi_en_1"),
67 PINCTRL_PIN(47, "x_txd_1"),
68 PINCTRL_PIN(48, "x_txd_2"),
69 PINCTRL_PIN(49, "x_rxd_1"),
70 PINCTRL_PIN(50, "x_rxd_2"),
71 PINCTRL_PIN(51, "x_usclk_0"),
72 PINCTRL_PIN(52, "x_utxd_0"),
73 PINCTRL_PIN(53, "x_urxd_0"),
74 PINCTRL_PIN(54, "x_utfs_0"),
75 PINCTRL_PIN(55, "x_urfs_0"),
76 PINCTRL_PIN(56, "usb_dat5"),
77 PINCTRL_PIN(57, "usb_dat4"),
78 PINCTRL_PIN(58, "usb_dat3"),
79 PINCTRL_PIN(59, "usb_dat2"),
80 PINCTRL_PIN(60, "usb_dat1"),
81 PINCTRL_PIN(61, "usb_dat0"),
82 PINCTRL_PIN(62, "x_ldd[14]"),
83 PINCTRL_PIN(63, "x_ldd[15]"),
84
85 PINCTRL_PIN(64, "x_gps_gpio"),
86 PINCTRL_PIN(65, "x_ldd[13]"),
87 PINCTRL_PIN(66, "x_df_we_b"),
88 PINCTRL_PIN(67, "x_df_re_b"),
89 PINCTRL_PIN(68, "x_txd_0"),
90 PINCTRL_PIN(69, "x_rxd_0"),
91 PINCTRL_PIN(70, "x_l_lck"),
92 PINCTRL_PIN(71, "x_l_fck"),
93 PINCTRL_PIN(72, "x_l_de"),
94 PINCTRL_PIN(73, "x_ldd[0]"),
95 PINCTRL_PIN(74, "x_ldd[1]"),
96 PINCTRL_PIN(75, "x_ldd[2]"),
97 PINCTRL_PIN(76, "x_ldd[3]"),
98 PINCTRL_PIN(77, "x_ldd[4]"),
99 PINCTRL_PIN(78, "x_cko_0"),
100 PINCTRL_PIN(79, "x_ldd[5]"),
101 PINCTRL_PIN(80, "x_ldd[6]"),
102 PINCTRL_PIN(81, "x_ldd[7]"),
103 PINCTRL_PIN(82, "x_ldd[8]"),
104 PINCTRL_PIN(83, "x_ldd[9]"),
105 PINCTRL_PIN(84, "x_ldd[10]"),
106 PINCTRL_PIN(85, "x_ldd[11]"),
107 PINCTRL_PIN(86, "x_ldd[12]"),
108 PINCTRL_PIN(87, "x_vip_vsync"),
109 PINCTRL_PIN(88, "x_vip_hsync"),
110 PINCTRL_PIN(89, "x_vip_pxclk"),
111 PINCTRL_PIN(90, "x_sda_0"),
112 PINCTRL_PIN(91, "x_scl_0"),
113 PINCTRL_PIN(92, "x_df_ry_by"),
114 PINCTRL_PIN(93, "x_df_cs_b[1]"),
115 PINCTRL_PIN(94, "x_df_cs_b[0]"),
116 PINCTRL_PIN(95, "x_l_pclk"),
117
118 PINCTRL_PIN(96, "x_df_dqs"),
119 PINCTRL_PIN(97, "x_df_wp_b"),
120 PINCTRL_PIN(98, "ac97_sync"),
121 PINCTRL_PIN(99, "ac97_bit_clk "),
122 PINCTRL_PIN(100, "ac97_dout"),
123 PINCTRL_PIN(101, "ac97_din"),
124 PINCTRL_PIN(102, "x_rtc_io"),
Rong Wang6a08a922013-09-29 22:27:59 +0800125
126 PINCTRL_PIN(103, "x_usb1_dp"),
127 PINCTRL_PIN(104, "x_usb1_dn"),
Barry Song3370dc92013-05-14 22:17:58 +0800128};
129
130static const struct sirfsoc_muxmask lcd_16bits_sirfsoc_muxmask[] = {
131 {
132 .group = 1,
133 .mask = BIT(30) | BIT(31),
134 }, {
135 .group = 2,
136 .mask = BIT(1) | BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
137 BIT(12) | BIT(13) | BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19) |
138 BIT(20) | BIT(21) | BIT(22) | BIT(31),
139 },
140};
141
142static const struct sirfsoc_padmux lcd_16bits_padmux = {
143 .muxmask_counts = ARRAY_SIZE(lcd_16bits_sirfsoc_muxmask),
144 .muxmask = lcd_16bits_sirfsoc_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800145 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800146 .funcmask = BIT(4),
147 .funcval = 0,
148};
149
150static const unsigned lcd_16bits_pins[] = { 62, 63, 65, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83,
151 84, 85, 86, 95 };
152
153static const struct sirfsoc_muxmask lcd_18bits_muxmask[] = {
154 {
155 .group = 2,
156 .mask = BIT(1) | BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
157 BIT(12) | BIT(13) | BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19) |
158 BIT(20) | BIT(21) | BIT(22) | BIT(31),
159 }, {
160 .group = 1,
161 .mask = BIT(30) | BIT(31),
162 }, {
163 .group = 0,
164 .mask = BIT(16) | BIT(17),
165 },
166};
167
168static const struct sirfsoc_padmux lcd_18bits_padmux = {
169 .muxmask_counts = ARRAY_SIZE(lcd_18bits_muxmask),
170 .muxmask = lcd_18bits_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800171 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800172 .funcmask = BIT(4) | BIT(15),
173 .funcval = 0,
174};
175
176static const unsigned lcd_18bits_pins[] = { 16, 17, 62, 63, 65, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83,
177 84, 85, 86, 95 };
178
179static const struct sirfsoc_muxmask lcd_24bits_muxmask[] = {
180 {
181 .group = 2,
182 .mask = BIT(1) | BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
183 BIT(12) | BIT(13) | BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19) |
184 BIT(20) | BIT(21) | BIT(22) | BIT(31),
185 }, {
186 .group = 1,
187 .mask = BIT(30) | BIT(31),
188 }, {
189 .group = 0,
190 .mask = BIT(16) | BIT(17) | BIT(18) | BIT(19) | BIT(20) | BIT(21) | BIT(22) | BIT(23),
191 },
192};
193
194static const struct sirfsoc_padmux lcd_24bits_padmux = {
195 .muxmask_counts = ARRAY_SIZE(lcd_24bits_muxmask),
196 .muxmask = lcd_24bits_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800197 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800198 .funcmask = BIT(4) | BIT(15),
199 .funcval = 0,
200};
201
202static const unsigned lcd_24bits_pins[] = { 16, 17, 18, 19, 20, 21, 22, 23, 62, 63, 65, 70, 71, 72, 73, 74, 75, 76, 77, 79,
203 80, 81, 82, 83, 84, 85, 86, 95};
204
205static const struct sirfsoc_muxmask lcdrom_muxmask[] = {
206 {
207 .group = 2,
208 .mask = BIT(1) | BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
209 BIT(12) | BIT(13) | BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19) |
210 BIT(20) | BIT(21) | BIT(22) | BIT(31),
211 }, {
212 .group = 1,
213 .mask = BIT(30) | BIT(31),
214 }, {
215 .group = 0,
216 .mask = BIT(8),
217 },
218};
219
220static const struct sirfsoc_padmux lcdrom_padmux = {
221 .muxmask_counts = ARRAY_SIZE(lcdrom_muxmask),
222 .muxmask = lcdrom_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800223 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800224 .funcmask = BIT(4),
225 .funcval = BIT(4),
226};
227
228static const unsigned lcdrom_pins[] = { 8, 62, 63, 65, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83,
229 84, 85, 86, 95};
230
231static const struct sirfsoc_muxmask uart0_muxmask[] = {
232 {
233 .group = 0,
234 .mask = BIT(12),
235 }, {
236 .group = 1,
237 .mask = BIT(23),
238 }, {
239 .group = 2,
240 .mask = BIT(4) | BIT(5),
241 },
242};
243
244static const struct sirfsoc_padmux uart0_padmux = {
245 .muxmask_counts = ARRAY_SIZE(uart0_muxmask),
246 .muxmask = uart0_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800247 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800248 .funcmask = BIT(9),
249 .funcval = BIT(9),
250};
251
252static const unsigned uart0_pins[] = { 12, 55, 68, 69 };
253
254static const struct sirfsoc_muxmask uart0_nostreamctrl_muxmask[] = {
255 {
256 .group = 2,
257 .mask = BIT(4) | BIT(5),
258 },
259};
260
261static const struct sirfsoc_padmux uart0_nostreamctrl_padmux = {
262 .muxmask_counts = ARRAY_SIZE(uart0_nostreamctrl_muxmask),
263 .muxmask = uart0_nostreamctrl_muxmask,
264};
265
266static const unsigned uart0_nostreamctrl_pins[] = { 68, 69 };
267
268static const struct sirfsoc_muxmask uart1_muxmask[] = {
269 {
270 .group = 1,
271 .mask = BIT(15) | BIT(17),
272 },
273};
274
275static const struct sirfsoc_padmux uart1_padmux = {
276 .muxmask_counts = ARRAY_SIZE(uart1_muxmask),
277 .muxmask = uart1_muxmask,
278};
279
280static const unsigned uart1_pins[] = { 47, 49 };
281
282static const struct sirfsoc_muxmask uart2_muxmask[] = {
283 {
284 .group = 0,
285 .mask = BIT(10) | BIT(14),
286 }, {
287 .group = 1,
288 .mask = BIT(16) | BIT(18),
289 },
290};
291
292static const struct sirfsoc_padmux uart2_padmux = {
293 .muxmask_counts = ARRAY_SIZE(uart2_muxmask),
294 .muxmask = uart2_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800295 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800296 .funcmask = BIT(10),
297 .funcval = BIT(10),
298};
299
300static const unsigned uart2_pins[] = { 10, 14, 48, 50 };
301
302static const struct sirfsoc_muxmask uart2_nostreamctrl_muxmask[] = {
303 {
304 .group = 1,
305 .mask = BIT(16) | BIT(18),
306 },
307};
308
309static const struct sirfsoc_padmux uart2_nostreamctrl_padmux = {
310 .muxmask_counts = ARRAY_SIZE(uart2_nostreamctrl_muxmask),
311 .muxmask = uart2_nostreamctrl_muxmask,
312};
313
314static const unsigned uart2_nostreamctrl_pins[] = { 48, 50 };
315
316static const struct sirfsoc_muxmask sdmmc3_muxmask[] = {
317 {
318 .group = 0,
319 .mask = BIT(30) | BIT(31),
320 }, {
321 .group = 1,
322 .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
323 },
324};
325
326static const struct sirfsoc_padmux sdmmc3_padmux = {
327 .muxmask_counts = ARRAY_SIZE(sdmmc3_muxmask),
328 .muxmask = sdmmc3_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800329 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800330 .funcmask = BIT(7),
331 .funcval = 0,
332};
333
334static const unsigned sdmmc3_pins[] = { 30, 31, 32, 33, 34, 35 };
335
336static const struct sirfsoc_muxmask spi0_muxmask[] = {
337 {
338 .group = 0,
339 .mask = BIT(30),
340 }, {
341 .group = 1,
342 .mask = BIT(0) | BIT(2) | BIT(3),
343 },
344};
345
346static const struct sirfsoc_padmux spi0_padmux = {
347 .muxmask_counts = ARRAY_SIZE(spi0_muxmask),
348 .muxmask = spi0_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800349 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800350 .funcmask = BIT(7),
351 .funcval = BIT(7),
352};
353
354static const unsigned spi0_pins[] = { 30, 32, 34, 35 };
355
356static const struct sirfsoc_muxmask cko1_muxmask[] = {
357 {
358 .group = 1,
359 .mask = BIT(10),
360 },
361};
362
363static const struct sirfsoc_padmux cko1_padmux = {
364 .muxmask_counts = ARRAY_SIZE(cko1_muxmask),
365 .muxmask = cko1_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800366 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800367 .funcmask = BIT(3),
368 .funcval = 0,
369};
370
371static const unsigned cko1_pins[] = { 42 };
372
373static const struct sirfsoc_muxmask i2s_muxmask[] = {
374 {
375 .group = 1,
376 .mask = BIT(10),
377 }, {
378 .group = 3,
379 .mask = BIT(2) | BIT(3) | BIT(4) | BIT(5),
380 },
381};
382
383static const struct sirfsoc_padmux i2s_padmux = {
384 .muxmask_counts = ARRAY_SIZE(i2s_muxmask),
385 .muxmask = i2s_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800386 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800387 .funcmask = BIT(3),
388 .funcval = BIT(3),
389};
390
391static const unsigned i2s_pins[] = { 42, 98, 99, 100, 101 };
392
393static const struct sirfsoc_muxmask i2s_no_din_muxmask[] = {
394 {
395 .group = 1,
396 .mask = BIT(10),
397 }, {
398 .group = 3,
399 .mask = BIT(2) | BIT(3) | BIT(4),
400 },
401};
402
403static const struct sirfsoc_padmux i2s_no_din_padmux = {
404 .muxmask_counts = ARRAY_SIZE(i2s_no_din_muxmask),
405 .muxmask = i2s_no_din_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800406 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800407 .funcmask = BIT(3),
408 .funcval = BIT(3),
409};
410
411static const unsigned i2s_no_din_pins[] = { 42, 98, 99, 100 };
412
413static const struct sirfsoc_muxmask i2s_6chn_muxmask[] = {
414 {
415 .group = 1,
416 .mask = BIT(10) | BIT(20) | BIT(23),
417 }, {
418 .group = 3,
419 .mask = BIT(2) | BIT(3) | BIT(4) | BIT(5),
420 },
421};
422
423static const struct sirfsoc_padmux i2s_6chn_padmux = {
424 .muxmask_counts = ARRAY_SIZE(i2s_6chn_muxmask),
425 .muxmask = i2s_6chn_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800426 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800427 .funcmask = BIT(1) | BIT(3) | BIT(9),
428 .funcval = BIT(1) | BIT(3) | BIT(9),
429};
430
431static const unsigned i2s_6chn_pins[] = { 42, 52, 55, 98, 99, 100, 101 };
432
433static const struct sirfsoc_muxmask ac97_muxmask[] = {
434 {
435 .group = 3,
436 .mask = BIT(2) | BIT(3) | BIT(4) | BIT(5),
437 },
438};
439
440static const struct sirfsoc_padmux ac97_padmux = {
441 .muxmask_counts = ARRAY_SIZE(ac97_muxmask),
442 .muxmask = ac97_muxmask,
443};
444
445static const unsigned ac97_pins[] = { 98, 99, 100, 101 };
446
447static const struct sirfsoc_muxmask spi1_muxmask[] = {
448 {
449 .group = 1,
450 .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14),
451 },
452};
453
454static const struct sirfsoc_padmux spi1_padmux = {
455 .muxmask_counts = ARRAY_SIZE(spi1_muxmask),
456 .muxmask = spi1_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800457 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800458 .funcmask = BIT(16),
459 .funcval = 0,
460};
461
462static const unsigned spi1_pins[] = { 43, 44, 45, 46 };
463
464static const struct sirfsoc_muxmask sdmmc1_muxmask[] = {
465 {
466 .group = 2,
467 .mask = BIT(2) | BIT(3),
468 },
469};
470
471static const struct sirfsoc_padmux sdmmc1_padmux = {
472 .muxmask_counts = ARRAY_SIZE(sdmmc1_muxmask),
473 .muxmask = sdmmc1_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800474 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800475 .funcmask = BIT(5),
476 .funcval = BIT(5),
477};
478
479static const unsigned sdmmc1_pins[] = { 66, 67 };
480
481static const struct sirfsoc_muxmask gps_muxmask[] = {
482 {
483 .group = 0,
484 .mask = BIT(24) | BIT(25) | BIT(26),
485 },
486};
487
488static const struct sirfsoc_padmux gps_padmux = {
489 .muxmask_counts = ARRAY_SIZE(gps_muxmask),
490 .muxmask = gps_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800491 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800492 .funcmask = BIT(13),
493 .funcval = 0,
494};
495
496static const unsigned gps_pins[] = { 24, 25, 26 };
497
498static const struct sirfsoc_muxmask sdmmc5_muxmask[] = {
499 {
500 .group = 0,
501 .mask = BIT(24) | BIT(25) | BIT(26),
502 },
503};
504
505static const struct sirfsoc_padmux sdmmc5_padmux = {
506 .muxmask_counts = ARRAY_SIZE(sdmmc5_muxmask),
507 .muxmask = sdmmc5_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800508 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800509 .funcmask = BIT(13),
510 .funcval = BIT(13),
511};
512
513static const unsigned sdmmc5_pins[] = { 24, 25, 26 };
514
515static const struct sirfsoc_muxmask usp0_muxmask[] = {
516 {
517 .group = 1,
Qipan Li42a708c2013-07-04 15:55:25 +0800518 .mask = BIT(19) | BIT(20) | BIT(21) | BIT(22) | BIT(23),
Barry Song3370dc92013-05-14 22:17:58 +0800519 },
520};
521
522static const struct sirfsoc_padmux usp0_padmux = {
523 .muxmask_counts = ARRAY_SIZE(usp0_muxmask),
524 .muxmask = usp0_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800525 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800526 .funcmask = BIT(1) | BIT(2) | BIT(9),
527 .funcval = 0,
528};
529
Qipan Li42a708c2013-07-04 15:55:25 +0800530static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 };
Barry Song3370dc92013-05-14 22:17:58 +0800531
Qipan Lid58e9a02013-07-04 15:55:26 +0800532static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = {
533 {
534 .group = 1,
535 .mask = BIT(20) | BIT(21),
536 },
537};
538
539static const struct sirfsoc_padmux usp0_uart_nostreamctrl_padmux = {
540 .muxmask_counts = ARRAY_SIZE(usp0_uart_nostreamctrl_muxmask),
541 .muxmask = usp0_uart_nostreamctrl_muxmask,
542};
543
544static const unsigned usp0_uart_nostreamctrl_pins[] = { 52, 53 };
Barry Song3370dc92013-05-14 22:17:58 +0800545static const struct sirfsoc_muxmask usp1_muxmask[] = {
546 {
547 .group = 0,
548 .mask = BIT(15),
549 }, {
550 .group = 1,
551 .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14),
552 },
553};
554
555static const struct sirfsoc_padmux usp1_padmux = {
556 .muxmask_counts = ARRAY_SIZE(usp1_muxmask),
557 .muxmask = usp1_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800558 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800559 .funcmask = BIT(16),
560 .funcval = BIT(16),
561};
562
563static const unsigned usp1_pins[] = { 15, 43, 44, 45, 46 };
564
565static const struct sirfsoc_muxmask nand_muxmask[] = {
566 {
567 .group = 2,
568 .mask = BIT(2) | BIT(3) | BIT(28) | BIT(29) | BIT(30),
569 }, {
570 .group = 3,
571 .mask = BIT(0) | BIT(1),
572 },
573};
574
575static const struct sirfsoc_padmux nand_padmux = {
576 .muxmask_counts = ARRAY_SIZE(nand_muxmask),
577 .muxmask = nand_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800578 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800579 .funcmask = BIT(5) | BIT(19),
580 .funcval = 0,
581};
582
583static const unsigned nand_pins[] = { 66, 67, 92, 93, 94, 96, 97 };
584
585static const struct sirfsoc_muxmask sdmmc0_muxmask[] = {
586 {
587 .group = 3,
588 .mask = BIT(1),
589 },
590};
591
592static const struct sirfsoc_padmux sdmmc0_padmux = {
593 .muxmask_counts = ARRAY_SIZE(sdmmc0_muxmask),
594 .muxmask = sdmmc0_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800595 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800596 .funcmask = BIT(5) | BIT(19),
597 .funcval = BIT(19),
598};
599
600static const unsigned sdmmc0_pins[] = { 97 };
601
602static const struct sirfsoc_muxmask sdmmc2_muxmask[] = {
603 {
604 .group = 0,
605 .mask = BIT(27) | BIT(28) | BIT(29),
606 },
607};
608
609static const struct sirfsoc_padmux sdmmc2_padmux = {
610 .muxmask_counts = ARRAY_SIZE(sdmmc2_muxmask),
611 .muxmask = sdmmc2_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800612 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800613 .funcmask = BIT(11),
614 .funcval = 0,
615};
616
617static const unsigned sdmmc2_pins[] = { 27, 28, 29 };
618
619static const struct sirfsoc_muxmask sdmmc2_nowp_muxmask[] = {
620 {
621 .group = 0,
622 .mask = BIT(27) | BIT(28),
623 },
624};
625
626static const struct sirfsoc_padmux sdmmc2_nowp_padmux = {
627 .muxmask_counts = ARRAY_SIZE(sdmmc2_nowp_muxmask),
628 .muxmask = sdmmc2_nowp_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800629 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800630 .funcmask = BIT(11),
631 .funcval = 0,
632};
633
634static const unsigned sdmmc2_nowp_pins[] = { 27, 28 };
635
636static const struct sirfsoc_muxmask cko0_muxmask[] = {
637 {
638 .group = 2,
639 .mask = BIT(14),
640 },
641};
642
643static const struct sirfsoc_padmux cko0_padmux = {
644 .muxmask_counts = ARRAY_SIZE(cko0_muxmask),
645 .muxmask = cko0_muxmask,
646};
647
648static const unsigned cko0_pins[] = { 78 };
649
650static const struct sirfsoc_muxmask vip_muxmask[] = {
651 {
652 .group = 1,
653 .mask = BIT(4) | BIT(5) | BIT(6) | BIT(8) | BIT(9)
654 | BIT(24) | BIT(25) | BIT(26) | BIT(27) | BIT(28) |
655 BIT(29),
656 },
657};
658
659static const struct sirfsoc_padmux vip_padmux = {
660 .muxmask_counts = ARRAY_SIZE(vip_muxmask),
661 .muxmask = vip_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800662 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800663 .funcmask = BIT(18),
664 .funcval = BIT(18),
665};
666
667static const unsigned vip_pins[] = { 36, 37, 38, 40, 41, 56, 57, 58, 59, 60, 61 };
668
669static const struct sirfsoc_muxmask vip_noupli_muxmask[] = {
670 {
671 .group = 0,
672 .mask = BIT(16) | BIT(17) | BIT(18) | BIT(19) | BIT(20)
673 | BIT(21) | BIT(22) | BIT(23),
674 }, {
675 .group = 2,
676 .mask = BIT(23) | BIT(24) | BIT(25),
677 },
678};
679
680static const struct sirfsoc_padmux vip_noupli_padmux = {
681 .muxmask_counts = ARRAY_SIZE(vip_noupli_muxmask),
682 .muxmask = vip_noupli_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800683 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800684 .funcmask = BIT(15),
685 .funcval = BIT(15),
686};
687
688static const unsigned vip_noupli_pins[] = { 16, 17, 18, 19, 20, 21, 22, 23, 87, 88, 89 };
689
690static const struct sirfsoc_muxmask i2c0_muxmask[] = {
691 {
692 .group = 2,
693 .mask = BIT(26) | BIT(27),
694 },
695};
696
697static const struct sirfsoc_padmux i2c0_padmux = {
698 .muxmask_counts = ARRAY_SIZE(i2c0_muxmask),
699 .muxmask = i2c0_muxmask,
700};
701
702static const unsigned i2c0_pins[] = { 90, 91 };
703
704static const struct sirfsoc_muxmask i2c1_muxmask[] = {
705 {
706 .group = 0,
707 .mask = BIT(13) | BIT(15),
708 },
709};
710
711static const struct sirfsoc_padmux i2c1_padmux = {
712 .muxmask_counts = ARRAY_SIZE(i2c1_muxmask),
713 .muxmask = i2c1_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800714 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800715 .funcmask = BIT(16),
716 .funcval = 0,
717};
718
719static const unsigned i2c1_pins[] = { 13, 15 };
720
721static const struct sirfsoc_muxmask pwm0_muxmask[] = {
722 {
723 .group = 0,
724 .mask = BIT(4),
725 },
726};
727
728static const struct sirfsoc_padmux pwm0_padmux = {
729 .muxmask_counts = ARRAY_SIZE(pwm0_muxmask),
730 .muxmask = pwm0_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800731 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800732 .funcmask = BIT(12),
733 .funcval = 0,
734};
735
736static const unsigned pwm0_pins[] = { 4 };
737
738static const struct sirfsoc_muxmask pwm1_muxmask[] = {
739 {
740 .group = 0,
741 .mask = BIT(5),
742 },
743};
744
745static const struct sirfsoc_padmux pwm1_padmux = {
746 .muxmask_counts = ARRAY_SIZE(pwm1_muxmask),
747 .muxmask = pwm1_muxmask,
748};
749
750static const unsigned pwm1_pins[] = { 5 };
751
752static const struct sirfsoc_muxmask pwm2_muxmask[] = {
753 {
754 .group = 0,
755 .mask = BIT(6),
756 },
757};
758
759static const struct sirfsoc_padmux pwm2_padmux = {
760 .muxmask_counts = ARRAY_SIZE(pwm2_muxmask),
761 .muxmask = pwm2_muxmask,
762};
763
764static const unsigned pwm2_pins[] = { 6 };
765
766static const struct sirfsoc_muxmask pwm3_muxmask[] = {
767 {
768 .group = 0,
769 .mask = BIT(7),
770 },
771};
772
773static const struct sirfsoc_padmux pwm3_padmux = {
774 .muxmask_counts = ARRAY_SIZE(pwm3_muxmask),
775 .muxmask = pwm3_muxmask,
776};
777
778static const unsigned pwm3_pins[] = { 7 };
779
780static const struct sirfsoc_muxmask pwm4_muxmask[] = {
781 {
782 .group = 2,
783 .mask = BIT(14),
784 },
785};
786
787static const struct sirfsoc_padmux pwm4_padmux = {
788 .muxmask_counts = ARRAY_SIZE(pwm4_muxmask),
789 .muxmask = pwm4_muxmask,
790};
791
792static const unsigned pwm4_pins[] = { 78 };
793
794static const struct sirfsoc_muxmask warm_rst_muxmask[] = {
795 {
796 .group = 0,
797 .mask = BIT(8),
798 },
799};
800
801static const struct sirfsoc_padmux warm_rst_padmux = {
802 .muxmask_counts = ARRAY_SIZE(warm_rst_muxmask),
803 .muxmask = warm_rst_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800804 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800805 .funcmask = BIT(4),
806 .funcval = 0,
807};
808
809static const unsigned warm_rst_pins[] = { 8 };
810
811static const struct sirfsoc_muxmask usb0_upli_drvbus_muxmask[] = {
812 {
813 .group = 1,
814 .mask = BIT(4) | BIT(5) | BIT(6) | BIT(7) | BIT(8)
815 | BIT(9) | BIT(24) | BIT(25) | BIT(26) |
816 BIT(27) | BIT(28) | BIT(29),
817 },
818};
819static const struct sirfsoc_padmux usb0_upli_drvbus_padmux = {
820 .muxmask_counts = ARRAY_SIZE(usb0_upli_drvbus_muxmask),
821 .muxmask = usb0_upli_drvbus_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800822 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800823 .funcmask = BIT(18),
824 .funcval = 0,
825};
826
827static const unsigned usb0_upli_drvbus_pins[] = { 36, 37, 38, 39, 40, 41, 56, 57, 58, 59, 60, 61 };
828
829static const struct sirfsoc_muxmask usb1_utmi_drvbus_muxmask[] = {
830 {
831 .group = 0,
832 .mask = BIT(28),
833 },
834};
835
836static const struct sirfsoc_padmux usb1_utmi_drvbus_padmux = {
837 .muxmask_counts = ARRAY_SIZE(usb1_utmi_drvbus_muxmask),
838 .muxmask = usb1_utmi_drvbus_muxmask,
Rong Wang6a08a922013-09-29 22:27:59 +0800839 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
Barry Song3370dc92013-05-14 22:17:58 +0800840 .funcmask = BIT(11),
841 .funcval = BIT(11), /* refer to PAD_UTMI_DRVVBUS1_ENABLE */
842};
843
844static const unsigned usb1_utmi_drvbus_pins[] = { 28 };
845
Rong Wang6a08a922013-09-29 22:27:59 +0800846static const struct sirfsoc_padmux usb1_dp_dn_padmux = {
847 .muxmask_counts = 0,
848 .ctrlreg = SIRFSOC_RSC_USB_UART_SHARE,
849 .funcmask = BIT(2),
850 .funcval = BIT(2),
851};
852
853static const unsigned usb1_dp_dn_pins[] = { 103, 104 };
854
855static const struct sirfsoc_padmux uart1_route_io_usb1_padmux = {
856 .muxmask_counts = 0,
857 .ctrlreg = SIRFSOC_RSC_USB_UART_SHARE,
858 .funcmask = BIT(2),
859 .funcval = 0,
860};
861
862static const unsigned uart1_route_io_usb1_pins[] = { 103, 104 };
863
Barry Song3370dc92013-05-14 22:17:58 +0800864static const struct sirfsoc_muxmask pulse_count_muxmask[] = {
865 {
866 .group = 0,
867 .mask = BIT(9) | BIT(10) | BIT(11),
868 },
869};
870
871static const struct sirfsoc_padmux pulse_count_padmux = {
872 .muxmask_counts = ARRAY_SIZE(pulse_count_muxmask),
873 .muxmask = pulse_count_muxmask,
874};
875
876static const unsigned pulse_count_pins[] = { 9, 10, 11 };
877
878static const struct sirfsoc_pin_group sirfsoc_pin_groups[] = {
879 SIRFSOC_PIN_GROUP("lcd_16bitsgrp", lcd_16bits_pins),
880 SIRFSOC_PIN_GROUP("lcd_18bitsgrp", lcd_18bits_pins),
881 SIRFSOC_PIN_GROUP("lcd_24bitsgrp", lcd_24bits_pins),
882 SIRFSOC_PIN_GROUP("lcdrom_grp", lcdrom_pins),
883 SIRFSOC_PIN_GROUP("uart0grp", uart0_pins),
Qipan Li031b8ce2013-08-19 16:15:49 +0800884 SIRFSOC_PIN_GROUP("uart0_nostreamctrlgrp", uart0_nostreamctrl_pins),
Barry Song3370dc92013-05-14 22:17:58 +0800885 SIRFSOC_PIN_GROUP("uart1grp", uart1_pins),
886 SIRFSOC_PIN_GROUP("uart2grp", uart2_pins),
887 SIRFSOC_PIN_GROUP("uart2_nostreamctrlgrp", uart2_nostreamctrl_pins),
888 SIRFSOC_PIN_GROUP("usp0grp", usp0_pins),
Qipan Lid58e9a02013-07-04 15:55:26 +0800889 SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp",
890 usp0_uart_nostreamctrl_pins),
Barry Song3370dc92013-05-14 22:17:58 +0800891 SIRFSOC_PIN_GROUP("usp1grp", usp1_pins),
892 SIRFSOC_PIN_GROUP("i2c0grp", i2c0_pins),
893 SIRFSOC_PIN_GROUP("i2c1grp", i2c1_pins),
894 SIRFSOC_PIN_GROUP("pwm0grp", pwm0_pins),
895 SIRFSOC_PIN_GROUP("pwm1grp", pwm1_pins),
896 SIRFSOC_PIN_GROUP("pwm2grp", pwm2_pins),
897 SIRFSOC_PIN_GROUP("pwm3grp", pwm3_pins),
898 SIRFSOC_PIN_GROUP("pwm4grp", pwm4_pins),
899 SIRFSOC_PIN_GROUP("vipgrp", vip_pins),
900 SIRFSOC_PIN_GROUP("vip_noupligrp", vip_noupli_pins),
901 SIRFSOC_PIN_GROUP("warm_rstgrp", warm_rst_pins),
902 SIRFSOC_PIN_GROUP("cko0grp", cko0_pins),
903 SIRFSOC_PIN_GROUP("cko1grp", cko1_pins),
904 SIRFSOC_PIN_GROUP("sdmmc0grp", sdmmc0_pins),
905 SIRFSOC_PIN_GROUP("sdmmc1grp", sdmmc1_pins),
906 SIRFSOC_PIN_GROUP("sdmmc2grp", sdmmc2_pins),
907 SIRFSOC_PIN_GROUP("sdmmc2_nowpgrp", sdmmc2_nowp_pins),
908 SIRFSOC_PIN_GROUP("sdmmc3grp", sdmmc3_pins),
909 SIRFSOC_PIN_GROUP("sdmmc5grp", sdmmc5_pins),
910 SIRFSOC_PIN_GROUP("usb0_upli_drvbusgrp", usb0_upli_drvbus_pins),
911 SIRFSOC_PIN_GROUP("usb1_utmi_drvbusgrp", usb1_utmi_drvbus_pins),
Rong Wang6a08a922013-09-29 22:27:59 +0800912 SIRFSOC_PIN_GROUP("usb1_dp_dngrp", usb1_dp_dn_pins),
913 SIRFSOC_PIN_GROUP("uart1_route_io_usb1grp", uart1_route_io_usb1_pins),
Barry Song3370dc92013-05-14 22:17:58 +0800914 SIRFSOC_PIN_GROUP("pulse_countgrp", pulse_count_pins),
915 SIRFSOC_PIN_GROUP("i2sgrp", i2s_pins),
916 SIRFSOC_PIN_GROUP("i2s_no_dingrp", i2s_no_din_pins),
917 SIRFSOC_PIN_GROUP("i2s_6chngrp", i2s_6chn_pins),
918 SIRFSOC_PIN_GROUP("ac97grp", ac97_pins),
919 SIRFSOC_PIN_GROUP("nandgrp", nand_pins),
920 SIRFSOC_PIN_GROUP("spi0grp", spi0_pins),
921 SIRFSOC_PIN_GROUP("spi1grp", spi1_pins),
922 SIRFSOC_PIN_GROUP("gpsgrp", gps_pins),
923};
924
925static const char * const lcd_16bitsgrp[] = { "lcd_16bitsgrp" };
926static const char * const lcd_18bitsgrp[] = { "lcd_18bitsgrp" };
927static const char * const lcd_24bitsgrp[] = { "lcd_24bitsgrp" };
928static const char * const lcdromgrp[] = { "lcdromgrp" };
929static const char * const uart0grp[] = { "uart0grp" };
Qipan Li031b8ce2013-08-19 16:15:49 +0800930static const char * const uart0_nostreamctrlgrp[] = { "uart0_nostreamctrlgrp" };
Barry Song3370dc92013-05-14 22:17:58 +0800931static const char * const uart1grp[] = { "uart1grp" };
932static const char * const uart2grp[] = { "uart2grp" };
933static const char * const uart2_nostreamctrlgrp[] = { "uart2_nostreamctrlgrp" };
Qipan Lid58e9a02013-07-04 15:55:26 +0800934static const char * const usp0_uart_nostreamctrl_grp[] = {
935 "usp0_uart_nostreamctrl_grp" };
Barry Song3370dc92013-05-14 22:17:58 +0800936static const char * const usp0grp[] = { "usp0grp" };
937static const char * const usp1grp[] = { "usp1grp" };
938static const char * const i2c0grp[] = { "i2c0grp" };
939static const char * const i2c1grp[] = { "i2c1grp" };
940static const char * const pwm0grp[] = { "pwm0grp" };
941static const char * const pwm1grp[] = { "pwm1grp" };
942static const char * const pwm2grp[] = { "pwm2grp" };
943static const char * const pwm3grp[] = { "pwm3grp" };
944static const char * const pwm4grp[] = { "pwm4grp" };
945static const char * const vipgrp[] = { "vipgrp" };
946static const char * const vip_noupligrp[] = { "vip_noupligrp" };
947static const char * const warm_rstgrp[] = { "warm_rstgrp" };
948static const char * const cko0grp[] = { "cko0grp" };
949static const char * const cko1grp[] = { "cko1grp" };
950static const char * const sdmmc0grp[] = { "sdmmc0grp" };
951static const char * const sdmmc1grp[] = { "sdmmc1grp" };
952static const char * const sdmmc2grp[] = { "sdmmc2grp" };
953static const char * const sdmmc3grp[] = { "sdmmc3grp" };
954static const char * const sdmmc5grp[] = { "sdmmc5grp" };
955static const char * const sdmmc2_nowpgrp[] = { "sdmmc2_nowpgrp" };
956static const char * const usb0_upli_drvbusgrp[] = { "usb0_upli_drvbusgrp" };
957static const char * const usb1_utmi_drvbusgrp[] = { "usb1_utmi_drvbusgrp" };
Rong Wang6a08a922013-09-29 22:27:59 +0800958static const char * const usb1_dp_dngrp[] = { "usb1_dp_dngrp" };
959static const char * const uart1_route_io_usb1grp[] = { "uart1_route_io_usb1grp" };
Barry Song3370dc92013-05-14 22:17:58 +0800960static const char * const pulse_countgrp[] = { "pulse_countgrp" };
961static const char * const i2sgrp[] = { "i2sgrp" };
962static const char * const i2s_no_dingrp[] = { "i2s_no_dingrp" };
963static const char * const i2s_6chngrp[] = { "i2s_6chngrp" };
964static const char * const ac97grp[] = { "ac97grp" };
965static const char * const nandgrp[] = { "nandgrp" };
966static const char * const spi0grp[] = { "spi0grp" };
967static const char * const spi1grp[] = { "spi1grp" };
968static const char * const gpsgrp[] = { "gpsgrp" };
969
970static const struct sirfsoc_pmx_func sirfsoc_pmx_functions[] = {
971 SIRFSOC_PMX_FUNCTION("lcd_16bits", lcd_16bitsgrp, lcd_16bits_padmux),
972 SIRFSOC_PMX_FUNCTION("lcd_18bits", lcd_18bitsgrp, lcd_18bits_padmux),
973 SIRFSOC_PMX_FUNCTION("lcd_24bits", lcd_24bitsgrp, lcd_24bits_padmux),
974 SIRFSOC_PMX_FUNCTION("lcdrom", lcdromgrp, lcdrom_padmux),
975 SIRFSOC_PMX_FUNCTION("uart0", uart0grp, uart0_padmux),
Qipan Li031b8ce2013-08-19 16:15:49 +0800976 SIRFSOC_PMX_FUNCTION("uart0_nostreamctrl", uart0_nostreamctrlgrp,
977 uart0_nostreamctrl_padmux),
Barry Song3370dc92013-05-14 22:17:58 +0800978 SIRFSOC_PMX_FUNCTION("uart1", uart1grp, uart1_padmux),
979 SIRFSOC_PMX_FUNCTION("uart2", uart2grp, uart2_padmux),
980 SIRFSOC_PMX_FUNCTION("uart2_nostreamctrl", uart2_nostreamctrlgrp, uart2_nostreamctrl_padmux),
981 SIRFSOC_PMX_FUNCTION("usp0", usp0grp, usp0_padmux),
Qipan Lid58e9a02013-07-04 15:55:26 +0800982 SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl",
983 usp0_uart_nostreamctrl_grp,
984 usp0_uart_nostreamctrl_padmux),
Barry Song3370dc92013-05-14 22:17:58 +0800985 SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux),
986 SIRFSOC_PMX_FUNCTION("i2c0", i2c0grp, i2c0_padmux),
987 SIRFSOC_PMX_FUNCTION("i2c1", i2c1grp, i2c1_padmux),
988 SIRFSOC_PMX_FUNCTION("pwm0", pwm0grp, pwm0_padmux),
989 SIRFSOC_PMX_FUNCTION("pwm1", pwm1grp, pwm1_padmux),
990 SIRFSOC_PMX_FUNCTION("pwm2", pwm2grp, pwm2_padmux),
991 SIRFSOC_PMX_FUNCTION("pwm3", pwm3grp, pwm3_padmux),
992 SIRFSOC_PMX_FUNCTION("pwm4", pwm4grp, pwm4_padmux),
993 SIRFSOC_PMX_FUNCTION("vip", vipgrp, vip_padmux),
994 SIRFSOC_PMX_FUNCTION("vip_noupli", vip_noupligrp, vip_noupli_padmux),
995 SIRFSOC_PMX_FUNCTION("warm_rst", warm_rstgrp, warm_rst_padmux),
996 SIRFSOC_PMX_FUNCTION("cko0", cko0grp, cko0_padmux),
997 SIRFSOC_PMX_FUNCTION("cko1", cko1grp, cko1_padmux),
998 SIRFSOC_PMX_FUNCTION("sdmmc0", sdmmc0grp, sdmmc0_padmux),
999 SIRFSOC_PMX_FUNCTION("sdmmc1", sdmmc1grp, sdmmc1_padmux),
1000 SIRFSOC_PMX_FUNCTION("sdmmc2", sdmmc2grp, sdmmc2_padmux),
1001 SIRFSOC_PMX_FUNCTION("sdmmc3", sdmmc3grp, sdmmc3_padmux),
1002 SIRFSOC_PMX_FUNCTION("sdmmc5", sdmmc5grp, sdmmc5_padmux),
1003 SIRFSOC_PMX_FUNCTION("sdmmc2_nowp", sdmmc2_nowpgrp, sdmmc2_nowp_padmux),
1004 SIRFSOC_PMX_FUNCTION("usb0_upli_drvbus", usb0_upli_drvbusgrp, usb0_upli_drvbus_padmux),
1005 SIRFSOC_PMX_FUNCTION("usb1_utmi_drvbus", usb1_utmi_drvbusgrp, usb1_utmi_drvbus_padmux),
Rong Wang6a08a922013-09-29 22:27:59 +08001006 SIRFSOC_PMX_FUNCTION("usb1_dp_dn", usb1_dp_dngrp, usb1_dp_dn_padmux),
1007 SIRFSOC_PMX_FUNCTION("uart1_route_io_usb1", uart1_route_io_usb1grp, uart1_route_io_usb1_padmux),
Barry Song3370dc92013-05-14 22:17:58 +08001008 SIRFSOC_PMX_FUNCTION("pulse_count", pulse_countgrp, pulse_count_padmux),
1009 SIRFSOC_PMX_FUNCTION("i2s", i2sgrp, i2s_padmux),
1010 SIRFSOC_PMX_FUNCTION("i2s_no_din", i2s_no_dingrp, i2s_no_din_padmux),
1011 SIRFSOC_PMX_FUNCTION("i2s_6chn", i2s_6chngrp, i2s_6chn_padmux),
1012 SIRFSOC_PMX_FUNCTION("ac97", ac97grp, ac97_padmux),
1013 SIRFSOC_PMX_FUNCTION("nand", nandgrp, nand_padmux),
1014 SIRFSOC_PMX_FUNCTION("spi0", spi0grp, spi0_padmux),
1015 SIRFSOC_PMX_FUNCTION("spi1", spi1grp, spi1_padmux),
1016 SIRFSOC_PMX_FUNCTION("gps", gpsgrp, gps_padmux),
1017};
1018
1019struct sirfsoc_pinctrl_data atlas6_pinctrl_data = {
1020 (struct pinctrl_pin_desc *)sirfsoc_pads,
1021 ARRAY_SIZE(sirfsoc_pads),
1022 (struct sirfsoc_pin_group *)sirfsoc_pin_groups,
1023 ARRAY_SIZE(sirfsoc_pin_groups),
1024 (struct sirfsoc_pmx_func *)sirfsoc_pmx_functions,
1025 ARRAY_SIZE(sirfsoc_pmx_functions),
1026};
1027