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