blob: 8c879255f0467219b6325016fac54f7206af9177 [file] [log] [blame]
Stepan Moskovchenko5ea3c312012-01-31 18:19:40 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Stepan Moskovchenko2327a952011-12-14 16:31:28 -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
14#include <linux/init.h>
15#include <linux/ioport.h>
16#include <linux/platform_device.h>
17#include <linux/bootmem.h>
18#include <asm/mach-types.h>
19#include <asm/mach/mmc.h>
20#include <mach/msm_bus_board.h>
21#include <mach/board.h>
22#include <mach/gpio.h>
23#include <mach/gpiomux.h>
Joel Kingdacbc822012-01-25 13:30:57 -080024#include <mach/socinfo.h>
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080025#include "devices.h"
26#include "board-8064.h"
27
28#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
29static struct gpiomux_setting gpio_eth_config = {
30 .pull = GPIOMUX_PULL_NONE,
31 .drv = GPIOMUX_DRV_8MA,
32 .func = GPIOMUX_FUNC_GPIO,
33};
34
35/* The SPI configurations apply to GSBI 5*/
36static struct gpiomux_setting gpio_spi_config = {
37 .func = GPIOMUX_FUNC_2,
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -080038 .drv = GPIOMUX_DRV_12MA,
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080039 .pull = GPIOMUX_PULL_NONE,
40};
41
42/* The SPI configurations apply to GSBI 5 chip select 2*/
43static struct gpiomux_setting gpio_spi_cs2_config = {
44 .func = GPIOMUX_FUNC_3,
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -080045 .drv = GPIOMUX_DRV_12MA,
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080046 .pull = GPIOMUX_PULL_NONE,
47};
48
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -080049/* Chip selects for SPI clients */
50static struct gpiomux_setting gpio_spi_cs_config = {
51 .func = GPIOMUX_FUNC_GPIO,
52 .drv = GPIOMUX_DRV_12MA,
53 .pull = GPIOMUX_PULL_UP,
54};
55
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080056struct msm_gpiomux_config apq8064_ethernet_configs[] = {
57 {
58 .gpio = 43,
59 .settings = {
60 [GPIOMUX_SUSPENDED] = &gpio_eth_config,
61 [GPIOMUX_ACTIVE] = &gpio_eth_config,
62 }
63 },
64};
65#endif
66
David Keitel3c40fc52012-02-09 17:53:52 -080067static struct gpiomux_setting gpio_i2c_config = {
68 .func = GPIOMUX_FUNC_1,
69 .drv = GPIOMUX_DRV_8MA,
70 .pull = GPIOMUX_PULL_NONE,
71};
72
73static struct gpiomux_setting gpio_i2c_config_sus = {
74 .func = GPIOMUX_FUNC_1,
75 .drv = GPIOMUX_DRV_2MA,
76 .pull = GPIOMUX_PULL_KEEPER,
77};
78
Swaminathan Sathappancef966d2011-12-15 17:27:04 -080079static struct gpiomux_setting cdc_mclk = {
80 .func = GPIOMUX_FUNC_1,
81 .drv = GPIOMUX_DRV_8MA,
82 .pull = GPIOMUX_PULL_NONE,
83};
84
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080085static struct gpiomux_setting audio_auxpcm[] = {
86 /* Suspended state */
87 {
88 .func = GPIOMUX_FUNC_GPIO,
89 .drv = GPIOMUX_DRV_2MA,
90 .pull = GPIOMUX_PULL_NONE,
91 },
92 /* Active state */
93 {
94 .func = GPIOMUX_FUNC_1,
95 .drv = GPIOMUX_DRV_2MA,
96 .pull = GPIOMUX_PULL_NONE,
97 },
98};
99
Ankit Verma6b7e2ba2012-01-26 15:48:54 -0800100
101static struct gpiomux_setting wcnss_5wire_suspend_cfg = {
102 .func = GPIOMUX_FUNC_GPIO,
103 .drv = GPIOMUX_DRV_2MA,
104 .pull = GPIOMUX_PULL_UP,
105};
106
107static struct gpiomux_setting wcnss_5wire_active_cfg = {
108 .func = GPIOMUX_FUNC_1,
109 .drv = GPIOMUX_DRV_6MA,
110 .pull = GPIOMUX_PULL_DOWN,
111};
112
113
Swaminathan Sathappancef966d2011-12-15 17:27:04 -0800114static struct gpiomux_setting slimbus = {
115 .func = GPIOMUX_FUNC_1,
116 .drv = GPIOMUX_DRV_8MA,
117 .pull = GPIOMUX_PULL_KEEPER,
118};
119
Stepan Moskovchenko5ea3c312012-01-31 18:19:40 -0800120static struct gpiomux_setting gsbi1_uart_config = {
121 .func = GPIOMUX_FUNC_1,
122 .drv = GPIOMUX_DRV_16MA,
123 .pull = GPIOMUX_PULL_NONE,
124};
125
David Collinsf0d00732012-01-25 15:46:50 -0800126static struct gpiomux_setting ext_regulator_config = {
127 .func = GPIOMUX_FUNC_GPIO,
128 .drv = GPIOMUX_DRV_8MA,
129 .pull = GPIOMUX_PULL_NONE,
130 .dir = GPIOMUX_OUT_LOW,
131};
132
Jin Hong4bbbfba2012-02-02 21:48:07 -0800133static struct gpiomux_setting gsbi7_func1_cfg = {
134 .func = GPIOMUX_FUNC_1,
135 .drv = GPIOMUX_DRV_8MA,
136 .pull = GPIOMUX_PULL_NONE,
137};
138
139static struct gpiomux_setting gsbi7_func2_cfg = {
140 .func = GPIOMUX_FUNC_2,
141 .drv = GPIOMUX_DRV_8MA,
142 .pull = GPIOMUX_PULL_NONE,
143};
144
Jing Lin04601f92012-02-05 15:36:07 -0800145static struct gpiomux_setting gsbi3_suspended_cfg = {
146 .func = GPIOMUX_FUNC_1,
147 .drv = GPIOMUX_DRV_2MA,
148 .pull = GPIOMUX_PULL_KEEPER,
149};
150
151static struct gpiomux_setting gsbi3_active_cfg = {
152 .func = GPIOMUX_FUNC_1,
153 .drv = GPIOMUX_DRV_8MA,
154 .pull = GPIOMUX_PULL_NONE,
155};
156
Aravind Venkateswaran0507c8c2012-02-16 17:16:05 -0800157static struct gpiomux_setting hdmi_suspend_cfg = {
158 .func = GPIOMUX_FUNC_GPIO,
159 .drv = GPIOMUX_DRV_2MA,
160 .pull = GPIOMUX_PULL_DOWN,
161};
162
163static struct gpiomux_setting hdmi_active_1_cfg = {
164 .func = GPIOMUX_FUNC_1,
165 .drv = GPIOMUX_DRV_2MA,
166 .pull = GPIOMUX_PULL_UP,
167};
168
169static struct gpiomux_setting hdmi_active_2_cfg = {
170 .func = GPIOMUX_FUNC_1,
171 .drv = GPIOMUX_DRV_16MA,
172 .pull = GPIOMUX_PULL_DOWN,
173};
174
Hemant Kumara945b472012-01-25 15:08:06 -0800175#ifdef CONFIG_USB_EHCI_MSM_HSIC
176static struct gpiomux_setting hsic_act_cfg = {
177 .func = GPIOMUX_FUNC_1,
178 .drv = GPIOMUX_DRV_8MA,
179 .pull = GPIOMUX_PULL_NONE,
180};
181
182static struct gpiomux_setting hsic_sus_cfg = {
183 .func = GPIOMUX_FUNC_GPIO,
184 .drv = GPIOMUX_DRV_2MA,
185 .pull = GPIOMUX_PULL_DOWN,
186 .dir = GPIOMUX_OUT_LOW,
187};
188
Anirudh Ghayal2917a5a2012-02-05 19:51:07 -0800189static struct gpiomux_setting cyts_resout_sus_cfg = {
190 .func = GPIOMUX_FUNC_GPIO,
191 .drv = GPIOMUX_DRV_6MA,
192 .pull = GPIOMUX_PULL_UP,
193};
194
195static struct gpiomux_setting cyts_resout_act_cfg = {
196 .func = GPIOMUX_FUNC_GPIO,
197 .drv = GPIOMUX_DRV_6MA,
198 .pull = GPIOMUX_PULL_UP,
199};
200
201static struct gpiomux_setting cyts_sleep_sus_cfg = {
202 .func = GPIOMUX_FUNC_GPIO,
203 .drv = GPIOMUX_DRV_6MA,
204 .pull = GPIOMUX_PULL_DOWN,
205};
206
207static struct gpiomux_setting cyts_sleep_act_cfg = {
208 .func = GPIOMUX_FUNC_GPIO,
209 .drv = GPIOMUX_DRV_6MA,
210 .pull = GPIOMUX_PULL_DOWN,
211};
212
213static struct gpiomux_setting cyts_int_act_cfg = {
214 .func = GPIOMUX_FUNC_GPIO,
215 .drv = GPIOMUX_DRV_8MA,
216 .pull = GPIOMUX_PULL_UP,
217};
218
219static struct gpiomux_setting cyts_int_sus_cfg = {
220 .func = GPIOMUX_FUNC_GPIO,
221 .drv = GPIOMUX_DRV_2MA,
222 .pull = GPIOMUX_PULL_DOWN,
223};
224
225static struct msm_gpiomux_config cyts_gpio_configs[] __initdata = {
226 { /* TS INTERRUPT */
227 .gpio = 6,
228 .settings = {
229 [GPIOMUX_ACTIVE] = &cyts_int_act_cfg,
230 [GPIOMUX_SUSPENDED] = &cyts_int_sus_cfg,
231 },
232 },
233 { /* TS SLEEP */
234 .gpio = 33,
235 .settings = {
236 [GPIOMUX_ACTIVE] = &cyts_sleep_act_cfg,
237 [GPIOMUX_SUSPENDED] = &cyts_sleep_sus_cfg,
238 },
239 },
240 { /* TS RESOUT */
241 .gpio = 7,
242 .settings = {
243 [GPIOMUX_ACTIVE] = &cyts_resout_act_cfg,
244 [GPIOMUX_SUSPENDED] = &cyts_resout_sus_cfg,
245 },
246 },
247};
248
Hemant Kumara945b472012-01-25 15:08:06 -0800249static struct msm_gpiomux_config apq8064_hsic_configs[] = {
250 {
251 .gpio = 88, /*HSIC_STROBE */
252 .settings = {
253 [GPIOMUX_ACTIVE] = &hsic_act_cfg,
254 [GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
255 },
256 },
257 {
258 .gpio = 89, /* HSIC_DATA */
259 .settings = {
260 [GPIOMUX_ACTIVE] = &hsic_act_cfg,
261 [GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
262 },
263 },
264};
265#endif
266
Jing Lin21ed4de2012-02-05 15:53:28 -0800267static struct gpiomux_setting mxt_reset_sus_cfg = {
268 .func = GPIOMUX_FUNC_GPIO,
269 .drv = GPIOMUX_DRV_6MA,
270 .pull = GPIOMUX_PULL_DOWN,
271};
272
273static struct gpiomux_setting mxt_reset_act_cfg = {
274 .func = GPIOMUX_FUNC_GPIO,
275 .drv = GPIOMUX_DRV_6MA,
276 .pull = GPIOMUX_PULL_UP,
277};
278
279static struct gpiomux_setting mxt_int_sus_cfg = {
280 .func = GPIOMUX_FUNC_GPIO,
281 .drv = GPIOMUX_DRV_2MA,
282 .pull = GPIOMUX_PULL_DOWN,
283};
284
285static struct gpiomux_setting mxt_int_act_cfg = {
286 .func = GPIOMUX_FUNC_GPIO,
287 .drv = GPIOMUX_DRV_8MA,
288 .pull = GPIOMUX_PULL_UP,
289};
290
Aravind Venkateswaran0507c8c2012-02-16 17:16:05 -0800291static struct msm_gpiomux_config apq8064_hdmi_configs[] __initdata = {
292 {
293 .gpio = 69,
294 .settings = {
295 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
296 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
297 },
298 },
299 {
300 .gpio = 70,
301 .settings = {
302 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
303 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
304 },
305 },
306 {
307 .gpio = 71,
308 .settings = {
309 [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg,
310 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
311 },
312 },
313 {
314 .gpio = 72,
315 .settings = {
316 [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg,
317 [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg,
318 },
319 },
320};
321
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800322static struct msm_gpiomux_config apq8064_gsbi_configs[] __initdata = {
Stepan Moskovchenko5ea3c312012-01-31 18:19:40 -0800323 {
Jing Lin04601f92012-02-05 15:36:07 -0800324 .gpio = 8, /* GSBI3 I2C QUP SDA */
325 .settings = {
326 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
327 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
328 },
329 },
330 {
331 .gpio = 9, /* GSBI3 I2C QUP SCL */
332 .settings = {
333 [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg,
334 [GPIOMUX_ACTIVE] = &gsbi3_active_cfg,
335 },
336 },
337 {
Stepan Moskovchenko5ea3c312012-01-31 18:19:40 -0800338 .gpio = 18, /* GSBI1 UART TX */
339 .settings = {
340 [GPIOMUX_SUSPENDED] = &gsbi1_uart_config,
341 },
342 },
343 {
344 .gpio = 19, /* GSBI1 UART RX */
345 .settings = {
346 [GPIOMUX_SUSPENDED] = &gsbi1_uart_config,
347 },
348 },
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800349#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
350 {
351 .gpio = 51, /* GSBI5 QUP SPI_DATA_MOSI */
352 .settings = {
353 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
354 },
355 },
356 {
357 .gpio = 52, /* GSBI5 QUP SPI_DATA_MISO */
358 .settings = {
359 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
360 },
361 },
362 {
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -0800363 .gpio = 53, /* Funny CS0 */
364 .settings = {
365 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
366 },
367 },
368 {
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800369 .gpio = 31, /* GSBI5 QUP SPI_CS2_N */
370 .settings = {
371 [GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config,
372 },
373 },
374 {
375 .gpio = 54, /* GSBI5 QUP SPI_CLK */
376 .settings = {
377 [GPIOMUX_SUSPENDED] = &gpio_spi_config,
378 },
379 },
380#endif
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -0800381 {
382 .gpio = 30, /* FP CS */
383 .settings = {
384 [GPIOMUX_SUSPENDED] = &gpio_spi_cs_config,
385 },
386 },
387 {
388 .gpio = 32, /* EPM CS */
389 .settings = {
390 [GPIOMUX_SUSPENDED] = &gpio_spi_cs_config,
391 },
392 },
393 {
394 .gpio = 53, /* NOR CS */
395 .settings = {
396 [GPIOMUX_SUSPENDED] = &gpio_spi_cs_config,
397 },
398 },
Jin Hong4bbbfba2012-02-02 21:48:07 -0800399 {
400 .gpio = 82, /* GSBI7 UART2 TX */
401 .settings = {
402 [GPIOMUX_SUSPENDED] = &gsbi7_func2_cfg,
403 },
404 },
405 {
406 .gpio = 83, /* GSBI7 UART2 RX */
407 .settings = {
408 [GPIOMUX_SUSPENDED] = &gsbi7_func1_cfg,
409 },
410 },
David Keitel3c40fc52012-02-09 17:53:52 -0800411 {
412 .gpio = 21, /* GSBI1 QUP I2C_CLK */
413 .settings = {
414 [GPIOMUX_SUSPENDED] = &gpio_i2c_config_sus,
415 [GPIOMUX_ACTIVE] = &gpio_i2c_config,
416 },
417 },
418 {
419 .gpio = 20, /* GSBI1 QUP I2C_DATA */
420 .settings = {
421 [GPIOMUX_SUSPENDED] = &gpio_i2c_config_sus,
422 [GPIOMUX_ACTIVE] = &gpio_i2c_config,
423 },
424 },
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800425};
426
Swaminathan Sathappancef966d2011-12-15 17:27:04 -0800427static struct msm_gpiomux_config apq8064_slimbus_config[] __initdata = {
428 {
429 .gpio = 40, /* slimbus clk */
430 .settings = {
431 [GPIOMUX_SUSPENDED] = &slimbus,
432 },
433 },
434 {
435 .gpio = 41, /* slimbus data */
436 .settings = {
437 [GPIOMUX_SUSPENDED] = &slimbus,
438 },
439 },
440};
441
442static struct msm_gpiomux_config apq8064_audio_codec_configs[] __initdata = {
443 {
444 .gpio = 39,
445 .settings = {
446 [GPIOMUX_SUSPENDED] = &cdc_mclk,
447 },
448 },
449};
450
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800451static struct msm_gpiomux_config apq8064_audio_auxpcm_configs[] __initdata = {
452 {
453 .gpio = 43,
454 .settings = {
455 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
456 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
457 },
458 },
459 {
460 .gpio = 44,
461 .settings = {
462 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
463 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
464 },
465 },
466 {
467 .gpio = 45,
468 .settings = {
469 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
470 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
471 },
472 },
473 {
474 .gpio = 46,
475 .settings = {
476 [GPIOMUX_SUSPENDED] = &audio_auxpcm[0],
477 [GPIOMUX_ACTIVE] = &audio_auxpcm[1],
478 },
479 },
480};
481
David Collinsf0d00732012-01-25 15:46:50 -0800482/* External 3.3 V regulator enable */
483static struct msm_gpiomux_config apq8064_ext_regulator_configs[] __initdata = {
484 {
485 .gpio = APQ8064_EXT_3P3V_REG_EN_GPIO,
486 .settings = {
487 [GPIOMUX_SUSPENDED] = &ext_regulator_config,
488 },
489 },
490};
491
Joel Kingdacbc822012-01-25 13:30:57 -0800492static struct gpiomux_setting ap2mdm_cfg = {
493 .func = GPIOMUX_FUNC_GPIO,
494 .drv = GPIOMUX_DRV_8MA,
495 .pull = GPIOMUX_PULL_DOWN,
496};
497
498static struct gpiomux_setting mdm2ap_status_cfg = {
499 .func = GPIOMUX_FUNC_GPIO,
500 .drv = GPIOMUX_DRV_8MA,
501 .pull = GPIOMUX_PULL_NONE,
502};
503
504static struct gpiomux_setting mdm2ap_errfatal_cfg = {
505 .func = GPIOMUX_FUNC_GPIO,
506 .drv = GPIOMUX_DRV_16MA,
507 .pull = GPIOMUX_PULL_DOWN,
508};
509
510static struct gpiomux_setting ap2mdm_pon_reset_n_cfg = {
511 .func = GPIOMUX_FUNC_GPIO,
512 .drv = GPIOMUX_DRV_8MA,
513 .pull = GPIOMUX_PULL_DOWN,
514};
515
516static struct msm_gpiomux_config mdm_configs[] __initdata = {
517 /* AP2MDM_STATUS */
518 {
519 .gpio = 48,
520 .settings = {
521 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
522 }
523 },
524 /* MDM2AP_STATUS */
525 {
526 .gpio = 49,
527 .settings = {
528 [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
529 }
530 },
531 /* MDM2AP_ERRFATAL */
532 {
533 .gpio = 19,
534 .settings = {
535 [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
536 }
537 },
538 /* AP2MDM_ERRFATAL */
539 {
540 .gpio = 18,
541 .settings = {
542 [GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
543 }
544 },
545 /* AP2MDM_PON_RESET_N */
546 {
547 .gpio = 27,
548 .settings = {
549 [GPIOMUX_SUSPENDED] = &ap2mdm_pon_reset_n_cfg,
550 }
Mohan Pallaka474b94b2012-01-25 12:59:58 +0530551 },
552};
553
Jing Lin21ed4de2012-02-05 15:53:28 -0800554static struct msm_gpiomux_config apq8064_mxt_configs[] __initdata = {
555 { /* TS INTERRUPT */
556 .gpio = 6,
557 .settings = {
558 [GPIOMUX_ACTIVE] = &mxt_int_act_cfg,
559 [GPIOMUX_SUSPENDED] = &mxt_int_sus_cfg,
560 },
561 },
562 { /* TS RESET */
563 .gpio = 33,
564 .settings = {
565 [GPIOMUX_ACTIVE] = &mxt_reset_act_cfg,
566 [GPIOMUX_SUSPENDED] = &mxt_reset_sus_cfg,
567 },
568 },
569};
570
Ankit Verma6b7e2ba2012-01-26 15:48:54 -0800571static struct msm_gpiomux_config wcnss_5wire_interface[] = {
572 {
573 .gpio = 64,
574 .settings = {
575 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
576 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
577 },
578 },
579 {
580 .gpio = 65,
581 .settings = {
582 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
583 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
584 },
585 },
586 {
587 .gpio = 66,
588 .settings = {
589 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
590 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
591 },
592 },
593 {
594 .gpio = 67,
595 .settings = {
596 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
597 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
598 },
599 },
600 {
601 .gpio = 68,
602 .settings = {
603 [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg,
604 [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg,
605 },
606 },
607};
608
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800609void __init apq8064_init_gpiomux(void)
610{
611 int rc;
612
613 rc = msm_gpiomux_init(NR_GPIO_IRQS);
614 if (rc) {
615 pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
616 return;
617 }
618
619#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
620 msm_gpiomux_install(apq8064_ethernet_configs,
621 ARRAY_SIZE(apq8064_ethernet_configs));
622#endif
623
Ankit Verma6b7e2ba2012-01-26 15:48:54 -0800624 msm_gpiomux_install(wcnss_5wire_interface,
625 ARRAY_SIZE(wcnss_5wire_interface));
626
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800627 msm_gpiomux_install(apq8064_gsbi_configs,
628 ARRAY_SIZE(apq8064_gsbi_configs));
629
Swaminathan Sathappancef966d2011-12-15 17:27:04 -0800630 msm_gpiomux_install(apq8064_slimbus_config,
631 ARRAY_SIZE(apq8064_slimbus_config));
632
633 msm_gpiomux_install(apq8064_audio_codec_configs,
634 ARRAY_SIZE(apq8064_audio_codec_configs));
635
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800636 msm_gpiomux_install(apq8064_audio_auxpcm_configs,
637 ARRAY_SIZE(apq8064_audio_auxpcm_configs));
David Collinsf0d00732012-01-25 15:46:50 -0800638
639 msm_gpiomux_install(apq8064_ext_regulator_configs,
640 ARRAY_SIZE(apq8064_ext_regulator_configs));
Joel Kingdacbc822012-01-25 13:30:57 -0800641
642 if (machine_is_apq8064_mtp())
643 msm_gpiomux_install(mdm_configs,
644 ARRAY_SIZE(mdm_configs));
Hemant Kumara945b472012-01-25 15:08:06 -0800645
Anirudh Ghayal2917a5a2012-02-05 19:51:07 -0800646 if (machine_is_apq8064_mtp())
647 msm_gpiomux_install(cyts_gpio_configs,
648 ARRAY_SIZE(cyts_gpio_configs));
649
Hemant Kumara945b472012-01-25 15:08:06 -0800650#ifdef CONFIG_USB_EHCI_MSM_HSIC
Hemant Kumarf1ca9192012-02-07 18:59:33 -0800651 if (machine_is_apq8064_mtp())
652 msm_gpiomux_install(apq8064_hsic_configs,
653 ARRAY_SIZE(apq8064_hsic_configs));
Hemant Kumara945b472012-01-25 15:08:06 -0800654#endif
Jing Lin21ed4de2012-02-05 15:53:28 -0800655
656 if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
657 msm_gpiomux_install(apq8064_mxt_configs,
658 ARRAY_SIZE(apq8064_mxt_configs));
Aravind Venkateswaran0507c8c2012-02-16 17:16:05 -0800659
660 msm_gpiomux_install(apq8064_hdmi_configs,
661 ARRAY_SIZE(apq8064_hdmi_configs));
Stepan Moskovchenko2327a952011-12-14 16:31:28 -0800662}