blob: ef97522b4bf008f27aa630520224d1ddf369c9e5 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
Gregory Bean1963a2a2010-08-28 10:05:44 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
Gregory Bean1963a2a2010-08-28 10:05:44 -070011 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070012#include <linux/module.h>
13#include <mach/irqs.h>
14#include <asm/mach-types.h>
Rohit Vaswania513aa8d2011-07-18 15:14:28 -070015#include <mach/gpiomux.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016#include "gpiomux-8x60.h"
Gregory Bean1963a2a2010-08-28 10:05:44 -070017
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018static struct gpiomux_setting console_uart = {
19 .func = GPIOMUX_FUNC_2,
20 .drv = GPIOMUX_DRV_8MA,
21 .pull = GPIOMUX_PULL_NONE,
22};
23
24/* The SPI configurations apply to GSBI1 and GSBI10 */
25static struct gpiomux_setting spi_active = {
26 .func = GPIOMUX_FUNC_1,
27 .drv = GPIOMUX_DRV_8MA,
28 .pull = GPIOMUX_PULL_NONE,
29};
30
31static struct gpiomux_setting spi_suspended_config = {
32 .func = GPIOMUX_FUNC_1,
33 .drv = GPIOMUX_DRV_2MA,
34 .pull = GPIOMUX_PULL_DOWN,
35};
36
37static struct gpiomux_setting spi_suspended_cs_config = {
38 .func = GPIOMUX_FUNC_1,
39 .drv = GPIOMUX_DRV_2MA,
40 .pull = GPIOMUX_PULL_NONE,
41};
42
43/* This I2C active configuration applies to GSBI3 and GSBI4 */
44static struct gpiomux_setting i2c_active = {
45 .func = GPIOMUX_FUNC_1,
46 .drv = GPIOMUX_DRV_8MA,
47 .pull = GPIOMUX_PULL_NONE,
48};
49
50static struct gpiomux_setting i2c_active_gsbi7 = {
51 .func = GPIOMUX_FUNC_1,
52 .drv = GPIOMUX_DRV_12MA,
53 .pull = GPIOMUX_PULL_NONE,
54};
55
56/* This I2C suspended configuration applies to GSBI3, GSBI4 and GSBI7 */
57static struct gpiomux_setting i2c_suspended_config = {
58 .func = GPIOMUX_FUNC_1,
59 .drv = GPIOMUX_DRV_2MA,
60 .pull = GPIOMUX_PULL_NONE,
61};
62
63static struct gpiomux_setting gsbi8 = {
64 .func = GPIOMUX_FUNC_1,
65 .drv = GPIOMUX_DRV_2MA,
66 .pull = GPIOMUX_PULL_NONE,
67};
68
69static struct gpiomux_setting ps_hold = {
70 .func = GPIOMUX_FUNC_1,
71 .drv = GPIOMUX_DRV_12MA,
72 .pull = GPIOMUX_PULL_NONE,
73};
74
75static struct gpiomux_setting msm_snddev_active_config = {
76 .func = GPIOMUX_FUNC_1,
77 .drv = GPIOMUX_DRV_2MA,
78 .pull = GPIOMUX_PULL_NONE,
79};
80
81static struct gpiomux_setting msm_snddev_suspend_config = {
82 .func = GPIOMUX_FUNC_GPIO,
83 .drv = GPIOMUX_DRV_2MA,
84 .pull = GPIOMUX_PULL_DOWN,
85};
86
87static struct gpiomux_setting ebi2_a_d = {
88 .func = GPIOMUX_FUNC_1,
89 .drv = GPIOMUX_DRV_8MA,
90 .pull = GPIOMUX_PULL_UP,
91};
92
93static struct gpiomux_setting ebi2_oe = {
94 .func = GPIOMUX_FUNC_1,
95 .drv = GPIOMUX_DRV_8MA,
96 .pull = GPIOMUX_PULL_UP,
97};
98
99static struct gpiomux_setting ebi2_we = {
100 .func = GPIOMUX_FUNC_1,
101 .drv = GPIOMUX_DRV_8MA,
102 .pull = GPIOMUX_PULL_UP,
103};
104
105static struct gpiomux_setting ebi2_cs2 = {
106 .func = GPIOMUX_FUNC_2,
107 .drv = GPIOMUX_DRV_8MA,
108 .pull = GPIOMUX_PULL_UP,
109};
110
111static struct gpiomux_setting ebi2_cs3 = {
112 .func = GPIOMUX_FUNC_1,
113 .drv = GPIOMUX_DRV_8MA,
114 .pull = GPIOMUX_PULL_UP,
115};
116
117#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
118static struct gpiomux_setting ebi2_cs4 = {
119 .func = GPIOMUX_FUNC_1,
120 .drv = GPIOMUX_DRV_8MA,
121 .pull = GPIOMUX_PULL_UP,
122};
123#endif
124
125static struct gpiomux_setting ebi2_adv = {
126 .func = GPIOMUX_FUNC_1,
127 .drv = GPIOMUX_DRV_8MA,
128 .pull = GPIOMUX_PULL_UP,
129};
130
131#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
132static struct gpiomux_setting usb_isp1763_actv_cfg = {
133 .func = GPIOMUX_FUNC_GPIO,
134 .drv = GPIOMUX_DRV_8MA,
135 .pull = GPIOMUX_PULL_NONE,
136};
137
138static struct gpiomux_setting usb_isp1763_susp_cfg = {
139 .func = GPIOMUX_FUNC_GPIO,
140 .drv = GPIOMUX_DRV_2MA,
141 .pull = GPIOMUX_PULL_DOWN,
142};
143#endif
144
145static struct gpiomux_setting sdcc1_dat_0_3_cmd_actv_cfg = {
146 .func = GPIOMUX_FUNC_1,
147 .drv = GPIOMUX_DRV_10MA,
148 .pull = GPIOMUX_PULL_UP,
149};
150
151static struct gpiomux_setting sdcc1_dat_4_7_cmd_actv_cfg = {
152 .func = GPIOMUX_FUNC_1,
153 .drv = GPIOMUX_DRV_10MA,
154 .pull = GPIOMUX_PULL_UP,
155};
156
157static struct gpiomux_setting sdcc1_clk_actv_cfg = {
158 .func = GPIOMUX_FUNC_1,
159 .drv = GPIOMUX_DRV_16MA,
160 .pull = GPIOMUX_PULL_NONE,
161};
162
163static struct gpiomux_setting sdcc1_suspend_config = {
164 .func = GPIOMUX_FUNC_GPIO,
165 .drv = GPIOMUX_DRV_2MA,
166 .pull = GPIOMUX_PULL_UP,
167};
168
169static struct gpiomux_setting sdcc2_dat_0_3_cmd_actv_cfg = {
170 .func = GPIOMUX_FUNC_2,
171 .drv = GPIOMUX_DRV_10MA,
172 .pull = GPIOMUX_PULL_UP,
173};
174
175static struct gpiomux_setting sdcc2_dat_4_7_cmd_actv_cfg = {
176 .func = GPIOMUX_FUNC_2,
177 .drv = GPIOMUX_DRV_10MA,
178 .pull = GPIOMUX_PULL_UP,
179};
180
181static struct gpiomux_setting sdcc2_clk_actv_cfg = {
182 .func = GPIOMUX_FUNC_2,
183 .drv = GPIOMUX_DRV_16MA,
184 .pull = GPIOMUX_PULL_NONE,
185};
186
187static struct gpiomux_setting sdcc2_suspend_config = {
188 .func = GPIOMUX_FUNC_GPIO,
189 .drv = GPIOMUX_DRV_2MA,
Venkat Gopalakrishnan0c62bf62011-08-08 12:17:11 -0700190 .pull = GPIOMUX_PULL_UP,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700191};
192
193static struct gpiomux_setting sdcc5_dat_0_3_cmd_actv_cfg = {
194 .func = GPIOMUX_FUNC_2,
195 .drv = GPIOMUX_DRV_10MA,
196 .pull = GPIOMUX_PULL_UP,
197};
198
199static struct gpiomux_setting sdcc5_clk_actv_cfg = {
200 .func = GPIOMUX_FUNC_2,
201 .drv = GPIOMUX_DRV_16MA,
202 .pull = GPIOMUX_PULL_NONE,
203};
204
205static struct gpiomux_setting sdcc5_suspend_config = {
206 .func = GPIOMUX_FUNC_GPIO,
207 .drv = GPIOMUX_DRV_2MA,
Venkat Gopalakrishnan0c62bf62011-08-08 12:17:11 -0700208 .pull = GPIOMUX_PULL_UP,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700209};
210
211static struct gpiomux_setting aux_pcm_active_config = {
212 .func = GPIOMUX_FUNC_1,
213 .drv = GPIOMUX_DRV_2MA,
214 .pull = GPIOMUX_PULL_NONE,
215};
216
217static struct gpiomux_setting aux_pcm_suspend_config = {
218 .func = GPIOMUX_FUNC_GPIO,
219 .drv = GPIOMUX_DRV_2MA,
220 .pull = GPIOMUX_PULL_NONE,
221};
222
223static struct gpiomux_setting uart1dm_active = {
224 .func = GPIOMUX_FUNC_1,
225 .drv = GPIOMUX_DRV_8MA,
226 .pull = GPIOMUX_PULL_NONE,
227};
228
229static struct gpiomux_setting uart1dm_suspended = {
230 .func = GPIOMUX_FUNC_GPIO,
231 .drv = GPIOMUX_DRV_2MA,
232 .pull = GPIOMUX_PULL_DOWN,
233};
234
235static struct gpiomux_setting mi2s_active_cfg = {
236 .func = GPIOMUX_FUNC_1,
237 .drv = GPIOMUX_DRV_2MA,
238 .pull = GPIOMUX_PULL_NONE,
239};
240
241static struct gpiomux_setting mi2s_suspend_cfg = {
242 .func = GPIOMUX_FUNC_GPIO,
243 .drv = GPIOMUX_DRV_2MA,
244 .pull = GPIOMUX_PULL_DOWN,
245};
246
247static struct gpiomux_setting lcdc_active_cfg = {
248 .func = GPIOMUX_FUNC_1,
249 .drv = GPIOMUX_DRV_16MA,
250 .pull = GPIOMUX_PULL_NONE,
251};
252
253static struct gpiomux_setting lcdc_suspend_cfg = {
254 .func = GPIOMUX_FUNC_GPIO,
255 .drv = GPIOMUX_DRV_2MA,
256 .pull = GPIOMUX_PULL_DOWN,
257};
258
259static struct gpiomux_setting mdp_vsync_suspend_cfg = {
260 .func = GPIOMUX_FUNC_GPIO,
261 .drv = GPIOMUX_DRV_2MA,
262 .pull = GPIOMUX_PULL_DOWN,
263};
264
265static struct gpiomux_setting hdmi_suspend_cfg = {
266 .func = GPIOMUX_FUNC_GPIO,
267 .drv = GPIOMUX_DRV_2MA,
268 .pull = GPIOMUX_PULL_DOWN,
269};
270
271static struct gpiomux_setting mdm2ap_status_active_cfg = {
272 .func = GPIOMUX_FUNC_GPIO,
273 .drv = GPIOMUX_DRV_2MA,
274 .pull = GPIOMUX_PULL_NONE,
275};
276
277static struct gpiomux_setting mdm2ap_status_suspend_cfg = {
278 .func = GPIOMUX_FUNC_GPIO,
279 .drv = GPIOMUX_DRV_2MA,
280 .pull = GPIOMUX_PULL_NONE,
281};
282
283static struct gpiomux_setting cam_suspend_cfg = {
284 .func = GPIOMUX_FUNC_GPIO,
285 .drv = GPIOMUX_DRV_2MA,
286 .pull = GPIOMUX_PULL_DOWN,
287};
288
289static struct gpiomux_setting mdm2ap_sync_active_cfg = {
290 .func = GPIOMUX_FUNC_GPIO,
291 .drv = GPIOMUX_DRV_2MA,
292 .pull = GPIOMUX_PULL_NONE,
293};
294
295static struct gpiomux_setting mdm2ap_sync_suspend_cfg = {
296 .func = GPIOMUX_FUNC_GPIO,
297 .drv = GPIOMUX_DRV_2MA,
298 .pull = GPIOMUX_PULL_NONE,
299};
300
301static struct gpiomux_setting tm_active = {
302 .func = GPIOMUX_FUNC_GPIO,
303 .drv = GPIOMUX_DRV_2MA,
304 .pull = GPIOMUX_PULL_UP,
305};
306
307static struct gpiomux_setting tm_suspended = {
308 .func = GPIOMUX_FUNC_GPIO,
309 .drv = GPIOMUX_DRV_2MA,
310 .pull = GPIOMUX_PULL_NONE,
311};
312
313static struct gpiomux_setting tma_active = {
314 .func = GPIOMUX_FUNC_GPIO,
315 .drv = GPIOMUX_DRV_6MA,
316 .pull = GPIOMUX_PULL_UP,
317};
318
319static struct gpiomux_setting ts_suspended = {
320 .func = GPIOMUX_FUNC_GPIO,
321 .drv = GPIOMUX_DRV_2MA,
322 .pull = GPIOMUX_PULL_DOWN,
323};
324
325static struct gpiomux_setting mdp_vsync_active_cfg = {
326 .func = GPIOMUX_FUNC_1,
327 .drv = GPIOMUX_DRV_2MA,
328 .pull = GPIOMUX_PULL_NONE,
329};
330
331static struct gpiomux_setting hdmi_active_1_cfg = {
332 .func = GPIOMUX_FUNC_1,
333 .drv = GPIOMUX_DRV_2MA,
334 .pull = GPIOMUX_PULL_UP,
335};
336
337static struct gpiomux_setting hdmi_active_2_cfg = {
338 .func = GPIOMUX_FUNC_1,
339 .drv = GPIOMUX_DRV_16MA,
340 .pull = GPIOMUX_PULL_NONE,
341};
342
343static struct gpiomux_setting hdmi_active_3_cfg = {
344 .func = GPIOMUX_FUNC_1,
345 .drv = GPIOMUX_DRV_16MA,
346 .pull = GPIOMUX_PULL_DOWN,
347};
348
349static struct gpiomux_setting pmic_suspended_cfg = {
350 .func = GPIOMUX_FUNC_GPIO,
351 .drv = GPIOMUX_DRV_2MA,
352 .pull = GPIOMUX_PULL_NONE,
353};
354
355static struct gpiomux_setting cam_active_1_cfg = {
356 .func = GPIOMUX_FUNC_1,
357 .drv = GPIOMUX_DRV_2MA,
358 .pull = GPIOMUX_PULL_NONE,
359};
360
361static struct gpiomux_setting cam_active_2_cfg = {
362 .func = GPIOMUX_FUNC_GPIO,
363 .drv = GPIOMUX_DRV_2MA,
364 .pull = GPIOMUX_PULL_NONE,
365};
366
367static struct gpiomux_setting cam_active_3_cfg = {
368 .func = GPIOMUX_FUNC_1,
369 .drv = GPIOMUX_DRV_8MA,
370 .pull = GPIOMUX_PULL_UP,
371};
372
373static struct gpiomux_setting cam_active_4_cfg = {
374 .func = GPIOMUX_FUNC_GPIO,
375 .drv = GPIOMUX_DRV_2MA,
376 .pull = GPIOMUX_PULL_DOWN,
377};
378
379static struct gpiomux_setting cam_active_5_cfg = {
380 .func = GPIOMUX_FUNC_1,
381 .drv = GPIOMUX_DRV_4MA,
382 .pull = GPIOMUX_PULL_NONE,
383};
384
385#ifdef CONFIG_MSM_GSBI9_UART
386static struct gpiomux_setting uart9dm_active = {
387 .func = GPIOMUX_FUNC_1,
388 .drv = GPIOMUX_DRV_8MA ,
389 .pull = GPIOMUX_PULL_DOWN,
390};
391
392static struct gpiomux_setting gsbi9 = {
393 .func = GPIOMUX_FUNC_1,
394 .drv = GPIOMUX_DRV_8MA,
395 .pull = GPIOMUX_PULL_NONE,
396};
397#endif
398
399static struct gpiomux_setting ap2mdm_cfg = {
400 .func = GPIOMUX_FUNC_GPIO,
401 .drv = GPIOMUX_DRV_8MA,
402 .pull = GPIOMUX_PULL_DOWN,
403};
404
405static struct gpiomux_setting mdm2ap_status_cfg = {
406 .func = GPIOMUX_FUNC_GPIO,
407 .drv = GPIOMUX_DRV_8MA,
408 .pull = GPIOMUX_PULL_NONE,
409};
410
411static struct gpiomux_setting mdm2ap_vfr_active_cfg = {
412 .func = GPIOMUX_FUNC_GPIO,
413 .drv = GPIOMUX_DRV_8MA,
414 .pull = GPIOMUX_PULL_UP,
415};
416
417static struct gpiomux_setting mdm2ap_vfr_suspend_cfg = {
418 .func = GPIOMUX_FUNC_GPIO,
419 .drv = GPIOMUX_DRV_8MA,
420 .pull = GPIOMUX_PULL_DOWN,
421};
422
423static struct gpiomux_setting mdm2ap_errfatal_cfg = {
424 .func = GPIOMUX_FUNC_GPIO,
425 .drv = GPIOMUX_DRV_16MA,
426 .pull = GPIOMUX_PULL_NONE,
427};
428
429static struct gpiomux_setting ap2mdm_kpdpwr_n_cfg = {
430 .func = GPIOMUX_FUNC_GPIO,
431 .drv = GPIOMUX_DRV_8MA,
432 .pull = GPIOMUX_PULL_NONE,
433};
434
435
436static struct gpiomux_setting mdm2ap_vddmin_active_cfg = {
437 .func = GPIOMUX_FUNC_GPIO,
438 .drv = GPIOMUX_DRV_2MA,
439 .pull = GPIOMUX_PULL_NONE,
440};
441
442static struct gpiomux_setting mdm2ap_vddmin_suspend_cfg = {
443 .func = GPIOMUX_FUNC_GPIO,
444 .drv = GPIOMUX_DRV_2MA,
445 .pull = GPIOMUX_PULL_NONE,
446};
447
448static struct msm_gpiomux_config msm8x60_gsbi_configs[] __initdata = {
449 {
450 .gpio = 33,
451 .settings = {
452 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
453 [GPIOMUX_ACTIVE] = &spi_active,
454 },
455 },
456 {
457 .gpio = 34,
458 .settings = {
459 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
460 [GPIOMUX_ACTIVE] = &spi_active,
461 },
462 },
463 {
464 .gpio = 35,
465 .settings = {
466 [GPIOMUX_SUSPENDED] = &spi_suspended_cs_config,
467 [GPIOMUX_ACTIVE] = &spi_active,
468 },
469 },
470 {
471 .gpio = 36,
472 .settings = {
473 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
474 [GPIOMUX_ACTIVE] = &spi_active,
475 },
476 },
477 {
478 .gpio = 43,
479 .settings = {
480 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
481 [GPIOMUX_ACTIVE] = &i2c_active,
482 },
483 },
484 {
485 .gpio = 44,
486 .settings = {
487 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
488 [GPIOMUX_ACTIVE] = &i2c_active,
489 },
490 },
491 {
492 .gpio = 47,
493 .settings = {
494 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
495 [GPIOMUX_ACTIVE] = &i2c_active,
496 },
497 },
498 {
499 .gpio = 48,
500 .settings = {
501 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
502 [GPIOMUX_ACTIVE] = &i2c_active,
503 },
504 },
505 {
506 .gpio = 59,
507 .settings = {
508 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
509 [GPIOMUX_ACTIVE] = &i2c_active_gsbi7,
510 },
511 },
512 {
513 .gpio = 60,
514 .settings = {
515 [GPIOMUX_SUSPENDED] = &i2c_suspended_config,
516 [GPIOMUX_ACTIVE] = &i2c_active_gsbi7,
517 },
518 },
519 {
520 .gpio = 64,
521 .settings = {
522 [GPIOMUX_SUSPENDED] = &gsbi8,
523 },
524 },
525 {
526 .gpio = 65,
527 .settings = {
528 [GPIOMUX_SUSPENDED] = &gsbi8,
529 },
530 },
531};
532
533static struct msm_gpiomux_config msm8x60_fluid_gsbi_configs[] __initdata = {
534 {
535 .gpio = 70,
536 .settings = {
537 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
538 [GPIOMUX_ACTIVE] = &spi_active,
539 },
540 },
541 {
542 .gpio = 72,
543 .settings = {
544 [GPIOMUX_SUSPENDED] = &spi_suspended_cs_config,
545 [GPIOMUX_ACTIVE] = &spi_active,
546 },
547 },
548 {
549 .gpio = 73,
550 .settings = {
551 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
552 [GPIOMUX_ACTIVE] = &spi_active,
553 },
554 },
555};
556
557static struct msm_gpiomux_config msm8x60_ebi2_configs[] __initdata = {
558 {
559 .gpio = 40,
560 .settings = {
561 [GPIOMUX_SUSPENDED] = &ebi2_cs2,
562 },
563 },
564 {
565 .gpio = 123,
566 .settings = {
567 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
568 },
569 },
570 {
571 .gpio = 124,
572 .settings = {
573 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
574 },
575 },
576 {
577 .gpio = 125,
578 .settings = {
579 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
580 },
581 },
582 {
583 .gpio = 126,
584 .settings = {
585 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
586 },
587 },
588 {
589 .gpio = 127,
590 .settings = {
591 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
592 },
593 },
594 {
595 .gpio = 128,
596 .settings = {
597 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
598 },
599 },
600 {
601 .gpio = 129,
602 .settings = {
603 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
604 },
605 },
606 {
607 .gpio = 130,
608 .settings = {
609 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
610 },
611 },
612#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
613 /* ISP VDD_3V3_EN */
614 {
615 .gpio = 132,
616 .settings = {
617 [GPIOMUX_SUSPENDED] = &ebi2_cs4,
618 },
619 },
620#endif
621 {
622 .gpio = 133,
623 .settings = {
624 [GPIOMUX_SUSPENDED] = &ebi2_cs3,
625 },
626 },
627 {
628 .gpio = 135,
629 .settings = {
630 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
631 },
632 },
633 {
634 .gpio = 136,
635 .settings = {
636 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
637 },
638 },
639 {
640 .gpio = 137,
641 .settings = {
642 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
643 },
644 },
645 {
646 .gpio = 138,
647 .settings = {
648 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
649 },
650 },
651 {
652 .gpio = 139,
653 .settings = {
654 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
655 },
656 },
657 {
658 .gpio = 140,
659 .settings = {
660 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
661 },
662 },
663 {
664 .gpio = 141,
665 .settings = {
666 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
667 },
668 },
669 {
670 .gpio = 142,
671 .settings = {
672 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
673 },
674 },
675 {
676 .gpio = 143,
677 .settings = {
678 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
679 },
680 },
681 {
682 .gpio = 144,
683 .settings = {
684 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
685 },
686 },
687 {
688 .gpio = 145,
689 .settings = {
690 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
691 },
692 },
693 {
694 .gpio = 146,
695 .settings = {
696 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
697 },
698 },
699 {
700 .gpio = 147,
701 .settings = {
702 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
703 },
704 },
705 {
706 .gpio = 148,
707 .settings = {
708 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
709 },
710 },
711 {
712 .gpio = 149,
713 .settings = {
714 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
715 },
716 },
717 {
718 .gpio = 150,
719 .settings = {
720 [GPIOMUX_SUSPENDED] = &ebi2_a_d,
721 },
722 },
723 {
724 .gpio = 151,
725 .settings = {
726 [GPIOMUX_SUSPENDED] = &ebi2_oe,
727 },
728 },
729 {
730 .gpio = 153,
731 .settings = {
732 [GPIOMUX_SUSPENDED] = &ebi2_adv,
733 },
734 },
735 {
736 .gpio = 157,
737 .settings = {
738 [GPIOMUX_SUSPENDED] = &ebi2_we,
739 },
740 },
741};
742
743#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
744static struct msm_gpiomux_config msm8x60_isp_usb_configs[] __initdata = {
745 {
746 .gpio = 117,
747 .settings = {
748 [GPIOMUX_ACTIVE] = &usb_isp1763_actv_cfg,
749 [GPIOMUX_SUSPENDED] = &usb_isp1763_susp_cfg,
750 },
751 },
752 {
753 .gpio = 152,
754 .settings = {
755 [GPIOMUX_ACTIVE] = &usb_isp1763_actv_cfg,
756 [GPIOMUX_SUSPENDED] = &usb_isp1763_susp_cfg,
757 },
758 },
759
760};
761#endif
762
763static struct msm_gpiomux_config msm8x60_uart_configs[] __initdata = {
764 { /* UARTDM_TX */
765 .gpio = 53,
766 .settings = {
767 [GPIOMUX_ACTIVE] = &uart1dm_active,
768 [GPIOMUX_SUSPENDED] = &uart1dm_suspended,
769 },
770 },
771 { /* UARTDM_RX */
772 .gpio = 54,
773 .settings = {
774 [GPIOMUX_ACTIVE] = &uart1dm_active,
775 [GPIOMUX_SUSPENDED] = &uart1dm_suspended,
776 },
777 },
778 { /* UARTDM_CTS */
779 .gpio = 55,
780 .settings = {
781 [GPIOMUX_ACTIVE] = &uart1dm_active,
782 [GPIOMUX_SUSPENDED] = &uart1dm_suspended,
783 },
784 },
785 { /* UARTDM_RFR */
786 .gpio = 56,
787 .settings = {
788 [GPIOMUX_ACTIVE] = &uart1dm_active,
789 [GPIOMUX_SUSPENDED] = &uart1dm_suspended,
790 },
791 },
792 {
793 .gpio = 115,
794 .settings = {
795 [GPIOMUX_SUSPENDED] = &console_uart,
796 },
797 },
798 {
799 .gpio = 116,
800 .settings = {
801 [GPIOMUX_SUSPENDED] = &console_uart,
802 },
803 },
804#if !defined(CONFIG_USB_PEHCI_HCD) && !defined(CONFIG_USB_PEHCI_HCD_MODULE)
805 /* USB ISP1763 may also use 117 GPIO */
806 {
807 .gpio = 117,
808 .settings = {
809 [GPIOMUX_SUSPENDED] = &console_uart,
810 },
811 },
812#endif
813 {
814 .gpio = 118,
815 .settings = {
816 [GPIOMUX_SUSPENDED] = &console_uart,
817 },
818 },
819};
820
821#ifdef CONFIG_MSM_GSBI9_UART
822static struct msm_gpiomux_config msm8x60_charm_uart_configs[] __initdata = {
823 { /* UART9DM RX */
824 .gpio = 66,
825 .settings = {
826 [GPIOMUX_ACTIVE] = &uart9dm_active,
827 [GPIOMUX_SUSPENDED] = &gsbi9,
828 },
829 },
830 { /* UART9DM TX */
831 .gpio = 67,
832 .settings = {
833 [GPIOMUX_ACTIVE] = &uart9dm_active,
834 [GPIOMUX_SUSPENDED] = &gsbi9,
835 },
836 },
837};
838#endif
839
840static struct msm_gpiomux_config msm8x60_ts_configs[] __initdata = {
841 {
842 /* TS_ATTN */
843 .gpio = 58,
844 .settings = {
845 [GPIOMUX_SUSPENDED] = &ts_suspended,
846 },
847 },
848};
849
850static struct msm_gpiomux_config msm8x60_tmg200_configs[] __initdata = {
851 {
852 .gpio = 61,
853 .settings = {
854 [GPIOMUX_ACTIVE] = &tm_active,
855 [GPIOMUX_SUSPENDED] = &tm_suspended,
856 },
857 },
858};
859
860static struct msm_gpiomux_config msm8x60_tma300_configs[] __initdata = {
861 {
862 .gpio = 61,
863 .settings = {
864 [GPIOMUX_ACTIVE] = &tma_active,
865 [GPIOMUX_SUSPENDED] = &tm_suspended,
866 },
867 },
868};
869
870static struct msm_gpiomux_config msm8x60_aux_pcm_configs[] __initdata = {
871 {
872 .gpio = 111,
873 .settings = {
874 [GPIOMUX_ACTIVE] = &aux_pcm_active_config,
875 [GPIOMUX_SUSPENDED] = &aux_pcm_suspend_config,
876 },
877 },
878 {
879 .gpio = 112,
880 .settings = {
881 [GPIOMUX_ACTIVE] = &aux_pcm_active_config,
882 [GPIOMUX_SUSPENDED] = &aux_pcm_suspend_config,
883 },
884 },
885 {
886 .gpio = 113,
887 .settings = {
888 [GPIOMUX_ACTIVE] = &aux_pcm_active_config,
889 [GPIOMUX_SUSPENDED] = &aux_pcm_suspend_config,
890 },
891 },
892 {
893 .gpio = 114,
894 .settings = {
895 [GPIOMUX_ACTIVE] = &aux_pcm_active_config,
896 [GPIOMUX_SUSPENDED] = &aux_pcm_suspend_config,
897 },
898 },
899};
900
901static struct msm_gpiomux_config msm8x60_sdc_configs[] __initdata = {
902 /* SDCC1 data[0] */
903 {
904 .gpio = 159,
905 .settings = {
906 [GPIOMUX_ACTIVE] = &sdcc1_dat_0_3_cmd_actv_cfg,
907 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
908 },
909 },
910 /* SDCC1 data[1] */
911 {
912 .gpio = 160,
913 .settings = {
914 [GPIOMUX_ACTIVE] = &sdcc1_dat_0_3_cmd_actv_cfg,
915 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
916 },
917 },
918 /* SDCC1 data[2] */
919 {
920 .gpio = 161,
921 .settings = {
922 [GPIOMUX_ACTIVE] = &sdcc1_dat_0_3_cmd_actv_cfg,
923 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
924 },
925 },
926 /* SDCC1 data[3] */
927 {
928 .gpio = 162,
929 .settings = {
930 [GPIOMUX_ACTIVE] = &sdcc1_dat_0_3_cmd_actv_cfg,
931 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
932 },
933 },
934 /* SDCC1 data[4] */
935 {
936 .gpio = 163,
937 .settings = {
938 [GPIOMUX_ACTIVE] = &sdcc1_dat_4_7_cmd_actv_cfg,
939 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
940 },
941 },
942 /* SDCC1 data[5] */
943 {
944 .gpio = 164,
945 .settings = {
946 [GPIOMUX_ACTIVE] = &sdcc1_dat_4_7_cmd_actv_cfg,
947 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
948 },
949 },
950 /* SDCC1 data[6] */
951 {
952 .gpio = 165,
953 .settings = {
954 [GPIOMUX_ACTIVE] = &sdcc1_dat_4_7_cmd_actv_cfg,
955 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
956 },
957 },
958 /* SDCC1 data[7] */
959 {
960 .gpio = 166,
961 .settings = {
962 [GPIOMUX_ACTIVE] = &sdcc1_dat_4_7_cmd_actv_cfg,
963 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
964 },
965 },
966 /* SDCC1 CLK */
967 {
968 .gpio = 167,
969 .settings = {
970 [GPIOMUX_ACTIVE] = &sdcc1_clk_actv_cfg,
971 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
972 },
973 },
974 /* SDCC1 CMD */
975 {
976 .gpio = 168,
977 .settings = {
978 [GPIOMUX_ACTIVE] = &sdcc1_dat_0_3_cmd_actv_cfg,
979 [GPIOMUX_SUSPENDED] = &sdcc1_suspend_config,
980 },
981 },
982};
983
984static struct msm_gpiomux_config msm8x60_charm_sdc_configs[] __initdata = {
985 /* SDCC5 cmd */
986 {
987 .gpio = 95,
988 .settings = {
989 [GPIOMUX_ACTIVE] = &sdcc5_dat_0_3_cmd_actv_cfg,
990 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
991 },
992 },
993 /* SDCC5 data[3]*/
994 {
995 .gpio = 96,
996 .settings = {
997 [GPIOMUX_ACTIVE] = &sdcc5_dat_0_3_cmd_actv_cfg,
998 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
999 },
1000 },
1001 /* SDCC5 clk */
1002 {
1003 .gpio = 97,
1004 .settings = {
1005 [GPIOMUX_ACTIVE] = &sdcc5_clk_actv_cfg,
1006 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
1007 },
1008 },
1009 /* SDCC5 data[2]*/
1010 {
1011 .gpio = 98,
1012 .settings = {
1013 [GPIOMUX_ACTIVE] = &sdcc5_dat_0_3_cmd_actv_cfg,
1014 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
1015 },
1016 },
1017 /* SDCC5 data[1]*/
1018 {
1019 .gpio = 99,
1020 .settings = {
1021 [GPIOMUX_ACTIVE] = &sdcc5_dat_0_3_cmd_actv_cfg,
1022 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
1023 },
1024 },
1025 /* SDCC5 data[0]*/
1026 {
1027 .gpio = 100,
1028 .settings = {
1029 [GPIOMUX_ACTIVE] = &sdcc5_dat_0_3_cmd_actv_cfg,
1030 [GPIOMUX_SUSPENDED] = &sdcc5_suspend_config,
1031 },
1032 },
1033 /* MDM2AP_SYNC */
1034 {
1035 .gpio = 129,
1036 .settings = {
1037 [GPIOMUX_ACTIVE] = &mdm2ap_sync_active_cfg,
1038 [GPIOMUX_SUSPENDED] = &mdm2ap_sync_suspend_cfg,
1039 },
1040 },
1041
1042 /* MDM2AP_VDDMIN */
1043 {
1044 .gpio = 140,
1045 .settings = {
1046 [GPIOMUX_ACTIVE] = &mdm2ap_vddmin_active_cfg,
1047 [GPIOMUX_SUSPENDED] = &mdm2ap_vddmin_suspend_cfg,
1048 },
1049 },
1050 /* SDCC2 data[0] */
1051 {
1052 .gpio = 143,
1053 .settings = {
1054 [GPIOMUX_ACTIVE] = &sdcc2_dat_0_3_cmd_actv_cfg,
1055 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1056 },
1057 },
1058 /* SDCC2 data[1] */
1059 {
1060 .gpio = 144,
1061 .settings = {
1062 [GPIOMUX_ACTIVE] = &sdcc2_dat_0_3_cmd_actv_cfg,
1063 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1064 },
1065 },
1066 /* SDCC2 data[2] */
1067 {
1068 .gpio = 145,
1069 .settings = {
1070 [GPIOMUX_ACTIVE] = &sdcc2_dat_0_3_cmd_actv_cfg,
1071 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1072 },
1073 },
1074 /* SDCC2 data[3] */
1075 {
1076 .gpio = 146,
1077 .settings = {
1078 [GPIOMUX_ACTIVE] = &sdcc2_dat_0_3_cmd_actv_cfg,
1079 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1080 },
1081 },
1082 /* SDCC2 data[4] */
1083 {
1084 .gpio = 147,
1085 .settings = {
1086 [GPIOMUX_ACTIVE] = &sdcc2_dat_4_7_cmd_actv_cfg,
1087 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1088 },
1089 },
1090 /* SDCC2 data[5] */
1091 {
1092 .gpio = 148,
1093 .settings = {
1094 [GPIOMUX_ACTIVE] = &sdcc2_dat_4_7_cmd_actv_cfg,
1095 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1096 },
1097 },
1098 /* SDCC2 data[6] */
1099 {
1100 .gpio = 149,
1101 .settings = {
1102 [GPIOMUX_ACTIVE] = &sdcc2_dat_4_7_cmd_actv_cfg,
1103 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1104 },
1105 },
1106 /* SDCC2 data[7] */
1107 {
1108 .gpio = 150,
1109 .settings = {
1110 [GPIOMUX_ACTIVE] = &sdcc2_dat_4_7_cmd_actv_cfg,
1111 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1112 },
1113 },
1114 /* SDCC2 CMD */
1115 {
1116 .gpio = 151,
1117 .settings = {
1118 [GPIOMUX_ACTIVE] = &sdcc2_dat_0_3_cmd_actv_cfg,
1119 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1120 },
1121 },
1122
1123 /* SDCC2 CLK */
1124 {
1125 .gpio = 152,
1126 .settings = {
1127 [GPIOMUX_ACTIVE] = &sdcc2_clk_actv_cfg,
1128 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_config,
1129 },
1130 },
1131};
1132
1133static struct msm_gpiomux_config msm8x60_snd_configs[] __initdata = {
1134 {
1135 .gpio = 108,
1136 .settings = {
1137 [GPIOMUX_ACTIVE] = &msm_snddev_active_config,
1138 [GPIOMUX_SUSPENDED] = &msm_snddev_suspend_config,
1139 },
1140 },
1141 {
1142 .gpio = 109,
1143 .settings = {
1144 [GPIOMUX_ACTIVE] = &msm_snddev_active_config,
1145 [GPIOMUX_SUSPENDED] = &msm_snddev_suspend_config,
1146 },
1147 },
1148};
1149
1150static struct msm_gpiomux_config msm8x60_mi2s_configs[] __initdata = {
1151 /* MI2S WS */
1152 {
1153 .gpio = 101,
1154 .settings = {
1155 [GPIOMUX_ACTIVE] = &mi2s_active_cfg,
1156 [GPIOMUX_SUSPENDED] = &mi2s_suspend_cfg,
1157 },
1158 },
1159 /* MI2S SCLK */
1160 {
1161 .gpio = 102,
1162 .settings = {
1163 [GPIOMUX_ACTIVE] = &mi2s_active_cfg,
1164 [GPIOMUX_SUSPENDED] = &mi2s_suspend_cfg,
1165 },
1166 },
1167 /* MI2S MCLK */
1168 {
1169 .gpio = 103,
1170 .settings = {
1171 [GPIOMUX_ACTIVE] = &mi2s_active_cfg,
1172 [GPIOMUX_SUSPENDED] = &mi2s_suspend_cfg,
1173 },
1174 },
1175 /* MI2S SD3 */
1176 {
1177 .gpio = 107,
1178 .settings = {
1179 [GPIOMUX_ACTIVE] = &mi2s_active_cfg,
1180 [GPIOMUX_SUSPENDED] = &mi2s_suspend_cfg,
1181 },
1182 },
1183};
1184
1185static struct msm_gpiomux_config msm8x60_lcdc_configs[] __initdata = {
1186 /* lcdc_pclk */
1187 {
1188 .gpio = 0,
1189 .settings = {
1190 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1191 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1192 },
1193 },
1194 /* lcdc_hsync */
1195 {
1196 .gpio = 1,
1197 .settings = {
1198 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1199 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1200 },
1201 },
1202 /* lcdc_vsync */
1203 {
1204 .gpio = 2,
1205 .settings = {
1206 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1207 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1208 },
1209 },
1210 /* lcdc_den */
1211 {
1212 .gpio = 3,
1213 .settings = {
1214 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1215 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1216 },
1217 },
1218 /* lcdc_red7 */
1219 {
1220 .gpio = 4,
1221 .settings = {
1222 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1223 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1224 },
1225 },
1226 /* lcdc_red6 */
1227 {
1228 .gpio = 5,
1229 .settings = {
1230 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1231 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1232 },
1233 },
1234 /* lcdc_red5 */
1235 {
1236 .gpio = 6,
1237 .settings = {
1238 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1239 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1240 },
1241 },
1242 /* lcdc_red4 */
1243 {
1244 .gpio = 7,
1245 .settings = {
1246 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1247 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1248 },
1249 },
1250 /* lcdc_red3 */
1251 {
1252 .gpio = 8,
1253 .settings = {
1254 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1255 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1256 },
1257 },
1258 /* lcdc_red2 */
1259 {
1260 .gpio = 9,
1261 .settings = {
1262 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1263 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1264 },
1265 },
1266 /* lcdc_red1 */
1267 {
1268 .gpio = 10,
1269 .settings = {
1270 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1271 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1272 },
1273 },
1274 /* lcdc_red0 */
1275 {
1276 .gpio = 11,
1277 .settings = {
1278 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1279 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1280 },
1281 },
1282 /* lcdc_grn7 */
1283 {
1284 .gpio = 12,
1285 .settings = {
1286 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1287 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1288 },
1289 },
1290 /* lcdc_grn6 */
1291 {
1292 .gpio = 13,
1293 .settings = {
1294 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1295 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1296 },
1297 },
1298 /* lcdc_grn5 */
1299 {
1300 .gpio = 14,
1301 .settings = {
1302 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1303 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1304 },
1305 },
1306 /* lcdc_grn4 */
1307 {
1308 .gpio = 15,
1309 .settings = {
1310 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1311 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1312 },
1313 },
1314 /* lcdc_grn3 */
1315 {
1316 .gpio = 16,
1317 .settings = {
1318 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1319 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1320 },
1321 },
1322 /* lcdc_grn2 */
1323 {
1324 .gpio = 17,
1325 .settings = {
1326 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1327 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1328 },
1329 },
1330 /* lcdc_grn1 */
1331 {
1332 .gpio = 18,
1333 .settings = {
1334 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1335 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1336 },
1337 },
1338 /* lcdc_grn0 */
1339 {
1340 .gpio = 19,
1341 .settings = {
1342 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1343 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1344 },
1345 },
1346 /* lcdc_blu7 */
1347 {
1348 .gpio = 20,
1349 .settings = {
1350 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1351 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1352 },
1353 },
1354 /* lcdc_blu6 */
1355 {
1356 .gpio = 21,
1357 .settings = {
1358 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1359 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1360 },
1361 },
1362 /* lcdc_blu5 */
1363 {
1364 .gpio = 22,
1365 .settings = {
1366 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1367 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1368 },
1369 },
1370 /* lcdc_blu4 */
1371 {
1372 .gpio = 23,
1373 .settings = {
1374 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1375 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1376 },
1377 },
1378 /* lcdc_blu3 */
1379 {
1380 .gpio = 24,
1381 .settings = {
1382 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1383 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1384 },
1385 },
1386 /* lcdc_blu2 */
1387 {
1388 .gpio = 25,
1389 .settings = {
1390 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1391 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1392 },
1393 },
1394 /* lcdc_blu1 */
1395 {
1396 .gpio = 26,
1397 .settings = {
1398 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1399 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1400 },
1401 },
1402 /* lcdc_blu0 */
1403 {
1404 .gpio = 27,
1405 .settings = {
1406 [GPIOMUX_ACTIVE] = &lcdc_active_cfg,
1407 [GPIOMUX_SUSPENDED] = &lcdc_suspend_cfg,
1408 },
1409 },
1410};
1411
1412static struct msm_gpiomux_config msm8x60_mdp_vsync_configs[] __initdata = {
1413 {
1414 .gpio = 28,
1415 .settings = {
1416 [GPIOMUX_ACTIVE] = &mdp_vsync_active_cfg,
1417 [GPIOMUX_SUSPENDED] = &mdp_vsync_suspend_cfg,
1418 },
1419 },
1420};
1421
1422static struct msm_gpiomux_config msm8x60_hdmi_configs[] __initdata = {
1423 {
1424 .gpio = 169,
1425 .settings = {
1426 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
1427 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
1428 },
1429 },
1430 {
1431 .gpio = 170,
1432 .settings = {
1433 [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg,
1434 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
1435 },
1436 },
1437 {
1438 .gpio = 171,
1439 .settings = {
1440 [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg,
1441 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
1442 },
1443 },
1444 {
1445 .gpio = 172,
1446 .settings = {
1447 [GPIOMUX_ACTIVE] = &hdmi_active_3_cfg,
1448 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
1449 },
1450 },
1451};
1452
1453/* Because PMIC drivers do not use gpio-management routines and PMIC
1454 * gpios must never sleep, a "good enough" config is obtained by placing
1455 * the active config in the 'suspended' slot and leaving the active
1456 * config invalid: the suspended config will be installed at boot
1457 * and never replaced.
1458 */
1459
1460static struct msm_gpiomux_config msm8x60_pmic_configs[] __initdata = {
1461 {
1462 .gpio = 88,
1463 .settings = {
1464 [GPIOMUX_SUSPENDED] = &pmic_suspended_cfg,
1465 },
1466 },
1467 {
1468 .gpio = 91,
1469 .settings = {
1470 [GPIOMUX_SUSPENDED] = &pmic_suspended_cfg,
1471 },
1472 },
1473};
1474
1475static struct msm_gpiomux_config msm8x60_common_configs[] __initdata = {
1476 /* MDM2AP_STATUS */
1477 {
1478 .gpio = 77,
1479 .settings = {
1480 [GPIOMUX_ACTIVE] = &mdm2ap_status_active_cfg,
1481 [GPIOMUX_SUSPENDED] = &mdm2ap_status_suspend_cfg,
1482 },
1483 },
1484 /* PS_HOLD */
1485 {
1486 .gpio = 92,
1487 .settings = {
1488 [GPIOMUX_SUSPENDED] = &ps_hold,
1489 },
1490 },
1491};
1492
1493static struct msm_gpiomux_config msm8x60_cam_configs[] __initdata = {
1494 {
1495 .gpio = 29,
1496 .settings = {
1497 [GPIOMUX_ACTIVE] = &cam_active_2_cfg,
1498 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1499 },
1500 },
1501 {
1502 .gpio = 30,
1503 .settings = {
1504 [GPIOMUX_ACTIVE] = &cam_active_1_cfg,
1505 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1506 },
1507 },
1508 {
1509 .gpio = 31,
1510 .settings = {
1511 [GPIOMUX_ACTIVE] = &cam_active_2_cfg,
1512 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1513 },
1514 },
1515 {
1516 .gpio = 32,
1517 .settings = {
1518 [GPIOMUX_ACTIVE] = &cam_active_5_cfg,
1519 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1520 },
1521 },
1522 {
1523 .gpio = 42,
1524 .settings = {
1525 [GPIOMUX_ACTIVE] = &cam_active_2_cfg,
1526 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1527 },
1528 },
1529 {
1530 .gpio = 47,
1531 .settings = {
1532 [GPIOMUX_ACTIVE] = &cam_active_3_cfg,
1533 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1534 },
1535 },
1536 {
1537 .gpio = 48,
1538 .settings = {
1539 [GPIOMUX_ACTIVE] = &cam_active_3_cfg,
1540 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1541 },
1542 },
1543 {
1544 .gpio = 105,
1545 .settings = {
1546 [GPIOMUX_ACTIVE] = &cam_active_4_cfg,
1547 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1548 },
1549 },
1550 {
1551 .gpio = 106,
1552 .settings = {
1553 [GPIOMUX_ACTIVE] = &cam_active_4_cfg,
1554 [GPIOMUX_SUSPENDED] = &cam_suspend_cfg,
1555 },
1556 },
1557};
1558
1559static struct msm_gpiomux_config msm8x60_charm_configs[] __initdata = {
1560 /* AP2MDM_WAKEUP */
1561 {
1562 .gpio = 135,
1563 .settings = {
1564 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
1565 }
1566 },
1567 /* MDM2AP_VFR */
1568 {
1569 .gpio = 94,
1570 .settings = {
1571 [GPIOMUX_ACTIVE] = &mdm2ap_vfr_active_cfg,
1572 [GPIOMUX_SUSPENDED] = &mdm2ap_vfr_suspend_cfg,
1573 }
1574 },
1575 /* AP2MDM_STATUS */
1576 {
1577 .gpio = 136,
1578 .settings = {
1579 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
1580 }
1581 },
1582 /* MDM2AP_STATUS */
1583 {
1584 .gpio = 134,
1585 .settings = {
1586 [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
1587 }
1588 },
1589 /* MDM2AP_WAKEUP */
1590 {
1591 .gpio = 40,
1592 .settings = {
1593 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
1594 }
1595 },
1596 /* MDM2AP_ERRFATAL */
1597 {
1598 .gpio = 133,
1599 .settings = {
1600 [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
1601 }
1602 },
1603 /* AP2MDM_ERRFATAL */
1604 {
1605 .gpio = 93,
1606 .settings = {
1607 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
1608 }
1609 },
1610 /* AP2MDM_KPDPWR_N */
1611 {
1612 .gpio = 132,
1613 .settings = {
1614 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
1615 }
1616 },
1617 /* AP2MDM_PMIC_RESET_N */
1618 {
1619 .gpio = 131,
1620 .settings = {
1621 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
1622 }
1623 }
1624};
1625
1626struct msm_gpiomux_configs
1627msm8x60_surf_ffa_gpiomux_cfgs[] __initdata = {
1628 {msm8x60_gsbi_configs, ARRAY_SIZE(msm8x60_gsbi_configs)},
1629 {msm8x60_ebi2_configs, ARRAY_SIZE(msm8x60_ebi2_configs)},
1630 {msm8x60_uart_configs, ARRAY_SIZE(msm8x60_uart_configs)},
1631#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
1632 {msm8x60_isp_usb_configs, ARRAY_SIZE(msm8x60_isp_usb_configs)},
1633#endif
1634 {msm8x60_ts_configs, ARRAY_SIZE(msm8x60_ts_configs)},
1635 {msm8x60_aux_pcm_configs, ARRAY_SIZE(msm8x60_aux_pcm_configs)},
1636 {msm8x60_sdc_configs, ARRAY_SIZE(msm8x60_sdc_configs)},
1637 {msm8x60_snd_configs, ARRAY_SIZE(msm8x60_snd_configs)},
1638 {msm8x60_mi2s_configs, ARRAY_SIZE(msm8x60_mi2s_configs)},
1639 {msm8x60_lcdc_configs, ARRAY_SIZE(msm8x60_lcdc_configs)},
1640 {msm8x60_mdp_vsync_configs, ARRAY_SIZE(msm8x60_mdp_vsync_configs)},
1641 {msm8x60_hdmi_configs, ARRAY_SIZE(msm8x60_hdmi_configs)},
1642 {msm8x60_pmic_configs, ARRAY_SIZE(msm8x60_pmic_configs)},
1643 {msm8x60_common_configs, ARRAY_SIZE(msm8x60_common_configs)},
1644 {msm8x60_cam_configs, ARRAY_SIZE(msm8x60_cam_configs)},
1645 {msm8x60_tmg200_configs, ARRAY_SIZE(msm8x60_tmg200_configs)},
1646 {NULL, 0},
1647};
1648
1649struct msm_gpiomux_configs
1650msm8x60_fluid_gpiomux_cfgs[] __initdata = {
1651 {msm8x60_gsbi_configs, ARRAY_SIZE(msm8x60_gsbi_configs)},
1652 {msm8x60_fluid_gsbi_configs, ARRAY_SIZE(msm8x60_fluid_gsbi_configs)},
1653 {msm8x60_ebi2_configs, ARRAY_SIZE(msm8x60_ebi2_configs)},
1654 {msm8x60_uart_configs, ARRAY_SIZE(msm8x60_uart_configs)},
1655 {msm8x60_ts_configs, ARRAY_SIZE(msm8x60_ts_configs)},
1656 {msm8x60_aux_pcm_configs, ARRAY_SIZE(msm8x60_aux_pcm_configs)},
1657 {msm8x60_sdc_configs, ARRAY_SIZE(msm8x60_sdc_configs)},
1658 {msm8x60_snd_configs, ARRAY_SIZE(msm8x60_snd_configs)},
1659 {msm8x60_mi2s_configs, ARRAY_SIZE(msm8x60_mi2s_configs)},
1660 {msm8x60_lcdc_configs, ARRAY_SIZE(msm8x60_lcdc_configs)},
1661 {msm8x60_mdp_vsync_configs, ARRAY_SIZE(msm8x60_mdp_vsync_configs)},
1662 {msm8x60_hdmi_configs, ARRAY_SIZE(msm8x60_hdmi_configs)},
1663 {msm8x60_pmic_configs, ARRAY_SIZE(msm8x60_pmic_configs)},
1664 {msm8x60_common_configs, ARRAY_SIZE(msm8x60_common_configs)},
1665 {msm8x60_cam_configs, ARRAY_SIZE(msm8x60_cam_configs)},
1666 {msm8x60_tma300_configs, ARRAY_SIZE(msm8x60_tma300_configs)},
1667 {NULL, 0},
1668};
1669
1670struct msm_gpiomux_configs
1671msm8x60_charm_gpiomux_cfgs[] __initdata = {
1672 {msm8x60_gsbi_configs, ARRAY_SIZE(msm8x60_gsbi_configs)},
1673 {msm8x60_uart_configs, ARRAY_SIZE(msm8x60_uart_configs)},
1674#ifdef CONFIG_MSM_GSBI9_UART
1675 {msm8x60_charm_uart_configs, ARRAY_SIZE(msm8x60_charm_uart_configs)},
1676#endif
1677 {msm8x60_ts_configs, ARRAY_SIZE(msm8x60_ts_configs)},
1678 {msm8x60_aux_pcm_configs, ARRAY_SIZE(msm8x60_aux_pcm_configs)},
1679 {msm8x60_sdc_configs, ARRAY_SIZE(msm8x60_sdc_configs)},
1680 {msm8x60_snd_configs, ARRAY_SIZE(msm8x60_snd_configs)},
1681 {msm8x60_mi2s_configs, ARRAY_SIZE(msm8x60_mi2s_configs)},
1682 {msm8x60_lcdc_configs, ARRAY_SIZE(msm8x60_lcdc_configs)},
1683 {msm8x60_mdp_vsync_configs, ARRAY_SIZE(msm8x60_mdp_vsync_configs)},
1684 {msm8x60_hdmi_configs, ARRAY_SIZE(msm8x60_hdmi_configs)},
1685 {msm8x60_pmic_configs, ARRAY_SIZE(msm8x60_pmic_configs)},
1686 {msm8x60_common_configs, ARRAY_SIZE(msm8x60_common_configs)},
1687 {msm8x60_cam_configs, ARRAY_SIZE(msm8x60_cam_configs)},
1688 {msm8x60_tmg200_configs, ARRAY_SIZE(msm8x60_tmg200_configs)},
1689 {msm8x60_charm_sdc_configs, ARRAY_SIZE(msm8x60_charm_sdc_configs)},
1690 {msm8x60_charm_configs, ARRAY_SIZE(msm8x60_charm_configs)},
1691 {NULL, 0},
1692};
1693
Zhang Chang Kenef05b172011-07-27 15:28:13 -04001694struct msm_gpiomux_configs
1695msm8x60_dragon_gpiomux_cfgs[] __initdata = {
1696 {msm8x60_gsbi_configs, ARRAY_SIZE(msm8x60_gsbi_configs)},
1697 {msm8x60_ebi2_configs, ARRAY_SIZE(msm8x60_ebi2_configs)},
1698 {msm8x60_uart_configs, ARRAY_SIZE(msm8x60_uart_configs)},
1699#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
1700 {msm8x60_isp_usb_configs, ARRAY_SIZE(msm8x60_isp_usb_configs)},
1701#endif
1702 {msm8x60_ts_configs, ARRAY_SIZE(msm8x60_ts_configs)},
1703 {msm8x60_aux_pcm_configs, ARRAY_SIZE(msm8x60_aux_pcm_configs)},
1704 {msm8x60_sdc_configs, ARRAY_SIZE(msm8x60_sdc_configs)},
1705 {msm8x60_snd_configs, ARRAY_SIZE(msm8x60_snd_configs)},
1706 {msm8x60_mi2s_configs, ARRAY_SIZE(msm8x60_mi2s_configs)},
1707 {msm8x60_lcdc_configs, ARRAY_SIZE(msm8x60_lcdc_configs)},
1708 {msm8x60_mdp_vsync_configs, ARRAY_SIZE(msm8x60_mdp_vsync_configs)},
1709 {msm8x60_hdmi_configs, ARRAY_SIZE(msm8x60_hdmi_configs)},
1710 {msm8x60_pmic_configs, ARRAY_SIZE(msm8x60_pmic_configs)},
1711 {msm8x60_common_configs, ARRAY_SIZE(msm8x60_common_configs)},
1712 {msm8x60_cam_configs, ARRAY_SIZE(msm8x60_cam_configs)},
1713 {msm8x60_tmg200_configs, ARRAY_SIZE(msm8x60_tmg200_configs)},
1714 {NULL, 0},
1715};
1716
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001717void __init msm8x60_init_gpiomux(struct msm_gpiomux_configs *cfgs)
1718{
1719 int rc;
1720
1721 rc = msm_gpiomux_init(NR_GPIO_IRQS);
1722 if (rc) {
1723 pr_err("%s failure: %d\n", __func__, rc);
1724 return;
1725 }
1726
1727 while (cfgs->cfg) {
1728 msm_gpiomux_install(cfgs->cfg, cfgs->ncfg);
1729 ++cfgs;
1730 }
1731}