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