Damir Didjusto | 04d3c36 | 2013-01-07 14:30:53 -0800 | [diff] [blame^] | 1 | /* Copyright (c) 2012-2013, Code Aurora Forum. All rights reserved. |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [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 <mach/board.h> |
| 17 | #include <mach/gpio.h> |
| 18 | #include <mach/gpiomux.h> |
Stepan Moskovchenko | 95108b8 | 2012-11-27 14:28:11 -0800 | [diff] [blame] | 19 | #include <mach/socinfo.h> |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 20 | |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 21 | #define KS8851_IRQ_GPIO 94 |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 22 | |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 23 | static struct gpiomux_setting gpio_uart_config = { |
| 24 | .func = GPIOMUX_FUNC_2, |
| 25 | .drv = GPIOMUX_DRV_16MA, |
| 26 | .pull = GPIOMUX_PULL_NONE, |
| 27 | .dir = GPIOMUX_OUT_HIGH, |
| 28 | }; |
| 29 | |
Sagar Dharia | a8e6b0a | 2012-08-10 20:52:30 -0600 | [diff] [blame] | 30 | static struct gpiomux_setting slimbus = { |
| 31 | .func = GPIOMUX_FUNC_1, |
| 32 | .drv = GPIOMUX_DRV_8MA, |
| 33 | .pull = GPIOMUX_PULL_KEEPER, |
| 34 | }; |
| 35 | |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 36 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 37 | static struct gpiomux_setting gpio_eth_config = { |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 38 | .pull = GPIOMUX_PULL_UP, |
| 39 | .drv = GPIOMUX_DRV_2MA, |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 40 | .func = GPIOMUX_FUNC_GPIO, |
| 41 | }; |
| 42 | |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 43 | static struct gpiomux_setting gpio_spi_cs2_config = { |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 44 | .func = GPIOMUX_FUNC_4, |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 45 | .drv = GPIOMUX_DRV_6MA, |
| 46 | .pull = GPIOMUX_PULL_DOWN, |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | static struct gpiomux_setting gpio_spi_config = { |
| 50 | .func = GPIOMUX_FUNC_1, |
| 51 | .drv = GPIOMUX_DRV_12MA, |
| 52 | .pull = GPIOMUX_PULL_NONE, |
| 53 | }; |
| 54 | |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 55 | static struct gpiomux_setting gpio_spi_cs1_config = { |
| 56 | .func = GPIOMUX_FUNC_GPIO, |
| 57 | .drv = GPIOMUX_DRV_6MA, |
| 58 | .pull = GPIOMUX_PULL_UP, |
| 59 | }; |
| 60 | |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 61 | static struct msm_gpiomux_config msm_eth_configs[] = { |
| 62 | { |
| 63 | .gpio = KS8851_IRQ_GPIO, |
| 64 | .settings = { |
| 65 | [GPIOMUX_SUSPENDED] = &gpio_eth_config, |
| 66 | } |
| 67 | }, |
| 68 | }; |
| 69 | #endif |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame] | 70 | |
Siddartha Mohanadoss | c4bc6ae | 2012-12-06 14:22:22 -0800 | [diff] [blame] | 71 | static struct gpiomux_setting gpio_epm_config = { |
| 72 | .func = GPIOMUX_FUNC_GPIO, |
| 73 | .drv = GPIOMUX_DRV_2MA, |
| 74 | .pull = GPIOMUX_PULL_DOWN, |
| 75 | }; |
| 76 | |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame] | 77 | static struct gpiomux_setting wcnss_5wire_suspend_cfg = { |
| 78 | .func = GPIOMUX_FUNC_GPIO, |
| 79 | .drv = GPIOMUX_DRV_2MA, |
| 80 | .pull = GPIOMUX_PULL_UP, |
| 81 | }; |
| 82 | |
| 83 | static struct gpiomux_setting wcnss_5wire_active_cfg = { |
| 84 | .func = GPIOMUX_FUNC_1, |
| 85 | .drv = GPIOMUX_DRV_6MA, |
| 86 | .pull = GPIOMUX_PULL_DOWN, |
| 87 | }; |
| 88 | |
Jin Hong | a04caaa | 2012-05-23 10:28:27 -0700 | [diff] [blame] | 89 | static struct gpiomux_setting gpio_i2c_config = { |
| 90 | .func = GPIOMUX_FUNC_3, |
Gilad Avidov | b7d8bb1 | 2012-11-09 16:30:37 -0700 | [diff] [blame] | 91 | /* |
| 92 | * Please keep I2C GPIOs drive-strength at minimum (2ma). It is a |
| 93 | * workaround for HW issue of glitches caused by rapid GPIO current- |
| 94 | * change. |
| 95 | */ |
| 96 | .drv = GPIOMUX_DRV_2MA, |
Jin Hong | a04caaa | 2012-05-23 10:28:27 -0700 | [diff] [blame] | 97 | .pull = GPIOMUX_PULL_NONE, |
| 98 | }; |
| 99 | |
Chandan Uddaraju | 88b26d7 | 2012-08-13 22:28:44 -0700 | [diff] [blame] | 100 | static struct gpiomux_setting lcd_en_act_cfg = { |
| 101 | .func = GPIOMUX_FUNC_GPIO, |
| 102 | .drv = GPIOMUX_DRV_8MA, |
| 103 | .pull = GPIOMUX_PULL_NONE, |
| 104 | }; |
| 105 | |
| 106 | static struct gpiomux_setting lcd_en_sus_cfg = { |
| 107 | .func = GPIOMUX_FUNC_GPIO, |
| 108 | .drv = GPIOMUX_DRV_2MA, |
| 109 | .pull = GPIOMUX_PULL_DOWN, |
| 110 | }; |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 111 | |
Amy Maloche | 9e99a79 | 2012-08-15 23:27:51 -0700 | [diff] [blame] | 112 | static struct gpiomux_setting atmel_resout_sus_cfg = { |
| 113 | .func = GPIOMUX_FUNC_GPIO, |
| 114 | .drv = GPIOMUX_DRV_6MA, |
| 115 | .pull = GPIOMUX_PULL_DOWN, |
| 116 | }; |
| 117 | |
| 118 | static struct gpiomux_setting atmel_resout_act_cfg = { |
| 119 | .func = GPIOMUX_FUNC_GPIO, |
| 120 | .drv = GPIOMUX_DRV_6MA, |
| 121 | .pull = GPIOMUX_PULL_UP, |
| 122 | }; |
| 123 | |
| 124 | static struct gpiomux_setting atmel_int_act_cfg = { |
| 125 | .func = GPIOMUX_FUNC_GPIO, |
| 126 | .drv = GPIOMUX_DRV_8MA, |
| 127 | .pull = GPIOMUX_PULL_UP, |
| 128 | }; |
| 129 | |
| 130 | static struct gpiomux_setting atmel_int_sus_cfg = { |
| 131 | .func = GPIOMUX_FUNC_GPIO, |
| 132 | .drv = GPIOMUX_DRV_2MA, |
| 133 | .pull = GPIOMUX_PULL_DOWN, |
| 134 | }; |
| 135 | |
Joonwoo Park | 187e9cb | 2012-08-24 22:47:53 -0700 | [diff] [blame] | 136 | static struct gpiomux_setting taiko_reset = { |
| 137 | .func = GPIOMUX_FUNC_GPIO, |
| 138 | .drv = GPIOMUX_DRV_6MA, |
| 139 | .pull = GPIOMUX_PULL_NONE, |
| 140 | .dir = GPIOMUX_OUT_LOW, |
| 141 | }; |
| 142 | |
Joonwoo Park | eb84dc7 | 2012-09-12 10:22:49 -0700 | [diff] [blame] | 143 | static struct gpiomux_setting taiko_int = { |
| 144 | .func = GPIOMUX_FUNC_GPIO, |
| 145 | .drv = GPIOMUX_DRV_2MA, |
| 146 | .pull = GPIOMUX_PULL_NONE, |
| 147 | }; |
Amy Maloche | 527acc4 | 2012-12-07 18:40:54 -0800 | [diff] [blame] | 148 | static struct gpiomux_setting hap_lvl_shft_suspended_config = { |
| 149 | .func = GPIOMUX_FUNC_GPIO, |
| 150 | .drv = GPIOMUX_DRV_2MA, |
| 151 | .pull = GPIOMUX_PULL_DOWN, |
| 152 | }; |
| 153 | |
| 154 | static struct gpiomux_setting hap_lvl_shft_active_config = { |
| 155 | .func = GPIOMUX_FUNC_GPIO, |
| 156 | .drv = GPIOMUX_DRV_8MA, |
| 157 | .pull = GPIOMUX_PULL_UP, |
| 158 | }; |
| 159 | static struct msm_gpiomux_config hap_lvl_shft_config[] __initdata = { |
| 160 | { |
| 161 | .gpio = 86, |
| 162 | .settings = { |
| 163 | [GPIOMUX_SUSPENDED] = &hap_lvl_shft_suspended_config, |
| 164 | [GPIOMUX_ACTIVE] = &hap_lvl_shft_active_config, |
| 165 | }, |
| 166 | }, |
| 167 | }; |
Joonwoo Park | eb84dc7 | 2012-09-12 10:22:49 -0700 | [diff] [blame] | 168 | |
Amy Maloche | 9e99a79 | 2012-08-15 23:27:51 -0700 | [diff] [blame] | 169 | static struct msm_gpiomux_config msm_touch_configs[] __initdata = { |
| 170 | { |
| 171 | .gpio = 60, /* TOUCH RESET */ |
| 172 | .settings = { |
| 173 | [GPIOMUX_ACTIVE] = &atmel_resout_act_cfg, |
| 174 | [GPIOMUX_SUSPENDED] = &atmel_resout_sus_cfg, |
| 175 | }, |
| 176 | }, |
| 177 | { |
| 178 | .gpio = 61, /* TOUCH IRQ */ |
| 179 | .settings = { |
| 180 | [GPIOMUX_ACTIVE] = &atmel_int_act_cfg, |
| 181 | [GPIOMUX_SUSPENDED] = &atmel_int_sus_cfg, |
| 182 | }, |
| 183 | }, |
| 184 | |
| 185 | }; |
Ujwal Patel | 74b5df4 | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 186 | |
Manu Gautam | ac7265b | 2012-11-21 11:49:15 +0530 | [diff] [blame] | 187 | static struct gpiomux_setting hsic_sus_cfg = { |
| 188 | .func = GPIOMUX_FUNC_GPIO, |
| 189 | .drv = GPIOMUX_DRV_2MA, |
| 190 | .pull = GPIOMUX_PULL_DOWN, |
| 191 | .dir = GPIOMUX_OUT_LOW, |
| 192 | }; |
| 193 | |
| 194 | static struct gpiomux_setting hsic_act_cfg = { |
| 195 | .func = GPIOMUX_FUNC_1, |
| 196 | .drv = GPIOMUX_DRV_12MA, |
| 197 | .pull = GPIOMUX_PULL_NONE, |
| 198 | }; |
| 199 | |
| 200 | static struct gpiomux_setting hsic_hub_act_cfg = { |
| 201 | .func = GPIOMUX_FUNC_GPIO, |
| 202 | .drv = GPIOMUX_DRV_2MA, |
| 203 | .pull = GPIOMUX_PULL_UP, |
| 204 | .dir = GPIOMUX_IN, |
| 205 | }; |
| 206 | |
| 207 | static struct msm_gpiomux_config msm_hsic_configs[] = { |
| 208 | { |
| 209 | .gpio = 144, /*HSIC_STROBE */ |
| 210 | .settings = { |
| 211 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 212 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 213 | }, |
| 214 | }, |
| 215 | { |
| 216 | .gpio = 145, /* HSIC_DATA */ |
| 217 | .settings = { |
| 218 | [GPIOMUX_ACTIVE] = &hsic_act_cfg, |
| 219 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 220 | }, |
| 221 | }, |
| 222 | }; |
| 223 | |
| 224 | static struct msm_gpiomux_config msm_hsic_hub_configs[] = { |
| 225 | { |
| 226 | .gpio = 50, /* HSIC_HUB_INT_N */ |
| 227 | .settings = { |
| 228 | [GPIOMUX_ACTIVE] = &hsic_hub_act_cfg, |
| 229 | [GPIOMUX_SUSPENDED] = &hsic_sus_cfg, |
| 230 | }, |
| 231 | }, |
| 232 | }; |
| 233 | |
Manoj Rao | 5bf2a7e | 2012-10-29 12:53:27 -0700 | [diff] [blame] | 234 | static struct gpiomux_setting mhl_suspend_config = { |
| 235 | .func = GPIOMUX_FUNC_GPIO, |
| 236 | .drv = GPIOMUX_DRV_2MA, |
| 237 | .pull = GPIOMUX_PULL_DOWN, |
| 238 | }; |
| 239 | |
| 240 | static struct gpiomux_setting mhl_active_1_cfg = { |
| 241 | .func = GPIOMUX_FUNC_1, |
| 242 | .drv = GPIOMUX_DRV_2MA, |
| 243 | .pull = GPIOMUX_PULL_UP, |
| 244 | .dir = GPIOMUX_OUT_HIGH, |
| 245 | }; |
| 246 | |
| 247 | static struct gpiomux_setting mhl_active_2_cfg = { |
| 248 | .func = GPIOMUX_FUNC_1, |
| 249 | .drv = GPIOMUX_DRV_2MA, |
| 250 | .pull = GPIOMUX_PULL_UP, |
| 251 | }; |
| 252 | |
Ujwal Patel | 74b5df4 | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 253 | static struct gpiomux_setting hdmi_suspend_cfg = { |
| 254 | .func = GPIOMUX_FUNC_GPIO, |
| 255 | .drv = GPIOMUX_DRV_2MA, |
| 256 | .pull = GPIOMUX_PULL_DOWN, |
| 257 | }; |
| 258 | |
| 259 | static struct gpiomux_setting hdmi_active_1_cfg = { |
| 260 | .func = GPIOMUX_FUNC_1, |
| 261 | .drv = GPIOMUX_DRV_2MA, |
| 262 | .pull = GPIOMUX_PULL_UP, |
| 263 | }; |
| 264 | |
| 265 | static struct gpiomux_setting hdmi_active_2_cfg = { |
| 266 | .func = GPIOMUX_FUNC_1, |
| 267 | .drv = GPIOMUX_DRV_16MA, |
| 268 | .pull = GPIOMUX_PULL_DOWN, |
| 269 | }; |
| 270 | |
Manoj Rao | 5bf2a7e | 2012-10-29 12:53:27 -0700 | [diff] [blame] | 271 | static struct msm_gpiomux_config msm_mhl_configs[] __initdata = { |
| 272 | { |
| 273 | /* mhl-sii8334 pwr */ |
| 274 | .gpio = 12, |
| 275 | .settings = { |
| 276 | [GPIOMUX_SUSPENDED] = &mhl_suspend_config, |
| 277 | [GPIOMUX_ACTIVE] = &mhl_active_1_cfg, |
| 278 | }, |
| 279 | }, |
| 280 | { |
| 281 | /* mhl-sii8334 intr */ |
| 282 | .gpio = 82, |
| 283 | .settings = { |
| 284 | [GPIOMUX_SUSPENDED] = &mhl_suspend_config, |
| 285 | [GPIOMUX_ACTIVE] = &mhl_active_1_cfg, |
| 286 | }, |
| 287 | }, |
| 288 | { |
| 289 | /* mhl-sii8334 reset */ |
| 290 | .gpio = 8, |
| 291 | .settings = { |
| 292 | [GPIOMUX_SUSPENDED] = &mhl_suspend_config, |
| 293 | [GPIOMUX_ACTIVE] = &mhl_active_2_cfg, |
| 294 | }, |
| 295 | }, |
| 296 | }; |
| 297 | |
| 298 | |
Ujwal Patel | 74b5df4 | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 299 | static struct msm_gpiomux_config msm_hdmi_configs[] __initdata = { |
| 300 | { |
| 301 | .gpio = 31, |
| 302 | .settings = { |
| 303 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 304 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 305 | }, |
| 306 | }, |
| 307 | { |
| 308 | .gpio = 32, |
| 309 | .settings = { |
| 310 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 311 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 312 | }, |
| 313 | }, |
| 314 | { |
| 315 | .gpio = 33, |
| 316 | .settings = { |
| 317 | [GPIOMUX_ACTIVE] = &hdmi_active_1_cfg, |
| 318 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 319 | }, |
| 320 | }, |
| 321 | { |
| 322 | .gpio = 34, |
| 323 | .settings = { |
| 324 | [GPIOMUX_ACTIVE] = &hdmi_active_2_cfg, |
| 325 | [GPIOMUX_SUSPENDED] = &hdmi_suspend_cfg, |
| 326 | }, |
| 327 | }, |
| 328 | }; |
| 329 | |
Stepan Moskovchenko | 95108b8 | 2012-11-27 14:28:11 -0800 | [diff] [blame] | 330 | static struct msm_gpiomux_config msm_rumi_blsp_configs[] __initdata = { |
| 331 | { |
| 332 | .gpio = 45, /* BLSP2 UART8 TX */ |
| 333 | .settings = { |
| 334 | [GPIOMUX_SUSPENDED] = &gpio_uart_config, |
| 335 | }, |
| 336 | }, |
| 337 | { |
| 338 | .gpio = 46, /* BLSP2 UART8 RX */ |
| 339 | .settings = { |
| 340 | [GPIOMUX_SUSPENDED] = &gpio_uart_config, |
| 341 | }, |
| 342 | }, |
| 343 | }; |
| 344 | |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 345 | static struct msm_gpiomux_config msm_blsp_configs[] __initdata = { |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 346 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 347 | { |
| 348 | .gpio = 0, /* BLSP1 QUP SPI_DATA_MOSI */ |
| 349 | .settings = { |
| 350 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 351 | }, |
| 352 | }, |
| 353 | { |
| 354 | .gpio = 1, /* BLSP1 QUP SPI_DATA_MISO */ |
| 355 | .settings = { |
| 356 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 357 | }, |
| 358 | }, |
| 359 | { |
| 360 | .gpio = 3, /* BLSP1 QUP SPI_CLK */ |
| 361 | .settings = { |
| 362 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 363 | }, |
| 364 | }, |
| 365 | { |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 366 | .gpio = 9, /* BLSP1 QUP SPI_CS2A_N */ |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 367 | .settings = { |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 368 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config, |
| 369 | }, |
| 370 | }, |
| 371 | { |
| 372 | .gpio = 8, /* BLSP1 QUP SPI_CS1_N */ |
| 373 | .settings = { |
| 374 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs1_config, |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 375 | }, |
| 376 | }, |
| 377 | #endif |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 378 | { |
Chandan Uddaraju | 88b26d7 | 2012-08-13 22:28:44 -0700 | [diff] [blame] | 379 | .gpio = 58, |
| 380 | .settings = { |
| 381 | [GPIOMUX_ACTIVE] = &lcd_en_act_cfg, |
| 382 | [GPIOMUX_SUSPENDED] = &lcd_en_sus_cfg, |
| 383 | }, |
| 384 | }, |
| 385 | { |
Amy Maloche | bc7e967 | 2012-08-15 10:30:40 -0700 | [diff] [blame] | 386 | .gpio = 6, /* BLSP1 QUP2 I2C_DAT */ |
| 387 | .settings = { |
| 388 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config, |
| 389 | }, |
| 390 | }, |
| 391 | { |
| 392 | .gpio = 7, /* BLSP1 QUP2 I2C_CLK */ |
| 393 | .settings = { |
| 394 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config, |
| 395 | }, |
| 396 | }, |
| 397 | { |
Jin Hong | a04caaa | 2012-05-23 10:28:27 -0700 | [diff] [blame] | 398 | .gpio = 83, /* BLSP11 QUP I2C_DAT */ |
| 399 | .settings = { |
| 400 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config, |
| 401 | }, |
| 402 | }, |
| 403 | { |
| 404 | .gpio = 84, /* BLSP11 QUP I2C_CLK */ |
| 405 | .settings = { |
| 406 | [GPIOMUX_SUSPENDED] = &gpio_i2c_config, |
| 407 | }, |
| 408 | }, |
| 409 | { |
Stepan Moskovchenko | 5269b60 | 2012-08-08 17:57:09 -0700 | [diff] [blame] | 410 | .gpio = 4, /* BLSP2 UART TX */ |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 411 | .settings = { |
| 412 | [GPIOMUX_SUSPENDED] = &gpio_uart_config, |
| 413 | }, |
| 414 | }, |
| 415 | { |
Stepan Moskovchenko | 5269b60 | 2012-08-08 17:57:09 -0700 | [diff] [blame] | 416 | .gpio = 5, /* BLSP2 UART RX */ |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 417 | .settings = { |
| 418 | [GPIOMUX_SUSPENDED] = &gpio_uart_config, |
| 419 | }, |
| 420 | }, |
Sagar Dharia | e0bb650 | 2012-08-10 20:25:51 -0600 | [diff] [blame] | 421 | { |
| 422 | .gpio = 53, /* BLSP2 QUP4 SPI_DATA_MOSI */ |
| 423 | .settings = { |
| 424 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 425 | }, |
| 426 | }, |
| 427 | { |
| 428 | .gpio = 54, /* BLSP2 QUP4 SPI_DATA_MISO */ |
| 429 | .settings = { |
| 430 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 431 | }, |
| 432 | }, |
| 433 | { |
| 434 | .gpio = 56, /* BLSP2 QUP4 SPI_CLK */ |
| 435 | .settings = { |
| 436 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 437 | }, |
| 438 | }, |
| 439 | { |
| 440 | .gpio = 55, /* BLSP2 QUP4 SPI_CS0_N */ |
| 441 | .settings = { |
| 442 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 443 | }, |
| 444 | }, |
Siddartha Mohanadoss | c4bc6ae | 2012-12-06 14:22:22 -0800 | [diff] [blame] | 445 | { |
| 446 | .gpio = 81, /* EPM enable */ |
| 447 | .settings = { |
| 448 | [GPIOMUX_SUSPENDED] = &gpio_epm_config, |
| 449 | }, |
| 450 | }, |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 451 | }; |
| 452 | |
Sagar Dharia | a8e6b0a | 2012-08-10 20:52:30 -0600 | [diff] [blame] | 453 | static struct msm_gpiomux_config msm8974_slimbus_config[] __initdata = { |
| 454 | { |
| 455 | .gpio = 70, /* slimbus clk */ |
| 456 | .settings = { |
| 457 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 458 | }, |
| 459 | }, |
| 460 | { |
| 461 | .gpio = 71, /* slimbus data */ |
| 462 | .settings = { |
| 463 | [GPIOMUX_SUSPENDED] = &slimbus, |
| 464 | }, |
| 465 | }, |
| 466 | }; |
| 467 | |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 468 | static struct gpiomux_setting cam_settings[] = { |
| 469 | { |
Sreesudhan Ramakrish Ramkumar | 88c4a09 | 2012-09-07 23:43:46 -0700 | [diff] [blame] | 470 | .func = GPIOMUX_FUNC_1, /*active 1*/ /* 0 */ |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 471 | .drv = GPIOMUX_DRV_2MA, |
| 472 | .pull = GPIOMUX_PULL_NONE, |
| 473 | }, |
| 474 | |
| 475 | { |
Sreesudhan Ramakrish Ramkumar | 88c4a09 | 2012-09-07 23:43:46 -0700 | [diff] [blame] | 476 | .func = GPIOMUX_FUNC_1, /*suspend*/ /* 1 */ |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 477 | .drv = GPIOMUX_DRV_2MA, |
| 478 | .pull = GPIOMUX_PULL_DOWN, |
| 479 | }, |
| 480 | |
| 481 | { |
Sreesudhan Ramakrish Ramkumar | 88c4a09 | 2012-09-07 23:43:46 -0700 | [diff] [blame] | 482 | .func = GPIOMUX_FUNC_1, /*i2c suspend*/ /* 2 */ |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 483 | .drv = GPIOMUX_DRV_2MA, |
| 484 | .pull = GPIOMUX_PULL_KEEPER, |
| 485 | }, |
Sreesudhan Ramakrish Ramkumar | 88c4a09 | 2012-09-07 23:43:46 -0700 | [diff] [blame] | 486 | |
| 487 | { |
| 488 | .func = GPIOMUX_FUNC_GPIO, /*active 0*/ /* 3 */ |
| 489 | .drv = GPIOMUX_DRV_2MA, |
| 490 | .pull = GPIOMUX_PULL_NONE, |
| 491 | }, |
| 492 | |
| 493 | { |
| 494 | .func = GPIOMUX_FUNC_GPIO, /*suspend 0*/ /* 4 */ |
| 495 | .drv = GPIOMUX_DRV_2MA, |
| 496 | .pull = GPIOMUX_PULL_DOWN, |
| 497 | }, |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 498 | }; |
| 499 | |
Subhash Jadavani | 76aa7de | 2012-10-10 09:58:17 +0530 | [diff] [blame] | 500 | static struct gpiomux_setting sd_card_det_config = { |
| 501 | .func = GPIOMUX_FUNC_GPIO, |
| 502 | .drv = GPIOMUX_DRV_2MA, |
| 503 | .pull = GPIOMUX_PULL_NONE, |
| 504 | .dir = GPIOMUX_IN, |
| 505 | }; |
| 506 | |
| 507 | static struct msm_gpiomux_config sd_card_det __initdata = { |
| 508 | .gpio = 62, |
| 509 | .settings = { |
| 510 | [GPIOMUX_ACTIVE] = &sd_card_det_config, |
| 511 | [GPIOMUX_SUSPENDED] = &sd_card_det_config, |
| 512 | }, |
| 513 | }; |
| 514 | |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 515 | static struct msm_gpiomux_config msm_sensor_configs[] __initdata = { |
| 516 | { |
| 517 | .gpio = 15, /* CAM_MCLK0 */ |
| 518 | .settings = { |
| 519 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 520 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 521 | }, |
| 522 | }, |
| 523 | { |
| 524 | .gpio = 16, /* CAM_MCLK1 */ |
| 525 | .settings = { |
| 526 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 527 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 528 | }, |
| 529 | }, |
| 530 | { |
| 531 | .gpio = 17, /* CAM_MCLK2 */ |
| 532 | .settings = { |
| 533 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 534 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 535 | }, |
| 536 | }, |
| 537 | { |
| 538 | .gpio = 18, /* WEBCAM1_RESET_N / CAM_MCLK3 */ |
| 539 | .settings = { |
Sreesudhan Ramakrish Ramkumar | 88c4a09 | 2012-09-07 23:43:46 -0700 | [diff] [blame] | 540 | [GPIOMUX_ACTIVE] = &cam_settings[3], |
| 541 | [GPIOMUX_SUSPENDED] = &cam_settings[4], |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 542 | }, |
| 543 | }, |
| 544 | { |
| 545 | .gpio = 19, /* CCI_I2C_SDA0 */ |
| 546 | .settings = { |
| 547 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 548 | [GPIOMUX_SUSPENDED] = &cam_settings[2], |
| 549 | }, |
| 550 | }, |
| 551 | { |
| 552 | .gpio = 20, /* CCI_I2C_SCL0 */ |
| 553 | .settings = { |
| 554 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 555 | [GPIOMUX_SUSPENDED] = &cam_settings[2], |
| 556 | }, |
| 557 | }, |
| 558 | { |
| 559 | .gpio = 21, /* CCI_I2C_SDA1 */ |
| 560 | .settings = { |
| 561 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 562 | [GPIOMUX_SUSPENDED] = &cam_settings[2], |
| 563 | }, |
| 564 | }, |
| 565 | { |
| 566 | .gpio = 22, /* CCI_I2C_SCL1 */ |
| 567 | .settings = { |
| 568 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 569 | [GPIOMUX_SUSPENDED] = &cam_settings[2], |
| 570 | }, |
| 571 | }, |
| 572 | { |
| 573 | .gpio = 23, /* FLASH_LED_EN */ |
| 574 | .settings = { |
| 575 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 576 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 577 | }, |
| 578 | }, |
| 579 | { |
| 580 | .gpio = 24, /* FLASH_LED_NOW */ |
| 581 | .settings = { |
| 582 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 583 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 584 | }, |
| 585 | }, |
| 586 | { |
| 587 | .gpio = 25, /* WEBCAM2_RESET_N */ |
| 588 | .settings = { |
| 589 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 590 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 591 | }, |
| 592 | }, |
| 593 | { |
| 594 | .gpio = 26, /* CAM_IRQ */ |
| 595 | .settings = { |
| 596 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 597 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 598 | }, |
| 599 | }, |
| 600 | { |
| 601 | .gpio = 27, /* OIS_SYNC */ |
| 602 | .settings = { |
| 603 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 604 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 605 | }, |
| 606 | }, |
| 607 | { |
| 608 | .gpio = 28, /* WEBCAM1_STANDBY */ |
| 609 | .settings = { |
| 610 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 611 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 612 | }, |
| 613 | }, |
| 614 | { |
| 615 | .gpio = 89, /* CAM1_STANDBY_N */ |
| 616 | .settings = { |
| 617 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 618 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 619 | }, |
| 620 | }, |
| 621 | { |
| 622 | .gpio = 90, /* CAM1_RST_N */ |
| 623 | .settings = { |
| 624 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 625 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 626 | }, |
| 627 | }, |
| 628 | { |
| 629 | .gpio = 91, /* CAM2_STANDBY_N */ |
| 630 | .settings = { |
| 631 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 632 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 633 | }, |
| 634 | }, |
| 635 | { |
| 636 | .gpio = 92, /* CAM2_RST_N */ |
| 637 | .settings = { |
| 638 | [GPIOMUX_ACTIVE] = &cam_settings[0], |
| 639 | [GPIOMUX_SUSPENDED] = &cam_settings[1], |
| 640 | }, |
| 641 | }, |
| 642 | }; |
Damir Didjusto | 04d3c36 | 2013-01-07 14:30:53 -0800 | [diff] [blame^] | 643 | |
| 644 | static struct gpiomux_setting pri_auxpcm_act_cfg = { |
| 645 | .func = GPIOMUX_FUNC_1, |
| 646 | .drv = GPIOMUX_DRV_8MA, |
| 647 | .pull = GPIOMUX_PULL_NONE, |
| 648 | }; |
| 649 | |
| 650 | |
| 651 | static struct gpiomux_setting pri_auxpcm_sus_cfg = { |
| 652 | .func = GPIOMUX_FUNC_1, |
| 653 | .drv = GPIOMUX_DRV_2MA, |
| 654 | .pull = GPIOMUX_PULL_DOWN, |
| 655 | }; |
| 656 | |
| 657 | static struct msm_gpiomux_config msm8974_pri_auxpcm_configs[] __initdata = { |
| 658 | { |
| 659 | .gpio = 65, |
| 660 | .settings = { |
| 661 | [GPIOMUX_SUSPENDED] = &pri_auxpcm_sus_cfg, |
| 662 | [GPIOMUX_ACTIVE] = &pri_auxpcm_act_cfg, |
| 663 | }, |
| 664 | }, |
| 665 | { |
| 666 | .gpio = 66, |
| 667 | .settings = { |
| 668 | [GPIOMUX_SUSPENDED] = &pri_auxpcm_sus_cfg, |
| 669 | [GPIOMUX_ACTIVE] = &pri_auxpcm_act_cfg, |
| 670 | }, |
| 671 | }, |
| 672 | { |
| 673 | .gpio = 67, |
| 674 | .settings = { |
| 675 | [GPIOMUX_SUSPENDED] = &pri_auxpcm_sus_cfg, |
| 676 | [GPIOMUX_ACTIVE] = &pri_auxpcm_act_cfg, |
| 677 | }, |
| 678 | }, |
| 679 | { |
| 680 | .gpio = 68, |
| 681 | .settings = { |
| 682 | [GPIOMUX_SUSPENDED] = &pri_auxpcm_sus_cfg, |
| 683 | [GPIOMUX_ACTIVE] = &pri_auxpcm_act_cfg, |
| 684 | }, |
| 685 | }, |
| 686 | }; |
| 687 | |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame] | 688 | static struct msm_gpiomux_config wcnss_5wire_interface[] = { |
| 689 | { |
| 690 | .gpio = 36, |
| 691 | .settings = { |
| 692 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 693 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 694 | }, |
| 695 | }, |
| 696 | { |
| 697 | .gpio = 37, |
| 698 | .settings = { |
| 699 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 700 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 701 | }, |
| 702 | }, |
| 703 | { |
| 704 | .gpio = 38, |
| 705 | .settings = { |
| 706 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 707 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 708 | }, |
| 709 | }, |
| 710 | { |
| 711 | .gpio = 39, |
| 712 | .settings = { |
| 713 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 714 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 715 | }, |
| 716 | }, |
| 717 | { |
| 718 | .gpio = 40, |
| 719 | .settings = { |
| 720 | [GPIOMUX_ACTIVE] = &wcnss_5wire_active_cfg, |
| 721 | [GPIOMUX_SUSPENDED] = &wcnss_5wire_suspend_cfg, |
| 722 | }, |
| 723 | }, |
| 724 | }; |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 725 | |
Joonwoo Park | 187e9cb | 2012-08-24 22:47:53 -0700 | [diff] [blame] | 726 | static struct msm_gpiomux_config msm_taiko_config[] __initdata = { |
| 727 | { |
| 728 | .gpio = 63, /* SYS_RST_N */ |
| 729 | .settings = { |
| 730 | [GPIOMUX_SUSPENDED] = &taiko_reset, |
| 731 | }, |
Joonwoo Park | eb84dc7 | 2012-09-12 10:22:49 -0700 | [diff] [blame] | 732 | }, |
| 733 | { |
| 734 | .gpio = 72, /* CDC_INT */ |
| 735 | .settings = { |
| 736 | [GPIOMUX_SUSPENDED] = &taiko_int, |
| 737 | }, |
| 738 | }, |
Joonwoo Park | 187e9cb | 2012-08-24 22:47:53 -0700 | [diff] [blame] | 739 | }; |
| 740 | |
Subhash Jadavani | 102f0ce | 2012-12-14 21:25:59 +0530 | [diff] [blame] | 741 | #ifdef CONFIG_MMC_MSM_SDC3_SUPPORT |
| 742 | static struct gpiomux_setting sdc3_clk_actv_cfg = { |
| 743 | .func = GPIOMUX_FUNC_2, |
| 744 | .drv = GPIOMUX_DRV_8MA, |
| 745 | .pull = GPIOMUX_PULL_NONE, |
| 746 | }; |
| 747 | |
| 748 | static struct gpiomux_setting sdc3_cmd_data_0_3_actv_cfg = { |
| 749 | .func = GPIOMUX_FUNC_2, |
| 750 | .drv = GPIOMUX_DRV_8MA, |
| 751 | .pull = GPIOMUX_PULL_UP, |
| 752 | }; |
| 753 | |
| 754 | static struct gpiomux_setting sdc3_suspend_cfg = { |
| 755 | .func = GPIOMUX_FUNC_GPIO, |
| 756 | .drv = GPIOMUX_DRV_2MA, |
| 757 | .pull = GPIOMUX_PULL_DOWN, |
| 758 | }; |
| 759 | |
| 760 | static struct gpiomux_setting sdc3_data_1_suspend_cfg = { |
| 761 | .func = GPIOMUX_FUNC_GPIO, |
| 762 | .drv = GPIOMUX_DRV_8MA, |
| 763 | .pull = GPIOMUX_PULL_UP, |
| 764 | }; |
| 765 | |
| 766 | static struct msm_gpiomux_config msm8974_sdc3_configs[] __initdata = { |
| 767 | { |
| 768 | /* DAT3 */ |
| 769 | .gpio = 35, |
| 770 | .settings = { |
| 771 | [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg, |
| 772 | [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg, |
| 773 | }, |
| 774 | }, |
| 775 | { |
| 776 | /* DAT2 */ |
| 777 | .gpio = 36, |
| 778 | .settings = { |
| 779 | [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg, |
| 780 | [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg, |
| 781 | }, |
| 782 | }, |
| 783 | { |
| 784 | /* DAT1 */ |
| 785 | .gpio = 37, |
| 786 | .settings = { |
| 787 | [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg, |
| 788 | [GPIOMUX_SUSPENDED] = &sdc3_data_1_suspend_cfg, |
| 789 | }, |
| 790 | }, |
| 791 | { |
| 792 | /* DAT0 */ |
| 793 | .gpio = 38, |
| 794 | .settings = { |
| 795 | [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg, |
| 796 | [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg, |
| 797 | }, |
| 798 | }, |
| 799 | { |
| 800 | /* CMD */ |
| 801 | .gpio = 39, |
| 802 | .settings = { |
| 803 | [GPIOMUX_ACTIVE] = &sdc3_cmd_data_0_3_actv_cfg, |
| 804 | [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg, |
| 805 | }, |
| 806 | }, |
| 807 | { |
| 808 | /* CLK */ |
| 809 | .gpio = 40, |
| 810 | .settings = { |
| 811 | [GPIOMUX_ACTIVE] = &sdc3_clk_actv_cfg, |
| 812 | [GPIOMUX_SUSPENDED] = &sdc3_suspend_cfg, |
| 813 | }, |
| 814 | }, |
| 815 | }; |
| 816 | |
| 817 | static void msm_gpiomux_sdc3_install(void) |
| 818 | { |
| 819 | msm_gpiomux_install(msm8974_sdc3_configs, |
| 820 | ARRAY_SIZE(msm8974_sdc3_configs)); |
| 821 | } |
| 822 | #else |
| 823 | static void msm_gpiomux_sdc3_install(void) {} |
| 824 | #endif /* CONFIG_MMC_MSM_SDC3_SUPPORT */ |
| 825 | |
| 826 | #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT |
| 827 | static struct gpiomux_setting sdc4_clk_actv_cfg = { |
| 828 | .func = GPIOMUX_FUNC_2, |
| 829 | .drv = GPIOMUX_DRV_8MA, |
| 830 | .pull = GPIOMUX_PULL_NONE, |
| 831 | }; |
| 832 | |
| 833 | static struct gpiomux_setting sdc4_cmd_data_0_3_actv_cfg = { |
| 834 | .func = GPIOMUX_FUNC_2, |
| 835 | .drv = GPIOMUX_DRV_8MA, |
| 836 | .pull = GPIOMUX_PULL_UP, |
| 837 | }; |
| 838 | |
| 839 | static struct gpiomux_setting sdc4_suspend_cfg = { |
| 840 | .func = GPIOMUX_FUNC_GPIO, |
| 841 | .drv = GPIOMUX_DRV_2MA, |
| 842 | .pull = GPIOMUX_PULL_DOWN, |
| 843 | }; |
| 844 | |
| 845 | static struct gpiomux_setting sdc4_data_1_suspend_cfg = { |
| 846 | .func = GPIOMUX_FUNC_GPIO, |
| 847 | .drv = GPIOMUX_DRV_8MA, |
| 848 | .pull = GPIOMUX_PULL_UP, |
| 849 | }; |
| 850 | |
| 851 | static struct msm_gpiomux_config msm8974_sdc4_configs[] __initdata = { |
| 852 | { |
| 853 | /* DAT3 */ |
| 854 | .gpio = 92, |
| 855 | .settings = { |
| 856 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_actv_cfg, |
| 857 | [GPIOMUX_SUSPENDED] = &sdc4_suspend_cfg, |
| 858 | }, |
| 859 | }, |
| 860 | { |
| 861 | /* DAT2 */ |
| 862 | .gpio = 94, |
| 863 | .settings = { |
| 864 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_actv_cfg, |
| 865 | [GPIOMUX_SUSPENDED] = &sdc4_suspend_cfg, |
| 866 | }, |
| 867 | }, |
| 868 | { |
| 869 | /* DAT1 */ |
| 870 | .gpio = 95, |
| 871 | .settings = { |
| 872 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_actv_cfg, |
| 873 | [GPIOMUX_SUSPENDED] = &sdc4_data_1_suspend_cfg, |
| 874 | }, |
| 875 | }, |
| 876 | { |
| 877 | /* DAT0 */ |
| 878 | .gpio = 96, |
| 879 | .settings = { |
| 880 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_actv_cfg, |
| 881 | [GPIOMUX_SUSPENDED] = &sdc4_suspend_cfg, |
| 882 | }, |
| 883 | }, |
| 884 | { |
| 885 | /* CMD */ |
| 886 | .gpio = 91, |
| 887 | .settings = { |
| 888 | [GPIOMUX_ACTIVE] = &sdc4_cmd_data_0_3_actv_cfg, |
| 889 | [GPIOMUX_SUSPENDED] = &sdc4_suspend_cfg, |
| 890 | }, |
| 891 | }, |
| 892 | { |
| 893 | /* CLK */ |
| 894 | .gpio = 93, |
| 895 | .settings = { |
| 896 | [GPIOMUX_ACTIVE] = &sdc4_clk_actv_cfg, |
| 897 | [GPIOMUX_SUSPENDED] = &sdc4_suspend_cfg, |
| 898 | }, |
| 899 | }, |
| 900 | }; |
| 901 | |
| 902 | static void msm_gpiomux_sdc4_install(void) |
| 903 | { |
| 904 | msm_gpiomux_install(msm8974_sdc4_configs, |
| 905 | ARRAY_SIZE(msm8974_sdc4_configs)); |
| 906 | } |
| 907 | #else |
| 908 | static void msm_gpiomux_sdc4_install(void) {} |
| 909 | #endif /* CONFIG_MMC_MSM_SDC4_SUPPORT */ |
| 910 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 911 | void __init msm_8974_init_gpiomux(void) |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 912 | { |
| 913 | int rc; |
| 914 | |
Rohit Vaswani | 341c203 | 2012-11-08 18:49:29 -0800 | [diff] [blame] | 915 | rc = msm_gpiomux_init_dt(); |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 916 | if (rc) { |
Rohit Vaswani | 341c203 | 2012-11-08 18:49:29 -0800 | [diff] [blame] | 917 | pr_err("%s failed %d\n", __func__, rc); |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 918 | return; |
| 919 | } |
| 920 | |
Sathish Ambley | e3154b4 | 2012-04-09 10:59:09 -0700 | [diff] [blame] | 921 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
| 922 | msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); |
| 923 | #endif |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 924 | msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame] | 925 | msm_gpiomux_install(wcnss_5wire_interface, |
| 926 | ARRAY_SIZE(wcnss_5wire_interface)); |
Sagar Dharia | a8e6b0a | 2012-08-10 20:52:30 -0600 | [diff] [blame] | 927 | |
| 928 | msm_gpiomux_install(msm8974_slimbus_config, |
| 929 | ARRAY_SIZE(msm8974_slimbus_config)); |
| 930 | |
Amy Maloche | 9e99a79 | 2012-08-15 23:27:51 -0700 | [diff] [blame] | 931 | msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs)); |
Amy Maloche | 527acc4 | 2012-12-07 18:40:54 -0800 | [diff] [blame] | 932 | msm_gpiomux_install(hap_lvl_shft_config, |
| 933 | ARRAY_SIZE(hap_lvl_shft_config)); |
Kevin Chan | bdcf7ef | 2012-08-24 08:33:33 -0700 | [diff] [blame] | 934 | |
| 935 | msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); |
Joonwoo Park | 187e9cb | 2012-08-24 22:47:53 -0700 | [diff] [blame] | 936 | |
Subhash Jadavani | 76aa7de | 2012-10-10 09:58:17 +0530 | [diff] [blame] | 937 | msm_gpiomux_install(&sd_card_det, 1); |
Subhash Jadavani | 102f0ce | 2012-12-14 21:25:59 +0530 | [diff] [blame] | 938 | msm_gpiomux_sdc3_install(); |
| 939 | msm_gpiomux_sdc4_install(); |
Subhash Jadavani | 76aa7de | 2012-10-10 09:58:17 +0530 | [diff] [blame] | 940 | |
Joonwoo Park | 187e9cb | 2012-08-24 22:47:53 -0700 | [diff] [blame] | 941 | msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); |
Ujwal Patel | 74b5df4 | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 942 | |
Manu Gautam | ac7265b | 2012-11-21 11:49:15 +0530 | [diff] [blame] | 943 | msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); |
| 944 | msm_gpiomux_install(msm_hsic_hub_configs, |
| 945 | ARRAY_SIZE(msm_hsic_hub_configs)); |
| 946 | |
Ujwal Patel | 74b5df4 | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 947 | msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); |
Manoj Rao | 5bf2a7e | 2012-10-29 12:53:27 -0700 | [diff] [blame] | 948 | msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); |
Stepan Moskovchenko | 95108b8 | 2012-11-27 14:28:11 -0800 | [diff] [blame] | 949 | |
Damir Didjusto | 04d3c36 | 2013-01-07 14:30:53 -0800 | [diff] [blame^] | 950 | msm_gpiomux_install(msm8974_pri_auxpcm_configs, |
| 951 | ARRAY_SIZE(msm8974_pri_auxpcm_configs)); |
| 952 | |
Stepan Moskovchenko | 95108b8 | 2012-11-27 14:28:11 -0800 | [diff] [blame] | 953 | if (machine_is_msm8974_rumi()) |
| 954 | msm_gpiomux_install(msm_rumi_blsp_configs, |
| 955 | ARRAY_SIZE(msm_rumi_blsp_configs)); |
Sathish Ambley | b17ec7e | 2012-04-03 15:20:03 -0700 | [diff] [blame] | 956 | } |