blob: dcae37c58fde3d935d58bf6df8bb2ad029a43c55 [file] [log] [blame]
Shantanu Jain55d277a2013-03-08 11:37:29 +05301/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08002 *
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.
11 *
12 */
13
Steve Mucklef132c6c2012-06-06 18:30:57 -070014#include <linux/gpio.h>
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -080015#include <asm/mach-types.h>
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -080016#include <mach/gpiomux.h>
17#include <mach/socinfo.h>
18#include "devices.h"
Stepan Moskovchenko5a83dba2011-12-05 17:30:17 -080019#include "board-8930.h"
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -080020
Saket Saurabhc6cdc292013-02-13 10:54:53 +053021/* GSBI10 UART configurations */
22static struct gpiomux_setting gsbi10_uart_cfg = {
23 .func = GPIOMUX_FUNC_2,
24 .drv = GPIOMUX_DRV_8MA,
25 .pull = GPIOMUX_PULL_NONE,
26};
27
28static struct msm_gpiomux_config msm8930_gsbi10_uart_configs[] __initdata = {
29 {
30 .gpio = 71, /* GSBI10 UART TX */
31 .settings = {
32 [GPIOMUX_SUSPENDED] = &gsbi10_uart_cfg,
33 },
34 },
35 {
36 .gpio = 72, /* GSBI10 UART RX */
37 .settings = {
38 [GPIOMUX_SUSPENDED] = &gsbi10_uart_cfg,
39 },
40 },
41};
42
Saket Saurabh8cb97b82013-04-30 17:53:54 +053043/* GSBI11 UART configurations */
44static struct gpiomux_setting gsbi11_uart_cfg = {
45 .func = GPIOMUX_FUNC_1,
46 .drv = GPIOMUX_DRV_10MA,
47 .pull = GPIOMUX_PULL_NONE,
48};
49
50static struct msm_gpiomux_config msm8930_gsbi11_uart_configs[] __initdata = {
51 {
52 .gpio = 38, /* GSBI11 UART TX */
53 .settings = {
54 [GPIOMUX_SUSPENDED] = &gsbi11_uart_cfg,
55 },
56 },
57 {
58 .gpio = 39, /* GSBI11 UART RX */
59 .settings = {
60 [GPIOMUX_SUSPENDED] = &gsbi11_uart_cfg,
61 },
62 },
63};
64
65
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -080066/* The SPI configurations apply to GSBI 1*/
67static struct gpiomux_setting spi_active = {
68 .func = GPIOMUX_FUNC_1,
69 .drv = GPIOMUX_DRV_12MA,
70 .pull = GPIOMUX_PULL_NONE,
71};
72
73static struct gpiomux_setting spi_suspended_config = {
74 .func = GPIOMUX_FUNC_GPIO,
75 .drv = GPIOMUX_DRV_2MA,
76 .pull = GPIOMUX_PULL_DOWN,
77};
78
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -080079static struct gpiomux_setting gsbi3_suspended_cfg = {
80 .func = GPIOMUX_FUNC_1,
81 .drv = GPIOMUX_DRV_2MA,
82 .pull = GPIOMUX_PULL_KEEPER,
83};
84
85static struct gpiomux_setting gsbi3_active_cfg = {
86 .func = GPIOMUX_FUNC_1,
87 .drv = GPIOMUX_DRV_8MA,
88 .pull = GPIOMUX_PULL_NONE,
89};
90
Taniya Das75596f92013-03-06 11:47:34 +053091static struct gpiomux_setting gsbi9_active_cfg = {
92 .func = GPIOMUX_FUNC_2,
93 .drv = GPIOMUX_DRV_8MA,
94 .pull = GPIOMUX_PULL_DOWN,
95};
96
97static struct gpiomux_setting gsbi9_suspended_cfg = {
98 .func = GPIOMUX_FUNC_2,
99 .drv = GPIOMUX_DRV_2MA,
100 .pull = GPIOMUX_PULL_DOWN,
101};
102
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800103static struct gpiomux_setting gsbi5 = {
104 .func = GPIOMUX_FUNC_1,
105 .drv = GPIOMUX_DRV_8MA,
106 .pull = GPIOMUX_PULL_NONE,
107};
108
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -0600109static struct gpiomux_setting gsbi9 = {
110 .func = GPIOMUX_FUNC_2,
111 .drv = GPIOMUX_DRV_8MA,
112 .pull = GPIOMUX_PULL_NONE,
113};
114
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800115static struct gpiomux_setting gsbi10 = {
116 .func = GPIOMUX_FUNC_2,
117 .drv = GPIOMUX_DRV_8MA,
118 .pull = GPIOMUX_PULL_NONE,
119};
120
121static struct gpiomux_setting gsbi12 = {
122 .func = GPIOMUX_FUNC_1,
123 .drv = GPIOMUX_DRV_8MA,
124 .pull = GPIOMUX_PULL_NONE,
125};
126
Taniya Das75596f92013-03-06 11:47:34 +0530127static struct gpiomux_setting external_vfr[] = {
128 /* Suspended state */
129 {
130 .func = GPIOMUX_FUNC_3,
131 .drv = GPIOMUX_DRV_2MA,
132 .pull = GPIOMUX_PULL_KEEPER,
133 },
134 /* Active state */
135 {
136 .func = GPIOMUX_FUNC_3,
137 .drv = GPIOMUX_DRV_2MA,
138 .pull = GPIOMUX_PULL_KEEPER,
139 },
140};
141
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800142static struct gpiomux_setting cdc_mclk = {
143 .func = GPIOMUX_FUNC_1,
Rohit Vaswani47e6c142012-09-19 16:11:06 -0700144 .drv = GPIOMUX_DRV_2MA,
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800145 .pull = GPIOMUX_PULL_NONE,
146};
147
148static struct gpiomux_setting audio_auxpcm[] = {
149 /* Suspended state */
150 {
151 .func = GPIOMUX_FUNC_GPIO,
152 .drv = GPIOMUX_DRV_2MA,
153 .pull = GPIOMUX_PULL_NONE,
154 },
155 /* Active state */
156 {
157 .func = GPIOMUX_FUNC_1,
158 .drv = GPIOMUX_DRV_2MA,
159 .pull = GPIOMUX_PULL_NONE,
160 },
161};
162
Bhalchandra Gajaredd00a9b2012-05-02 16:44:36 -0700163static struct gpiomux_setting audio_mbhc = {
164 .func = GPIOMUX_FUNC_GPIO,
165 .drv = GPIOMUX_DRV_8MA,
166 .pull = GPIOMUX_PULL_NONE,
167};
168
Bhalchandra Gajarec0ac7d82012-05-16 11:28:59 -0700169static struct gpiomux_setting audio_spkr_boost = {
170 .func = GPIOMUX_FUNC_GPIO,
171 .drv = GPIOMUX_DRV_8MA,
172 .pull = GPIOMUX_PULL_NONE,
173};
174
Laxminath Kasam46cf4b02013-03-20 23:28:26 +0530175static struct gpiomux_setting audio_useuro_switch = {
176 .func = GPIOMUX_FUNC_GPIO,
177 .drv = GPIOMUX_DRV_2MA,
178 .pull = GPIOMUX_PULL_NONE,
179};
180
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800181#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
182static struct gpiomux_setting gpio_eth_config = {
183 .pull = GPIOMUX_PULL_NONE,
184 .drv = GPIOMUX_DRV_8MA,
185 .func = GPIOMUX_FUNC_GPIO,
186};
187#endif
188
189static struct gpiomux_setting slimbus = {
190 .func = GPIOMUX_FUNC_1,
191 .drv = GPIOMUX_DRV_8MA,
192 .pull = GPIOMUX_PULL_KEEPER,
193};
194
195static struct gpiomux_setting wcnss_5wire_suspend_cfg = {
196 .func = GPIOMUX_FUNC_GPIO,
197 .drv = GPIOMUX_DRV_2MA,
198 .pull = GPIOMUX_PULL_UP,
199};
200
201static struct gpiomux_setting wcnss_5wire_active_cfg = {
202 .func = GPIOMUX_FUNC_1,
203 .drv = GPIOMUX_DRV_6MA,
204 .pull = GPIOMUX_PULL_DOWN,
205};
206
Amy Malochef3c9db42011-12-08 15:17:35 -0800207static struct gpiomux_setting atmel_resout_sus_cfg = {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800208 .func = GPIOMUX_FUNC_GPIO,
209 .drv = GPIOMUX_DRV_6MA,
210 .pull = GPIOMUX_PULL_DOWN,
211};
212
Amy Malochef3c9db42011-12-08 15:17:35 -0800213static struct gpiomux_setting atmel_resout_act_cfg = {
214 .func = GPIOMUX_FUNC_GPIO,
215 .drv = GPIOMUX_DRV_6MA,
216 .pull = GPIOMUX_PULL_UP,
217};
218
219static struct gpiomux_setting atmel_ldo_en_sus_cfg = {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800220 .func = GPIOMUX_FUNC_GPIO,
221 .drv = GPIOMUX_DRV_6MA,
222 .pull = GPIOMUX_PULL_DOWN,
223};
224
Amy Malochef3c9db42011-12-08 15:17:35 -0800225static struct gpiomux_setting atmel_ldo_en_act_cfg = {
226 .func = GPIOMUX_FUNC_GPIO,
227 .drv = GPIOMUX_DRV_6MA,
228 .pull = GPIOMUX_PULL_DOWN,
229};
230
231static struct gpiomux_setting atmel_int_act_cfg = {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800232 .func = GPIOMUX_FUNC_GPIO,
233 .drv = GPIOMUX_DRV_8MA,
234 .pull = GPIOMUX_PULL_UP,
235};
236
Amy Malochef3c9db42011-12-08 15:17:35 -0800237static struct gpiomux_setting atmel_int_sus_cfg = {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800238 .func = GPIOMUX_FUNC_GPIO,
239 .drv = GPIOMUX_DRV_2MA,
240 .pull = GPIOMUX_PULL_DOWN,
241};
Shantanu Jain55d277a2013-03-08 11:37:29 +0530242
243static struct gpiomux_setting synaptic_rmi4_resout_sus_cfg = {
244 .func = GPIOMUX_FUNC_GPIO,
245 .drv = GPIOMUX_DRV_6MA,
246 .pull = GPIOMUX_PULL_DOWN,
247};
248
249static struct gpiomux_setting synaptic_rmi4_resout_act_cfg = {
250 .func = GPIOMUX_FUNC_GPIO,
251 .drv = GPIOMUX_DRV_6MA,
252 .pull = GPIOMUX_PULL_UP,
253};
254
255static struct gpiomux_setting synaptic_rmi4_attn_act_cfg = {
256 .func = GPIOMUX_FUNC_GPIO,
257 .drv = GPIOMUX_DRV_8MA,
258 .pull = GPIOMUX_PULL_UP,
259};
260
261static struct gpiomux_setting synaptic_rmi4_attn_sus_cfg = {
262 .func = GPIOMUX_FUNC_GPIO,
263 .drv = GPIOMUX_DRV_2MA,
264 .pull = GPIOMUX_PULL_DOWN,
265};
266
Mayank Ranabf5084a2011-12-12 17:06:54 +0530267#ifdef MSM8930_PHASE_2
Mayank Ranabf5084a2011-12-12 17:06:54 +0530268static struct gpiomux_setting hsusb_sus_cfg = {
269 .func = GPIOMUX_FUNC_GPIO,
270 .drv = GPIOMUX_DRV_2MA,
David Keitelc72d8192012-01-09 11:33:55 -0800271 .pull = GPIOMUX_PULL_NONE,
272 .dir = GPIOMUX_OUT_LOW,
Mayank Ranabf5084a2011-12-12 17:06:54 +0530273};
274static struct msm_gpiomux_config msm8930_hsusb_configs[] = {
275 {
276 .gpio = 63, /* HSUSB_EXTERNAL_5V_LDO_EN */
277 .settings = {
Mayank Ranabf5084a2011-12-12 17:06:54 +0530278 [GPIOMUX_SUSPENDED] = &hsusb_sus_cfg,
279 },
280 },
281 {
282 .gpio = 97, /* HSUSB_5V_EN */
283 .settings = {
Mayank Ranabf5084a2011-12-12 17:06:54 +0530284 [GPIOMUX_SUSPENDED] = &hsusb_sus_cfg,
285 },
286 },
287};
288#endif
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800289
290static struct gpiomux_setting hap_lvl_shft_suspended_config = {
291 .func = GPIOMUX_FUNC_GPIO,
292 .drv = GPIOMUX_DRV_2MA,
293 .pull = GPIOMUX_PULL_DOWN,
294};
295
296static struct gpiomux_setting hap_lvl_shft_active_config = {
297 .func = GPIOMUX_FUNC_GPIO,
298 .drv = GPIOMUX_DRV_8MA,
299 .pull = GPIOMUX_PULL_UP,
300};
301
302static struct gpiomux_setting ap2mdm_cfg = {
303 .func = GPIOMUX_FUNC_GPIO,
304 .drv = GPIOMUX_DRV_8MA,
305 .pull = GPIOMUX_PULL_DOWN,
306};
307
308static struct gpiomux_setting mdm2ap_status_cfg = {
309 .func = GPIOMUX_FUNC_GPIO,
310 .drv = GPIOMUX_DRV_8MA,
311 .pull = GPIOMUX_PULL_NONE,
312};
313
314static struct gpiomux_setting mdm2ap_errfatal_cfg = {
315 .func = GPIOMUX_FUNC_GPIO,
316 .drv = GPIOMUX_DRV_16MA,
317 .pull = GPIOMUX_PULL_DOWN,
318};
319
320static struct gpiomux_setting ap2mdm_kpdpwr_n_cfg = {
321 .func = GPIOMUX_FUNC_GPIO,
322 .drv = GPIOMUX_DRV_8MA,
323 .pull = GPIOMUX_PULL_NONE,
324};
325
326static struct gpiomux_setting mdp_vsync_suspend_cfg = {
327 .func = GPIOMUX_FUNC_GPIO,
328 .drv = GPIOMUX_DRV_2MA,
329 .pull = GPIOMUX_PULL_DOWN,
330};
331
332static struct gpiomux_setting mdp_vsync_active_cfg = {
333 .func = GPIOMUX_FUNC_1,
334 .drv = GPIOMUX_DRV_2MA,
335 .pull = GPIOMUX_PULL_DOWN,
336};
337
338#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
339static struct gpiomux_setting hdmi_suspend_cfg = {
340 .func = GPIOMUX_FUNC_GPIO,
341 .drv = GPIOMUX_DRV_2MA,
342 .pull = GPIOMUX_PULL_DOWN,
343};
344
345static struct gpiomux_setting hdmi_active_1_cfg = {
346 .func = GPIOMUX_FUNC_1,
347 .drv = GPIOMUX_DRV_2MA,
348 .pull = GPIOMUX_PULL_UP,
349};
350
351static struct gpiomux_setting hdmi_active_2_cfg = {
352 .func = GPIOMUX_FUNC_1,
353 .drv = GPIOMUX_DRV_2MA,
354 .pull = GPIOMUX_PULL_DOWN,
355};
Manoj Raoc6d904c2012-06-22 00:32:14 -0700356
357static struct gpiomux_setting hdmi_active_3_cfg = {
358 .func = GPIOMUX_FUNC_GPIO,
359 .drv = GPIOMUX_DRV_2MA,
360 .pull = GPIOMUX_PULL_UP,
361 .dir = GPIOMUX_IN,
362};
363
364static struct gpiomux_setting hdmi_active_4_cfg = {
365 .func = GPIOMUX_FUNC_GPIO,
366 .drv = GPIOMUX_DRV_2MA,
367 .pull = GPIOMUX_PULL_UP,
368 .dir = GPIOMUX_OUT_HIGH,
369};
370
371static struct gpiomux_setting hdmi_active_5_cfg = {
372 .func = GPIOMUX_FUNC_GPIO,
373 .drv = GPIOMUX_DRV_2MA,
374 .pull = GPIOMUX_PULL_UP,
375 .dir = GPIOMUX_OUT_HIGH,
376};
377
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800378#endif
379
Joonwoo Parkb0795e12012-08-24 22:47:53 -0700380static struct gpiomux_setting sitar_reset = {
381 .func = GPIOMUX_FUNC_GPIO,
382 .drv = GPIOMUX_DRV_6MA,
383 .pull = GPIOMUX_PULL_NONE,
384 .dir = GPIOMUX_OUT_LOW,
385};
386
Taniya Das75596f92013-03-06 11:47:34 +0530387static struct gpiomux_setting usbsw_cfg = {
388 .func = GPIOMUX_FUNC_GPIO,
389 .drv = GPIOMUX_DRV_8MA,
390 .pull = GPIOMUX_PULL_DOWN,
391};
392
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800393#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
394static struct msm_gpiomux_config msm8960_ethernet_configs[] = {
395 {
396 .gpio = 90,
397 .settings = {
398 [GPIOMUX_SUSPENDED] = &gpio_eth_config,
399 }
400 },
401 {
402 .gpio = 89,
403 .settings = {
404 [GPIOMUX_SUSPENDED] = &gpio_eth_config,
405 }
406 },
407};
408#endif
409
410static struct msm_gpiomux_config msm8960_gsbi_configs[] __initdata = {
411 {
412 .gpio = 6, /* GSBI1 QUP SPI_DATA_MOSI */
413 .settings = {
414 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
415 [GPIOMUX_ACTIVE] = &spi_active,
416 },
417 },
418 {
419 .gpio = 7, /* GSBI1 QUP SPI_DATA_MISO */
420 .settings = {
421 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
422 [GPIOMUX_ACTIVE] = &spi_active,
423 },
424 },
425 {
426 .gpio = 8, /* GSBI1 QUP SPI_CS_N */
427 .settings = {
428 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
429 [GPIOMUX_ACTIVE] = &spi_active,
430 },
431 },
432 {
433 .gpio = 9, /* GSBI1 QUP SPI_CLK */
434 .settings = {
435 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
436 [GPIOMUX_ACTIVE] = &spi_active,
437 },
438 },
439 {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800440 .gpio = 16, /* GSBI3 I2C QUP SDA */
441 .settings = {
442 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
443 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
444 },
445 },
446 {
447 .gpio = 17, /* GSBI3 I2C QUP SCL */
448 .settings = {
449 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
450 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
451 },
452 },
453 {
454 .gpio = 22, /* GSBI5 UART2 */
455 .settings = {
456 [GPIOMUX_SUSPENDED] = &gsbi5,
457 },
458 },
459 {
460 .gpio = 23, /* GSBI5 UART2 */
461 .settings = {
462 [GPIOMUX_SUSPENDED] = &gsbi5,
463 },
464 },
465 {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800466 .gpio = 44, /* GSBI12 I2C QUP SDA */
467 .settings = {
468 [GPIOMUX_SUSPENDED] = &gsbi12,
469 },
470 },
471 {
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -0600472 .gpio = 95, /* GSBI9 I2C QUP SDA */
473 .settings = {
474 [GPIOMUX_SUSPENDED] = &gsbi9,
475 },
476 },
477 {
478 .gpio = 96, /* GSBI12 I2C QUP SCL */
479 .settings = {
480 [GPIOMUX_SUSPENDED] = &gsbi9,
481 },
482 },
483 {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800484 .gpio = 45, /* GSBI12 I2C QUP SCL */
485 .settings = {
486 [GPIOMUX_SUSPENDED] = &gsbi12,
487 },
488 },
489 {
490 .gpio = 73, /* GSBI10 I2C QUP SDA */
491 .settings = {
492 [GPIOMUX_SUSPENDED] = &gsbi10,
493 },
494 },
495 {
496 .gpio = 74, /* GSBI10 I2C QUP SCL */
497 .settings = {
498 [GPIOMUX_SUSPENDED] = &gsbi10,
499 },
500 },
501};
502
Kiran Gunda484442e2013-03-11 19:14:44 +0530503static struct msm_gpiomux_config msm8930_sglte_gsbi_configs[] __initdata = {
504 /* Add the I2C/SPI GPIOs Here */
505 {
506 .gpio = 6, /* GSBI1 TX */
507 .settings = {
508 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
509 [GPIOMUX_ACTIVE] = &spi_active,
510 },
511 },
512 {
513 .gpio = 7, /* GSBI1 RX */
514 .settings = {
515 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
516 [GPIOMUX_ACTIVE] = &spi_active,
517 },
518 },
519 {
520 .gpio = 8, /* GSBI1 CTS_N */
521 .settings = {
522 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
523 [GPIOMUX_ACTIVE] = &spi_active,
524 },
525 },
526 {
527 .gpio = 9, /* GSBI1 RFR_N */
528 .settings = {
529 [GPIOMUX_SUSPENDED] = &spi_suspended_config,
530 [GPIOMUX_ACTIVE] = &spi_active,
531 },
532 },
533 {
534 .gpio = 16, /* GSBI3 I2C QUP SDA */
535 .settings = {
536 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
537 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
538 },
539 },
540 {
541 .gpio = 17, /* GSBI3 I2C QUP SCL */
542 .settings = {
543 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
544 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
545 },
546 },
547 {
548 .gpio = 44, /* GSBI12 I2C QUP SDA */
549 .settings = {
550 [GPIOMUX_SUSPENDED] = &gsbi12,
551 },
552 },
553 {
554 .gpio = 45, /* GSBI12 I2C QUP SCL */
555 .settings = {
556 [GPIOMUX_SUSPENDED] = &gsbi12,
557 },
558 },
559 {
560 .gpio = 73, /* GSBI10 I2C QUP SDA */
561 .settings = {
562 [GPIOMUX_SUSPENDED] = &gsbi10,
563 },
564 },
565 {
566 .gpio = 74, /* GSBI10 I2C QUP SCL */
567 .settings = {
568 [GPIOMUX_SUSPENDED] = &gsbi10,
569 },
570 },
571
572};
573
574
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800575static struct msm_gpiomux_config msm8960_slimbus_config[] __initdata = {
576 {
577 .gpio = 60, /* slimbus data */
578 .settings = {
579 [GPIOMUX_SUSPENDED] = &slimbus,
580 },
581 },
582 {
583 .gpio = 61, /* slimbus clk */
584 .settings = {
585 [GPIOMUX_SUSPENDED] = &slimbus,
586 },
587 },
588};
589
590static struct msm_gpiomux_config msm8960_audio_codec_configs[] __initdata = {
591 {
592 .gpio = 59,
593 .settings = {
594 [GPIOMUX_SUSPENDED] = &cdc_mclk,
595 },
596 },
597};
598
Bhalchandra Gajaredd00a9b2012-05-02 16:44:36 -0700599static struct msm_gpiomux_config msm8960_audio_mbhc_configs[] __initdata = {
600 {
601 .gpio = 37,
602 .settings = {
603 [GPIOMUX_SUSPENDED] = &audio_mbhc,
604 },
605 },
Laxminath Kasam46cf4b02013-03-20 23:28:26 +0530606 {
607 .gpio = 80,
608 .settings = {
609 [GPIOMUX_SUSPENDED] = &audio_useuro_switch,
610 },
611 },
612};
613
614static struct msm_gpiomux_config msm8960_audio_mbhc_configs_sglte[] __initdata = {
615 {
616 .gpio = 50,
617 .settings = {
618 [GPIOMUX_SUSPENDED] = &audio_mbhc,
619 },
620 },
621 {
622 .gpio = 66,
623 .settings = {
624 [GPIOMUX_SUSPENDED] = &audio_useuro_switch,
625 },
626 },
Bhalchandra Gajaredd00a9b2012-05-02 16:44:36 -0700627};
628
Bhalchandra Gajarec0ac7d82012-05-16 11:28:59 -0700629static struct msm_gpiomux_config msm8960_audio_spkr_configs[] __initdata = {
630 {
631 .gpio = 15,
632 .settings = {
633 [GPIOMUX_SUSPENDED] = &audio_spkr_boost,
634 },
635 },
636};
637
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800638static struct msm_gpiomux_config msm8960_audio_auxpcm_configs[] __initdata = {
639 {
640 .gpio = 63,
641 .settings = {
642 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
643 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
644 },
645 },
646 {
647 .gpio = 64,
648 .settings = {
649 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
650 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
651 },
652 },
653 {
654 .gpio = 65,
655 .settings = {
656 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
657 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
658 },
659 },
660 {
661 .gpio = 66,
662 .settings = {
663 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
664 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
665 },
666 },
667};
668
669static struct msm_gpiomux_config wcnss_5wire_interface[] = {
670 {
671 .gpio = 84,
672 .settings = {
673 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
674 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
675 },
676 },
677 {
678 .gpio = 85,
679 .settings = {
680 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
681 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
682 },
683 },
684 {
685 .gpio = 86,
686 .settings = {
687 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
688 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
689 },
690 },
691 {
692 .gpio = 87,
693 .settings = {
694 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
695 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
696 },
697 },
698 {
699 .gpio = 88,
700 .settings = {
701 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
702 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
703 },
704 },
705};
706
Amy Malochef3c9db42011-12-08 15:17:35 -0800707static struct msm_gpiomux_config msm8960_atmel_configs[] __initdata = {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800708 { /* TS INTERRUPT */
709 .gpio = 11,
710 .settings = {
Amy Malochef3c9db42011-12-08 15:17:35 -0800711 [GPIOMUX_ACTIVE] = &atmel_int_act_cfg,
712 [GPIOMUX_SUSPENDED] = &atmel_int_sus_cfg,
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800713 },
714 },
Amy Malochef3c9db42011-12-08 15:17:35 -0800715 { /* TS LDO ENABLE */
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800716 .gpio = 50,
717 .settings = {
Amy Malochef3c9db42011-12-08 15:17:35 -0800718 [GPIOMUX_ACTIVE] = &atmel_ldo_en_act_cfg,
719 [GPIOMUX_SUSPENDED] = &atmel_ldo_en_sus_cfg,
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800720 },
721 },
722 { /* TS RESOUT */
723 .gpio = 52,
724 .settings = {
Amy Malochef3c9db42011-12-08 15:17:35 -0800725 [GPIOMUX_ACTIVE] = &atmel_resout_act_cfg,
726 [GPIOMUX_SUSPENDED] = &atmel_resout_sus_cfg,
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800727 },
728 },
729};
730
Shantanu Jain55d277a2013-03-08 11:37:29 +0530731static struct msm_gpiomux_config msm8960_synaptic_rmi4_configs[] __initdata = {
732 { /* TS INTERRUPT */
733 .gpio = 11,
734 .settings = {
735 [GPIOMUX_ACTIVE] = &synaptic_rmi4_attn_act_cfg,
736 [GPIOMUX_SUSPENDED] = &synaptic_rmi4_attn_sus_cfg,
737 },
738 },
739 { /* TS RESOUT */
740 .gpio = 52,
741 .settings = {
742 [GPIOMUX_ACTIVE] = &synaptic_rmi4_resout_act_cfg,
743 [GPIOMUX_SUSPENDED] = &synaptic_rmi4_resout_sus_cfg,
744 },
745 },
746};
747
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800748static struct msm_gpiomux_config hap_lvl_shft_config[] __initdata = {
749 {
750 .gpio = 47,
751 .settings = {
752 [GPIOMUX_SUSPENDED] = &hap_lvl_shft_suspended_config,
753 [GPIOMUX_ACTIVE] = &hap_lvl_shft_active_config,
754 },
755 },
756};
757
758static struct msm_gpiomux_config mdm_configs[] __initdata = {
759 /* AP2MDM_STATUS */
760 {
761 .gpio = 94,
762 .settings = {
763 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
764 }
765 },
766 /* MDM2AP_STATUS */
767 {
768 .gpio = 69,
769 .settings = {
770 [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
771 }
772 },
773 /* MDM2AP_ERRFATAL */
774 {
775 .gpio = 70,
776 .settings = {
777 [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
778 }
779 },
780 /* AP2MDM_ERRFATAL */
781 {
782 .gpio = 95,
783 .settings = {
784 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
785 }
786 },
787 /* AP2MDM_KPDPWR_N */
788 {
789 .gpio = 81,
790 .settings = {
791 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
792 }
793 },
794 /* AP2MDM_PMIC_RESET_N */
795 {
796 .gpio = 80,
797 .settings = {
798 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
799 }
800 }
801};
802
803static struct msm_gpiomux_config msm8960_mdp_vsync_configs[] __initdata = {
804 {
805 .gpio = 0,
806 .settings = {
807 [GPIOMUX_ACTIVE] = &mdp_vsync_active_cfg,
808 [GPIOMUX_SUSPENDED] = &mdp_vsync_suspend_cfg,
809 },
810 }
811};
812
813#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
814static struct msm_gpiomux_config msm8960_hdmi_configs[] __initdata = {
815 {
816 .gpio = 99,
817 .settings = {
818 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
819 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
820 },
821 },
822 {
823 .gpio = 100,
824 .settings = {
825 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
826 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
827 },
828 },
829 {
830 .gpio = 101,
831 .settings = {
832 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
833 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
834 },
835 },
836 {
837 .gpio = 102,
838 .settings = {
839 [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg,
840 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
841 },
842 },
Manoj Raoc6d904c2012-06-22 00:32:14 -0700843
844};
845
846static struct msm_gpiomux_config msm8930_mhl_configs[] __initdata = {
847 {
848 .gpio = 72,
849 .settings = {
850 [GPIOMUX_ACTIVE] = &hdmi_active_3_cfg,
851 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
852 },
853 },
854 {
855 .gpio = 71,
856 .settings = {
857 [GPIOMUX_ACTIVE] = &hdmi_active_4_cfg,
858 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
859 },
860 },
861 {
862 .gpio = 73,
863 .settings = {
864 [GPIOMUX_ACTIVE] = &hdmi_active_5_cfg,
865 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
866 },
867 },
868
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -0800869};
870#endif
871
Amy Malochee8de95d2012-02-23 10:40:25 -0800872static struct gpiomux_setting haptics_active_cfg = {
873 .func = GPIOMUX_FUNC_GPIO,
874 .drv = GPIOMUX_DRV_8MA,
875 .pull = GPIOMUX_PULL_UP,
876};
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +0530877static struct gpiomux_setting haptics_suspend_cfg = {
878 .func = GPIOMUX_FUNC_GPIO,
879 .drv = GPIOMUX_DRV_8MA,
880 .pull = GPIOMUX_PULL_DOWN,
881};
882
883static struct msm_gpiomux_config msm8930_haptics_configs[] __initdata = {
884 {
885 .gpio = 77,
886 .settings = {
Amy Malochee8de95d2012-02-23 10:40:25 -0800887 [GPIOMUX_ACTIVE] = &haptics_active_cfg,
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +0530888 [GPIOMUX_SUSPENDED] = &haptics_suspend_cfg,
889 },
890 },
891 {
892 .gpio = 78,
893 .settings = {
Amy Malochee8de95d2012-02-23 10:40:25 -0800894 [GPIOMUX_ACTIVE] = &haptics_active_cfg,
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +0530895 [GPIOMUX_SUSPENDED] = &haptics_suspend_cfg,
896 },
897 },
898};
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +0530899
Krishna Konda41b6ab02012-05-16 15:08:03 -0700900static struct gpiomux_setting sd_det_line = {
901 .func = GPIOMUX_FUNC_GPIO,
902 .drv = GPIOMUX_DRV_2MA,
903 .pull = GPIOMUX_PULL_NONE,
904};
905
906static struct msm_gpiomux_config msm8930_sd_det_config[] __initdata = {
907 {
908 .gpio = 94, /* SD Card Detect Line */
909 .settings = {
910 [GPIOMUX_SUSPENDED] = &sd_det_line,
911 [GPIOMUX_ACTIVE] = &sd_det_line,
912 },
913 },
914};
915
Subhash Jadavaniaea501c2013-03-01 21:38:36 +0530916static struct msm_gpiomux_config msm8930_sd_det_config_evt[] __initdata = {
917 {
918 .gpio = 90, /* SD Card Detect Line */
919 .settings = {
920 [GPIOMUX_SUSPENDED] = &sd_det_line,
921 [GPIOMUX_ACTIVE] = &sd_det_line,
922 },
923 },
924};
925
Wentao Xuc7769c02012-08-03 15:06:41 -0400926static struct gpiomux_setting gyro_int_line = {
927 .func = GPIOMUX_FUNC_GPIO,
928 .drv = GPIOMUX_DRV_2MA,
929 .pull = GPIOMUX_PULL_NONE,
930};
931
932static struct msm_gpiomux_config msm8930_gyro_int_config[] __initdata = {
933 {
934 .gpio = 69, /* Gyro Interrupt Line */
935 .settings = {
936 [GPIOMUX_SUSPENDED] = &gyro_int_line,
937 [GPIOMUX_ACTIVE] = &gyro_int_line,
938 },
939 },
940};
941
Joonwoo Parkb0795e12012-08-24 22:47:53 -0700942static struct msm_gpiomux_config msm_sitar_config[] __initdata = {
943 {
944 .gpio = 42, /* SYS_RST_N */
945 .settings = {
946 [GPIOMUX_SUSPENDED] = &sitar_reset,
947 },
948 }
949};
950
Taniya Das75596f92013-03-06 11:47:34 +0530951static struct msm_gpiomux_config sglte_8930_configs[] __initdata = {
952 /* AP2MDM_STATUS */
953 {
954 .gpio = 77,
955 .settings = {
956 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
957 }
958 },
959 /* MDM2AP_STATUS */
960 {
961 .gpio = 24,
962 .settings = {
963 [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
964 }
965 },
966 /* MDM2AP_ERRFATAL */
967 {
968 .gpio = 40,
969 .settings = {
970 [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
971 }
972 },
973 /* AP2MDM_ERRFATAL */
974 {
975 .gpio = 80,
976 .settings = {
977 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
978 }
979 },
980 /* AP2MDM_KPDPWR_N */
981 {
982 .gpio = 79,
983 .settings = {
984 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
985 }
986 },
987 /* AP2MDM_PMIC_PWR_EN */
988 {
989 .gpio = 22,
990 .settings = {
991 [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg,
992 }
993 },
994 /* AP2MDM_SOFT_RESET */
995 {
996 .gpio = 78,
997 .settings = {
998 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
999 }
1000 },
1001 /* USB_SW */
1002 {
1003 .gpio = 25,
1004 .settings = {
1005 [GPIOMUX_SUSPENDED] = &usbsw_cfg,
1006 }
1007 }
1008};
1009
1010static struct msm_gpiomux_config msm8930_fusion_gsbi_configs[] = {
1011 {
1012 .gpio = 93,
1013 .settings = {
1014 [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg,
1015 [GPIOMUX_ACTIVE] = &gsbi9_active_cfg,
1016 }
1017 },
1018 {
1019 .gpio = 94,
1020 .settings = {
1021 [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg,
1022 [GPIOMUX_ACTIVE] = &gsbi9_active_cfg,
1023 }
1024 },
1025 {
1026 .gpio = 95,
1027 .settings = {
1028 [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg,
1029 [GPIOMUX_ACTIVE] = &gsbi9_active_cfg,
1030 }
1031 },
1032 {
1033 .gpio = 96,
1034 .settings = {
1035 [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg,
1036 [GPIOMUX_ACTIVE] = &gsbi9_active_cfg,
1037 }
1038 },
1039};
1040
1041static struct msm_gpiomux_config msm8930_external_vfr_configs[] __initdata = {
1042 {
1043 .gpio = 23, /* EXTERNAL VFR */
1044 .settings = {
1045 [GPIOMUX_SUSPENDED] = &external_vfr[0],
1046 [GPIOMUX_ACTIVE] = &external_vfr[1],
1047 },
1048 },
1049};
1050
1051int __init sglte8930_init_gpiomux(void)
1052{
Saket Saurabhc6cdc292013-02-13 10:54:53 +05301053 int minor_ver = SOCINFO_VERSION_MINOR(socinfo_get_platform_version());
1054 int major_ver = SOCINFO_VERSION_MAJOR(socinfo_get_platform_version());
1055
Taniya Das75596f92013-03-06 11:47:34 +05301056 /* For 8960 Fusion 2.2 Primary IPC */
1057 msm_gpiomux_install(msm8930_fusion_gsbi_configs,
1058 ARRAY_SIZE(msm8930_fusion_gsbi_configs));
Saket Saurabhc6cdc292013-02-13 10:54:53 +05301059 /* For 8930 SGLTE Serial Console */
1060 if (machine_is_msm8930_evt() && major_ver == 1) {
1061 if (minor_ver == 0)
1062 msm_gpiomux_install(msm8930_gsbi10_uart_configs,
1063 ARRAY_SIZE(msm8930_gsbi10_uart_configs));
Saket Saurabh8cb97b82013-04-30 17:53:54 +05301064 else if (minor_ver == 1)
1065 msm_gpiomux_install(msm8930_gsbi11_uart_configs,
1066 ARRAY_SIZE(msm8930_gsbi11_uart_configs));
Saket Saurabhc6cdc292013-02-13 10:54:53 +05301067 }
1068
Taniya Das75596f92013-03-06 11:47:34 +05301069 /* For SGLTE 8960 Fusion External VFR */
1070 msm_gpiomux_install(msm8930_external_vfr_configs,
1071 ARRAY_SIZE(msm8930_external_vfr_configs));
1072 msm_gpiomux_install(sglte_8930_configs,
1073 ARRAY_SIZE(sglte_8930_configs));
1074
Kiran Gunda484442e2013-03-11 19:14:44 +05301075 msm_gpiomux_install(msm8930_sglte_gsbi_configs,
1076 ARRAY_SIZE(msm8930_sglte_gsbi_configs));
1077
Taniya Das75596f92013-03-06 11:47:34 +05301078 msm_gpiomux_install(msm8960_slimbus_config,
1079 ARRAY_SIZE(msm8960_slimbus_config));
1080
1081 msm_gpiomux_install(msm8960_audio_codec_configs,
1082 ARRAY_SIZE(msm8960_audio_codec_configs));
1083
1084 msm_gpiomux_install(wcnss_5wire_interface,
1085 ARRAY_SIZE(wcnss_5wire_interface));
1086
1087 msm_gpiomux_install(msm8960_mdp_vsync_configs,
1088 ARRAY_SIZE(msm8960_mdp_vsync_configs));
1089
1090 msm_gpiomux_install(msm_sitar_config, ARRAY_SIZE(msm_sitar_config));
1091
Shantanu Jain55d277a2013-03-08 11:37:29 +05301092 msm_gpiomux_install(msm8960_synaptic_rmi4_configs,
1093 ARRAY_SIZE(msm8960_synaptic_rmi4_configs));
1094
Subhash Jadavaniaea501c2013-03-01 21:38:36 +05301095 msm_gpiomux_install(msm8930_sd_det_config_evt,
1096 ARRAY_SIZE(msm8930_sd_det_config_evt));
1097
Laxminath Kasam46cf4b02013-03-20 23:28:26 +05301098 msm_gpiomux_install(msm8960_audio_mbhc_configs_sglte,
1099 ARRAY_SIZE(msm8960_audio_mbhc_configs_sglte));
1100
Taniya Das75596f92013-03-06 11:47:34 +05301101 return 0;
1102}
1103
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001104int __init msm8930_init_gpiomux(void)
1105{
1106 int rc = msm_gpiomux_init(NR_GPIO_IRQS);
1107 if (rc) {
1108 pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
1109 return rc;
1110 }
1111
Taniya Das75596f92013-03-06 11:47:34 +05301112 if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE)
1113 return sglte8930_init_gpiomux();
1114
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001115#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
1116 msm_gpiomux_install(msm8960_ethernet_configs,
1117 ARRAY_SIZE(msm8960_ethernet_configs));
1118#endif
1119
1120 msm_gpiomux_install(msm8960_gsbi_configs,
1121 ARRAY_SIZE(msm8960_gsbi_configs));
1122
Amy Malochef3c9db42011-12-08 15:17:35 -08001123 msm_gpiomux_install(msm8960_atmel_configs,
1124 ARRAY_SIZE(msm8960_atmel_configs));
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001125
1126 msm_gpiomux_install(msm8960_slimbus_config,
1127 ARRAY_SIZE(msm8960_slimbus_config));
1128
1129 msm_gpiomux_install(msm8960_audio_codec_configs,
1130 ARRAY_SIZE(msm8960_audio_codec_configs));
1131
Bhalchandra Gajaredd00a9b2012-05-02 16:44:36 -07001132 msm_gpiomux_install(msm8960_audio_mbhc_configs,
1133 ARRAY_SIZE(msm8960_audio_mbhc_configs));
1134
Bhalchandra Gajarec0ac7d82012-05-16 11:28:59 -07001135 msm_gpiomux_install(msm8960_audio_spkr_configs,
1136 ARRAY_SIZE(msm8960_audio_spkr_configs));
1137
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001138 msm_gpiomux_install(msm8960_audio_auxpcm_configs,
1139 ARRAY_SIZE(msm8960_audio_auxpcm_configs));
1140
1141 msm_gpiomux_install(wcnss_5wire_interface,
1142 ARRAY_SIZE(wcnss_5wire_interface));
1143
1144 if (machine_is_msm8930_mtp() || machine_is_msm8930_fluid() ||
Mayank Ranabf5084a2011-12-12 17:06:54 +05301145 machine_is_msm8930_cdp()) {
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001146 msm_gpiomux_install(hap_lvl_shft_config,
1147 ARRAY_SIZE(hap_lvl_shft_config));
Mayank Ranabf5084a2011-12-12 17:06:54 +05301148#ifdef MSM8930_PHASE_2
1149 msm_gpiomux_install(msm8930_hsusb_configs,
1150 ARRAY_SIZE(msm8930_hsusb_configs));
1151#endif
1152 }
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001153
1154 if (PLATFORM_IS_CHARM25())
1155 msm_gpiomux_install(mdm_configs,
1156 ARRAY_SIZE(mdm_configs));
1157
Amy Malochee8de95d2012-02-23 10:40:25 -08001158 if (machine_is_msm8930_cdp() || machine_is_msm8930_mtp()
1159 || machine_is_msm8930_fluid())
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +05301160 msm_gpiomux_install(msm8930_haptics_configs,
1161 ARRAY_SIZE(msm8930_haptics_configs));
Anirudh Ghayal8c15f7f2012-01-09 14:04:02 +05301162
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001163#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
1164 msm_gpiomux_install(msm8960_hdmi_configs,
1165 ARRAY_SIZE(msm8960_hdmi_configs));
Manoj Raoc6d904c2012-06-22 00:32:14 -07001166 if (machine_is_msm8930_fluid())
1167 msm_gpiomux_install(msm8930_mhl_configs,
1168 ARRAY_SIZE(msm8930_mhl_configs));
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001169#endif
1170
1171 msm_gpiomux_install(msm8960_mdp_vsync_configs,
1172 ARRAY_SIZE(msm8960_mdp_vsync_configs));
Krishna Konda41b6ab02012-05-16 15:08:03 -07001173
1174 msm_gpiomux_install(msm8930_sd_det_config,
1175 ARRAY_SIZE(msm8930_sd_det_config));
1176
Wentao Xuc7769c02012-08-03 15:06:41 -04001177 if (machine_is_msm8930_fluid() || machine_is_msm8930_mtp())
1178 msm_gpiomux_install(msm8930_gyro_int_config,
1179 ARRAY_SIZE(msm8930_gyro_int_config));
1180
Joonwoo Parkb0795e12012-08-24 22:47:53 -07001181 msm_gpiomux_install(msm_sitar_config, ARRAY_SIZE(msm_sitar_config));
1182
Stepan Moskovchenko3b09bf52011-12-06 20:40:53 -08001183 return 0;
1184}