blob: 89ad4effa6e1692873dccaa1a1800312803d4a45 [file] [log] [blame]
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -07001/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
2 *
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
14#include <linux/init.h>
15#include <linux/ioport.h>
16#include <mach/board.h>
17#include <mach/gpio.h>
18#include <mach/gpiomux.h>
19
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -070020#define KS8851_IRQ_GPIO 94
Sathish Ambleye3154b42012-04-09 10:59:09 -070021
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -070022static struct gpiomux_setting gpio_uart_config = {
23 .func = GPIOMUX_FUNC_2,
24 .drv = GPIOMUX_DRV_16MA,
25 .pull = GPIOMUX_PULL_NONE,
26 .dir = GPIOMUX_OUT_HIGH,
27};
28
Sagar Dhariaa8e6b0a2012-08-10 20:52:30 -060029static struct gpiomux_setting slimbus = {
30 .func = GPIOMUX_FUNC_1,
31 .drv = GPIOMUX_DRV_8MA,
32 .pull = GPIOMUX_PULL_KEEPER,
33};
34
Sathish Ambleye3154b42012-04-09 10:59:09 -070035#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
36static struct gpiomux_setting gpio_eth_config = {
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -070037 .pull = GPIOMUX_PULL_UP,
38 .drv = GPIOMUX_DRV_2MA,
Sathish Ambleye3154b42012-04-09 10:59:09 -070039 .func = GPIOMUX_FUNC_GPIO,
40};
41
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -070042static struct gpiomux_setting gpio_spi_cs2_config = {
Sathish Ambleye3154b42012-04-09 10:59:09 -070043 .func = GPIOMUX_FUNC_4,
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -070044 .drv = GPIOMUX_DRV_6MA,
45 .pull = GPIOMUX_PULL_DOWN,
Sathish Ambleye3154b42012-04-09 10:59:09 -070046};
47
48static struct gpiomux_setting gpio_spi_config = {
49 .func = GPIOMUX_FUNC_1,
50 .drv = GPIOMUX_DRV_12MA,
51 .pull = GPIOMUX_PULL_NONE,
52};
53
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -070054static struct gpiomux_setting gpio_spi_cs1_config = {
55 .func = GPIOMUX_FUNC_GPIO,
56 .drv = GPIOMUX_DRV_6MA,
57 .pull = GPIOMUX_PULL_UP,
58};
59
Sathish Ambleye3154b42012-04-09 10:59:09 -070060static struct msm_gpiomux_config msm_eth_configs[] = {
61 {
62 .gpio = KS8851_IRQ_GPIO,
63 .settings = {
64 [GPIOMUX_SUSPENDED] = &gpio_eth_config,
65 }
66 },
67};
68#endif
Sameer Thalappil8d686d42012-08-24 10:07:31 -070069
70static struct gpiomux_setting wcnss_5wire_suspend_cfg = {
71 .func = GPIOMUX_FUNC_GPIO,
72 .drv = GPIOMUX_DRV_2MA,
73 .pull = GPIOMUX_PULL_UP,
74};
75
76static struct gpiomux_setting wcnss_5wire_active_cfg = {
77 .func = GPIOMUX_FUNC_1,
78 .drv = GPIOMUX_DRV_6MA,
79 .pull = GPIOMUX_PULL_DOWN,
80};
81
Jin Honga04caaa2012-05-23 10:28:27 -070082static struct gpiomux_setting gpio_i2c_config = {
83 .func = GPIOMUX_FUNC_3,
84 .drv = GPIOMUX_DRV_8MA,
85 .pull = GPIOMUX_PULL_NONE,
86};
87
Chandan Uddaraju88b26d72012-08-13 22:28:44 -070088static struct gpiomux_setting lcd_en_act_cfg = {
89 .func = GPIOMUX_FUNC_GPIO,
90 .drv = GPIOMUX_DRV_8MA,
91 .pull = GPIOMUX_PULL_NONE,
92};
93
94static struct gpiomux_setting lcd_en_sus_cfg = {
95 .func = GPIOMUX_FUNC_GPIO,
96 .drv = GPIOMUX_DRV_2MA,
97 .pull = GPIOMUX_PULL_DOWN,
98};
Sathish Ambleye3154b42012-04-09 10:59:09 -070099
Amy Maloche9e99a792012-08-15 23:27:51 -0700100static struct gpiomux_setting atmel_resout_sus_cfg = {
101 .func = GPIOMUX_FUNC_GPIO,
102 .drv = GPIOMUX_DRV_6MA,
103 .pull = GPIOMUX_PULL_DOWN,
104};
105
106static struct gpiomux_setting atmel_resout_act_cfg = {
107 .func = GPIOMUX_FUNC_GPIO,
108 .drv = GPIOMUX_DRV_6MA,
109 .pull = GPIOMUX_PULL_UP,
110};
111
112static struct gpiomux_setting atmel_int_act_cfg = {
113 .func = GPIOMUX_FUNC_GPIO,
114 .drv = GPIOMUX_DRV_8MA,
115 .pull = GPIOMUX_PULL_UP,
116};
117
118static struct gpiomux_setting atmel_int_sus_cfg = {
119 .func = GPIOMUX_FUNC_GPIO,
120 .drv = GPIOMUX_DRV_2MA,
121 .pull = GPIOMUX_PULL_DOWN,
122};
123
Joonwoo Park187e9cb2012-08-24 22:47:53 -0700124static struct gpiomux_setting taiko_reset = {
125 .func = GPIOMUX_FUNC_GPIO,
126 .drv = GPIOMUX_DRV_6MA,
127 .pull = GPIOMUX_PULL_NONE,
128 .dir = GPIOMUX_OUT_LOW,
129};
130
Joonwoo Parkeb84dc72012-09-12 10:22:49 -0700131static struct gpiomux_setting taiko_int = {
132 .func = GPIOMUX_FUNC_GPIO,
133 .drv = GPIOMUX_DRV_2MA,
134 .pull = GPIOMUX_PULL_NONE,
135};
136
Amy Maloche9e99a792012-08-15 23:27:51 -0700137static struct msm_gpiomux_config msm_touch_configs[] __initdata = {
138 {
139 .gpio = 60, /* TOUCH RESET */
140 .settings = {
141 [GPIOMUX_ACTIVE] = &atmel_resout_act_cfg,
142 [GPIOMUX_SUSPENDED] = &atmel_resout_sus_cfg,
143 },
144 },
145 {
146 .gpio = 61, /* TOUCH IRQ */
147 .settings = {
148 [GPIOMUX_ACTIVE] = &atmel_int_act_cfg,
149 [GPIOMUX_SUSPENDED] = &atmel_int_sus_cfg,
150 },
151 },
152
153};
Ujwal Patel74b5df42012-08-13 22:50:13 -0700154
Manoj Rao5bf2a7e2012-10-29 12:53:27 -0700155static struct gpiomux_setting mhl_suspend_config = {
156 .func = GPIOMUX_FUNC_GPIO,
157 .drv = GPIOMUX_DRV_2MA,
158 .pull = GPIOMUX_PULL_DOWN,
159};
160
161static struct gpiomux_setting mhl_active_1_cfg = {
162 .func = GPIOMUX_FUNC_1,
163 .drv = GPIOMUX_DRV_2MA,
164 .pull = GPIOMUX_PULL_UP,
165 .dir = GPIOMUX_OUT_HIGH,
166};
167
168static struct gpiomux_setting mhl_active_2_cfg = {
169 .func = GPIOMUX_FUNC_1,
170 .drv = GPIOMUX_DRV_2MA,
171 .pull = GPIOMUX_PULL_UP,
172};
173
174
Ujwal Patel74b5df42012-08-13 22:50:13 -0700175static struct gpiomux_setting hdmi_suspend_cfg = {
176 .func = GPIOMUX_FUNC_GPIO,
177 .drv = GPIOMUX_DRV_2MA,
178 .pull = GPIOMUX_PULL_DOWN,
179};
180
181static struct gpiomux_setting hdmi_active_1_cfg = {
182 .func = GPIOMUX_FUNC_1,
183 .drv = GPIOMUX_DRV_2MA,
184 .pull = GPIOMUX_PULL_UP,
185};
186
187static struct gpiomux_setting hdmi_active_2_cfg = {
188 .func = GPIOMUX_FUNC_1,
189 .drv = GPIOMUX_DRV_16MA,
190 .pull = GPIOMUX_PULL_DOWN,
191};
192
Manoj Rao5bf2a7e2012-10-29 12:53:27 -0700193static struct msm_gpiomux_config msm_mhl_configs[] __initdata = {
194 {
195 /* mhl-sii8334 pwr */
196 .gpio = 12,
197 .settings = {
198 [GPIOMUX_SUSPENDED] = &mhl_suspend_config,
199 [GPIOMUX_ACTIVE] = &mhl_active_1_cfg,
200 },
201 },
202 {
203 /* mhl-sii8334 intr */
204 .gpio = 82,
205 .settings = {
206 [GPIOMUX_SUSPENDED] = &mhl_suspend_config,
207 [GPIOMUX_ACTIVE] = &mhl_active_1_cfg,
208 },
209 },
210 {
211 /* mhl-sii8334 reset */
212 .gpio = 8,
213 .settings = {
214 [GPIOMUX_SUSPENDED] = &mhl_suspend_config,
215 [GPIOMUX_ACTIVE] = &mhl_active_2_cfg,
216 },
217 },
218};
219
220
Ujwal Patel74b5df42012-08-13 22:50:13 -0700221static struct msm_gpiomux_config msm_hdmi_configs[] __initdata = {
222 {
223 .gpio = 31,
224 .settings = {
225 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
226 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
227 },
228 },
229 {
230 .gpio = 32,
231 .settings = {
232 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
233 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
234 },
235 },
236 {
237 .gpio = 33,
238 .settings = {
239 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
240 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
241 },
242 },
243 {
244 .gpio = 34,
245 .settings = {
246 [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg,
247 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
248 },
249 },
250};
251
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700252static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
Sathish Ambleye3154b42012-04-09 10:59:09 -0700253#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
254 {
255 .gpio = 0, /* BLSP1 QUP SPI_DATA_MOSI */
256 .settings = {
257 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
258 },
259 },
260 {
261 .gpio = 1, /* BLSP1 QUP SPI_DATA_MISO */
262 .settings = {
263 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
264 },
265 },
266 {
267 .gpio = 3, /* BLSP1 QUP SPI_CLK */
268 .settings = {
269 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
270 },
271 },
272 {
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -0700273 .gpio = 9, /* BLSP1 QUP SPI_CS2A_N */
Sathish Ambleye3154b42012-04-09 10:59:09 -0700274 .settings = {
Subbaraman Narayanamurthy3f93ab12012-08-17 19:39:47 -0700275 [GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config,
276 },
277 },
278 {
279 .gpio = 8, /* BLSP1 QUP SPI_CS1_N */
280 .settings = {
281 [GPIOMUX_SUSPENDED] = &gpio_spi_cs1_config,
Sathish Ambleye3154b42012-04-09 10:59:09 -0700282 },
283 },
284#endif
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700285 {
Chandan Uddaraju88b26d72012-08-13 22:28:44 -0700286 .gpio = 58,
287 .settings = {
288 [GPIOMUX_ACTIVE] = &lcd_en_act_cfg,
289 [GPIOMUX_SUSPENDED] = &lcd_en_sus_cfg,
290 },
291 },
292 {
Amy Malochebc7e9672012-08-15 10:30:40 -0700293 .gpio = 6, /* BLSP1 QUP2 I2C_DAT */
294 .settings = {
295 [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
296 },
297 },
298 {
299 .gpio = 7, /* BLSP1 QUP2 I2C_CLK */
300 .settings = {
301 [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
302 },
303 },
304 {
Jin Honga04caaa2012-05-23 10:28:27 -0700305 .gpio = 83, /* BLSP11 QUP I2C_DAT */
306 .settings = {
307 [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
308 },
309 },
310 {
311 .gpio = 84, /* BLSP11 QUP I2C_CLK */
312 .settings = {
313 [GPIOMUX_SUSPENDED] = &gpio_i2c_config,
314 },
315 },
316 {
Stepan Moskovchenko5269b602012-08-08 17:57:09 -0700317 .gpio = 4, /* BLSP2 UART TX */
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700318 .settings = {
319 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
320 },
321 },
322 {
Stepan Moskovchenko5269b602012-08-08 17:57:09 -0700323 .gpio = 5, /* BLSP2 UART RX */
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700324 .settings = {
325 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
326 },
327 },
Sagar Dhariae0bb6502012-08-10 20:25:51 -0600328 {
329 .gpio = 53, /* BLSP2 QUP4 SPI_DATA_MOSI */
330 .settings = {
331 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
332 },
333 },
334 {
335 .gpio = 54, /* BLSP2 QUP4 SPI_DATA_MISO */
336 .settings = {
337 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
338 },
339 },
340 {
341 .gpio = 56, /* BLSP2 QUP4 SPI_CLK */
342 .settings = {
343 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
344 },
345 },
346 {
347 .gpio = 55, /* BLSP2 QUP4 SPI_CS0_N */
348 .settings = {
349 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
350 },
351 },
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700352};
353
Sagar Dhariaa8e6b0a2012-08-10 20:52:30 -0600354static struct msm_gpiomux_config msm8974_slimbus_config[] __initdata = {
355 {
356 .gpio = 70, /* slimbus clk */
357 .settings = {
358 [GPIOMUX_SUSPENDED] = &slimbus,
359 },
360 },
361 {
362 .gpio = 71, /* slimbus data */
363 .settings = {
364 [GPIOMUX_SUSPENDED] = &slimbus,
365 },
366 },
367};
368
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700369static struct gpiomux_setting cam_settings[] = {
370 {
Sreesudhan Ramakrish Ramkumar88c4a092012-09-07 23:43:46 -0700371 .func = GPIOMUX_FUNC_1, /*active 1*/ /* 0 */
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700372 .drv = GPIOMUX_DRV_2MA,
373 .pull = GPIOMUX_PULL_NONE,
374 },
375
376 {
Sreesudhan Ramakrish Ramkumar88c4a092012-09-07 23:43:46 -0700377 .func = GPIOMUX_FUNC_1, /*suspend*/ /* 1 */
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700378 .drv = GPIOMUX_DRV_2MA,
379 .pull = GPIOMUX_PULL_DOWN,
380 },
381
382 {
Sreesudhan Ramakrish Ramkumar88c4a092012-09-07 23:43:46 -0700383 .func = GPIOMUX_FUNC_1, /*i2c suspend*/ /* 2 */
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700384 .drv = GPIOMUX_DRV_2MA,
385 .pull = GPIOMUX_PULL_KEEPER,
386 },
Sreesudhan Ramakrish Ramkumar88c4a092012-09-07 23:43:46 -0700387
388 {
389 .func = GPIOMUX_FUNC_GPIO, /*active 0*/ /* 3 */
390 .drv = GPIOMUX_DRV_2MA,
391 .pull = GPIOMUX_PULL_NONE,
392 },
393
394 {
395 .func = GPIOMUX_FUNC_GPIO, /*suspend 0*/ /* 4 */
396 .drv = GPIOMUX_DRV_2MA,
397 .pull = GPIOMUX_PULL_DOWN,
398 },
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700399};
400
Subhash Jadavani76aa7de2012-10-10 09:58:17 +0530401static struct gpiomux_setting sd_card_det_config = {
402 .func = GPIOMUX_FUNC_GPIO,
403 .drv = GPIOMUX_DRV_2MA,
404 .pull = GPIOMUX_PULL_NONE,
405 .dir = GPIOMUX_IN,
406};
407
408static struct msm_gpiomux_config sd_card_det __initdata = {
409 .gpio = 62,
410 .settings = {
411 [GPIOMUX_ACTIVE] = &sd_card_det_config,
412 [GPIOMUX_SUSPENDED] = &sd_card_det_config,
413 },
414};
415
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700416static struct msm_gpiomux_config msm_sensor_configs[] __initdata = {
417 {
418 .gpio = 15, /* CAM_MCLK0 */
419 .settings = {
420 [GPIOMUX_ACTIVE] = &cam_settings[0],
421 [GPIOMUX_SUSPENDED] = &cam_settings[1],
422 },
423 },
424 {
425 .gpio = 16, /* CAM_MCLK1 */
426 .settings = {
427 [GPIOMUX_ACTIVE] = &cam_settings[0],
428 [GPIOMUX_SUSPENDED] = &cam_settings[1],
429 },
430 },
431 {
432 .gpio = 17, /* CAM_MCLK2 */
433 .settings = {
434 [GPIOMUX_ACTIVE] = &cam_settings[0],
435 [GPIOMUX_SUSPENDED] = &cam_settings[1],
436 },
437 },
438 {
439 .gpio = 18, /* WEBCAM1_RESET_N / CAM_MCLK3 */
440 .settings = {
Sreesudhan Ramakrish Ramkumar88c4a092012-09-07 23:43:46 -0700441 [GPIOMUX_ACTIVE] = &cam_settings[3],
442 [GPIOMUX_SUSPENDED] = &cam_settings[4],
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700443 },
444 },
445 {
446 .gpio = 19, /* CCI_I2C_SDA0 */
447 .settings = {
448 [GPIOMUX_ACTIVE] = &cam_settings[0],
449 [GPIOMUX_SUSPENDED] = &cam_settings[2],
450 },
451 },
452 {
453 .gpio = 20, /* CCI_I2C_SCL0 */
454 .settings = {
455 [GPIOMUX_ACTIVE] = &cam_settings[0],
456 [GPIOMUX_SUSPENDED] = &cam_settings[2],
457 },
458 },
459 {
460 .gpio = 21, /* CCI_I2C_SDA1 */
461 .settings = {
462 [GPIOMUX_ACTIVE] = &cam_settings[0],
463 [GPIOMUX_SUSPENDED] = &cam_settings[2],
464 },
465 },
466 {
467 .gpio = 22, /* CCI_I2C_SCL1 */
468 .settings = {
469 [GPIOMUX_ACTIVE] = &cam_settings[0],
470 [GPIOMUX_SUSPENDED] = &cam_settings[2],
471 },
472 },
473 {
474 .gpio = 23, /* FLASH_LED_EN */
475 .settings = {
476 [GPIOMUX_ACTIVE] = &cam_settings[0],
477 [GPIOMUX_SUSPENDED] = &cam_settings[1],
478 },
479 },
480 {
481 .gpio = 24, /* FLASH_LED_NOW */
482 .settings = {
483 [GPIOMUX_ACTIVE] = &cam_settings[0],
484 [GPIOMUX_SUSPENDED] = &cam_settings[1],
485 },
486 },
487 {
488 .gpio = 25, /* WEBCAM2_RESET_N */
489 .settings = {
490 [GPIOMUX_ACTIVE] = &cam_settings[0],
491 [GPIOMUX_SUSPENDED] = &cam_settings[1],
492 },
493 },
494 {
495 .gpio = 26, /* CAM_IRQ */
496 .settings = {
497 [GPIOMUX_ACTIVE] = &cam_settings[0],
498 [GPIOMUX_SUSPENDED] = &cam_settings[1],
499 },
500 },
501 {
502 .gpio = 27, /* OIS_SYNC */
503 .settings = {
504 [GPIOMUX_ACTIVE] = &cam_settings[0],
505 [GPIOMUX_SUSPENDED] = &cam_settings[1],
506 },
507 },
508 {
509 .gpio = 28, /* WEBCAM1_STANDBY */
510 .settings = {
511 [GPIOMUX_ACTIVE] = &cam_settings[0],
512 [GPIOMUX_SUSPENDED] = &cam_settings[1],
513 },
514 },
515 {
516 .gpio = 89, /* CAM1_STANDBY_N */
517 .settings = {
518 [GPIOMUX_ACTIVE] = &cam_settings[0],
519 [GPIOMUX_SUSPENDED] = &cam_settings[1],
520 },
521 },
522 {
523 .gpio = 90, /* CAM1_RST_N */
524 .settings = {
525 [GPIOMUX_ACTIVE] = &cam_settings[0],
526 [GPIOMUX_SUSPENDED] = &cam_settings[1],
527 },
528 },
529 {
530 .gpio = 91, /* CAM2_STANDBY_N */
531 .settings = {
532 [GPIOMUX_ACTIVE] = &cam_settings[0],
533 [GPIOMUX_SUSPENDED] = &cam_settings[1],
534 },
535 },
536 {
537 .gpio = 92, /* CAM2_RST_N */
538 .settings = {
539 [GPIOMUX_ACTIVE] = &cam_settings[0],
540 [GPIOMUX_SUSPENDED] = &cam_settings[1],
541 },
542 },
543};
Sameer Thalappil8d686d42012-08-24 10:07:31 -0700544static struct msm_gpiomux_config wcnss_5wire_interface[] = {
545 {
546 .gpio = 36,
547 .settings = {
548 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
549 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
550 },
551 },
552 {
553 .gpio = 37,
554 .settings = {
555 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
556 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
557 },
558 },
559 {
560 .gpio = 38,
561 .settings = {
562 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
563 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
564 },
565 },
566 {
567 .gpio = 39,
568 .settings = {
569 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
570 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
571 },
572 },
573 {
574 .gpio = 40,
575 .settings = {
576 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
577 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
578 },
579 },
580};
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700581
Joonwoo Park187e9cb2012-08-24 22:47:53 -0700582static struct msm_gpiomux_config msm_taiko_config[] __initdata = {
583 {
584 .gpio = 63, /* SYS_RST_N */
585 .settings = {
586 [GPIOMUX_SUSPENDED] = &taiko_reset,
587 },
Joonwoo Parkeb84dc72012-09-12 10:22:49 -0700588 },
589 {
590 .gpio = 72, /* CDC_INT */
591 .settings = {
592 [GPIOMUX_SUSPENDED] = &taiko_int,
593 },
594 },
Joonwoo Park187e9cb2012-08-24 22:47:53 -0700595};
596
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700597void __init msm_8974_init_gpiomux(void)
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700598{
599 int rc;
600
601 rc = msm_gpiomux_init(NR_GPIO_IRQS);
602 if (rc) {
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700603 pr_err(KERN_ERR "msm_8974_init_gpiomux failed %d\n", rc);
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700604 return;
605 }
606
Sathish Ambleye3154b42012-04-09 10:59:09 -0700607#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
608 msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs));
609#endif
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700610 msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
Sameer Thalappil8d686d42012-08-24 10:07:31 -0700611 msm_gpiomux_install(wcnss_5wire_interface,
612 ARRAY_SIZE(wcnss_5wire_interface));
Sagar Dhariaa8e6b0a2012-08-10 20:52:30 -0600613
614 msm_gpiomux_install(msm8974_slimbus_config,
615 ARRAY_SIZE(msm8974_slimbus_config));
616
Amy Maloche9e99a792012-08-15 23:27:51 -0700617 msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
Kevin Chanbdcf7ef2012-08-24 08:33:33 -0700618
619 msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
Joonwoo Park187e9cb2012-08-24 22:47:53 -0700620
Subhash Jadavani76aa7de2012-10-10 09:58:17 +0530621 msm_gpiomux_install(&sd_card_det, 1);
622
Joonwoo Park187e9cb2012-08-24 22:47:53 -0700623 msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
Ujwal Patel74b5df42012-08-13 22:50:13 -0700624
625 msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
Manoj Rao5bf2a7e2012-10-29 12:53:27 -0700626 msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs));
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700627}