Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -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 <linux/init.h> |
| 15 | #include <linux/ioport.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/bootmem.h> |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 18 | #include <linux/gpio.h> |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 19 | #include <asm/mach-types.h> |
| 20 | #include <asm/mach/mmc.h> |
| 21 | #include <mach/msm_bus_board.h> |
| 22 | #include <mach/board.h> |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 23 | #include <mach/gpiomux.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 24 | #include <mach/socinfo.h> |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 25 | #include "devices.h" |
| 26 | #include "board-8064.h" |
| 27 | |
| 28 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 29 | static struct gpiomux_setting gpio_eth_config = { |
| 30 | .pull = GPIOMUX_PULL_NONE, |
| 31 | .drv = GPIOMUX_DRV_8MA, |
| 32 | .func = GPIOMUX_FUNC_GPIO, |
| 33 | }; |
| 34 | |
| 35 | /* The SPI configurations apply to GSBI 5*/ |
| 36 | static struct gpiomux_setting gpio_spi_config = { |
| 37 | .func = GPIOMUX_FUNC_2, |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 38 | .drv = GPIOMUX_DRV_12MA, |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 39 | .pull = GPIOMUX_PULL_NONE, |
| 40 | }; |
| 41 | |
| 42 | /* The SPI configurations apply to GSBI 5 chip select 2*/ |
| 43 | static struct gpiomux_setting gpio_spi_cs2_config = { |
| 44 | .func = GPIOMUX_FUNC_3, |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 45 | .drv = GPIOMUX_DRV_12MA, |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 46 | .pull = GPIOMUX_PULL_NONE, |
| 47 | }; |
| 48 | |
Hanumant Singh | 9a36119 | 2013-01-03 15:08:39 -0800 | [diff] [blame] | 49 | |
| 50 | struct msm_gpiomux_config apq8064_ethernet_configs[] = { |
| 51 | { |
| 52 | .gpio = 43, |
| 53 | .settings = { |
| 54 | [GPIOMUX_SUSPENDED] = &gpio_eth_config, |
| 55 | [GPIOMUX_ACTIVE] = &gpio_eth_config, |
| 56 | } |
| 57 | }, |
| 58 | }; |
| 59 | #endif |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 60 | /* Chip selects for SPI clients */ |
| 61 | static struct gpiomux_setting gpio_spi_cs_config = { |
| 62 | .func = GPIOMUX_FUNC_GPIO, |
| 63 | .drv = GPIOMUX_DRV_12MA, |
| 64 | .pull = GPIOMUX_PULL_UP, |
| 65 | }; |
| 66 | |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 67 | /* Chip selects for EPM SPI clients */ |
| 68 | static struct gpiomux_setting gpio_epm_spi_cs_config = { |
Siddartha Mohanadoss | 52015a5 | 2012-05-09 21:44:58 -0700 | [diff] [blame] | 69 | .func = GPIOMUX_FUNC_6, |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 70 | .drv = GPIOMUX_DRV_12MA, |
| 71 | .pull = GPIOMUX_PULL_UP, |
| 72 | }; |
| 73 | |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 74 | #ifdef CONFIG_MSM_VCAP |
| 75 | static struct gpiomux_setting gpio_vcap_config[] = { |
| 76 | { |
| 77 | .func = GPIOMUX_FUNC_GPIO, |
| 78 | .drv = GPIOMUX_DRV_2MA, |
| 79 | .pull = GPIOMUX_PULL_DOWN, |
| 80 | }, |
| 81 | { |
| 82 | .func = GPIOMUX_FUNC_1, |
| 83 | .drv = GPIOMUX_DRV_2MA, |
| 84 | .pull = GPIOMUX_PULL_DOWN, |
| 85 | }, |
| 86 | { |
| 87 | .func = GPIOMUX_FUNC_2, |
| 88 | .drv = GPIOMUX_DRV_2MA, |
| 89 | .pull = GPIOMUX_PULL_DOWN, |
| 90 | }, |
| 91 | { |
| 92 | .func = GPIOMUX_FUNC_3, |
| 93 | .drv = GPIOMUX_DRV_2MA, |
| 94 | .pull = GPIOMUX_PULL_DOWN, |
| 95 | }, |
| 96 | { |
| 97 | .func = GPIOMUX_FUNC_4, |
| 98 | .drv = GPIOMUX_DRV_2MA, |
| 99 | .pull = GPIOMUX_PULL_DOWN, |
| 100 | }, |
| 101 | { |
| 102 | .func = GPIOMUX_FUNC_5, |
| 103 | .drv = GPIOMUX_DRV_2MA, |
| 104 | .pull = GPIOMUX_PULL_DOWN, |
| 105 | }, |
| 106 | { |
| 107 | .func = GPIOMUX_FUNC_6, |
| 108 | .drv = GPIOMUX_DRV_2MA, |
| 109 | .pull = GPIOMUX_PULL_DOWN, |
| 110 | }, |
| 111 | { |
| 112 | .func = GPIOMUX_FUNC_7, |
| 113 | .drv = GPIOMUX_DRV_2MA, |
| 114 | .pull = GPIOMUX_PULL_DOWN, |
| 115 | }, |
| 116 | { |
| 117 | .func = GPIOMUX_FUNC_8, |
| 118 | .drv = GPIOMUX_DRV_2MA, |
| 119 | .pull = GPIOMUX_PULL_DOWN, |
| 120 | }, |
| 121 | { |
| 122 | .func = GPIOMUX_FUNC_9, |
| 123 | .drv = GPIOMUX_DRV_2MA, |
| 124 | .pull = GPIOMUX_PULL_DOWN, |
| 125 | }, |
| 126 | { |
| 127 | .func = GPIOMUX_FUNC_A, |
| 128 | .drv = GPIOMUX_DRV_2MA, |
| 129 | .pull = GPIOMUX_PULL_DOWN, |
| 130 | }, |
| 131 | }; |
| 132 | |
| 133 | struct msm_gpiomux_config vcap_configs[] = { |
| 134 | { |
| 135 | .gpio = 20, |
| 136 | .settings = { |
| 137 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[7], |
| 138 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[7], |
| 139 | } |
| 140 | }, |
| 141 | { |
| 142 | .gpio = 25, |
| 143 | .settings = { |
| 144 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 145 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 146 | } |
| 147 | }, |
| 148 | { |
| 149 | .gpio = 24, |
| 150 | .settings = { |
| 151 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[1], |
| 152 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[1], |
| 153 | } |
| 154 | }, |
| 155 | { |
| 156 | .gpio = 23, |
| 157 | .settings = { |
| 158 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 159 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 160 | } |
| 161 | }, |
| 162 | { |
| 163 | .gpio = 19, |
| 164 | .settings = { |
| 165 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[8], |
| 166 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[8], |
| 167 | } |
| 168 | }, |
| 169 | { |
| 170 | .gpio = 22, |
| 171 | .settings = { |
| 172 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 173 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 174 | } |
| 175 | }, |
| 176 | { |
| 177 | .gpio = 21, |
| 178 | .settings = { |
| 179 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[7], |
| 180 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[7], |
| 181 | } |
| 182 | }, |
| 183 | { |
| 184 | .gpio = 12, |
| 185 | .settings = { |
| 186 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[6], |
| 187 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[6], |
| 188 | } |
| 189 | }, |
| 190 | { |
| 191 | .gpio = 18, |
| 192 | .settings = { |
| 193 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[9], |
| 194 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[9], |
| 195 | } |
| 196 | }, |
| 197 | { |
| 198 | .gpio = 11, |
| 199 | .settings = { |
| 200 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[10], |
| 201 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[10], |
| 202 | } |
| 203 | }, |
| 204 | { |
| 205 | .gpio = 10, |
| 206 | .settings = { |
| 207 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[9], |
| 208 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[9], |
| 209 | } |
| 210 | }, |
| 211 | { |
| 212 | .gpio = 9, |
| 213 | .settings = { |
| 214 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 215 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 216 | } |
| 217 | }, |
| 218 | { |
| 219 | .gpio = 26, |
| 220 | .settings = { |
| 221 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[1], |
| 222 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[1], |
| 223 | } |
| 224 | }, |
| 225 | { |
| 226 | .gpio = 8, |
| 227 | .settings = { |
| 228 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[3], |
| 229 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[3], |
| 230 | } |
| 231 | }, |
| 232 | { |
| 233 | .gpio = 7, |
| 234 | .settings = { |
| 235 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[7], |
| 236 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[7], |
| 237 | } |
| 238 | }, |
| 239 | { |
| 240 | .gpio = 6, |
| 241 | .settings = { |
| 242 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[7], |
| 243 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[7], |
| 244 | } |
| 245 | }, |
| 246 | { |
| 247 | .gpio = 80, |
| 248 | .settings = { |
| 249 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 250 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 251 | } |
| 252 | }, |
| 253 | { |
| 254 | .gpio = 86, |
| 255 | .settings = { |
| 256 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[1], |
| 257 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[1], |
| 258 | } |
| 259 | }, |
| 260 | { |
| 261 | .gpio = 85, |
| 262 | .settings = { |
| 263 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[4], |
| 264 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[4], |
| 265 | } |
| 266 | }, |
| 267 | { |
| 268 | .gpio = 84, |
| 269 | .settings = { |
| 270 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[3], |
| 271 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[3], |
| 272 | } |
| 273 | }, |
| 274 | { |
| 275 | .gpio = 5, |
| 276 | .settings = { |
| 277 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 278 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 279 | } |
| 280 | }, |
| 281 | { |
| 282 | .gpio = 4, |
| 283 | .settings = { |
| 284 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[3], |
| 285 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[3], |
| 286 | } |
| 287 | }, |
| 288 | { |
| 289 | .gpio = 3, |
| 290 | .settings = { |
| 291 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[6], |
| 292 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[6], |
| 293 | } |
| 294 | }, |
| 295 | { |
| 296 | .gpio = 2, |
| 297 | .settings = { |
| 298 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[5], |
| 299 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[5], |
| 300 | } |
| 301 | }, |
| 302 | { |
| 303 | .gpio = 82, |
| 304 | .settings = { |
| 305 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[4], |
| 306 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[4], |
| 307 | } |
| 308 | }, |
| 309 | { |
| 310 | .gpio = 83, |
| 311 | .settings = { |
| 312 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[4], |
| 313 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[4], |
| 314 | } |
| 315 | }, |
| 316 | { |
| 317 | .gpio = 87, |
| 318 | .settings = { |
| 319 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[2], |
| 320 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[2], |
| 321 | } |
| 322 | }, |
| 323 | { |
| 324 | .gpio = 13, |
| 325 | .settings = { |
| 326 | [GPIOMUX_SUSPENDED] = &gpio_vcap_config[6], |
| 327 | [GPIOMUX_ACTIVE] = &gpio_vcap_config[6], |
| 328 | } |
| 329 | }, |
| 330 | }; |
| 331 | #endif |
| 332 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 333 | static struct gpiomux_setting gpio_i2c_config = { |
| 334 | .func = GPIOMUX_FUNC_1, |
| 335 | .drv = GPIOMUX_DRV_8MA, |
| 336 | .pull = GPIOMUX_PULL_NONE, |
| 337 | }; |
| 338 | |
| 339 | static struct gpiomux_setting gpio_i2c_config_sus = { |
| 340 | .func = GPIOMUX_FUNC_1, |
| 341 | .drv = GPIOMUX_DRV_2MA, |
| 342 | .pull = GPIOMUX_PULL_KEEPER, |
| 343 | }; |
| 344 | |
Joonwoo Park | ca1516f | 2012-05-08 13:59:37 -0700 | [diff] [blame] | 345 | static struct gpiomux_setting mbhc_hs_detect = { |
| 346 | .func = GPIOMUX_FUNC_1, |
| 347 | .drv = GPIOMUX_DRV_2MA, |
| 348 | .pull = GPIOMUX_PULL_NONE, |
| 349 | }; |
| 350 | |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 351 | static struct gpiomux_setting cdc_mclk = { |
| 352 | .func = GPIOMUX_FUNC_1, |
| 353 | .drv = GPIOMUX_DRV_8MA, |
| 354 | .pull = GPIOMUX_PULL_NONE, |
| 355 | }; |
| 356 | |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 357 | static struct gpiomux_setting wcnss_5wire_suspend_cfg = { |
| 358 | .func = GPIOMUX_FUNC_GPIO, |
| 359 | .drv = GPIOMUX_DRV_2MA, |
| 360 | .pull = GPIOMUX_PULL_UP, |
| 361 | }; |
| 362 | |
| 363 | static struct gpiomux_setting wcnss_5wire_active_cfg = { |
| 364 | .func = GPIOMUX_FUNC_1, |
| 365 | .drv = GPIOMUX_DRV_6MA, |
| 366 | .pull = GPIOMUX_PULL_DOWN, |
| 367 | }; |
| 368 | |
| 369 | |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 370 | static struct gpiomux_setting slimbus = { |
| 371 | .func = GPIOMUX_FUNC_1, |
| 372 | .drv = GPIOMUX_DRV_8MA, |
| 373 | .pull = GPIOMUX_PULL_KEEPER, |
| 374 | }; |
| 375 | |
Stepan Moskovchenko | 5ea3c31 | 2012-01-31 18:19:40 -0800 | [diff] [blame] | 376 | static struct gpiomux_setting gsbi1_uart_config = { |
| 377 | .func = GPIOMUX_FUNC_1, |
| 378 | .drv = GPIOMUX_DRV_16MA, |
| 379 | .pull = GPIOMUX_PULL_NONE, |
| 380 | }; |
| 381 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 382 | static struct gpiomux_setting ext_regulator_config = { |
| 383 | .func = GPIOMUX_FUNC_GPIO, |
| 384 | .drv = GPIOMUX_DRV_8MA, |
| 385 | .pull = GPIOMUX_PULL_NONE, |
| 386 | .dir = GPIOMUX_OUT_LOW, |
| 387 | }; |
| 388 | |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 389 | static struct gpiomux_setting gsbi7_func1_cfg = { |
| 390 | .func = GPIOMUX_FUNC_1, |
| 391 | .drv = GPIOMUX_DRV_8MA, |
| 392 | .pull = GPIOMUX_PULL_NONE, |
| 393 | }; |
| 394 | |
| 395 | static struct gpiomux_setting gsbi7_func2_cfg = { |
| 396 | .func = GPIOMUX_FUNC_2, |
| 397 | .drv = GPIOMUX_DRV_8MA, |
| 398 | .pull = GPIOMUX_PULL_NONE, |
| 399 | }; |
| 400 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 401 | static struct gpiomux_setting gsbi3_suspended_cfg = { |
| 402 | .func = GPIOMUX_FUNC_1, |
| 403 | .drv = GPIOMUX_DRV_2MA, |
| 404 | .pull = GPIOMUX_PULL_KEEPER, |
| 405 | }; |
| 406 | |
| 407 | static struct gpiomux_setting gsbi3_active_cfg = { |
| 408 | .func = GPIOMUX_FUNC_1, |
| 409 | .drv = GPIOMUX_DRV_8MA, |
| 410 | .pull = GPIOMUX_PULL_NONE, |
| 411 | }; |
| 412 | |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 413 | static struct gpiomux_setting hdmi_suspend_cfg = { |
| 414 | .func = GPIOMUX_FUNC_GPIO, |
| 415 | .drv = GPIOMUX_DRV_2MA, |
| 416 | .pull = GPIOMUX_PULL_DOWN, |
| 417 | }; |
| 418 | |
| 419 | static struct gpiomux_setting hdmi_active_1_cfg = { |
| 420 | .func = GPIOMUX_FUNC_1, |
| 421 | .drv = GPIOMUX_DRV_2MA, |
| 422 | .pull = GPIOMUX_PULL_UP, |
| 423 | }; |
| 424 | |
| 425 | static struct gpiomux_setting hdmi_active_2_cfg = { |
| 426 | .func = GPIOMUX_FUNC_1, |
| 427 | .drv = GPIOMUX_DRV_16MA, |
| 428 | .pull = GPIOMUX_PULL_DOWN, |
| 429 | }; |
| 430 | |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 431 | static struct gpiomux_setting gsbi5_suspended_cfg = { |
| 432 | .func = GPIOMUX_FUNC_2, |
| 433 | .drv = GPIOMUX_DRV_12MA, |
| 434 | .pull = GPIOMUX_PULL_NONE, |
| 435 | }; |
| 436 | |
| 437 | static struct gpiomux_setting gsbi5_active_cfg = { |
| 438 | .func = GPIOMUX_FUNC_2, |
| 439 | .drv = GPIOMUX_DRV_12MA, |
| 440 | .pull = GPIOMUX_PULL_NONE, |
| 441 | }; |
Anirudh Ghayal | 9f1aaa7 | 2012-04-26 18:15:08 +0530 | [diff] [blame] | 442 | |
| 443 | static struct gpiomux_setting sx150x_suspended_cfg = { |
| 444 | .func = GPIOMUX_FUNC_GPIO, |
| 445 | .drv = GPIOMUX_DRV_8MA, |
| 446 | .pull = GPIOMUX_PULL_NONE, |
| 447 | }; |
| 448 | |
| 449 | static struct gpiomux_setting sx150x_active_cfg = { |
| 450 | .func = GPIOMUX_FUNC_GPIO, |
| 451 | .drv = GPIOMUX_DRV_8MA, |
| 452 | .pull = GPIOMUX_PULL_NONE, |
| 453 | }; |
| 454 | |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 455 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 456 | static struct gpiomux_setting cyts_sleep_sus_cfg = { |
| 457 | .func = GPIOMUX_FUNC_GPIO, |
| 458 | .drv = GPIOMUX_DRV_6MA, |
| 459 | .pull = GPIOMUX_PULL_DOWN, |
| 460 | }; |
| 461 | |
| 462 | static struct gpiomux_setting cyts_sleep_act_cfg = { |
| 463 | .func = GPIOMUX_FUNC_GPIO, |
| 464 | .drv = GPIOMUX_DRV_6MA, |
| 465 | .pull = GPIOMUX_PULL_DOWN, |
| 466 | }; |
| 467 | |
| 468 | static struct gpiomux_setting cyts_int_act_cfg = { |
| 469 | .func = GPIOMUX_FUNC_GPIO, |
| 470 | .drv = GPIOMUX_DRV_8MA, |
| 471 | .pull = GPIOMUX_PULL_UP, |
| 472 | }; |
| 473 | |
| 474 | static struct gpiomux_setting cyts_int_sus_cfg = { |
| 475 | .func = GPIOMUX_FUNC_GPIO, |
| 476 | .drv = GPIOMUX_DRV_2MA, |
| 477 | .pull = GPIOMUX_PULL_DOWN, |
| 478 | }; |
| 479 | |
| 480 | static struct msm_gpiomux_config cyts_gpio_configs[] __initdata = { |
| 481 | { /* TS INTERRUPT */ |
| 482 | .gpio = 6, |
| 483 | .settings = { |
| 484 | [GPIOMUX_ACTIVE] = &cyts_int_act_cfg, |
| 485 | [GPIOMUX_SUSPENDED] = &cyts_int_sus_cfg, |
| 486 | }, |
| 487 | }, |
| 488 | { /* TS SLEEP */ |
| 489 | .gpio = 33, |
| 490 | .settings = { |
| 491 | [GPIOMUX_ACTIVE] = &cyts_sleep_act_cfg, |
| 492 | [GPIOMUX_SUSPENDED] = &cyts_sleep_sus_cfg, |
| 493 | }, |
| 494 | }, |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 495 | }; |
Amy Maloche | 609bb5e | 2012-08-03 09:41:42 -0700 | [diff] [blame] | 496 | static struct msm_gpiomux_config cyts_gpio_alt_config[] __initdata = { |
| 497 | { /* TS INTERRUPT */ |
| 498 | .gpio = 6, |
| 499 | .settings = { |
| 500 | [GPIOMUX_ACTIVE] = &cyts_int_act_cfg, |
| 501 | [GPIOMUX_SUSPENDED] = &cyts_int_sus_cfg, |
| 502 | }, |
| 503 | }, |
| 504 | { /* TS SLEEP */ |
| 505 | .gpio = 12, |
| 506 | .settings = { |
| 507 | [GPIOMUX_ACTIVE] = &cyts_sleep_act_cfg, |
| 508 | [GPIOMUX_SUSPENDED] = &cyts_sleep_sus_cfg, |
| 509 | }, |
| 510 | }, |
| 511 | }; |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 512 | |
Amy Maloche | 9ba3ffe | 2012-04-26 10:31:20 -0700 | [diff] [blame] | 513 | static struct gpiomux_setting hsic_act_cfg = { |
| 514 | .func = GPIOMUX_FUNC_1, |
| 515 | .drv = GPIOMUX_DRV_8MA, |
| 516 | .pull = GPIOMUX_PULL_NONE, |
| 517 | }; |
| 518 | |
| 519 | static struct gpiomux_setting hsic_sus_cfg = { |
| 520 | .func = GPIOMUX_FUNC_GPIO, |
| 521 | .drv = GPIOMUX_DRV_2MA, |
| 522 | .pull = GPIOMUX_PULL_DOWN, |
| 523 | .dir = GPIOMUX_OUT_LOW, |
| 524 | }; |
| 525 | |
Hemant Kumar | 6fd6503 | 2012-05-23 13:02:24 -0700 | [diff] [blame] | 526 | static struct gpiomux_setting hsic_wakeup_act_cfg = { |
| 527 | .func = GPIOMUX_FUNC_GPIO, |
| 528 | .drv = GPIOMUX_DRV_8MA, |
| 529 | .pull = GPIOMUX_PULL_DOWN, |
| 530 | .dir = GPIOMUX_IN, |
| 531 | }; |
| 532 | |
| 533 | static struct gpiomux_setting hsic_wakeup_sus_cfg = { |
| 534 | .func = GPIOMUX_FUNC_GPIO, |
| 535 | .drv = GPIOMUX_DRV_2MA, |
| 536 | .pull = GPIOMUX_PULL_DOWN, |
| 537 | .dir = GPIOMUX_IN, |
| 538 | }; |
Amy Maloche | 9ba3ffe | 2012-04-26 10:31:20 -0700 | [diff] [blame] | 539 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 540 | static struct msm_gpiomux_config apq8064_hsic_configs[] = { |
| 541 | { |
| 542 | .gpio = 88, /*HSIC_STROBE */ |
| 543 | .settings = { |
| 544 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 545 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 546 | }, |
| 547 | }, |
| 548 | { |
| 549 | .gpio = 89, /* HSIC_DATA */ |
| 550 | .settings = { |
| 551 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 552 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 553 | }, |
| 554 | }, |
Hemant Kumar | 6fd6503 | 2012-05-23 13:02:24 -0700 | [diff] [blame] | 555 | { |
| 556 | .gpio = 47, /* wake up */ |
| 557 | .settings = { |
| 558 | [GPIOMUX_ACTIVE] = &hsic_wakeup_act_cfg, |
| 559 | [GPIOMUX_SUSPENDED] = &hsic_wakeup_sus_cfg, |
| 560 | }, |
| 561 | }, |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 562 | }; |
| 563 | #endif |
| 564 | |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 565 | static struct gpiomux_setting mxt_reset_sus_cfg = { |
| 566 | .func = GPIOMUX_FUNC_GPIO, |
| 567 | .drv = GPIOMUX_DRV_6MA, |
| 568 | .pull = GPIOMUX_PULL_DOWN, |
| 569 | }; |
| 570 | |
| 571 | static struct gpiomux_setting mxt_reset_act_cfg = { |
| 572 | .func = GPIOMUX_FUNC_GPIO, |
| 573 | .drv = GPIOMUX_DRV_6MA, |
| 574 | .pull = GPIOMUX_PULL_UP, |
| 575 | }; |
| 576 | |
| 577 | static struct gpiomux_setting mxt_int_sus_cfg = { |
| 578 | .func = GPIOMUX_FUNC_GPIO, |
| 579 | .drv = GPIOMUX_DRV_2MA, |
| 580 | .pull = GPIOMUX_PULL_DOWN, |
| 581 | }; |
| 582 | |
| 583 | static struct gpiomux_setting mxt_int_act_cfg = { |
| 584 | .func = GPIOMUX_FUNC_GPIO, |
| 585 | .drv = GPIOMUX_DRV_8MA, |
| 586 | .pull = GPIOMUX_PULL_UP, |
| 587 | }; |
| 588 | |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 589 | static struct msm_gpiomux_config apq8064_hdmi_configs[] __initdata = { |
| 590 | { |
| 591 | .gpio = 69, |
| 592 | .settings = { |
| 593 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 594 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 595 | }, |
| 596 | }, |
| 597 | { |
| 598 | .gpio = 70, |
| 599 | .settings = { |
| 600 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 601 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 602 | }, |
| 603 | }, |
| 604 | { |
| 605 | .gpio = 71, |
| 606 | .settings = { |
| 607 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 608 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 609 | }, |
| 610 | }, |
| 611 | { |
| 612 | .gpio = 72, |
| 613 | .settings = { |
| 614 | [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg, |
| 615 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 616 | }, |
| 617 | }, |
| 618 | }; |
| 619 | |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 620 | static struct msm_gpiomux_config apq8064_gsbi_configs[] __initdata = { |
Stepan Moskovchenko | 5ea3c31 | 2012-01-31 18:19:40 -0800 | [diff] [blame] | 621 | { |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 622 | .gpio = 8, /* GSBI3 I2C QUP SDA */ |
| 623 | .settings = { |
| 624 | [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg, |
| 625 | [GPIOMUX_ACTIVE] = &gsbi3_active_cfg, |
| 626 | }, |
| 627 | }, |
| 628 | { |
| 629 | .gpio = 9, /* GSBI3 I2C QUP SCL */ |
| 630 | .settings = { |
| 631 | [GPIOMUX_SUSPENDED] = &gsbi3_suspended_cfg, |
| 632 | [GPIOMUX_ACTIVE] = &gsbi3_active_cfg, |
| 633 | }, |
| 634 | }, |
| 635 | { |
Stepan Moskovchenko | 5ea3c31 | 2012-01-31 18:19:40 -0800 | [diff] [blame] | 636 | .gpio = 18, /* GSBI1 UART TX */ |
| 637 | .settings = { |
| 638 | [GPIOMUX_SUSPENDED] = &gsbi1_uart_config, |
| 639 | }, |
| 640 | }, |
| 641 | { |
| 642 | .gpio = 19, /* GSBI1 UART RX */ |
| 643 | .settings = { |
| 644 | [GPIOMUX_SUSPENDED] = &gsbi1_uart_config, |
| 645 | }, |
| 646 | }, |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 647 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 648 | { |
| 649 | .gpio = 51, /* GSBI5 QUP SPI_DATA_MOSI */ |
| 650 | .settings = { |
| 651 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 652 | }, |
| 653 | }, |
| 654 | { |
| 655 | .gpio = 52, /* GSBI5 QUP SPI_DATA_MISO */ |
| 656 | .settings = { |
| 657 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 658 | }, |
| 659 | }, |
| 660 | { |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 661 | .gpio = 53, /* Funny CS0 */ |
| 662 | .settings = { |
| 663 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 664 | }, |
| 665 | }, |
| 666 | { |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 667 | .gpio = 31, /* GSBI5 QUP SPI_CS2_N */ |
| 668 | .settings = { |
| 669 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config, |
| 670 | }, |
| 671 | }, |
| 672 | { |
| 673 | .gpio = 54, /* GSBI5 QUP SPI_CLK */ |
| 674 | .settings = { |
| 675 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 676 | }, |
| 677 | }, |
| 678 | #endif |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 679 | { |
| 680 | .gpio = 30, /* FP CS */ |
| 681 | .settings = { |
| 682 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs_config, |
| 683 | }, |
| 684 | }, |
| 685 | { |
| 686 | .gpio = 32, /* EPM CS */ |
| 687 | .settings = { |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 688 | [GPIOMUX_SUSPENDED] = &gpio_epm_spi_cs_config, |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 689 | }, |
| 690 | }, |
| 691 | { |
| 692 | .gpio = 53, /* NOR CS */ |
| 693 | .settings = { |
| 694 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs_config, |
| 695 | }, |
| 696 | }, |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 697 | { |
| 698 | .gpio = 82, /* GSBI7 UART2 TX */ |
| 699 | .settings = { |
| 700 | [GPIOMUX_SUSPENDED] = &gsbi7_func2_cfg, |
| 701 | }, |
| 702 | }, |
| 703 | { |
| 704 | .gpio = 83, /* GSBI7 UART2 RX */ |
| 705 | .settings = { |
| 706 | [GPIOMUX_SUSPENDED] = &gsbi7_func1_cfg, |
| 707 | }, |
| 708 | }, |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 709 | { |
| 710 | .gpio = 21, /* GSBI1 QUP I2C_CLK */ |
| 711 | .settings = { |
| 712 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config_sus, |
| 713 | [GPIOMUX_ACTIVE] = &gpio_i2c_config, |
| 714 | }, |
| 715 | }, |
| 716 | { |
| 717 | .gpio = 20, /* GSBI1 QUP I2C_DATA */ |
| 718 | .settings = { |
| 719 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config_sus, |
| 720 | [GPIOMUX_ACTIVE] = &gpio_i2c_config, |
| 721 | }, |
| 722 | }, |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 723 | }; |
| 724 | |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 725 | static struct msm_gpiomux_config apq8064_slimbus_config[] __initdata = { |
| 726 | { |
| 727 | .gpio = 40, /* slimbus clk */ |
| 728 | .settings = { |
| 729 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 730 | }, |
| 731 | }, |
| 732 | { |
| 733 | .gpio = 41, /* slimbus data */ |
| 734 | .settings = { |
| 735 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 736 | }, |
| 737 | }, |
| 738 | }; |
| 739 | |
Santosh Mardi | eff9a74 | 2012-04-09 23:23:39 +0530 | [diff] [blame] | 740 | static struct gpiomux_setting spkr_i2c = { |
| 741 | .func = GPIOMUX_FUNC_1, |
| 742 | .drv = GPIOMUX_DRV_8MA, |
| 743 | .pull = GPIOMUX_PULL_KEEPER, |
| 744 | }; |
| 745 | |
| 746 | static struct msm_gpiomux_config mpq8064_spkr_i2s_config[] __initdata = { |
| 747 | { |
| 748 | .gpio = 47, /* spkr i2c sck */ |
| 749 | .settings = { |
| 750 | [GPIOMUX_SUSPENDED] = &spkr_i2c, |
| 751 | }, |
| 752 | }, |
| 753 | { |
| 754 | .gpio = 48, /* spkr_i2s_ws */ |
| 755 | .settings = { |
| 756 | [GPIOMUX_SUSPENDED] = &spkr_i2c, |
| 757 | }, |
| 758 | }, |
| 759 | { |
| 760 | .gpio = 49, /* spkr_i2s_dout */ |
| 761 | .settings = { |
| 762 | [GPIOMUX_SUSPENDED] = &spkr_i2c, |
| 763 | }, |
| 764 | }, |
| 765 | { |
| 766 | .gpio = 50, /* spkr_i2s_mclk */ |
| 767 | .settings = { |
| 768 | [GPIOMUX_SUSPENDED] = &spkr_i2c, |
| 769 | }, |
| 770 | }, |
| 771 | }; |
| 772 | |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 773 | static struct msm_gpiomux_config apq8064_audio_codec_configs[] __initdata = { |
| 774 | { |
Joonwoo Park | ca1516f | 2012-05-08 13:59:37 -0700 | [diff] [blame] | 775 | .gpio = 38, |
| 776 | .settings = { |
| 777 | [GPIOMUX_SUSPENDED] = &mbhc_hs_detect, |
| 778 | }, |
| 779 | }, |
| 780 | { |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 781 | .gpio = 39, |
| 782 | .settings = { |
| 783 | [GPIOMUX_SUSPENDED] = &cdc_mclk, |
| 784 | }, |
| 785 | }, |
| 786 | }; |
| 787 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 788 | /* External 3.3 V regulator enable */ |
| 789 | static struct msm_gpiomux_config apq8064_ext_regulator_configs[] __initdata = { |
| 790 | { |
| 791 | .gpio = APQ8064_EXT_3P3V_REG_EN_GPIO, |
| 792 | .settings = { |
| 793 | [GPIOMUX_SUSPENDED] = &ext_regulator_config, |
| 794 | }, |
| 795 | }, |
| 796 | }; |
| 797 | |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 798 | static struct gpiomux_setting ap2mdm_cfg = { |
| 799 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 800 | .drv = GPIOMUX_DRV_4MA, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 801 | .pull = GPIOMUX_PULL_DOWN, |
| 802 | }; |
| 803 | |
| 804 | static struct gpiomux_setting mdm2ap_status_cfg = { |
| 805 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 806 | .drv = GPIOMUX_DRV_2MA, |
Joel King | 269aa60 | 2012-07-23 08:07:35 -0700 | [diff] [blame] | 807 | .pull = GPIOMUX_PULL_DOWN, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 808 | }; |
| 809 | |
| 810 | static struct gpiomux_setting mdm2ap_errfatal_cfg = { |
| 811 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 812 | .drv = GPIOMUX_DRV_2MA, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 813 | .pull = GPIOMUX_PULL_DOWN, |
| 814 | }; |
| 815 | |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 816 | static struct gpiomux_setting mdm2ap_pblrdy = { |
| 817 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 818 | .drv = GPIOMUX_DRV_2MA, |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 819 | .pull = GPIOMUX_PULL_DOWN, |
| 820 | }; |
| 821 | |
| 822 | |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 823 | static struct gpiomux_setting ap2mdm_soft_reset_cfg = { |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 824 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 825 | .drv = GPIOMUX_DRV_4MA, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 826 | .pull = GPIOMUX_PULL_DOWN, |
| 827 | }; |
| 828 | |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 829 | static struct gpiomux_setting ap2mdm_wakeup = { |
| 830 | .func = GPIOMUX_FUNC_GPIO, |
Taniya Das | 389853a | 2012-12-27 17:26:27 +0530 | [diff] [blame] | 831 | .drv = GPIOMUX_DRV_4MA, |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 832 | .pull = GPIOMUX_PULL_DOWN, |
| 833 | }; |
| 834 | |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 835 | static struct msm_gpiomux_config mdm_configs[] __initdata = { |
| 836 | /* AP2MDM_STATUS */ |
| 837 | { |
| 838 | .gpio = 48, |
| 839 | .settings = { |
| 840 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 841 | } |
| 842 | }, |
| 843 | /* MDM2AP_STATUS */ |
| 844 | { |
| 845 | .gpio = 49, |
| 846 | .settings = { |
Joel King | 269aa60 | 2012-07-23 08:07:35 -0700 | [diff] [blame] | 847 | [GPIOMUX_ACTIVE] = &mdm2ap_status_cfg, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 848 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 849 | } |
| 850 | }, |
| 851 | /* MDM2AP_ERRFATAL */ |
| 852 | { |
| 853 | .gpio = 19, |
| 854 | .settings = { |
| 855 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 856 | } |
| 857 | }, |
| 858 | /* AP2MDM_ERRFATAL */ |
| 859 | { |
| 860 | .gpio = 18, |
| 861 | .settings = { |
| 862 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 863 | } |
| 864 | }, |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 865 | /* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */ |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 866 | { |
| 867 | .gpio = 27, |
| 868 | .settings = { |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 869 | [GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 870 | } |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 871 | }, |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 872 | /* AP2MDM_WAKEUP */ |
| 873 | { |
| 874 | .gpio = 35, |
| 875 | .settings = { |
| 876 | [GPIOMUX_SUSPENDED] = &ap2mdm_wakeup, |
| 877 | } |
| 878 | }, |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 879 | /* MDM2AP_PBL_READY*/ |
| 880 | { |
| 881 | .gpio = 46, |
| 882 | .settings = { |
| 883 | [GPIOMUX_SUSPENDED] = &mdm2ap_pblrdy, |
| 884 | } |
| 885 | }, |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 886 | }; |
| 887 | |
Ameya Thakur | 2702baf | 2013-01-30 11:55:25 -0800 | [diff] [blame] | 888 | static struct msm_gpiomux_config amdm_configs[] __initdata = { |
| 889 | /* AP2MDM_STATUS */ |
| 890 | { |
| 891 | .gpio = 48, |
| 892 | .settings = { |
| 893 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 894 | } |
| 895 | }, |
| 896 | /* MDM2AP_STATUS */ |
| 897 | { |
| 898 | .gpio = 49, |
| 899 | .settings = { |
| 900 | [GPIOMUX_ACTIVE] = &mdm2ap_status_cfg, |
| 901 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 902 | } |
| 903 | }, |
| 904 | /* MDM2AP_ERRFATAL */ |
| 905 | { |
| 906 | .gpio = 19, |
| 907 | .settings = { |
| 908 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 909 | } |
| 910 | }, |
| 911 | /* AP2MDM_ERRFATAL */ |
| 912 | { |
| 913 | .gpio = 18, |
| 914 | .settings = { |
| 915 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 916 | } |
| 917 | }, |
| 918 | /* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */ |
| 919 | { |
| 920 | .gpio = 27, |
| 921 | .settings = { |
| 922 | [GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg, |
| 923 | } |
| 924 | }, |
| 925 | /* AP2MDM_WAKEUP */ |
| 926 | { |
| 927 | .gpio = 35, |
| 928 | .settings = { |
| 929 | [GPIOMUX_SUSPENDED] = &ap2mdm_wakeup, |
| 930 | } |
| 931 | }, |
| 932 | /* MDM2AP_PBL_READY*/ |
| 933 | { |
| 934 | .gpio = 31, |
| 935 | .settings = { |
| 936 | [GPIOMUX_SUSPENDED] = &mdm2ap_pblrdy, |
| 937 | } |
| 938 | }, |
| 939 | }; |
| 940 | |
| 941 | static struct msm_gpiomux_config bmdm_configs[] __initdata = { |
| 942 | /* AP2MDM_STATUS */ |
| 943 | { |
| 944 | .gpio = 56, |
| 945 | .settings = { |
| 946 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 947 | } |
| 948 | }, |
| 949 | /* MDM2AP_STATUS */ |
| 950 | { |
| 951 | .gpio = 32, |
| 952 | .settings = { |
| 953 | [GPIOMUX_ACTIVE] = &mdm2ap_status_cfg, |
| 954 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 955 | } |
| 956 | }, |
| 957 | /* MDM2AP_ERRFATAL */ |
| 958 | { |
| 959 | .gpio = 81, |
| 960 | .settings = { |
| 961 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 962 | } |
| 963 | }, |
| 964 | /* AP2MDM_ERRFATAL */ |
| 965 | { |
| 966 | .gpio = 18, |
| 967 | .settings = { |
| 968 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 969 | } |
| 970 | }, |
| 971 | /* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */ |
| 972 | { |
| 973 | .gpio = 3, |
| 974 | .settings = { |
| 975 | [GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg, |
| 976 | } |
| 977 | }, |
| 978 | /* AP2MDM_WAKEUP */ |
| 979 | { |
| 980 | .gpio = 29, |
| 981 | .settings = { |
| 982 | [GPIOMUX_SUSPENDED] = &ap2mdm_wakeup, |
| 983 | } |
| 984 | }, |
| 985 | }; |
| 986 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 987 | static struct msm_gpiomux_config mdm_i2s_configs[] __initdata = { |
| 988 | /* AP2MDM_STATUS */ |
| 989 | { |
| 990 | .gpio = 48, |
| 991 | .settings = { |
| 992 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 993 | } |
| 994 | }, |
| 995 | /* MDM2AP_STATUS */ |
| 996 | { |
| 997 | .gpio = 49, |
| 998 | .settings = { |
| 999 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 1000 | } |
| 1001 | }, |
| 1002 | /* MDM2AP_ERRFATAL */ |
| 1003 | { |
| 1004 | .gpio = 19, |
| 1005 | .settings = { |
| 1006 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 1007 | } |
| 1008 | }, |
| 1009 | /* AP2MDM_ERRFATAL */ |
| 1010 | { |
| 1011 | .gpio = 18, |
| 1012 | .settings = { |
| 1013 | [GPIOMUX_SUSPENDED] = &ap2mdm_cfg, |
| 1014 | } |
| 1015 | }, |
| 1016 | /* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */ |
| 1017 | { |
| 1018 | .gpio = 0, |
| 1019 | .settings = { |
| 1020 | [GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg, |
| 1021 | } |
| 1022 | }, |
| 1023 | /* AP2MDM_WAKEUP */ |
| 1024 | { |
| 1025 | .gpio = 44, |
| 1026 | .settings = { |
| 1027 | [GPIOMUX_SUSPENDED] = &ap2mdm_wakeup, |
| 1028 | } |
| 1029 | }, |
| 1030 | /* MDM2AP_PBL_READY*/ |
| 1031 | { |
| 1032 | .gpio = 81, |
| 1033 | .settings = { |
| 1034 | [GPIOMUX_SUSPENDED] = &mdm2ap_pblrdy, |
| 1035 | } |
| 1036 | }, |
| 1037 | }; |
| 1038 | |
Kuirong Wang | f23f8c5 | 2012-03-31 12:34:51 -0700 | [diff] [blame] | 1039 | static struct gpiomux_setting mi2s_act_cfg = { |
| 1040 | .func = GPIOMUX_FUNC_1, |
| 1041 | .drv = GPIOMUX_DRV_8MA, |
| 1042 | .pull = GPIOMUX_PULL_NONE, |
| 1043 | }; |
| 1044 | |
| 1045 | static struct gpiomux_setting mi2s_sus_cfg = { |
| 1046 | .func = GPIOMUX_FUNC_GPIO, |
| 1047 | .drv = GPIOMUX_DRV_2MA, |
| 1048 | .pull = GPIOMUX_PULL_DOWN, |
| 1049 | }; |
| 1050 | |
| 1051 | static struct msm_gpiomux_config mpq8064_mi2s_configs[] __initdata = { |
| 1052 | { |
| 1053 | .gpio = 27, /* mi2s ws */ |
| 1054 | .settings = { |
| 1055 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1056 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1057 | }, |
| 1058 | }, |
| 1059 | { |
| 1060 | .gpio = 28, /* mi2s sclk */ |
| 1061 | .settings = { |
| 1062 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1063 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1064 | }, |
| 1065 | }, |
| 1066 | { |
| 1067 | .gpio = 29, /* mi2s dout3 */ |
| 1068 | .settings = { |
| 1069 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1070 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1071 | }, |
| 1072 | }, |
| 1073 | { |
| 1074 | .gpio = 30, /* mi2s dout2 */ |
| 1075 | .settings = { |
| 1076 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1077 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1078 | }, |
| 1079 | }, |
| 1080 | |
| 1081 | { |
| 1082 | .gpio = 31, /* mi2s dout1 */ |
| 1083 | .settings = { |
| 1084 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1085 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1086 | }, |
| 1087 | }, |
| 1088 | { |
| 1089 | .gpio = 32, /* mi2s dout0 */ |
| 1090 | .settings = { |
| 1091 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1092 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1093 | }, |
| 1094 | }, |
| 1095 | |
| 1096 | { |
| 1097 | .gpio = 33, /* mi2s mclk */ |
| 1098 | .settings = { |
| 1099 | [GPIOMUX_ACTIVE] = &mi2s_act_cfg, |
| 1100 | [GPIOMUX_SUSPENDED] = &mi2s_sus_cfg, |
| 1101 | }, |
| 1102 | }, |
| 1103 | }; |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 1104 | static struct msm_gpiomux_config apq8064_mxt_configs[] __initdata = { |
| 1105 | { /* TS INTERRUPT */ |
| 1106 | .gpio = 6, |
| 1107 | .settings = { |
| 1108 | [GPIOMUX_ACTIVE] = &mxt_int_act_cfg, |
| 1109 | [GPIOMUX_SUSPENDED] = &mxt_int_sus_cfg, |
| 1110 | }, |
| 1111 | }, |
| 1112 | { /* TS RESET */ |
| 1113 | .gpio = 33, |
| 1114 | .settings = { |
| 1115 | [GPIOMUX_ACTIVE] = &mxt_reset_act_cfg, |
| 1116 | [GPIOMUX_SUSPENDED] = &mxt_reset_sus_cfg, |
| 1117 | }, |
| 1118 | }, |
| 1119 | }; |
| 1120 | |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 1121 | static struct msm_gpiomux_config wcnss_5wire_interface[] = { |
| 1122 | { |
| 1123 | .gpio = 64, |
| 1124 | .settings = { |
| 1125 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 1126 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 1127 | }, |
| 1128 | }, |
| 1129 | { |
| 1130 | .gpio = 65, |
| 1131 | .settings = { |
| 1132 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 1133 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 1134 | }, |
| 1135 | }, |
| 1136 | { |
| 1137 | .gpio = 66, |
| 1138 | .settings = { |
| 1139 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 1140 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 1141 | }, |
| 1142 | }, |
| 1143 | { |
| 1144 | .gpio = 67, |
| 1145 | .settings = { |
| 1146 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 1147 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 1148 | }, |
| 1149 | }, |
| 1150 | { |
| 1151 | .gpio = 68, |
| 1152 | .settings = { |
| 1153 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 1154 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 1155 | }, |
| 1156 | }, |
| 1157 | }; |
| 1158 | |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 1159 | static struct msm_gpiomux_config mpq8064_gsbi5_i2c_configs[] __initdata = { |
| 1160 | { |
| 1161 | .gpio = 53, /* GSBI5 I2C QUP SDA */ |
| 1162 | .settings = { |
| 1163 | [GPIOMUX_SUSPENDED] = &gsbi5_suspended_cfg, |
| 1164 | [GPIOMUX_ACTIVE] = &gsbi5_active_cfg, |
| 1165 | }, |
| 1166 | }, |
| 1167 | { |
| 1168 | .gpio = 54, /* GSBI5 I2C QUP SCL */ |
| 1169 | .settings = { |
| 1170 | [GPIOMUX_SUSPENDED] = &gsbi5_suspended_cfg, |
| 1171 | [GPIOMUX_ACTIVE] = &gsbi5_active_cfg, |
| 1172 | }, |
| 1173 | }, |
| 1174 | }; |
| 1175 | |
Ravi Kumar V | 05931a2 | 2012-04-04 17:09:37 +0530 | [diff] [blame] | 1176 | static struct gpiomux_setting ir_suspended_cfg = { |
| 1177 | .func = GPIOMUX_FUNC_GPIO, |
| 1178 | .drv = GPIOMUX_DRV_2MA, |
| 1179 | .pull = GPIOMUX_PULL_UP, |
| 1180 | }; |
| 1181 | |
| 1182 | static struct gpiomux_setting ir_active_cfg = { |
| 1183 | .func = GPIOMUX_FUNC_GPIO, |
| 1184 | .drv = GPIOMUX_DRV_8MA, |
| 1185 | .pull = GPIOMUX_PULL_UP, |
| 1186 | }; |
| 1187 | |
| 1188 | static struct msm_gpiomux_config mpq8064_ir_configs[] __initdata = { |
| 1189 | { |
| 1190 | .gpio = 88, /* GPIO IR */ |
| 1191 | .settings = { |
| 1192 | [GPIOMUX_SUSPENDED] = &ir_suspended_cfg, |
| 1193 | [GPIOMUX_ACTIVE] = &ir_active_cfg, |
| 1194 | }, |
| 1195 | }, |
| 1196 | }; |
| 1197 | |
Anirudh Ghayal | 9f1aaa7 | 2012-04-26 18:15:08 +0530 | [diff] [blame] | 1198 | static struct msm_gpiomux_config sx150x_int_configs[] __initdata = { |
| 1199 | { |
| 1200 | .gpio = 81, |
| 1201 | .settings = { |
| 1202 | [GPIOMUX_SUSPENDED] = &sx150x_suspended_cfg, |
| 1203 | [GPIOMUX_ACTIVE] = &sx150x_active_cfg, |
| 1204 | }, |
| 1205 | }, |
| 1206 | }; |
| 1207 | |
Oluwafemi Adeyemi | a46d032 | 2012-05-16 18:27:44 -0700 | [diff] [blame] | 1208 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 1209 | static struct gpiomux_setting sdc2_clk_active_cfg = { |
| 1210 | .func = GPIOMUX_FUNC_2, |
| 1211 | .drv = GPIOMUX_DRV_8MA, |
| 1212 | .pull = GPIOMUX_PULL_NONE, |
| 1213 | }; |
| 1214 | |
| 1215 | static struct gpiomux_setting sdc2_cmd_data_0_3_active_cfg = { |
| 1216 | .func = GPIOMUX_FUNC_2, |
| 1217 | .drv = GPIOMUX_DRV_8MA, |
| 1218 | .pull = GPIOMUX_PULL_UP, |
| 1219 | }; |
| 1220 | |
| 1221 | static struct gpiomux_setting sdc2_suspended_cfg = { |
| 1222 | .func = GPIOMUX_FUNC_GPIO, |
| 1223 | .drv = GPIOMUX_DRV_2MA, |
| 1224 | .pull = GPIOMUX_PULL_DOWN, |
| 1225 | }; |
| 1226 | |
| 1227 | static struct gpiomux_setting sdc2_data_1_suspended_cfg = { |
| 1228 | .func = GPIOMUX_FUNC_GPIO, |
| 1229 | .drv = GPIOMUX_DRV_2MA, |
| 1230 | .pull = GPIOMUX_PULL_UP, |
| 1231 | }; |
| 1232 | |
| 1233 | static struct msm_gpiomux_config apq8064_sdc2_configs[] __initdata = { |
| 1234 | { |
| 1235 | .gpio = 59, |
| 1236 | .settings = { |
| 1237 | [GPIOMUX_ACTIVE] = &sdc2_clk_active_cfg, |
| 1238 | [GPIOMUX_SUSPENDED] = &sdc2_suspended_cfg, |
| 1239 | }, |
| 1240 | }, |
| 1241 | { |
| 1242 | .gpio = 57, |
| 1243 | .settings = { |
| 1244 | [GPIOMUX_ACTIVE] = &sdc2_cmd_data_0_3_active_cfg, |
| 1245 | [GPIOMUX_SUSPENDED] = &sdc2_suspended_cfg, |
| 1246 | }, |
| 1247 | |
| 1248 | }, |
| 1249 | { |
| 1250 | .gpio = 62, |
| 1251 | .settings = { |
| 1252 | [GPIOMUX_ACTIVE] = &sdc2_cmd_data_0_3_active_cfg, |
| 1253 | [GPIOMUX_SUSPENDED] = &sdc2_suspended_cfg, |
| 1254 | }, |
| 1255 | }, |
| 1256 | { |
| 1257 | .gpio = 61, |
| 1258 | .settings = { |
| 1259 | [GPIOMUX_ACTIVE] = &sdc2_cmd_data_0_3_active_cfg, |
| 1260 | [GPIOMUX_SUSPENDED] = &sdc2_data_1_suspended_cfg, |
| 1261 | }, |
| 1262 | }, |
| 1263 | { |
| 1264 | .gpio = 60, |
| 1265 | .settings = { |
| 1266 | [GPIOMUX_ACTIVE] = &sdc2_cmd_data_0_3_active_cfg, |
| 1267 | [GPIOMUX_SUSPENDED] = &sdc2_suspended_cfg, |
| 1268 | }, |
| 1269 | }, |
| 1270 | { |
| 1271 | .gpio = 58, |
| 1272 | .settings = { |
| 1273 | [GPIOMUX_ACTIVE] = &sdc2_cmd_data_0_3_active_cfg, |
| 1274 | [GPIOMUX_SUSPENDED] = &sdc2_suspended_cfg, |
| 1275 | }, |
| 1276 | }, |
| 1277 | }; |
| 1278 | #endif |
| 1279 | |
| 1280 | |
| 1281 | #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT |
| 1282 | static struct gpiomux_setting sdc4_clk_active_cfg = { |
| 1283 | .func = GPIOMUX_FUNC_2, |
| 1284 | .drv = GPIOMUX_DRV_8MA, |
| 1285 | .pull = GPIOMUX_PULL_NONE, |
| 1286 | }; |
| 1287 | |
| 1288 | static struct gpiomux_setting sdc4_cmd_data_0_3_active_cfg = { |
| 1289 | .func = GPIOMUX_FUNC_2, |
| 1290 | .drv = GPIOMUX_DRV_8MA, |
| 1291 | .pull = GPIOMUX_PULL_UP, |
| 1292 | }; |
| 1293 | |
| 1294 | static struct gpiomux_setting sdc4_suspended_cfg = { |
| 1295 | .func = GPIOMUX_FUNC_GPIO, |
| 1296 | .drv = GPIOMUX_DRV_2MA, |
| 1297 | .pull = GPIOMUX_PULL_DOWN, |
| 1298 | }; |
| 1299 | |
| 1300 | static struct gpiomux_setting sdc4_data_1_suspended_cfg = { |
| 1301 | .func = GPIOMUX_FUNC_GPIO, |
| 1302 | .drv = GPIOMUX_DRV_2MA, |
| 1303 | .pull = GPIOMUX_PULL_UP, |
| 1304 | }; |
| 1305 | |
| 1306 | static struct msm_gpiomux_config apq8064_sdc4_configs[] __initdata = { |
| 1307 | { |
| 1308 | .gpio = 68, |
| 1309 | .settings = { |
| 1310 | [GPIOMUX_ACTIVE] = &sdc4_clk_active_cfg, |
| 1311 | [GPIOMUX_SUSPENDED] = &sdc4_suspended_cfg, |
| 1312 | }, |
| 1313 | }, |
| 1314 | { |
| 1315 | .gpio = 67, |
| 1316 | .settings = { |
| 1317 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_active_cfg, |
| 1318 | [GPIOMUX_SUSPENDED] = &sdc4_suspended_cfg, |
| 1319 | }, |
| 1320 | |
| 1321 | }, |
| 1322 | { |
| 1323 | .gpio = 66, |
| 1324 | .settings = { |
| 1325 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_active_cfg, |
| 1326 | [GPIOMUX_SUSPENDED] = &sdc4_suspended_cfg, |
| 1327 | }, |
| 1328 | }, |
| 1329 | { |
| 1330 | .gpio = 65, |
| 1331 | .settings = { |
| 1332 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_active_cfg, |
| 1333 | [GPIOMUX_SUSPENDED] = &sdc4_data_1_suspended_cfg, |
| 1334 | }, |
| 1335 | }, |
| 1336 | { |
| 1337 | .gpio = 64, |
| 1338 | .settings = { |
| 1339 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_active_cfg, |
| 1340 | [GPIOMUX_SUSPENDED] = &sdc4_suspended_cfg, |
| 1341 | }, |
| 1342 | }, |
| 1343 | { |
| 1344 | .gpio = 63, |
| 1345 | .settings = { |
| 1346 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_active_cfg, |
| 1347 | [GPIOMUX_SUSPENDED] = &sdc4_suspended_cfg, |
| 1348 | }, |
| 1349 | }, |
| 1350 | }; |
| 1351 | #endif |
| 1352 | |
Oluwafemi Adeyemi | 9aff26c | 2012-06-26 17:28:21 -0700 | [diff] [blame] | 1353 | static struct gpiomux_setting apq8064_sdc3_card_det_cfg = { |
| 1354 | .func = GPIOMUX_FUNC_GPIO, |
| 1355 | .drv = GPIOMUX_DRV_2MA, |
| 1356 | .pull = GPIOMUX_PULL_UP, |
| 1357 | }; |
| 1358 | |
| 1359 | static struct msm_gpiomux_config apq8064_sdc3_configs[] __initdata = { |
| 1360 | { |
| 1361 | .gpio = 26, |
| 1362 | .settings = { |
| 1363 | [GPIOMUX_SUSPENDED] = &apq8064_sdc3_card_det_cfg, |
| 1364 | [GPIOMUX_ACTIVE] = &apq8064_sdc3_card_det_cfg, |
| 1365 | }, |
| 1366 | }, |
| 1367 | }; |
| 1368 | |
Joel King | 3166e89 | 2013-02-26 11:16:08 -0800 | [diff] [blame] | 1369 | static struct msm_gpiomux_config sglte2_qsc_configs[] __initdata = { |
| 1370 | /* MDM2AP_STATUS */ |
| 1371 | { |
| 1372 | .gpio = 51, |
| 1373 | .settings = { |
| 1374 | [GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg, |
| 1375 | } |
| 1376 | }, |
| 1377 | /* MDM2AP_ERRFATAL */ |
| 1378 | { |
| 1379 | .gpio = 52, |
| 1380 | .settings = { |
| 1381 | [GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg, |
| 1382 | } |
| 1383 | }, |
| 1384 | }; |
| 1385 | |
Mayank Rana | e98f1e4 | 2013-02-22 19:58:59 +0530 | [diff] [blame] | 1386 | static struct gpiomux_setting gsbi4_uartdm_active = { |
| 1387 | .func = GPIOMUX_FUNC_1, |
| 1388 | .drv = GPIOMUX_DRV_8MA, |
| 1389 | .pull = GPIOMUX_PULL_NONE, |
| 1390 | }; |
| 1391 | |
| 1392 | static struct gpiomux_setting gsbi4_uartdm_suspended = { |
| 1393 | .func = GPIOMUX_FUNC_GPIO, |
| 1394 | .drv = GPIOMUX_DRV_2MA, |
| 1395 | .pull = GPIOMUX_PULL_DOWN, |
| 1396 | }; |
| 1397 | |
Mayank Rana | 33681af | 2012-05-10 15:14:00 -0700 | [diff] [blame] | 1398 | static struct gpiomux_setting gsbi6_uartdm_active = { |
| 1399 | .func = GPIOMUX_FUNC_2, |
| 1400 | .drv = GPIOMUX_DRV_8MA, |
| 1401 | .pull = GPIOMUX_PULL_NONE, |
| 1402 | }; |
| 1403 | |
| 1404 | static struct gpiomux_setting gsbi6_uartdm_suspended = { |
| 1405 | .func = GPIOMUX_FUNC_GPIO, |
| 1406 | .drv = GPIOMUX_DRV_2MA, |
| 1407 | .pull = GPIOMUX_PULL_DOWN, |
| 1408 | }; |
| 1409 | |
Mayank Rana | e98f1e4 | 2013-02-22 19:58:59 +0530 | [diff] [blame] | 1410 | static struct msm_gpiomux_config apq8064_uartdm_gsbi4_configs[] __initdata = { |
| 1411 | { |
| 1412 | .gpio = 11, /* GSBI4 UARTDM RX */ |
| 1413 | .settings = { |
| 1414 | [GPIOMUX_ACTIVE] = &gsbi4_uartdm_active, |
| 1415 | [GPIOMUX_SUSPENDED] = &gsbi4_uartdm_suspended, |
| 1416 | }, |
| 1417 | }, |
| 1418 | { |
| 1419 | .gpio = 10, /* GSBI4 UARTDM TX */ |
| 1420 | .settings = { |
| 1421 | [GPIOMUX_ACTIVE] = &gsbi4_uartdm_active, |
| 1422 | [GPIOMUX_SUSPENDED] = &gsbi4_uartdm_suspended, |
| 1423 | }, |
| 1424 | }, |
| 1425 | { |
| 1426 | .gpio = 13, /* GSBI4 UARTDM RFR */ |
| 1427 | .settings = { |
| 1428 | [GPIOMUX_ACTIVE] = &gsbi4_uartdm_active, |
| 1429 | [GPIOMUX_SUSPENDED] = &gsbi4_uartdm_suspended, |
| 1430 | }, |
| 1431 | }, |
| 1432 | { |
| 1433 | .gpio = 12, /* GSBI4 UARTDM CTS */ |
| 1434 | .settings = { |
| 1435 | [GPIOMUX_ACTIVE] = &gsbi4_uartdm_active, |
| 1436 | [GPIOMUX_SUSPENDED] = &gsbi4_uartdm_suspended, |
| 1437 | }, |
| 1438 | }, |
| 1439 | }; |
| 1440 | |
Mayank Rana | 33681af | 2012-05-10 15:14:00 -0700 | [diff] [blame] | 1441 | static struct msm_gpiomux_config mpq8064_uartdm_configs[] __initdata = { |
| 1442 | { /* UARTDM_TX */ |
| 1443 | .gpio = 14, |
| 1444 | .settings = { |
| 1445 | [GPIOMUX_ACTIVE] = &gsbi6_uartdm_active, |
| 1446 | [GPIOMUX_SUSPENDED] = &gsbi6_uartdm_suspended, |
| 1447 | }, |
| 1448 | }, |
| 1449 | { /* UARTDM_RX */ |
| 1450 | .gpio = 15, |
| 1451 | .settings = { |
| 1452 | [GPIOMUX_ACTIVE] = &gsbi6_uartdm_active, |
| 1453 | [GPIOMUX_SUSPENDED] = &gsbi6_uartdm_suspended, |
| 1454 | }, |
| 1455 | }, |
| 1456 | { /* UARTDM_CTS */ |
| 1457 | .gpio = 16, |
| 1458 | .settings = { |
| 1459 | [GPIOMUX_ACTIVE] = &gsbi6_uartdm_active, |
| 1460 | [GPIOMUX_SUSPENDED] = &gsbi6_uartdm_suspended, |
| 1461 | }, |
| 1462 | }, |
| 1463 | { /* UARTDM_RFR */ |
| 1464 | .gpio = 17, |
| 1465 | .settings = { |
| 1466 | [GPIOMUX_ACTIVE] = &gsbi6_uartdm_active, |
| 1467 | [GPIOMUX_SUSPENDED] = &gsbi6_uartdm_suspended, |
| 1468 | }, |
| 1469 | }, |
| 1470 | }; |
| 1471 | |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 1472 | void __init apq8064_init_gpiomux(void) |
| 1473 | { |
| 1474 | int rc; |
Amy Maloche | 609bb5e | 2012-08-03 09:41:42 -0700 | [diff] [blame] | 1475 | int platform_version = socinfo_get_platform_version(); |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 1476 | |
| 1477 | rc = msm_gpiomux_init(NR_GPIO_IRQS); |
| 1478 | if (rc) { |
| 1479 | pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); |
| 1480 | return; |
| 1481 | } |
| 1482 | |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 1483 | msm_gpiomux_install(wcnss_5wire_interface, |
| 1484 | ARRAY_SIZE(wcnss_5wire_interface)); |
| 1485 | |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 1486 | if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || |
| 1487 | machine_is_mpq8064_dtv()) { |
| 1488 | msm_gpiomux_install(mpq8064_gsbi5_i2c_configs, |
| 1489 | ARRAY_SIZE(mpq8064_gsbi5_i2c_configs)); |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 1490 | #ifdef CONFIG_MSM_VCAP |
| 1491 | msm_gpiomux_install(vcap_configs, |
| 1492 | ARRAY_SIZE(vcap_configs)); |
| 1493 | #endif |
Anirudh Ghayal | 9f1aaa7 | 2012-04-26 18:15:08 +0530 | [diff] [blame] | 1494 | msm_gpiomux_install(sx150x_int_configs, |
| 1495 | ARRAY_SIZE(sx150x_int_configs)); |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 1496 | } else { |
| 1497 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 1498 | msm_gpiomux_install(apq8064_ethernet_configs, |
| 1499 | ARRAY_SIZE(apq8064_ethernet_configs)); |
| 1500 | #endif |
| 1501 | |
| 1502 | msm_gpiomux_install(apq8064_gsbi_configs, |
| 1503 | ARRAY_SIZE(apq8064_gsbi_configs)); |
| 1504 | } |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 1505 | |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 1506 | msm_gpiomux_install(apq8064_slimbus_config, |
| 1507 | ARRAY_SIZE(apq8064_slimbus_config)); |
| 1508 | |
| 1509 | msm_gpiomux_install(apq8064_audio_codec_configs, |
| 1510 | ARRAY_SIZE(apq8064_audio_codec_configs)); |
| 1511 | |
Santosh Mardi | eff9a74 | 2012-04-09 23:23:39 +0530 | [diff] [blame] | 1512 | if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || |
| 1513 | machine_is_mpq8064_dtv()) { |
| 1514 | msm_gpiomux_install(mpq8064_spkr_i2s_config, |
| 1515 | ARRAY_SIZE(mpq8064_spkr_i2s_config)); |
| 1516 | } |
| 1517 | |
Swaminathan Sathappan | 9e07aa9 | 2012-02-29 12:07:27 -0800 | [diff] [blame] | 1518 | pr_debug("%s(): audio-auxpcm: Include GPIO configs" |
| 1519 | " as audio is not the primary user" |
| 1520 | " for these GPIO Pins\n", __func__); |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1521 | |
Kuirong Wang | f23f8c5 | 2012-03-31 12:34:51 -0700 | [diff] [blame] | 1522 | if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || |
| 1523 | machine_is_mpq8064_dtv()) |
| 1524 | msm_gpiomux_install(mpq8064_mi2s_configs, |
| 1525 | ARRAY_SIZE(mpq8064_mi2s_configs)); |
| 1526 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1527 | msm_gpiomux_install(apq8064_ext_regulator_configs, |
| 1528 | ARRAY_SIZE(apq8064_ext_regulator_configs)); |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1529 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 1530 | if (machine_is_apq8064_mtp()) { |
Ameya Thakur | 2702baf | 2013-01-30 11:55:25 -0800 | [diff] [blame] | 1531 | if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) { |
| 1532 | msm_gpiomux_install(amdm_configs, |
| 1533 | ARRAY_SIZE(amdm_configs)); |
| 1534 | msm_gpiomux_install(bmdm_configs, |
| 1535 | ARRAY_SIZE(bmdm_configs)); |
Joel King | 3166e89 | 2013-02-26 11:16:08 -0800 | [diff] [blame] | 1536 | } else if (socinfo_get_platform_subtype() == |
| 1537 | PLATFORM_SUBTYPE_SGLTE2) { |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 1538 | msm_gpiomux_install(mdm_configs, |
| 1539 | ARRAY_SIZE(mdm_configs)); |
Joel King | 3166e89 | 2013-02-26 11:16:08 -0800 | [diff] [blame] | 1540 | msm_gpiomux_install(sglte2_qsc_configs, |
| 1541 | ARRAY_SIZE(sglte2_qsc_configs)); |
Mayank Rana | e98f1e4 | 2013-02-22 19:58:59 +0530 | [diff] [blame] | 1542 | |
| 1543 | /* GSBI4 UART GPIOs for Primary IPC */ |
| 1544 | msm_gpiomux_install(apq8064_uartdm_gsbi4_configs, |
| 1545 | ARRAY_SIZE(apq8064_uartdm_gsbi4_configs)); |
Joel King | 3166e89 | 2013-02-26 11:16:08 -0800 | [diff] [blame] | 1546 | } else if (SOCINFO_VERSION_MINOR(platform_version) == 1) { |
| 1547 | msm_gpiomux_install(mdm_i2s_configs, |
| 1548 | ARRAY_SIZE(mdm_i2s_configs)); |
| 1549 | } else { |
| 1550 | msm_gpiomux_install(mdm_configs, |
| 1551 | ARRAY_SIZE(mdm_configs)); |
| 1552 | } |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 1553 | } |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1554 | |
Amy Maloche | 609bb5e | 2012-08-03 09:41:42 -0700 | [diff] [blame] | 1555 | if (machine_is_apq8064_mtp()) { |
| 1556 | if (SOCINFO_VERSION_MINOR(platform_version) == 1) { |
| 1557 | msm_gpiomux_install(cyts_gpio_alt_config, |
| 1558 | ARRAY_SIZE(cyts_gpio_alt_config)); |
| 1559 | } else { |
| 1560 | msm_gpiomux_install(cyts_gpio_configs, |
| 1561 | ARRAY_SIZE(cyts_gpio_configs)); |
| 1562 | } |
| 1563 | } |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 1564 | |
Amy Maloche | 609bb5e | 2012-08-03 09:41:42 -0700 | [diff] [blame] | 1565 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
Hemant Kumar | f1ca919 | 2012-02-07 18:59:33 -0800 | [diff] [blame] | 1566 | if (machine_is_apq8064_mtp()) |
| 1567 | msm_gpiomux_install(apq8064_hsic_configs, |
| 1568 | ARRAY_SIZE(apq8064_hsic_configs)); |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1569 | #endif |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 1570 | |
| 1571 | if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid()) |
| 1572 | msm_gpiomux_install(apq8064_mxt_configs, |
| 1573 | ARRAY_SIZE(apq8064_mxt_configs)); |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 1574 | |
| 1575 | msm_gpiomux_install(apq8064_hdmi_configs, |
| 1576 | ARRAY_SIZE(apq8064_hdmi_configs)); |
Ravi Kumar V | 05931a2 | 2012-04-04 17:09:37 +0530 | [diff] [blame] | 1577 | |
| 1578 | if (machine_is_mpq8064_cdp()) |
| 1579 | msm_gpiomux_install(mpq8064_ir_configs, |
| 1580 | ARRAY_SIZE(mpq8064_ir_configs)); |
Oluwafemi Adeyemi | a46d032 | 2012-05-16 18:27:44 -0700 | [diff] [blame] | 1581 | |
| 1582 | #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT |
| 1583 | msm_gpiomux_install(apq8064_sdc2_configs, |
| 1584 | ARRAY_SIZE(apq8064_sdc2_configs)); |
| 1585 | #endif |
| 1586 | |
| 1587 | #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT |
| 1588 | msm_gpiomux_install(apq8064_sdc4_configs, |
| 1589 | ARRAY_SIZE(apq8064_sdc4_configs)); |
| 1590 | #endif |
Oluwafemi Adeyemi | 9aff26c | 2012-06-26 17:28:21 -0700 | [diff] [blame] | 1591 | |
| 1592 | msm_gpiomux_install(apq8064_sdc3_configs, |
| 1593 | ARRAY_SIZE(apq8064_sdc3_configs)); |
Mayank Rana | 33681af | 2012-05-10 15:14:00 -0700 | [diff] [blame] | 1594 | if (machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) |
| 1595 | msm_gpiomux_install(mpq8064_uartdm_configs, |
| 1596 | ARRAY_SIZE(mpq8064_uartdm_configs)); |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 1597 | } |