Pratibhasagar V | 26cf265 | 2012-01-12 17:31:21 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 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 <asm/mach-types.h> |
| 15 | #include <mach/gpio.h> |
| 16 | #include <mach/gpiomux.h> |
| 17 | #include <mach/socinfo.h> |
| 18 | #include "devices.h" |
Stepan Moskovchenko | 5a83dba | 2011-12-05 17:30:17 -0800 | [diff] [blame] | 19 | #include "board-8960.h" |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 20 | |
| 21 | /* The SPI configurations apply to GSBI 1*/ |
| 22 | static struct gpiomux_setting spi_active = { |
| 23 | .func = GPIOMUX_FUNC_1, |
| 24 | .drv = GPIOMUX_DRV_12MA, |
| 25 | .pull = GPIOMUX_PULL_NONE, |
| 26 | }; |
| 27 | |
| 28 | static struct gpiomux_setting spi_suspended_config = { |
| 29 | .func = GPIOMUX_FUNC_GPIO, |
| 30 | .drv = GPIOMUX_DRV_2MA, |
| 31 | .pull = GPIOMUX_PULL_DOWN, |
| 32 | }; |
| 33 | |
| 34 | static struct gpiomux_setting spi_active_config2 = { |
| 35 | .func = GPIOMUX_FUNC_2, |
| 36 | .drv = GPIOMUX_DRV_8MA, |
| 37 | .pull = GPIOMUX_PULL_NONE, |
| 38 | }; |
| 39 | |
| 40 | static struct gpiomux_setting spi_suspended_config2 = { |
| 41 | .func = GPIOMUX_FUNC_GPIO, |
| 42 | .drv = GPIOMUX_DRV_2MA, |
| 43 | .pull = GPIOMUX_PULL_UP, |
| 44 | }; |
| 45 | |
| 46 | static struct gpiomux_setting gsbi3_suspended_cfg = { |
| 47 | .func = GPIOMUX_FUNC_1, |
| 48 | .drv = GPIOMUX_DRV_2MA, |
| 49 | .pull = GPIOMUX_PULL_KEEPER, |
| 50 | }; |
| 51 | |
| 52 | static struct gpiomux_setting gsbi3_active_cfg = { |
| 53 | .func = GPIOMUX_FUNC_1, |
| 54 | .drv = GPIOMUX_DRV_8MA, |
| 55 | .pull = GPIOMUX_PULL_NONE, |
| 56 | }; |
| 57 | |
Satish Babu Patakokila | 95d659d | 2012-05-10 14:42:46 +0530 | [diff] [blame] | 58 | static struct gpiomux_setting external_vfr[] = { |
| 59 | /* Suspended state */ |
| 60 | { |
| 61 | .func = GPIOMUX_FUNC_3, |
| 62 | .drv = GPIOMUX_DRV_2MA, |
| 63 | .pull = GPIOMUX_PULL_KEEPER, |
| 64 | }, |
| 65 | /* Active state */ |
| 66 | { |
| 67 | .func = GPIOMUX_FUNC_3, |
| 68 | .drv = GPIOMUX_DRV_2MA, |
| 69 | .pull = GPIOMUX_PULL_KEEPER, |
| 70 | }, |
| 71 | }; |
| 72 | |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 73 | static struct gpiomux_setting gsbi_uart = { |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 74 | .func = GPIOMUX_FUNC_1, |
| 75 | .drv = GPIOMUX_DRV_8MA, |
| 76 | .pull = GPIOMUX_PULL_NONE, |
| 77 | }; |
| 78 | |
Mayank Rana | e009c92 | 2012-03-22 03:02:06 +0530 | [diff] [blame] | 79 | static struct gpiomux_setting gsbi9_active_cfg = { |
| 80 | .func = GPIOMUX_FUNC_2, |
| 81 | .drv = GPIOMUX_DRV_8MA, |
| 82 | .pull = GPIOMUX_PULL_DOWN, |
| 83 | }; |
| 84 | |
| 85 | static struct gpiomux_setting gsbi9_suspended_cfg = { |
| 86 | .func = GPIOMUX_FUNC_2, |
| 87 | .drv = GPIOMUX_DRV_2MA, |
| 88 | .pull = GPIOMUX_PULL_DOWN, |
| 89 | }; |
| 90 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 91 | static struct gpiomux_setting gsbi10 = { |
| 92 | .func = GPIOMUX_FUNC_2, |
| 93 | .drv = GPIOMUX_DRV_8MA, |
| 94 | .pull = GPIOMUX_PULL_NONE, |
| 95 | }; |
| 96 | |
| 97 | static struct gpiomux_setting gsbi12 = { |
| 98 | .func = GPIOMUX_FUNC_1, |
| 99 | .drv = GPIOMUX_DRV_8MA, |
| 100 | .pull = GPIOMUX_PULL_NONE, |
| 101 | }; |
| 102 | |
| 103 | static struct gpiomux_setting cdc_mclk = { |
| 104 | .func = GPIOMUX_FUNC_1, |
| 105 | .drv = GPIOMUX_DRV_8MA, |
| 106 | .pull = GPIOMUX_PULL_NONE, |
| 107 | }; |
| 108 | |
| 109 | static struct gpiomux_setting audio_auxpcm[] = { |
| 110 | /* Suspended state */ |
| 111 | { |
| 112 | .func = GPIOMUX_FUNC_GPIO, |
| 113 | .drv = GPIOMUX_DRV_2MA, |
Patrick Lai | b593eaf | 2012-01-05 22:14:47 -0800 | [diff] [blame] | 114 | .pull = GPIOMUX_PULL_DOWN, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 115 | }, |
| 116 | /* Active state */ |
| 117 | { |
| 118 | .func = GPIOMUX_FUNC_1, |
| 119 | .drv = GPIOMUX_DRV_2MA, |
| 120 | .pull = GPIOMUX_PULL_NONE, |
| 121 | }, |
| 122 | }; |
| 123 | |
| 124 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 125 | static struct gpiomux_setting gpio_eth_config = { |
| 126 | .pull = GPIOMUX_PULL_NONE, |
| 127 | .drv = GPIOMUX_DRV_8MA, |
| 128 | .func = GPIOMUX_FUNC_GPIO, |
| 129 | }; |
| 130 | #endif |
| 131 | |
| 132 | static struct gpiomux_setting slimbus = { |
| 133 | .func = GPIOMUX_FUNC_1, |
| 134 | .drv = GPIOMUX_DRV_8MA, |
| 135 | .pull = GPIOMUX_PULL_KEEPER, |
| 136 | }; |
| 137 | |
| 138 | static struct gpiomux_setting wcnss_5wire_suspend_cfg = { |
| 139 | .func = GPIOMUX_FUNC_GPIO, |
| 140 | .drv = GPIOMUX_DRV_2MA, |
| 141 | .pull = GPIOMUX_PULL_UP, |
| 142 | }; |
| 143 | |
| 144 | static struct gpiomux_setting wcnss_5wire_active_cfg = { |
| 145 | .func = GPIOMUX_FUNC_1, |
| 146 | .drv = GPIOMUX_DRV_6MA, |
| 147 | .pull = GPIOMUX_PULL_DOWN, |
| 148 | }; |
| 149 | |
| 150 | static struct gpiomux_setting cyts_resout_sus_cfg = { |
| 151 | .func = GPIOMUX_FUNC_GPIO, |
| 152 | .drv = GPIOMUX_DRV_6MA, |
| 153 | .pull = GPIOMUX_PULL_UP, |
| 154 | }; |
| 155 | |
| 156 | static struct gpiomux_setting cyts_resout_act_cfg = { |
| 157 | .func = GPIOMUX_FUNC_GPIO, |
| 158 | .drv = GPIOMUX_DRV_6MA, |
| 159 | .pull = GPIOMUX_PULL_UP, |
| 160 | }; |
| 161 | |
| 162 | static struct gpiomux_setting cyts_sleep_sus_cfg = { |
| 163 | .func = GPIOMUX_FUNC_GPIO, |
| 164 | .drv = GPIOMUX_DRV_6MA, |
| 165 | .pull = GPIOMUX_PULL_DOWN, |
| 166 | }; |
| 167 | |
| 168 | static struct gpiomux_setting cyts_sleep_act_cfg = { |
| 169 | .func = GPIOMUX_FUNC_GPIO, |
| 170 | .drv = GPIOMUX_DRV_6MA, |
| 171 | .pull = GPIOMUX_PULL_DOWN, |
| 172 | }; |
| 173 | |
| 174 | static struct gpiomux_setting cyts_int_act_cfg = { |
| 175 | .func = GPIOMUX_FUNC_GPIO, |
| 176 | .drv = GPIOMUX_DRV_8MA, |
| 177 | .pull = GPIOMUX_PULL_UP, |
| 178 | }; |
| 179 | |
| 180 | static struct gpiomux_setting cyts_int_sus_cfg = { |
| 181 | .func = GPIOMUX_FUNC_GPIO, |
| 182 | .drv = GPIOMUX_DRV_2MA, |
| 183 | .pull = GPIOMUX_PULL_DOWN, |
| 184 | }; |
| 185 | |
| 186 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
| 187 | static struct gpiomux_setting hsic_act_cfg = { |
| 188 | .func = GPIOMUX_FUNC_1, |
| 189 | .drv = GPIOMUX_DRV_12MA, |
| 190 | .pull = GPIOMUX_PULL_NONE, |
| 191 | }; |
| 192 | |
| 193 | static struct gpiomux_setting hsic_sus_cfg = { |
| 194 | .func = GPIOMUX_FUNC_GPIO, |
| 195 | .drv = GPIOMUX_DRV_2MA, |
| 196 | .pull = GPIOMUX_PULL_DOWN, |
| 197 | .dir = GPIOMUX_OUT_LOW, |
| 198 | }; |
| 199 | |
| 200 | static struct gpiomux_setting hsic_hub_act_cfg = { |
| 201 | .func = GPIOMUX_FUNC_GPIO, |
| 202 | .drv = GPIOMUX_DRV_2MA, |
| 203 | .pull = GPIOMUX_PULL_NONE, |
| 204 | }; |
| 205 | #endif |
| 206 | |
| 207 | static struct gpiomux_setting hap_lvl_shft_suspended_config = { |
| 208 | .func = GPIOMUX_FUNC_GPIO, |
| 209 | .drv = GPIOMUX_DRV_2MA, |
| 210 | .pull = GPIOMUX_PULL_DOWN, |
| 211 | }; |
| 212 | |
| 213 | static struct gpiomux_setting hap_lvl_shft_active_config = { |
| 214 | .func = GPIOMUX_FUNC_GPIO, |
| 215 | .drv = GPIOMUX_DRV_8MA, |
| 216 | .pull = GPIOMUX_PULL_UP, |
| 217 | }; |
| 218 | |
| 219 | static struct gpiomux_setting ap2mdm_cfg = { |
| 220 | .func = GPIOMUX_FUNC_GPIO, |
| 221 | .drv = GPIOMUX_DRV_8MA, |
| 222 | .pull = GPIOMUX_PULL_DOWN, |
| 223 | }; |
| 224 | |
| 225 | static struct gpiomux_setting mdm2ap_status_cfg = { |
| 226 | .func = GPIOMUX_FUNC_GPIO, |
| 227 | .drv = GPIOMUX_DRV_8MA, |
| 228 | .pull = GPIOMUX_PULL_NONE, |
| 229 | }; |
| 230 | |
| 231 | static struct gpiomux_setting mdm2ap_errfatal_cfg = { |
| 232 | .func = GPIOMUX_FUNC_GPIO, |
| 233 | .drv = GPIOMUX_DRV_16MA, |
| 234 | .pull = GPIOMUX_PULL_DOWN, |
| 235 | }; |
| 236 | |
| 237 | static struct gpiomux_setting ap2mdm_kpdpwr_n_cfg = { |
| 238 | .func = GPIOMUX_FUNC_GPIO, |
| 239 | .drv = GPIOMUX_DRV_8MA, |
Joel King | 1c60731 | 2012-01-13 16:41:44 -0800 | [diff] [blame] | 240 | .pull = GPIOMUX_PULL_DOWN, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 241 | }; |
| 242 | |
| 243 | static struct gpiomux_setting mdp_vsync_suspend_cfg = { |
| 244 | .func = GPIOMUX_FUNC_GPIO, |
| 245 | .drv = GPIOMUX_DRV_2MA, |
| 246 | .pull = GPIOMUX_PULL_DOWN, |
| 247 | }; |
| 248 | |
| 249 | static struct gpiomux_setting mdp_vsync_active_cfg = { |
| 250 | .func = GPIOMUX_FUNC_1, |
| 251 | .drv = GPIOMUX_DRV_2MA, |
| 252 | .pull = GPIOMUX_PULL_DOWN, |
| 253 | }; |
| 254 | |
| 255 | #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL |
| 256 | static struct gpiomux_setting hdmi_suspend_cfg = { |
| 257 | .func = GPIOMUX_FUNC_GPIO, |
| 258 | .drv = GPIOMUX_DRV_2MA, |
| 259 | .pull = GPIOMUX_PULL_DOWN, |
| 260 | }; |
| 261 | |
| 262 | static struct gpiomux_setting hdmi_active_1_cfg = { |
| 263 | .func = GPIOMUX_FUNC_1, |
| 264 | .drv = GPIOMUX_DRV_2MA, |
| 265 | .pull = GPIOMUX_PULL_UP, |
| 266 | }; |
| 267 | |
| 268 | static struct gpiomux_setting hdmi_active_2_cfg = { |
| 269 | .func = GPIOMUX_FUNC_1, |
| 270 | .drv = GPIOMUX_DRV_2MA, |
| 271 | .pull = GPIOMUX_PULL_DOWN, |
| 272 | }; |
Eugene Yasman | 6759234 | 2011-12-11 13:12:36 +0200 | [diff] [blame] | 273 | |
Manoj Rao | 1464874 | 2012-03-30 19:42:12 -0700 | [diff] [blame] | 274 | #if defined(CONFIG_FB_MSM_HDMI_MHL_8334) || defined(CONFIG_FB_MSM_HDMI_MHL_9244) |
Eugene Yasman | 6759234 | 2011-12-11 13:12:36 +0200 | [diff] [blame] | 275 | static struct gpiomux_setting hdmi_active_3_cfg = { |
| 276 | .func = GPIOMUX_FUNC_GPIO, |
| 277 | .drv = GPIOMUX_DRV_2MA, |
Eugene Yasman | a2db416 | 2011-12-13 09:28:22 +0200 | [diff] [blame] | 278 | .pull = GPIOMUX_PULL_UP, |
Eugene Yasman | 6759234 | 2011-12-11 13:12:36 +0200 | [diff] [blame] | 279 | .dir = GPIOMUX_IN, |
| 280 | }; |
| 281 | |
| 282 | static struct gpiomux_setting hdmi_active_4_cfg = { |
| 283 | .func = GPIOMUX_FUNC_GPIO, |
| 284 | .drv = GPIOMUX_DRV_2MA, |
| 285 | .pull = GPIOMUX_PULL_UP, |
| 286 | .dir = GPIOMUX_OUT_HIGH, |
| 287 | }; |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 288 | #endif |
Manoj Rao | 1464874 | 2012-03-30 19:42:12 -0700 | [diff] [blame] | 289 | #endif |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 290 | |
| 291 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 292 | static struct msm_gpiomux_config msm8960_ethernet_configs[] = { |
| 293 | { |
| 294 | .gpio = 90, |
| 295 | .settings = { |
| 296 | [GPIOMUX_SUSPENDED] = &gpio_eth_config, |
| 297 | } |
| 298 | }, |
| 299 | { |
| 300 | .gpio = 89, |
| 301 | .settings = { |
| 302 | [GPIOMUX_SUSPENDED] = &gpio_eth_config, |
| 303 | } |
| 304 | }, |
| 305 | }; |
| 306 | #endif |
| 307 | |
Mayank Rana | e009c92 | 2012-03-22 03:02:06 +0530 | [diff] [blame] | 308 | static struct msm_gpiomux_config msm8960_fusion_gsbi_configs[] = { |
| 309 | { |
| 310 | .gpio = 93, |
| 311 | .settings = { |
| 312 | [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg, |
| 313 | [GPIOMUX_ACTIVE] = &gsbi9_active_cfg, |
| 314 | } |
| 315 | }, |
| 316 | { |
| 317 | .gpio = 94, |
| 318 | .settings = { |
| 319 | [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg, |
| 320 | [GPIOMUX_ACTIVE] = &gsbi9_active_cfg, |
| 321 | } |
| 322 | }, |
| 323 | { |
| 324 | .gpio = 95, |
| 325 | .settings = { |
| 326 | [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg, |
| 327 | [GPIOMUX_ACTIVE] = &gsbi9_active_cfg, |
| 328 | } |
| 329 | }, |
| 330 | { |
| 331 | .gpio = 96, |
| 332 | .settings = { |
| 333 | [GPIOMUX_SUSPENDED] = &gsbi9_suspended_cfg, |
| 334 | [GPIOMUX_ACTIVE] = &gsbi9_active_cfg, |
| 335 | } |
| 336 | }, |
| 337 | }; |
| 338 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 339 | static struct msm_gpiomux_config msm8960_gsbi_configs[] __initdata = { |
| 340 | { |
| 341 | .gpio = 6, /* GSBI1 QUP SPI_DATA_MOSI */ |
| 342 | .settings = { |
| 343 | [GPIOMUX_SUSPENDED] = &spi_suspended_config, |
| 344 | [GPIOMUX_ACTIVE] = &spi_active, |
| 345 | }, |
| 346 | }, |
| 347 | { |
| 348 | .gpio = 7, /* GSBI1 QUP SPI_DATA_MISO */ |
| 349 | .settings = { |
| 350 | [GPIOMUX_SUSPENDED] = &spi_suspended_config, |
| 351 | [GPIOMUX_ACTIVE] = &spi_active, |
| 352 | }, |
| 353 | }, |
| 354 | { |
| 355 | .gpio = 8, /* GSBI1 QUP SPI_CS_N */ |
| 356 | .settings = { |
| 357 | [GPIOMUX_SUSPENDED] = &spi_suspended_config, |
| 358 | [GPIOMUX_ACTIVE] = &spi_active, |
| 359 | }, |
| 360 | }, |
| 361 | { |
| 362 | .gpio = 9, /* GSBI1 QUP SPI_CLK */ |
| 363 | .settings = { |
| 364 | [GPIOMUX_SUSPENDED] = &spi_suspended_config, |
| 365 | [GPIOMUX_ACTIVE] = &spi_active, |
| 366 | }, |
| 367 | }, |
| 368 | { |
| 369 | .gpio = 14, /* GSBI1 SPI_CS_1 */ |
| 370 | .settings = { |
| 371 | [GPIOMUX_SUSPENDED] = &spi_suspended_config2, |
| 372 | [GPIOMUX_ACTIVE] = &spi_active_config2, |
| 373 | }, |
| 374 | }, |
| 375 | { |
| 376 | .gpio = 16, /* GSBI3 I2C QUP SDA */ |
| 377 | .settings = { |
| 378 | [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg, |
| 379 | [GPIOMUX_ACTIVE] = &gsbi3_active_cfg, |
| 380 | }, |
| 381 | }, |
| 382 | { |
| 383 | .gpio = 17, /* GSBI3 I2C QUP SCL */ |
| 384 | .settings = { |
| 385 | [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg, |
| 386 | [GPIOMUX_ACTIVE] = &gsbi3_active_cfg, |
| 387 | }, |
| 388 | }, |
| 389 | { |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 390 | .gpio = 44, /* GSBI12 I2C QUP SDA */ |
| 391 | .settings = { |
| 392 | [GPIOMUX_SUSPENDED] = &gsbi12, |
| 393 | }, |
| 394 | }, |
| 395 | { |
| 396 | .gpio = 45, /* GSBI12 I2C QUP SCL */ |
| 397 | .settings = { |
| 398 | [GPIOMUX_SUSPENDED] = &gsbi12, |
| 399 | }, |
| 400 | }, |
| 401 | { |
| 402 | .gpio = 73, /* GSBI10 I2C QUP SDA */ |
| 403 | .settings = { |
| 404 | [GPIOMUX_SUSPENDED] = &gsbi10, |
| 405 | }, |
| 406 | }, |
| 407 | { |
| 408 | .gpio = 74, /* GSBI10 I2C QUP SCL */ |
| 409 | .settings = { |
| 410 | [GPIOMUX_SUSPENDED] = &gsbi10, |
| 411 | }, |
| 412 | }, |
| 413 | }; |
| 414 | |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 415 | static struct msm_gpiomux_config msm8960_gsbi5_uart_configs[] __initdata = { |
| 416 | { |
| 417 | .gpio = 22, /* GSBI5 UART2 */ |
| 418 | .settings = { |
| 419 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 420 | }, |
| 421 | }, |
| 422 | { |
| 423 | .gpio = 23, /* GSBI5 UART2 */ |
| 424 | .settings = { |
| 425 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 426 | }, |
| 427 | }, |
| 428 | { |
| 429 | .gpio = 24, /* GSBI5 UART2 */ |
| 430 | .settings = { |
| 431 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 432 | }, |
| 433 | }, |
| 434 | { |
| 435 | .gpio = 25, /* GSBI5 UART2 */ |
| 436 | .settings = { |
| 437 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 438 | }, |
| 439 | }, |
| 440 | }; |
| 441 | |
Satish Babu Patakokila | 95d659d | 2012-05-10 14:42:46 +0530 | [diff] [blame] | 442 | static struct msm_gpiomux_config msm8960_external_vfr_configs[] __initdata = { |
| 443 | { |
| 444 | .gpio = 23, /* EXTERNAL VFR */ |
| 445 | .settings = { |
| 446 | [GPIOMUX_SUSPENDED] = &external_vfr[0], |
| 447 | [GPIOMUX_ACTIVE] = &external_vfr[1], |
| 448 | }, |
| 449 | }, |
| 450 | }; |
| 451 | |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 452 | static struct msm_gpiomux_config msm8960_gsbi8_uart_configs[] __initdata = { |
| 453 | { |
| 454 | .gpio = 34, /* GSBI8 UART3 */ |
| 455 | .settings = { |
| 456 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 457 | }, |
| 458 | }, |
| 459 | { |
| 460 | .gpio = 35, /* GSBI8 UART3 */ |
| 461 | .settings = { |
| 462 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 463 | }, |
| 464 | }, |
| 465 | { |
| 466 | .gpio = 36, /* GSBI8 UART3 */ |
| 467 | .settings = { |
| 468 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 469 | }, |
| 470 | }, |
| 471 | { |
| 472 | .gpio = 37, /* GSBI8 UART3 */ |
| 473 | .settings = { |
| 474 | [GPIOMUX_SUSPENDED] = &gsbi_uart, |
| 475 | }, |
| 476 | }, |
| 477 | }; |
| 478 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 479 | static struct msm_gpiomux_config msm8960_slimbus_config[] __initdata = { |
| 480 | { |
| 481 | .gpio = 60, /* slimbus data */ |
| 482 | .settings = { |
| 483 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 484 | }, |
| 485 | }, |
| 486 | { |
| 487 | .gpio = 61, /* slimbus clk */ |
| 488 | .settings = { |
| 489 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 490 | }, |
| 491 | }, |
| 492 | }; |
| 493 | |
| 494 | static struct msm_gpiomux_config msm8960_audio_codec_configs[] __initdata = { |
| 495 | { |
| 496 | .gpio = 59, |
| 497 | .settings = { |
| 498 | [GPIOMUX_SUSPENDED] = &cdc_mclk, |
| 499 | }, |
| 500 | }, |
| 501 | }; |
| 502 | |
| 503 | static struct msm_gpiomux_config msm8960_audio_auxpcm_configs[] __initdata = { |
| 504 | { |
| 505 | .gpio = 63, |
| 506 | .settings = { |
| 507 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 508 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 509 | }, |
| 510 | }, |
| 511 | { |
| 512 | .gpio = 64, |
| 513 | .settings = { |
| 514 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 515 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 516 | }, |
| 517 | }, |
| 518 | { |
| 519 | .gpio = 65, |
| 520 | .settings = { |
| 521 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 522 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 523 | }, |
| 524 | }, |
| 525 | { |
| 526 | .gpio = 66, |
| 527 | .settings = { |
| 528 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 529 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 530 | }, |
| 531 | }, |
| 532 | }; |
| 533 | |
| 534 | static struct msm_gpiomux_config wcnss_5wire_interface[] = { |
| 535 | { |
| 536 | .gpio = 84, |
| 537 | .settings = { |
| 538 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 539 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 540 | }, |
| 541 | }, |
| 542 | { |
| 543 | .gpio = 85, |
| 544 | .settings = { |
| 545 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 546 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 547 | }, |
| 548 | }, |
| 549 | { |
| 550 | .gpio = 86, |
| 551 | .settings = { |
| 552 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 553 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 554 | }, |
| 555 | }, |
| 556 | { |
| 557 | .gpio = 87, |
| 558 | .settings = { |
| 559 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 560 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 561 | }, |
| 562 | }, |
| 563 | { |
| 564 | .gpio = 88, |
| 565 | .settings = { |
| 566 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 567 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 568 | }, |
| 569 | }, |
| 570 | }; |
| 571 | |
| 572 | static struct msm_gpiomux_config msm8960_cyts_configs[] __initdata = { |
| 573 | { /* TS INTERRUPT */ |
| 574 | .gpio = 11, |
| 575 | .settings = { |
| 576 | [GPIOMUX_ACTIVE] = &cyts_int_act_cfg, |
| 577 | [GPIOMUX_SUSPENDED] = &cyts_int_sus_cfg, |
| 578 | }, |
| 579 | }, |
| 580 | { /* TS SLEEP */ |
| 581 | .gpio = 50, |
| 582 | .settings = { |
| 583 | [GPIOMUX_ACTIVE] = &cyts_sleep_act_cfg, |
| 584 | [GPIOMUX_SUSPENDED] = &cyts_sleep_sus_cfg, |
| 585 | }, |
| 586 | }, |
| 587 | { /* TS RESOUT */ |
| 588 | .gpio = 52, |
| 589 | .settings = { |
| 590 | [GPIOMUX_ACTIVE] = &cyts_resout_act_cfg, |
| 591 | [GPIOMUX_SUSPENDED] = &cyts_resout_sus_cfg, |
| 592 | }, |
| 593 | }, |
| 594 | }; |
| 595 | |
| 596 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
| 597 | static struct msm_gpiomux_config msm8960_hsic_configs[] = { |
| 598 | { |
| 599 | .gpio = 150, /*HSIC_STROBE */ |
| 600 | .settings = { |
| 601 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 602 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 603 | }, |
| 604 | }, |
| 605 | { |
| 606 | .gpio = 151, /* HSIC_DATA */ |
| 607 | .settings = { |
| 608 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 609 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 610 | }, |
| 611 | }, |
Vijayavardhan Vennapusa | afbbb8f | 2012-04-13 16:28:45 +0530 | [diff] [blame] | 612 | }; |
| 613 | |
| 614 | static struct msm_gpiomux_config msm8960_hsic_hub_configs[] = { |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 615 | { |
| 616 | .gpio = 91, /* HSIC_HUB_RESET */ |
| 617 | .settings = { |
| 618 | [GPIOMUX_ACTIVE] = &hsic_hub_act_cfg, |
| 619 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 620 | }, |
| 621 | }, |
| 622 | }; |
| 623 | #endif |
| 624 | |
Pratibhasagar V | 26cf265 | 2012-01-12 17:31:21 +0530 | [diff] [blame] | 625 | #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT |
| 626 | static struct gpiomux_setting sdcc4_clk_actv_cfg = { |
| 627 | .func = GPIOMUX_FUNC_2, |
| 628 | .drv = GPIOMUX_DRV_8MA, |
| 629 | .pull = GPIOMUX_PULL_NONE, |
| 630 | }; |
| 631 | |
| 632 | static struct gpiomux_setting sdcc4_cmd_data_0_3_actv_cfg = { |
| 633 | .func = GPIOMUX_FUNC_2, |
| 634 | .drv = GPIOMUX_DRV_8MA, |
| 635 | .pull = GPIOMUX_PULL_UP, |
| 636 | }; |
| 637 | |
| 638 | static struct gpiomux_setting sdcc4_suspend_cfg = { |
| 639 | .func = GPIOMUX_FUNC_GPIO, |
| 640 | .drv = GPIOMUX_DRV_2MA, |
| 641 | .pull = GPIOMUX_PULL_DOWN, |
| 642 | }; |
| 643 | |
| 644 | static struct gpiomux_setting sdcc4_data_1_suspend_cfg = { |
| 645 | .func = GPIOMUX_FUNC_GPIO, |
| 646 | .drv = GPIOMUX_DRV_8MA, |
| 647 | .pull = GPIOMUX_PULL_UP, |
| 648 | }; |
| 649 | |
| 650 | static struct msm_gpiomux_config msm8960_sdcc4_configs[] __initdata = { |
| 651 | { |
| 652 | /* SDC4_DATA_3 */ |
| 653 | .gpio = 83, |
| 654 | .settings = { |
| 655 | [GPIOMUX_ACTIVE] = &sdcc4_cmd_data_0_3_actv_cfg, |
| 656 | [GPIOMUX_SUSPENDED] = &sdcc4_suspend_cfg, |
| 657 | }, |
| 658 | }, |
| 659 | { |
| 660 | /* SDC4_DATA_2 */ |
| 661 | .gpio = 84, |
| 662 | .settings = { |
| 663 | [GPIOMUX_ACTIVE] = &sdcc4_cmd_data_0_3_actv_cfg, |
| 664 | [GPIOMUX_SUSPENDED] = &sdcc4_suspend_cfg, |
| 665 | }, |
| 666 | }, |
| 667 | { |
| 668 | /* SDC4_DATA_1 */ |
| 669 | .gpio = 85, |
| 670 | .settings = { |
| 671 | [GPIOMUX_ACTIVE] = &sdcc4_cmd_data_0_3_actv_cfg, |
| 672 | [GPIOMUX_SUSPENDED] = &sdcc4_data_1_suspend_cfg, |
| 673 | }, |
| 674 | }, |
| 675 | { |
| 676 | /* SDC4_DATA_0 */ |
| 677 | .gpio = 86, |
| 678 | .settings = { |
| 679 | [GPIOMUX_ACTIVE] = &sdcc4_cmd_data_0_3_actv_cfg, |
| 680 | [GPIOMUX_SUSPENDED] = &sdcc4_suspend_cfg, |
| 681 | }, |
| 682 | }, |
| 683 | { |
| 684 | /* SDC4_CMD */ |
| 685 | .gpio = 87, |
| 686 | .settings = { |
| 687 | [GPIOMUX_ACTIVE] = &sdcc4_cmd_data_0_3_actv_cfg, |
| 688 | [GPIOMUX_SUSPENDED] = &sdcc4_suspend_cfg, |
| 689 | }, |
| 690 | }, |
| 691 | { |
| 692 | /* SDC4_CLK */ |
| 693 | .gpio = 88, |
| 694 | .settings = { |
| 695 | [GPIOMUX_ACTIVE] = &sdcc4_clk_actv_cfg, |
| 696 | [GPIOMUX_SUSPENDED] = &sdcc4_suspend_cfg, |
| 697 | }, |
| 698 | }, |
| 699 | }; |
| 700 | #endif |
| 701 | |
| 702 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 703 | static struct msm_gpiomux_config hap_lvl_shft_config[] __initdata = { |
| 704 | { |
| 705 | .gpio = 47, |
| 706 | .settings = { |
| 707 | [GPIOMUX_SUSPENDED] = &hap_lvl_shft_suspended_config, |
| 708 | [GPIOMUX_ACTIVE] = &hap_lvl_shft_active_config, |
| 709 | }, |
| 710 | }, |
| 711 | }; |
| 712 | |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 713 | static struct msm_gpiomux_config sglte_configs[] __initdata = { |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 714 | /* AP2MDM_STATUS */ |
| 715 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 716 | .gpio = 77, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 717 | .settings = { |
| 718 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 719 | } |
| 720 | }, |
| 721 | /* MDM2AP_STATUS */ |
| 722 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 723 | .gpio = 24, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 724 | .settings = { |
| 725 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 726 | } |
| 727 | }, |
| 728 | /* MDM2AP_ERRFATAL */ |
| 729 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 730 | .gpio = 40, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 731 | .settings = { |
| 732 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 733 | } |
| 734 | }, |
| 735 | /* AP2MDM_ERRFATAL */ |
| 736 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 737 | .gpio = 80, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 738 | .settings = { |
| 739 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 740 | } |
| 741 | }, |
| 742 | /* AP2MDM_KPDPWR_N */ |
| 743 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 744 | .gpio = 79, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 745 | .settings = { |
| 746 | [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg, |
| 747 | } |
| 748 | }, |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 749 | /* AP2MDM_PMIC_PWR_EN */ |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 750 | { |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 751 | .gpio = 22, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 752 | .settings = { |
| 753 | [GPIOMUX_SUSPENDED] = &ap2mdm_kpdpwr_n_cfg, |
| 754 | } |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 755 | }, |
| 756 | /* AP2MDM_SOFT_RESET */ |
| 757 | { |
| 758 | .gpio = 78, |
| 759 | .settings = { |
| 760 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 761 | } |
| 762 | }, |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 763 | }; |
| 764 | |
| 765 | static struct msm_gpiomux_config msm8960_mdp_vsync_configs[] __initdata = { |
| 766 | { |
| 767 | .gpio = 0, |
| 768 | .settings = { |
| 769 | [GPIOMUX_ACTIVE] = &mdp_vsync_active_cfg, |
| 770 | [GPIOMUX_SUSPENDED] = &mdp_vsync_suspend_cfg, |
| 771 | }, |
| 772 | } |
| 773 | }; |
| 774 | |
| 775 | #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL |
| 776 | static struct msm_gpiomux_config msm8960_hdmi_configs[] __initdata = { |
| 777 | { |
| 778 | .gpio = 99, |
| 779 | .settings = { |
| 780 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 781 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 782 | }, |
| 783 | }, |
| 784 | { |
| 785 | .gpio = 100, |
| 786 | .settings = { |
| 787 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 788 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 789 | }, |
| 790 | }, |
| 791 | { |
| 792 | .gpio = 101, |
| 793 | .settings = { |
| 794 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 795 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 796 | }, |
| 797 | }, |
| 798 | { |
| 799 | .gpio = 102, |
| 800 | .settings = { |
| 801 | [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg, |
| 802 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 803 | }, |
| 804 | }, |
Manoj Rao | 1464874 | 2012-03-30 19:42:12 -0700 | [diff] [blame] | 805 | #ifdef CONFIG_FB_MSM_HDMI_MHL_9244 |
Eugene Yasman | 6759234 | 2011-12-11 13:12:36 +0200 | [diff] [blame] | 806 | { |
| 807 | .gpio = 15, |
| 808 | .settings = { |
| 809 | [GPIOMUX_ACTIVE] = &hdmi_active_3_cfg, |
| 810 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 811 | }, |
| 812 | }, |
| 813 | { |
| 814 | .gpio = 66, |
| 815 | .settings = { |
| 816 | [GPIOMUX_ACTIVE] = &hdmi_active_4_cfg, |
| 817 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 818 | }, |
| 819 | }, |
Manoj Rao | 1464874 | 2012-03-30 19:42:12 -0700 | [diff] [blame] | 820 | #endif |
| 821 | #ifdef CONFIG_FB_MSM_HDMI_MHL_8334 |
| 822 | { |
| 823 | .gpio = 4, |
| 824 | .settings = { |
| 825 | [GPIOMUX_ACTIVE] = &hdmi_active_3_cfg, |
| 826 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 827 | }, |
| 828 | }, |
| 829 | { |
| 830 | .gpio = 15, |
| 831 | .settings = { |
| 832 | [GPIOMUX_ACTIVE] = &hdmi_active_4_cfg, |
| 833 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 834 | }, |
| 835 | }, |
| 836 | #endif /* CONFIG_FB_MSM_HDMI_MHL */ |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 837 | }; |
| 838 | #endif |
| 839 | |
Pratibhasagar V | 57c808e | 2012-01-12 13:47:30 +0530 | [diff] [blame] | 840 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 841 | static struct gpiomux_setting sdcc2_clk_actv_cfg = { |
| 842 | .func = GPIOMUX_FUNC_2, |
| 843 | .drv = GPIOMUX_DRV_8MA, |
| 844 | .pull = GPIOMUX_PULL_NONE, |
| 845 | }; |
| 846 | |
| 847 | static struct gpiomux_setting sdcc2_cmd_data_0_3_actv_cfg = { |
| 848 | .func = GPIOMUX_FUNC_2, |
| 849 | .drv = GPIOMUX_DRV_8MA, |
| 850 | .pull = GPIOMUX_PULL_UP, |
| 851 | }; |
| 852 | |
| 853 | static struct gpiomux_setting sdcc2_suspend_cfg = { |
| 854 | .func = GPIOMUX_FUNC_GPIO, |
| 855 | .drv = GPIOMUX_DRV_2MA, |
| 856 | .pull = GPIOMUX_PULL_DOWN, |
| 857 | }; |
| 858 | |
| 859 | static struct gpiomux_setting sdcc2_data_1_suspend_cfg = { |
| 860 | .func = GPIOMUX_FUNC_GPIO, |
| 861 | .drv = GPIOMUX_DRV_8MA, |
| 862 | .pull = GPIOMUX_PULL_UP, |
| 863 | }; |
| 864 | |
| 865 | static struct msm_gpiomux_config msm8960_sdcc2_configs[] __initdata = { |
| 866 | { |
| 867 | /* DATA_3 */ |
| 868 | .gpio = 92, |
| 869 | .settings = { |
| 870 | [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg, |
| 871 | [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg, |
| 872 | }, |
| 873 | }, |
| 874 | { |
| 875 | /* DATA_2 */ |
| 876 | .gpio = 91, |
| 877 | .settings = { |
| 878 | [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg, |
| 879 | [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg, |
| 880 | }, |
| 881 | }, |
| 882 | { |
| 883 | /* DATA_1 */ |
| 884 | .gpio = 90, |
| 885 | .settings = { |
| 886 | [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg, |
| 887 | [GPIOMUX_SUSPENDED] = &sdcc2_data_1_suspend_cfg, |
| 888 | }, |
| 889 | }, |
| 890 | { |
| 891 | /* DATA_0 */ |
| 892 | .gpio = 89, |
| 893 | .settings = { |
| 894 | [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg, |
| 895 | [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg, |
| 896 | }, |
| 897 | }, |
| 898 | { |
| 899 | /* CMD */ |
| 900 | .gpio = 97, |
| 901 | .settings = { |
| 902 | [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg, |
| 903 | [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg, |
| 904 | }, |
| 905 | }, |
| 906 | { |
| 907 | /* CLK */ |
| 908 | .gpio = 98, |
| 909 | .settings = { |
| 910 | [GPIOMUX_ACTIVE] = &sdcc2_clk_actv_cfg, |
| 911 | [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg, |
| 912 | }, |
| 913 | }, |
| 914 | }; |
| 915 | #endif |
| 916 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 917 | int __init msm8960_init_gpiomux(void) |
| 918 | { |
| 919 | int rc = msm_gpiomux_init(NR_GPIO_IRQS); |
| 920 | if (rc) { |
| 921 | pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); |
| 922 | return rc; |
| 923 | } |
| 924 | |
| 925 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 926 | msm_gpiomux_install(msm8960_ethernet_configs, |
| 927 | ARRAY_SIZE(msm8960_ethernet_configs)); |
| 928 | #endif |
| 929 | |
| 930 | msm_gpiomux_install(msm8960_gsbi_configs, |
| 931 | ARRAY_SIZE(msm8960_gsbi_configs)); |
| 932 | |
| 933 | msm_gpiomux_install(msm8960_cyts_configs, |
| 934 | ARRAY_SIZE(msm8960_cyts_configs)); |
| 935 | |
| 936 | msm_gpiomux_install(msm8960_slimbus_config, |
| 937 | ARRAY_SIZE(msm8960_slimbus_config)); |
| 938 | |
| 939 | msm_gpiomux_install(msm8960_audio_codec_configs, |
| 940 | ARRAY_SIZE(msm8960_audio_codec_configs)); |
| 941 | |
| 942 | msm_gpiomux_install(msm8960_audio_auxpcm_configs, |
| 943 | ARRAY_SIZE(msm8960_audio_auxpcm_configs)); |
| 944 | |
| 945 | msm_gpiomux_install(wcnss_5wire_interface, |
| 946 | ARRAY_SIZE(wcnss_5wire_interface)); |
| 947 | |
Pratibhasagar V | 26cf265 | 2012-01-12 17:31:21 +0530 | [diff] [blame] | 948 | #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT |
| 949 | msm_gpiomux_install(msm8960_sdcc4_configs, |
| 950 | ARRAY_SIZE(msm8960_sdcc4_configs)); |
| 951 | #endif |
| 952 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 953 | if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || |
| 954 | machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) |
| 955 | msm_gpiomux_install(hap_lvl_shft_config, |
| 956 | ARRAY_SIZE(hap_lvl_shft_config)); |
| 957 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 958 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
| 959 | if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 960 | machine_is_msm8960_liquid()) |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 961 | msm_gpiomux_install(msm8960_hsic_configs, |
| 962 | ARRAY_SIZE(msm8960_hsic_configs)); |
Vijayavardhan Vennapusa | afbbb8f | 2012-04-13 16:28:45 +0530 | [diff] [blame] | 963 | |
| 964 | if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && |
| 965 | machine_is_msm8960_liquid()) |
| 966 | msm_gpiomux_install(msm8960_hsic_hub_configs, |
| 967 | ARRAY_SIZE(msm8960_hsic_hub_configs)); |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 968 | #endif |
| 969 | |
| 970 | #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL |
| 971 | msm_gpiomux_install(msm8960_hdmi_configs, |
| 972 | ARRAY_SIZE(msm8960_hdmi_configs)); |
| 973 | #endif |
| 974 | |
| 975 | msm_gpiomux_install(msm8960_mdp_vsync_configs, |
| 976 | ARRAY_SIZE(msm8960_mdp_vsync_configs)); |
| 977 | |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 978 | if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) |
| 979 | msm_gpiomux_install(msm8960_gsbi8_uart_configs, |
| 980 | ARRAY_SIZE(msm8960_gsbi8_uart_configs)); |
| 981 | else |
| 982 | msm_gpiomux_install(msm8960_gsbi5_uart_configs, |
| 983 | ARRAY_SIZE(msm8960_gsbi5_uart_configs)); |
Satish Babu Patakokila | 95d659d | 2012-05-10 14:42:46 +0530 | [diff] [blame] | 984 | |
| 985 | if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { |
| 986 | /* For 8960 Fusion 2.2 Primary IPC */ |
Mayank Rana | e009c92 | 2012-03-22 03:02:06 +0530 | [diff] [blame] | 987 | msm_gpiomux_install(msm8960_fusion_gsbi_configs, |
| 988 | ARRAY_SIZE(msm8960_fusion_gsbi_configs)); |
Satish Babu Patakokila | 95d659d | 2012-05-10 14:42:46 +0530 | [diff] [blame] | 989 | /* For SGLTE 8960 Fusion External VFR */ |
| 990 | msm_gpiomux_install(msm8960_external_vfr_configs, |
| 991 | ARRAY_SIZE(msm8960_external_vfr_configs)); |
| 992 | } |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 993 | |
Pratibhasagar V | 57c808e | 2012-01-12 13:47:30 +0530 | [diff] [blame] | 994 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 995 | msm_gpiomux_install(msm8960_sdcc2_configs, |
| 996 | ARRAY_SIZE(msm8960_sdcc2_configs)); |
| 997 | #endif |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame^] | 998 | |
| 999 | if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) |
| 1000 | msm_gpiomux_install(sglte_configs, |
| 1001 | ARRAY_SIZE(sglte_configs)); |
| 1002 | |
Stepan Moskovchenko | 3b09bf5 | 2011-12-06 20:40:53 -0800 | [diff] [blame] | 1003 | return 0; |
| 1004 | } |