| Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved. |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -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/kernel.h> |
| 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/regulator/machine.h> |
| 17 | #include <linux/regulator/consumer.h> |
| Deepak Kotur | 12301a7 | 2011-11-09 18:30:29 -0800 | [diff] [blame] | 18 | #include <linux/ion.h> |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | #include <mach/irqs.h> |
| 20 | #include <mach/dma.h> |
| 21 | #include <asm/mach/mmc.h> |
| 22 | #include <asm/clkdev.h> |
| 23 | #include <linux/msm_kgsl.h> |
| 24 | #include <linux/msm_rotator.h> |
| 25 | #include <mach/msm_hsusb.h> |
| 26 | #include "footswitch.h" |
| 27 | #include "clock.h" |
| 28 | #include "clock-rpm.h" |
| 29 | #include "clock-voter.h" |
| 30 | #include "devices.h" |
| 31 | #include "devices-msm8x60.h" |
| 32 | #include <linux/dma-mapping.h> |
| 33 | #include <linux/irq.h> |
| 34 | #include <linux/clk.h> |
| 35 | #include <asm/hardware/gic.h> |
| 36 | #include <asm/mach-types.h> |
| 37 | #include <asm/clkdev.h> |
| 38 | #include <mach/msm_serial_hs_lite.h> |
| 39 | #include <mach/msm_bus.h> |
| 40 | #include <mach/msm_bus_board.h> |
| 41 | #include <mach/socinfo.h> |
| 42 | #include <mach/msm_memtypes.h> |
| 43 | #include <mach/msm_tsif.h> |
| 44 | #include <mach/scm-io.h> |
| 45 | #ifdef CONFIG_MSM_DSPS |
| 46 | #include <mach/msm_dsps.h> |
| 47 | #endif |
| 48 | #include <linux/android_pmem.h> |
| 49 | #include <linux/gpio.h> |
| 50 | #include <linux/delay.h> |
| 51 | #include <mach/mdm.h> |
| 52 | #include <mach/rpm.h> |
| 53 | #include <mach/board.h> |
| Lei Zhou | 01366a4 | 2011-08-19 13:12:00 -0400 | [diff] [blame] | 54 | #include <sound/apr_audio.h> |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 55 | #include "rpm_log.h" |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 56 | #include "rpm_stats.h" |
| Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 57 | #include <mach/mpm.h> |
| Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 58 | #include "msm_watchdog.h" |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | |
| 60 | /* Address of GSBI blocks */ |
| 61 | #define MSM_GSBI1_PHYS 0x16000000 |
| 62 | #define MSM_GSBI2_PHYS 0x16100000 |
| 63 | #define MSM_GSBI3_PHYS 0x16200000 |
| 64 | #define MSM_GSBI4_PHYS 0x16300000 |
| 65 | #define MSM_GSBI5_PHYS 0x16400000 |
| 66 | #define MSM_GSBI6_PHYS 0x16500000 |
| 67 | #define MSM_GSBI7_PHYS 0x16600000 |
| 68 | #define MSM_GSBI8_PHYS 0x19800000 |
| 69 | #define MSM_GSBI9_PHYS 0x19900000 |
| 70 | #define MSM_GSBI10_PHYS 0x19A00000 |
| 71 | #define MSM_GSBI11_PHYS 0x19B00000 |
| 72 | #define MSM_GSBI12_PHYS 0x19C00000 |
| 73 | |
| 74 | /* GSBI QUPe devices */ |
| 75 | #define MSM_GSBI1_QUP_PHYS 0x16080000 |
| 76 | #define MSM_GSBI2_QUP_PHYS 0x16180000 |
| 77 | #define MSM_GSBI3_QUP_PHYS 0x16280000 |
| 78 | #define MSM_GSBI4_QUP_PHYS 0x16380000 |
| 79 | #define MSM_GSBI5_QUP_PHYS 0x16480000 |
| 80 | #define MSM_GSBI6_QUP_PHYS 0x16580000 |
| 81 | #define MSM_GSBI7_QUP_PHYS 0x16680000 |
| 82 | #define MSM_GSBI8_QUP_PHYS 0x19880000 |
| 83 | #define MSM_GSBI9_QUP_PHYS 0x19980000 |
| 84 | #define MSM_GSBI10_QUP_PHYS 0x19A80000 |
| 85 | #define MSM_GSBI11_QUP_PHYS 0x19B80000 |
| 86 | #define MSM_GSBI12_QUP_PHYS 0x19C80000 |
| 87 | |
| 88 | /* GSBI UART devices */ |
| 89 | #define MSM_UART1DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
| 90 | #define INT_UART1DM_IRQ GSBI6_UARTDM_IRQ |
| 91 | #define INT_UART2DM_IRQ GSBI12_UARTDM_IRQ |
| 92 | #define MSM_UART2DM_PHYS 0x19C40000 |
| 93 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
| 94 | #define INT_UART3DM_IRQ GSBI3_UARTDM_IRQ |
| 95 | #define TCSR_BASE_PHYS 0x16b00000 |
| 96 | |
| 97 | /* PRNG device */ |
| 98 | #define MSM_PRNG_PHYS 0x16C00000 |
| 99 | #define MSM_UART9DM_PHYS (MSM_GSBI9_PHYS + 0x40000) |
| 100 | #define INT_UART9DM_IRQ GSBI9_UARTDM_IRQ |
| 101 | |
| 102 | static void charm_ap2mdm_kpdpwr_on(void) |
| 103 | { |
| 104 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 0); |
| Laura Abbott | eda2337 | 2011-08-17 09:25:56 -0700 | [diff] [blame] | 105 | gpio_direction_output(AP2MDM_KPDPWR_N, 1); |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | static void charm_ap2mdm_kpdpwr_off(void) |
| 109 | { |
| 110 | int i; |
| 111 | |
| 112 | gpio_direction_output(AP2MDM_ERRFATAL, 1); |
| 113 | |
| 114 | for (i = 20; i > 0; i--) { |
| 115 | if (gpio_get_value(MDM2AP_STATUS) == 0) |
| 116 | break; |
| 117 | msleep(100); |
| 118 | } |
| 119 | gpio_direction_output(AP2MDM_ERRFATAL, 0); |
| 120 | |
| 121 | if (i == 0) { |
| 122 | pr_err("%s: MDM2AP_STATUS never went low. Doing a hard reset \ |
| 123 | of the charm modem.\n", __func__); |
| 124 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 1); |
| 125 | /* |
| 126 | * Currently, there is a debounce timer on the charm PMIC. It is |
| 127 | * necessary to hold the AP2MDM_PMIC_RESET low for ~3.5 seconds |
| 128 | * for the reset to fully take place. Sleep here to ensure the |
| 129 | * reset has occured before the function exits. |
| 130 | */ |
| 131 | msleep(4000); |
| 132 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 0); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | static struct resource charm_resources[] = { |
| 137 | /* MDM2AP_ERRFATAL */ |
| 138 | { |
| 139 | .start = MSM_GPIO_TO_INT(MDM2AP_ERRFATAL), |
| 140 | .end = MSM_GPIO_TO_INT(MDM2AP_ERRFATAL), |
| 141 | .flags = IORESOURCE_IRQ, |
| 142 | }, |
| 143 | /* MDM2AP_STATUS */ |
| 144 | { |
| 145 | .start = MSM_GPIO_TO_INT(MDM2AP_STATUS), |
| 146 | .end = MSM_GPIO_TO_INT(MDM2AP_STATUS), |
| 147 | .flags = IORESOURCE_IRQ, |
| 148 | } |
| 149 | }; |
| 150 | |
| 151 | static struct charm_platform_data mdm_platform_data = { |
| 152 | .charm_modem_on = charm_ap2mdm_kpdpwr_on, |
| 153 | .charm_modem_off = charm_ap2mdm_kpdpwr_off, |
| 154 | }; |
| 155 | |
| 156 | struct platform_device msm_charm_modem = { |
| 157 | .name = "charm_modem", |
| 158 | .id = -1, |
| 159 | .num_resources = ARRAY_SIZE(charm_resources), |
| 160 | .resource = charm_resources, |
| 161 | .dev = { |
| 162 | .platform_data = &mdm_platform_data, |
| 163 | }, |
| 164 | }; |
| 165 | |
| 166 | #ifdef CONFIG_MSM_DSPS |
| 167 | #define GSBI12_DEV (&msm_dsps_device.dev) |
| 168 | #else |
| 169 | #define GSBI12_DEV (&msm_gsbi12_qup_i2c_device.dev) |
| 170 | #endif |
| 171 | |
| 172 | void __init msm8x60_init_irq(void) |
| 173 | { |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 174 | struct msm_mpm_device_data *data = NULL; |
| 175 | |
| 176 | #ifdef CONFIG_MSM_MPM |
| 177 | data = &msm8660_mpm_dev_data; |
| 178 | #endif |
| 179 | |
| 180 | msm_mpm_irq_extn_init(data); |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 181 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, (void *)MSM_QGIC_CPU_BASE); |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 182 | } |
| 183 | |
| Stephen Boyd | 3acc9e4 | 2011-09-28 16:46:40 -0700 | [diff] [blame] | 184 | #define MSM_LPASS_QDSP6SS_PHYS 0x28800000 |
| 185 | |
| 186 | static struct resource msm_8660_q6_resources[] = { |
| 187 | { |
| 188 | .start = MSM_LPASS_QDSP6SS_PHYS, |
| 189 | .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1, |
| 190 | .flags = IORESOURCE_MEM, |
| 191 | }, |
| 192 | }; |
| 193 | |
| 194 | struct platform_device msm_pil_q6v3 = { |
| 195 | .name = "pil_qdsp6v3", |
| 196 | .id = -1, |
| 197 | .num_resources = ARRAY_SIZE(msm_8660_q6_resources), |
| 198 | .resource = msm_8660_q6_resources, |
| 199 | }; |
| 200 | |
| Stephen Boyd | 4eb885b | 2011-09-29 01:16:03 -0700 | [diff] [blame] | 201 | #define MSM_MSS_REGS_PHYS 0x10200000 |
| 202 | |
| 203 | static struct resource msm_8660_modem_resources[] = { |
| 204 | { |
| 205 | .start = MSM_MSS_REGS_PHYS, |
| 206 | .end = MSM_MSS_REGS_PHYS + SZ_256 - 1, |
| 207 | .flags = IORESOURCE_MEM, |
| 208 | }, |
| 209 | }; |
| 210 | |
| 211 | struct platform_device msm_pil_modem = { |
| 212 | .name = "pil_modem", |
| 213 | .id = -1, |
| 214 | .num_resources = ARRAY_SIZE(msm_8660_modem_resources), |
| 215 | .resource = msm_8660_modem_resources, |
| 216 | }; |
| 217 | |
| Stephen Boyd | d89eebe | 2011-09-28 23:28:11 -0700 | [diff] [blame] | 218 | struct platform_device msm_pil_tzapps = { |
| 219 | .name = "pil_tzapps", |
| 220 | .id = -1, |
| 221 | }; |
| 222 | |
| Stephen Boyd | 25c4a0b | 2011-09-20 00:12:36 -0700 | [diff] [blame] | 223 | struct platform_device msm_pil_dsps = { |
| 224 | .name = "pil_dsps", |
| 225 | .id = -1, |
| 226 | .dev.platform_data = "dsps", |
| 227 | }; |
| 228 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 229 | static struct resource msm_uart1_dm_resources[] = { |
| 230 | { |
| 231 | .start = MSM_UART1DM_PHYS, |
| 232 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 233 | .flags = IORESOURCE_MEM, |
| 234 | }, |
| 235 | { |
| 236 | .start = INT_UART1DM_IRQ, |
| 237 | .end = INT_UART1DM_IRQ, |
| 238 | .flags = IORESOURCE_IRQ, |
| 239 | }, |
| 240 | { |
| 241 | /* GSBI6 is UARTDM1 */ |
| 242 | .start = MSM_GSBI6_PHYS, |
| 243 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 244 | .name = "gsbi_resource", |
| 245 | .flags = IORESOURCE_MEM, |
| 246 | }, |
| 247 | { |
| 248 | .start = DMOV_HSUART1_TX_CHAN, |
| 249 | .end = DMOV_HSUART1_RX_CHAN, |
| 250 | .name = "uartdm_channels", |
| 251 | .flags = IORESOURCE_DMA, |
| 252 | }, |
| 253 | { |
| 254 | .start = DMOV_HSUART1_TX_CRCI, |
| 255 | .end = DMOV_HSUART1_RX_CRCI, |
| 256 | .name = "uartdm_crci", |
| 257 | .flags = IORESOURCE_DMA, |
| 258 | }, |
| 259 | }; |
| 260 | |
| 261 | static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32); |
| 262 | |
| 263 | struct platform_device msm_device_uart_dm1 = { |
| 264 | .name = "msm_serial_hs", |
| 265 | .id = 0, |
| 266 | .num_resources = ARRAY_SIZE(msm_uart1_dm_resources), |
| 267 | .resource = msm_uart1_dm_resources, |
| 268 | .dev = { |
| 269 | .dma_mask = &msm_uart_dm1_dma_mask, |
| 270 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 271 | }, |
| 272 | }; |
| 273 | |
| 274 | static struct resource msm_uart3_dm_resources[] = { |
| 275 | { |
| 276 | .start = MSM_UART3DM_PHYS, |
| 277 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 278 | .name = "uartdm_resource", |
| 279 | .flags = IORESOURCE_MEM, |
| 280 | }, |
| 281 | { |
| 282 | .start = INT_UART3DM_IRQ, |
| 283 | .end = INT_UART3DM_IRQ, |
| 284 | .flags = IORESOURCE_IRQ, |
| 285 | }, |
| 286 | { |
| 287 | .start = MSM_GSBI3_PHYS, |
| 288 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 289 | .name = "gsbi_resource", |
| 290 | .flags = IORESOURCE_MEM, |
| 291 | }, |
| 292 | }; |
| 293 | |
| 294 | struct platform_device msm_device_uart_dm3 = { |
| 295 | .name = "msm_serial_hsl", |
| 296 | .id = 2, |
| 297 | .num_resources = ARRAY_SIZE(msm_uart3_dm_resources), |
| 298 | .resource = msm_uart3_dm_resources, |
| 299 | }; |
| 300 | |
| 301 | static struct resource msm_uart12_dm_resources[] = { |
| 302 | { |
| 303 | .start = MSM_UART2DM_PHYS, |
| 304 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 305 | .name = "uartdm_resource", |
| 306 | .flags = IORESOURCE_MEM, |
| 307 | }, |
| 308 | { |
| 309 | .start = INT_UART2DM_IRQ, |
| 310 | .end = INT_UART2DM_IRQ, |
| 311 | .flags = IORESOURCE_IRQ, |
| 312 | }, |
| 313 | { |
| 314 | /* GSBI 12 is UARTDM2 */ |
| 315 | .start = MSM_GSBI12_PHYS, |
| 316 | .end = MSM_GSBI12_PHYS + PAGE_SIZE - 1, |
| 317 | .name = "gsbi_resource", |
| 318 | .flags = IORESOURCE_MEM, |
| 319 | }, |
| 320 | }; |
| 321 | |
| 322 | struct platform_device msm_device_uart_dm12 = { |
| 323 | .name = "msm_serial_hsl", |
| 324 | .id = 0, |
| 325 | .num_resources = ARRAY_SIZE(msm_uart12_dm_resources), |
| 326 | .resource = msm_uart12_dm_resources, |
| 327 | }; |
| 328 | |
| 329 | #ifdef CONFIG_MSM_GSBI9_UART |
| 330 | static struct msm_serial_hslite_platform_data uart_gsbi9_pdata = { |
| 331 | .config_gpio = 1, |
| 332 | .uart_tx_gpio = 67, |
| 333 | .uart_rx_gpio = 66, |
| Stepan Moskovchenko | 798fe55 | 2012-03-29 19:47:19 -0700 | [diff] [blame] | 334 | .line = 1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 335 | }; |
| 336 | |
| 337 | static struct resource msm_uart_gsbi9_resources[] = { |
| 338 | { |
| 339 | .start = MSM_UART9DM_PHYS, |
| 340 | .end = MSM_UART9DM_PHYS + PAGE_SIZE - 1, |
| 341 | .name = "uartdm_resource", |
| 342 | .flags = IORESOURCE_MEM, |
| 343 | }, |
| 344 | { |
| 345 | .start = INT_UART9DM_IRQ, |
| 346 | .end = INT_UART9DM_IRQ, |
| 347 | .flags = IORESOURCE_IRQ, |
| 348 | }, |
| 349 | { |
| 350 | /* GSBI 9 is UART_GSBI9 */ |
| 351 | .start = MSM_GSBI9_PHYS, |
| 352 | .end = MSM_GSBI9_PHYS + PAGE_SIZE - 1, |
| 353 | .name = "gsbi_resource", |
| 354 | .flags = IORESOURCE_MEM, |
| 355 | }, |
| 356 | }; |
| 357 | struct platform_device *msm_device_uart_gsbi9; |
| 358 | struct platform_device *msm_add_gsbi9_uart(void) |
| 359 | { |
| 360 | return platform_device_register_resndata(NULL, "msm_serial_hsl", |
| 361 | 1, msm_uart_gsbi9_resources, |
| 362 | ARRAY_SIZE(msm_uart_gsbi9_resources), |
| 363 | &uart_gsbi9_pdata, |
| 364 | sizeof(uart_gsbi9_pdata)); |
| 365 | } |
| 366 | #endif |
| 367 | |
| 368 | static struct resource gsbi3_qup_i2c_resources[] = { |
| 369 | { |
| 370 | .name = "qup_phys_addr", |
| 371 | .start = MSM_GSBI3_QUP_PHYS, |
| 372 | .end = MSM_GSBI3_QUP_PHYS + SZ_4K - 1, |
| 373 | .flags = IORESOURCE_MEM, |
| 374 | }, |
| 375 | { |
| 376 | .name = "gsbi_qup_i2c_addr", |
| 377 | .start = MSM_GSBI3_PHYS, |
| 378 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 379 | .flags = IORESOURCE_MEM, |
| 380 | }, |
| 381 | { |
| 382 | .name = "qup_err_intr", |
| 383 | .start = GSBI3_QUP_IRQ, |
| 384 | .end = GSBI3_QUP_IRQ, |
| 385 | .flags = IORESOURCE_IRQ, |
| 386 | }, |
| 387 | { |
| 388 | .name = "i2c_clk", |
| 389 | .start = 44, |
| 390 | .end = 44, |
| 391 | .flags = IORESOURCE_IO, |
| 392 | }, |
| 393 | { |
| 394 | .name = "i2c_sda", |
| 395 | .start = 43, |
| 396 | .end = 43, |
| 397 | .flags = IORESOURCE_IO, |
| 398 | }, |
| 399 | }; |
| 400 | |
| 401 | static struct resource gsbi4_qup_i2c_resources[] = { |
| 402 | { |
| 403 | .name = "qup_phys_addr", |
| 404 | .start = MSM_GSBI4_QUP_PHYS, |
| 405 | .end = MSM_GSBI4_QUP_PHYS + SZ_4K - 1, |
| 406 | .flags = IORESOURCE_MEM, |
| 407 | }, |
| 408 | { |
| 409 | .name = "gsbi_qup_i2c_addr", |
| 410 | .start = MSM_GSBI4_PHYS, |
| 411 | .end = MSM_GSBI4_PHYS + 4 - 1, |
| 412 | .flags = IORESOURCE_MEM, |
| 413 | }, |
| 414 | { |
| 415 | .name = "qup_err_intr", |
| 416 | .start = GSBI4_QUP_IRQ, |
| 417 | .end = GSBI4_QUP_IRQ, |
| 418 | .flags = IORESOURCE_IRQ, |
| 419 | }, |
| 420 | }; |
| 421 | |
| 422 | static struct resource gsbi7_qup_i2c_resources[] = { |
| 423 | { |
| 424 | .name = "qup_phys_addr", |
| 425 | .start = MSM_GSBI7_QUP_PHYS, |
| 426 | .end = MSM_GSBI7_QUP_PHYS + SZ_4K - 1, |
| 427 | .flags = IORESOURCE_MEM, |
| 428 | }, |
| 429 | { |
| 430 | .name = "gsbi_qup_i2c_addr", |
| 431 | .start = MSM_GSBI7_PHYS, |
| 432 | .end = MSM_GSBI7_PHYS + 4 - 1, |
| 433 | .flags = IORESOURCE_MEM, |
| 434 | }, |
| 435 | { |
| 436 | .name = "qup_err_intr", |
| 437 | .start = GSBI7_QUP_IRQ, |
| 438 | .end = GSBI7_QUP_IRQ, |
| 439 | .flags = IORESOURCE_IRQ, |
| 440 | }, |
| 441 | { |
| 442 | .name = "i2c_clk", |
| 443 | .start = 60, |
| 444 | .end = 60, |
| 445 | .flags = IORESOURCE_IO, |
| 446 | }, |
| 447 | { |
| 448 | .name = "i2c_sda", |
| 449 | .start = 59, |
| 450 | .end = 59, |
| 451 | .flags = IORESOURCE_IO, |
| 452 | }, |
| 453 | }; |
| 454 | |
| 455 | static struct resource gsbi8_qup_i2c_resources[] = { |
| 456 | { |
| 457 | .name = "qup_phys_addr", |
| 458 | .start = MSM_GSBI8_QUP_PHYS, |
| 459 | .end = MSM_GSBI8_QUP_PHYS + SZ_4K - 1, |
| 460 | .flags = IORESOURCE_MEM, |
| 461 | }, |
| 462 | { |
| 463 | .name = "gsbi_qup_i2c_addr", |
| 464 | .start = MSM_GSBI8_PHYS, |
| 465 | .end = MSM_GSBI8_PHYS + 4 - 1, |
| 466 | .flags = IORESOURCE_MEM, |
| 467 | }, |
| 468 | { |
| 469 | .name = "qup_err_intr", |
| 470 | .start = GSBI8_QUP_IRQ, |
| 471 | .end = GSBI8_QUP_IRQ, |
| 472 | .flags = IORESOURCE_IRQ, |
| 473 | }, |
| 474 | }; |
| 475 | |
| 476 | static struct resource gsbi9_qup_i2c_resources[] = { |
| 477 | { |
| 478 | .name = "qup_phys_addr", |
| 479 | .start = MSM_GSBI9_QUP_PHYS, |
| 480 | .end = MSM_GSBI9_QUP_PHYS + SZ_4K - 1, |
| 481 | .flags = IORESOURCE_MEM, |
| 482 | }, |
| 483 | { |
| 484 | .name = "gsbi_qup_i2c_addr", |
| 485 | .start = MSM_GSBI9_PHYS, |
| 486 | .end = MSM_GSBI9_PHYS + 4 - 1, |
| 487 | .flags = IORESOURCE_MEM, |
| 488 | }, |
| 489 | { |
| 490 | .name = "qup_err_intr", |
| 491 | .start = GSBI9_QUP_IRQ, |
| 492 | .end = GSBI9_QUP_IRQ, |
| 493 | .flags = IORESOURCE_IRQ, |
| 494 | }, |
| 495 | }; |
| 496 | |
| 497 | static struct resource gsbi12_qup_i2c_resources[] = { |
| 498 | { |
| 499 | .name = "qup_phys_addr", |
| 500 | .start = MSM_GSBI12_QUP_PHYS, |
| 501 | .end = MSM_GSBI12_QUP_PHYS + SZ_4K - 1, |
| 502 | .flags = IORESOURCE_MEM, |
| 503 | }, |
| 504 | { |
| 505 | .name = "gsbi_qup_i2c_addr", |
| 506 | .start = MSM_GSBI12_PHYS, |
| 507 | .end = MSM_GSBI12_PHYS + 4 - 1, |
| 508 | .flags = IORESOURCE_MEM, |
| 509 | }, |
| 510 | { |
| 511 | .name = "qup_err_intr", |
| 512 | .start = GSBI12_QUP_IRQ, |
| 513 | .end = GSBI12_QUP_IRQ, |
| 514 | .flags = IORESOURCE_IRQ, |
| 515 | }, |
| 516 | }; |
| 517 | |
| 518 | #ifdef CONFIG_MSM_BUS_SCALING |
| 519 | static struct msm_bus_vectors grp3d_init_vectors[] = { |
| 520 | { |
| 521 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 522 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 523 | .ab = 0, |
| 524 | .ib = 0, |
| 525 | }, |
| 526 | }; |
| 527 | |
| Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame] | 528 | static struct msm_bus_vectors grp3d_low_vectors[] = { |
| 529 | { |
| 530 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 531 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 532 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 533 | .ib = KGSL_CONVERT_TO_MBPS(990), |
| Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame] | 534 | }, |
| 535 | }; |
| 536 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 537 | static struct msm_bus_vectors grp3d_nominal_low_vectors[] = { |
| 538 | { |
| 539 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 540 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 541 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 542 | .ib = KGSL_CONVERT_TO_MBPS(1300), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 543 | }, |
| 544 | }; |
| 545 | |
| 546 | static struct msm_bus_vectors grp3d_nominal_high_vectors[] = { |
| 547 | { |
| 548 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 549 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 550 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 551 | .ib = KGSL_CONVERT_TO_MBPS(2008), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 552 | }, |
| 553 | }; |
| 554 | |
| 555 | static struct msm_bus_vectors grp3d_max_vectors[] = { |
| 556 | { |
| 557 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 558 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 559 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 560 | .ib = KGSL_CONVERT_TO_MBPS(2484), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 561 | }, |
| 562 | }; |
| 563 | |
| 564 | static struct msm_bus_paths grp3d_bus_scale_usecases[] = { |
| 565 | { |
| 566 | ARRAY_SIZE(grp3d_init_vectors), |
| 567 | grp3d_init_vectors, |
| 568 | }, |
| 569 | { |
| Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame] | 570 | ARRAY_SIZE(grp3d_low_vectors), |
| Suman Tatiraju | c87f58c | 2011-10-14 10:58:37 -0700 | [diff] [blame] | 571 | grp3d_low_vectors, |
| Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame] | 572 | }, |
| 573 | { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 574 | ARRAY_SIZE(grp3d_nominal_low_vectors), |
| 575 | grp3d_nominal_low_vectors, |
| 576 | }, |
| 577 | { |
| 578 | ARRAY_SIZE(grp3d_nominal_high_vectors), |
| 579 | grp3d_nominal_high_vectors, |
| 580 | }, |
| 581 | { |
| 582 | ARRAY_SIZE(grp3d_max_vectors), |
| 583 | grp3d_max_vectors, |
| 584 | }, |
| 585 | }; |
| 586 | |
| 587 | static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = { |
| 588 | grp3d_bus_scale_usecases, |
| 589 | ARRAY_SIZE(grp3d_bus_scale_usecases), |
| 590 | .name = "grp3d", |
| 591 | }; |
| 592 | |
| 593 | static struct msm_bus_vectors grp2d0_init_vectors[] = { |
| 594 | { |
| 595 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 596 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 597 | .ab = 0, |
| 598 | .ib = 0, |
| 599 | }, |
| 600 | }; |
| 601 | |
| 602 | static struct msm_bus_vectors grp2d0_max_vectors[] = { |
| 603 | { |
| 604 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 605 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 606 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 607 | .ib = KGSL_CONVERT_TO_MBPS(990), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 608 | }, |
| 609 | }; |
| 610 | |
| 611 | static struct msm_bus_paths grp2d0_bus_scale_usecases[] = { |
| 612 | { |
| 613 | ARRAY_SIZE(grp2d0_init_vectors), |
| 614 | grp2d0_init_vectors, |
| 615 | }, |
| 616 | { |
| 617 | ARRAY_SIZE(grp2d0_max_vectors), |
| 618 | grp2d0_max_vectors, |
| 619 | }, |
| 620 | }; |
| 621 | |
| 622 | static struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = { |
| 623 | grp2d0_bus_scale_usecases, |
| 624 | ARRAY_SIZE(grp2d0_bus_scale_usecases), |
| 625 | .name = "grp2d0", |
| 626 | }; |
| 627 | |
| 628 | static struct msm_bus_vectors grp2d1_init_vectors[] = { |
| 629 | { |
| 630 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 631 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 632 | .ab = 0, |
| 633 | .ib = 0, |
| 634 | }, |
| 635 | }; |
| 636 | |
| 637 | static struct msm_bus_vectors grp2d1_max_vectors[] = { |
| 638 | { |
| 639 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 640 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 641 | .ab = 0, |
| Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 642 | .ib = KGSL_CONVERT_TO_MBPS(990), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 643 | }, |
| 644 | }; |
| 645 | |
| 646 | static struct msm_bus_paths grp2d1_bus_scale_usecases[] = { |
| 647 | { |
| 648 | ARRAY_SIZE(grp2d1_init_vectors), |
| 649 | grp2d1_init_vectors, |
| 650 | }, |
| 651 | { |
| 652 | ARRAY_SIZE(grp2d1_max_vectors), |
| 653 | grp2d1_max_vectors, |
| 654 | }, |
| 655 | }; |
| 656 | |
| 657 | static struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = { |
| 658 | grp2d1_bus_scale_usecases, |
| 659 | ARRAY_SIZE(grp2d1_bus_scale_usecases), |
| 660 | .name = "grp2d1", |
| 661 | }; |
| 662 | #endif |
| 663 | |
| 664 | #ifdef CONFIG_HW_RANDOM_MSM |
| 665 | static struct resource rng_resources = { |
| 666 | .flags = IORESOURCE_MEM, |
| 667 | .start = MSM_PRNG_PHYS, |
| 668 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 669 | }; |
| 670 | |
| 671 | struct platform_device msm_device_rng = { |
| 672 | .name = "msm_rng", |
| 673 | .id = 0, |
| 674 | .num_resources = 1, |
| 675 | .resource = &rng_resources, |
| 676 | }; |
| 677 | #endif |
| 678 | |
| 679 | static struct resource kgsl_3d0_resources[] = { |
| 680 | { |
| 681 | .name = KGSL_3D0_REG_MEMORY, |
| 682 | .start = 0x04300000, /* GFX3D address */ |
| 683 | .end = 0x0431ffff, |
| 684 | .flags = IORESOURCE_MEM, |
| 685 | }, |
| 686 | { |
| 687 | .name = KGSL_3D0_IRQ, |
| 688 | .start = GFX3D_IRQ, |
| 689 | .end = GFX3D_IRQ, |
| 690 | .flags = IORESOURCE_IRQ, |
| 691 | }, |
| 692 | }; |
| 693 | |
| 694 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 695 | .pwrlevel = { |
| 696 | { |
| 697 | .gpu_freq = 266667000, |
| 698 | .bus_freq = 4, |
| 699 | .io_fraction = 0, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 700 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 701 | { |
| 702 | .gpu_freq = 228571000, |
| 703 | .bus_freq = 3, |
| 704 | .io_fraction = 33, |
| 705 | }, |
| 706 | { |
| 707 | .gpu_freq = 200000000, |
| 708 | .bus_freq = 2, |
| 709 | .io_fraction = 100, |
| 710 | }, |
| 711 | { |
| 712 | .gpu_freq = 177778000, |
| 713 | .bus_freq = 1, |
| 714 | .io_fraction = 100, |
| 715 | }, |
| 716 | { |
| 717 | .gpu_freq = 27000000, |
| 718 | .bus_freq = 0, |
| 719 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 720 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 721 | .init_level = 0, |
| 722 | .num_levels = 5, |
| 723 | .set_grp_async = NULL, |
| 724 | .idle_timeout = HZ/5, |
| 725 | .nap_allowed = true, |
| 726 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 727 | #ifdef CONFIG_MSM_BUS_SCALING |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 728 | .bus_scale_table = &grp3d_bus_scale_pdata, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 729 | #endif |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 730 | }; |
| 731 | |
| 732 | struct platform_device msm_kgsl_3d0 = { |
| 733 | .name = "kgsl-3d0", |
| 734 | .id = 0, |
| 735 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 736 | .resource = kgsl_3d0_resources, |
| 737 | .dev = { |
| 738 | .platform_data = &kgsl_3d0_pdata, |
| 739 | }, |
| 740 | }; |
| 741 | |
| 742 | static struct resource kgsl_2d0_resources[] = { |
| 743 | { |
| 744 | .name = KGSL_2D0_REG_MEMORY, |
| 745 | .start = 0x04100000, /* Z180 base address */ |
| 746 | .end = 0x04100FFF, |
| 747 | .flags = IORESOURCE_MEM, |
| 748 | }, |
| 749 | { |
| 750 | .name = KGSL_2D0_IRQ, |
| 751 | .start = GFX2D0_IRQ, |
| 752 | .end = GFX2D0_IRQ, |
| 753 | .flags = IORESOURCE_IRQ, |
| 754 | }, |
| 755 | }; |
| 756 | |
| 757 | static struct kgsl_device_platform_data kgsl_2d0_pdata = { |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 758 | .pwrlevel = { |
| 759 | { |
| 760 | .gpu_freq = 200000000, |
| 761 | .bus_freq = 1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 762 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 763 | { |
| 764 | .gpu_freq = 200000000, |
| 765 | .bus_freq = 0, |
| 766 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 767 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 768 | .init_level = 0, |
| 769 | .num_levels = 2, |
| 770 | .set_grp_async = NULL, |
| 771 | .idle_timeout = HZ/10, |
| 772 | .nap_allowed = true, |
| 773 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 774 | #ifdef CONFIG_MSM_BUS_SCALING |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 775 | .bus_scale_table = &grp2d0_bus_scale_pdata, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 776 | #endif |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 777 | }; |
| 778 | |
| 779 | struct platform_device msm_kgsl_2d0 = { |
| 780 | .name = "kgsl-2d0", |
| 781 | .id = 0, |
| 782 | .num_resources = ARRAY_SIZE(kgsl_2d0_resources), |
| 783 | .resource = kgsl_2d0_resources, |
| 784 | .dev = { |
| 785 | .platform_data = &kgsl_2d0_pdata, |
| 786 | }, |
| 787 | }; |
| 788 | |
| 789 | static struct resource kgsl_2d1_resources[] = { |
| 790 | { |
| 791 | .name = KGSL_2D1_REG_MEMORY, |
| 792 | .start = 0x04200000, /* Z180 device 1 base address */ |
| 793 | .end = 0x04200FFF, |
| 794 | .flags = IORESOURCE_MEM, |
| 795 | }, |
| 796 | { |
| 797 | .name = KGSL_2D1_IRQ, |
| 798 | .start = GFX2D1_IRQ, |
| 799 | .end = GFX2D1_IRQ, |
| 800 | .flags = IORESOURCE_IRQ, |
| 801 | }, |
| 802 | }; |
| 803 | |
| 804 | static struct kgsl_device_platform_data kgsl_2d1_pdata = { |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 805 | .pwrlevel = { |
| 806 | { |
| 807 | .gpu_freq = 200000000, |
| 808 | .bus_freq = 1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 809 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 810 | { |
| 811 | .gpu_freq = 200000000, |
| 812 | .bus_freq = 0, |
| 813 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 814 | }, |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 815 | .init_level = 0, |
| 816 | .num_levels = 2, |
| 817 | .set_grp_async = NULL, |
| 818 | .idle_timeout = HZ/10, |
| 819 | .nap_allowed = true, |
| 820 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 821 | #ifdef CONFIG_MSM_BUS_SCALING |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 822 | .bus_scale_table = &grp2d1_bus_scale_pdata, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 823 | #endif |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 824 | }; |
| 825 | |
| 826 | struct platform_device msm_kgsl_2d1 = { |
| 827 | .name = "kgsl-2d1", |
| 828 | .id = 1, |
| 829 | .num_resources = ARRAY_SIZE(kgsl_2d1_resources), |
| 830 | .resource = kgsl_2d1_resources, |
| 831 | .dev = { |
| 832 | .platform_data = &kgsl_2d1_pdata, |
| 833 | }, |
| 834 | }; |
| 835 | |
| 836 | /* |
| 837 | * this a software workaround for not having two distinct board |
| 838 | * files for 8660v1 and 8660v2. 8660v1 has a faulty 2d clock, and |
| 839 | * this workaround detects the cpu version to tell if the kernel is on a |
| 840 | * 8660v1, and should disable the 2d core. it is called from the board file |
| 841 | */ |
| 842 | void __init msm8x60_check_2d_hardware(void) |
| 843 | { |
| 844 | if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1) && |
| 845 | (SOCINFO_VERSION_MINOR(socinfo_get_version()) == 0)) { |
| 846 | printk(KERN_WARNING "kgsl: 2D cores disabled on 8660v1\n"); |
| Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 847 | kgsl_2d0_pdata.clk_map = 0; |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 848 | } |
| 849 | } |
| 850 | |
| 851 | /* Use GSBI3 QUP for /dev/i2c-0 */ |
| 852 | struct platform_device msm_gsbi3_qup_i2c_device = { |
| 853 | .name = "qup_i2c", |
| 854 | .id = MSM_GSBI3_QUP_I2C_BUS_ID, |
| 855 | .num_resources = ARRAY_SIZE(gsbi3_qup_i2c_resources), |
| 856 | .resource = gsbi3_qup_i2c_resources, |
| 857 | }; |
| 858 | |
| 859 | /* Use GSBI4 QUP for /dev/i2c-1 */ |
| 860 | struct platform_device msm_gsbi4_qup_i2c_device = { |
| 861 | .name = "qup_i2c", |
| 862 | .id = MSM_GSBI4_QUP_I2C_BUS_ID, |
| 863 | .num_resources = ARRAY_SIZE(gsbi4_qup_i2c_resources), |
| 864 | .resource = gsbi4_qup_i2c_resources, |
| 865 | }; |
| 866 | |
| 867 | /* Use GSBI8 QUP for /dev/i2c-3 */ |
| 868 | struct platform_device msm_gsbi8_qup_i2c_device = { |
| 869 | .name = "qup_i2c", |
| 870 | .id = MSM_GSBI8_QUP_I2C_BUS_ID, |
| 871 | .num_resources = ARRAY_SIZE(gsbi8_qup_i2c_resources), |
| 872 | .resource = gsbi8_qup_i2c_resources, |
| 873 | }; |
| 874 | |
| 875 | /* Use GSBI9 QUP for /dev/i2c-2 */ |
| 876 | struct platform_device msm_gsbi9_qup_i2c_device = { |
| 877 | .name = "qup_i2c", |
| 878 | .id = MSM_GSBI9_QUP_I2C_BUS_ID, |
| 879 | .num_resources = ARRAY_SIZE(gsbi9_qup_i2c_resources), |
| 880 | .resource = gsbi9_qup_i2c_resources, |
| 881 | }; |
| 882 | |
| 883 | /* Use GSBI7 QUP for /dev/i2c-4 (Marimba) */ |
| 884 | struct platform_device msm_gsbi7_qup_i2c_device = { |
| 885 | .name = "qup_i2c", |
| 886 | .id = MSM_GSBI7_QUP_I2C_BUS_ID, |
| 887 | .num_resources = ARRAY_SIZE(gsbi7_qup_i2c_resources), |
| 888 | .resource = gsbi7_qup_i2c_resources, |
| 889 | }; |
| 890 | |
| 891 | /* Use GSBI12 QUP for /dev/i2c-5 (Sensors) */ |
| 892 | struct platform_device msm_gsbi12_qup_i2c_device = { |
| 893 | .name = "qup_i2c", |
| 894 | .id = MSM_GSBI12_QUP_I2C_BUS_ID, |
| 895 | .num_resources = ARRAY_SIZE(gsbi12_qup_i2c_resources), |
| 896 | .resource = gsbi12_qup_i2c_resources, |
| 897 | }; |
| 898 | |
| Anirudh Ghayal | 9d9cdc2 | 2011-10-10 17:17:07 +0530 | [diff] [blame] | 899 | #ifdef CONFIG_MSM_SSBI |
| 900 | #define MSM_SSBI_PMIC1_PHYS 0x00500000 |
| 901 | static struct resource resources_ssbi_pmic1_resource[] = { |
| 902 | { |
| 903 | .start = MSM_SSBI_PMIC1_PHYS, |
| 904 | .end = MSM_SSBI_PMIC1_PHYS + SZ_4K - 1, |
| 905 | .flags = IORESOURCE_MEM, |
| 906 | }, |
| 907 | }; |
| 908 | |
| 909 | struct platform_device msm_device_ssbi_pmic1 = { |
| 910 | .name = "msm_ssbi", |
| 911 | .id = 0, |
| 912 | .resource = resources_ssbi_pmic1_resource, |
| 913 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1_resource), |
| 914 | }; |
| Anirudh Ghayal | c49157f | 2011-11-09 14:49:59 +0530 | [diff] [blame] | 915 | |
| 916 | #define MSM_SSBI2_PMIC2B_PHYS 0x00C00000 |
| 917 | static struct resource resources_ssbi_pmic2_resource[] = { |
| 918 | { |
| 919 | .start = MSM_SSBI2_PMIC2B_PHYS, |
| 920 | .end = MSM_SSBI2_PMIC2B_PHYS + SZ_4K - 1, |
| 921 | .flags = IORESOURCE_MEM, |
| 922 | }, |
| 923 | }; |
| 924 | |
| 925 | struct platform_device msm_device_ssbi_pmic2 = { |
| 926 | .name = "msm_ssbi", |
| 927 | .id = 1, |
| 928 | .resource = resources_ssbi_pmic2_resource, |
| 929 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2_resource), |
| 930 | }; |
| Anirudh Ghayal | 9d9cdc2 | 2011-10-10 17:17:07 +0530 | [diff] [blame] | 931 | #endif |
| 932 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 933 | #ifdef CONFIG_I2C_SSBI |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 934 | /* CODEC SSBI on /dev/i2c-8 */ |
| 935 | #define MSM_SSBI3_PHYS 0x18700000 |
| 936 | static struct resource msm_ssbi3_resources[] = { |
| 937 | { |
| 938 | .name = "ssbi_base", |
| 939 | .start = MSM_SSBI3_PHYS, |
| 940 | .end = MSM_SSBI3_PHYS + SZ_4K - 1, |
| 941 | .flags = IORESOURCE_MEM, |
| 942 | }, |
| 943 | }; |
| 944 | |
| 945 | struct platform_device msm_device_ssbi3 = { |
| 946 | .name = "i2c_ssbi", |
| 947 | .id = MSM_SSBI3_I2C_BUS_ID, |
| 948 | .num_resources = ARRAY_SIZE(msm_ssbi3_resources), |
| 949 | .resource = msm_ssbi3_resources, |
| 950 | }; |
| 951 | #endif /* CONFIG_I2C_SSBI */ |
| 952 | |
| 953 | static struct resource gsbi1_qup_spi_resources[] = { |
| 954 | { |
| 955 | .name = "spi_base", |
| 956 | .start = MSM_GSBI1_QUP_PHYS, |
| 957 | .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1, |
| 958 | .flags = IORESOURCE_MEM, |
| 959 | }, |
| 960 | { |
| 961 | .name = "gsbi_base", |
| 962 | .start = MSM_GSBI1_PHYS, |
| 963 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 964 | .flags = IORESOURCE_MEM, |
| 965 | }, |
| 966 | { |
| 967 | .name = "spi_irq_in", |
| 968 | .start = GSBI1_QUP_IRQ, |
| 969 | .end = GSBI1_QUP_IRQ, |
| 970 | .flags = IORESOURCE_IRQ, |
| 971 | }, |
| 972 | { |
| 973 | .name = "spidm_channels", |
| 974 | .start = 5, |
| 975 | .end = 6, |
| 976 | .flags = IORESOURCE_DMA, |
| 977 | }, |
| 978 | { |
| 979 | .name = "spidm_crci", |
| 980 | .start = 8, |
| 981 | .end = 7, |
| 982 | .flags = IORESOURCE_DMA, |
| 983 | }, |
| 984 | { |
| 985 | .name = "spi_clk", |
| 986 | .start = 36, |
| 987 | .end = 36, |
| 988 | .flags = IORESOURCE_IO, |
| 989 | }, |
| 990 | { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 991 | .name = "spi_miso", |
| 992 | .start = 34, |
| 993 | .end = 34, |
| 994 | .flags = IORESOURCE_IO, |
| 995 | }, |
| 996 | { |
| 997 | .name = "spi_mosi", |
| 998 | .start = 33, |
| 999 | .end = 33, |
| 1000 | .flags = IORESOURCE_IO, |
| 1001 | }, |
| Harini Jayaraman | 5d93be1 | 2011-11-29 18:32:20 -0700 | [diff] [blame] | 1002 | { |
| 1003 | .name = "spi_cs", |
| 1004 | .start = 35, |
| 1005 | .end = 35, |
| 1006 | .flags = IORESOURCE_IO, |
| 1007 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1008 | }; |
| 1009 | |
| 1010 | /* Use GSBI1 QUP for SPI-0 */ |
| 1011 | struct platform_device msm_gsbi1_qup_spi_device = { |
| 1012 | .name = "spi_qsd", |
| 1013 | .id = 0, |
| 1014 | .num_resources = ARRAY_SIZE(gsbi1_qup_spi_resources), |
| 1015 | .resource = gsbi1_qup_spi_resources, |
| 1016 | }; |
| 1017 | |
| 1018 | |
| 1019 | static struct resource gsbi10_qup_spi_resources[] = { |
| 1020 | { |
| 1021 | .name = "spi_base", |
| 1022 | .start = MSM_GSBI10_QUP_PHYS, |
| 1023 | .end = MSM_GSBI10_QUP_PHYS + SZ_4K - 1, |
| 1024 | .flags = IORESOURCE_MEM, |
| 1025 | }, |
| 1026 | { |
| 1027 | .name = "gsbi_base", |
| 1028 | .start = MSM_GSBI10_PHYS, |
| 1029 | .end = MSM_GSBI10_PHYS + 4 - 1, |
| 1030 | .flags = IORESOURCE_MEM, |
| 1031 | }, |
| 1032 | { |
| 1033 | .name = "spi_irq_in", |
| 1034 | .start = GSBI10_QUP_IRQ, |
| 1035 | .end = GSBI10_QUP_IRQ, |
| 1036 | .flags = IORESOURCE_IRQ, |
| 1037 | }, |
| 1038 | { |
| 1039 | .name = "spi_clk", |
| 1040 | .start = 73, |
| 1041 | .end = 73, |
| 1042 | .flags = IORESOURCE_IO, |
| 1043 | }, |
| 1044 | { |
| 1045 | .name = "spi_cs", |
| 1046 | .start = 72, |
| 1047 | .end = 72, |
| 1048 | .flags = IORESOURCE_IO, |
| 1049 | }, |
| 1050 | { |
| 1051 | .name = "spi_mosi", |
| 1052 | .start = 70, |
| 1053 | .end = 70, |
| 1054 | .flags = IORESOURCE_IO, |
| 1055 | }, |
| 1056 | }; |
| 1057 | |
| 1058 | /* Use GSBI10 QUP for SPI-1 */ |
| 1059 | struct platform_device msm_gsbi10_qup_spi_device = { |
| 1060 | .name = "spi_qsd", |
| 1061 | .id = 1, |
| 1062 | .num_resources = ARRAY_SIZE(gsbi10_qup_spi_resources), |
| 1063 | .resource = gsbi10_qup_spi_resources, |
| 1064 | }; |
| 1065 | #define MSM_SDC1_BASE 0x12400000 |
| 1066 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 1067 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 1068 | #define MSM_SDC2_BASE 0x12140000 |
| 1069 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 1070 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 1071 | #define MSM_SDC3_BASE 0x12180000 |
| 1072 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 1073 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 1074 | #define MSM_SDC4_BASE 0x121C0000 |
| 1075 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 1076 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 1077 | #define MSM_SDC5_BASE 0x12200000 |
| 1078 | #define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800) |
| 1079 | #define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000) |
| 1080 | |
| 1081 | static struct resource resources_sdc1[] = { |
| 1082 | { |
| 1083 | .start = MSM_SDC1_BASE, |
| 1084 | .end = MSM_SDC1_DML_BASE - 1, |
| 1085 | .flags = IORESOURCE_MEM, |
| 1086 | }, |
| 1087 | { |
| 1088 | .start = SDC1_IRQ_0, |
| 1089 | .end = SDC1_IRQ_0, |
| 1090 | .flags = IORESOURCE_IRQ, |
| 1091 | }, |
| 1092 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1093 | { |
| 1094 | .name = "sdcc_dml_addr", |
| 1095 | .start = MSM_SDC1_DML_BASE, |
| 1096 | .end = MSM_SDC1_BAM_BASE - 1, |
| 1097 | .flags = IORESOURCE_MEM, |
| 1098 | }, |
| 1099 | { |
| 1100 | .name = "sdcc_bam_addr", |
| 1101 | .start = MSM_SDC1_BAM_BASE, |
| 1102 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 1103 | .flags = IORESOURCE_MEM, |
| 1104 | }, |
| 1105 | { |
| 1106 | .name = "sdcc_bam_irq", |
| 1107 | .start = SDC1_BAM_IRQ, |
| 1108 | .end = SDC1_BAM_IRQ, |
| 1109 | .flags = IORESOURCE_IRQ, |
| 1110 | }, |
| 1111 | #else |
| 1112 | { |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1113 | .name = "sdcc_dma_chnl", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1114 | .start = DMOV_SDC1_CHAN, |
| 1115 | .end = DMOV_SDC1_CHAN, |
| 1116 | .flags = IORESOURCE_DMA, |
| 1117 | }, |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1118 | { |
| 1119 | .name = "sdcc_dma_crci", |
| 1120 | .start = DMOV_SDC1_CRCI, |
| 1121 | .end = DMOV_SDC1_CRCI, |
| 1122 | .flags = IORESOURCE_DMA, |
| 1123 | } |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1124 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1125 | }; |
| 1126 | |
| 1127 | static struct resource resources_sdc2[] = { |
| 1128 | { |
| 1129 | .start = MSM_SDC2_BASE, |
| 1130 | .end = MSM_SDC2_DML_BASE - 1, |
| 1131 | .flags = IORESOURCE_MEM, |
| 1132 | }, |
| 1133 | { |
| 1134 | .start = SDC2_IRQ_0, |
| 1135 | .end = SDC2_IRQ_0, |
| 1136 | .flags = IORESOURCE_IRQ, |
| 1137 | }, |
| 1138 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1139 | { |
| 1140 | .name = "sdcc_dml_addr", |
| 1141 | .start = MSM_SDC2_DML_BASE, |
| 1142 | .end = MSM_SDC2_BAM_BASE - 1, |
| 1143 | .flags = IORESOURCE_MEM, |
| 1144 | }, |
| 1145 | { |
| 1146 | .name = "sdcc_bam_addr", |
| 1147 | .start = MSM_SDC2_BAM_BASE, |
| 1148 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 1149 | .flags = IORESOURCE_MEM, |
| 1150 | }, |
| 1151 | { |
| 1152 | .name = "sdcc_bam_irq", |
| 1153 | .start = SDC2_BAM_IRQ, |
| 1154 | .end = SDC2_BAM_IRQ, |
| 1155 | .flags = IORESOURCE_IRQ, |
| 1156 | }, |
| 1157 | #else |
| 1158 | { |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1159 | .name = "sdcc_dma_chnl", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1160 | .start = DMOV_SDC2_CHAN, |
| 1161 | .end = DMOV_SDC2_CHAN, |
| 1162 | .flags = IORESOURCE_DMA, |
| 1163 | }, |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1164 | { |
| 1165 | .name = "sdcc_dma_crci", |
| 1166 | .start = DMOV_SDC2_CRCI, |
| 1167 | .end = DMOV_SDC2_CRCI, |
| 1168 | .flags = IORESOURCE_DMA, |
| 1169 | } |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1170 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1171 | }; |
| 1172 | |
| 1173 | static struct resource resources_sdc3[] = { |
| 1174 | { |
| 1175 | .start = MSM_SDC3_BASE, |
| 1176 | .end = MSM_SDC3_DML_BASE - 1, |
| 1177 | .flags = IORESOURCE_MEM, |
| 1178 | }, |
| 1179 | { |
| 1180 | .start = SDC3_IRQ_0, |
| 1181 | .end = SDC3_IRQ_0, |
| 1182 | .flags = IORESOURCE_IRQ, |
| 1183 | }, |
| 1184 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1185 | { |
| 1186 | .name = "sdcc_dml_addr", |
| 1187 | .start = MSM_SDC3_DML_BASE, |
| 1188 | .end = MSM_SDC3_BAM_BASE - 1, |
| 1189 | .flags = IORESOURCE_MEM, |
| 1190 | }, |
| 1191 | { |
| 1192 | .name = "sdcc_bam_addr", |
| 1193 | .start = MSM_SDC3_BAM_BASE, |
| 1194 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 1195 | .flags = IORESOURCE_MEM, |
| 1196 | }, |
| 1197 | { |
| 1198 | .name = "sdcc_bam_irq", |
| 1199 | .start = SDC3_BAM_IRQ, |
| 1200 | .end = SDC3_BAM_IRQ, |
| 1201 | .flags = IORESOURCE_IRQ, |
| 1202 | }, |
| 1203 | #else |
| 1204 | { |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1205 | .name = "sdcc_dma_chnl", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1206 | .start = DMOV_SDC3_CHAN, |
| 1207 | .end = DMOV_SDC3_CHAN, |
| 1208 | .flags = IORESOURCE_DMA, |
| 1209 | }, |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1210 | { |
| 1211 | .name = "sdcc_dma_crci", |
| 1212 | .start = DMOV_SDC3_CRCI, |
| 1213 | .end = DMOV_SDC3_CRCI, |
| 1214 | .flags = IORESOURCE_DMA, |
| 1215 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1216 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1217 | }; |
| 1218 | |
| 1219 | static struct resource resources_sdc4[] = { |
| 1220 | { |
| 1221 | .start = MSM_SDC4_BASE, |
| 1222 | .end = MSM_SDC4_DML_BASE - 1, |
| 1223 | .flags = IORESOURCE_MEM, |
| 1224 | }, |
| 1225 | { |
| 1226 | .start = SDC4_IRQ_0, |
| 1227 | .end = SDC4_IRQ_0, |
| 1228 | .flags = IORESOURCE_IRQ, |
| 1229 | }, |
| 1230 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1231 | { |
| 1232 | .name = "sdcc_dml_addr", |
| 1233 | .start = MSM_SDC4_DML_BASE, |
| 1234 | .end = MSM_SDC4_BAM_BASE - 1, |
| 1235 | .flags = IORESOURCE_MEM, |
| 1236 | }, |
| 1237 | { |
| 1238 | .name = "sdcc_bam_addr", |
| 1239 | .start = MSM_SDC4_BAM_BASE, |
| 1240 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 1241 | .flags = IORESOURCE_MEM, |
| 1242 | }, |
| 1243 | { |
| 1244 | .name = "sdcc_bam_irq", |
| 1245 | .start = SDC4_BAM_IRQ, |
| 1246 | .end = SDC4_BAM_IRQ, |
| 1247 | .flags = IORESOURCE_IRQ, |
| 1248 | }, |
| 1249 | #else |
| 1250 | { |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1251 | .name = "sdcc_dma_chnl", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1252 | .start = DMOV_SDC4_CHAN, |
| 1253 | .end = DMOV_SDC4_CHAN, |
| 1254 | .flags = IORESOURCE_DMA, |
| 1255 | }, |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1256 | { |
| 1257 | .name = "sdcc_dma_crci", |
| 1258 | .start = DMOV_SDC4_CRCI, |
| 1259 | .end = DMOV_SDC4_CRCI, |
| 1260 | .flags = IORESOURCE_DMA, |
| 1261 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1262 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1263 | }; |
| 1264 | |
| 1265 | static struct resource resources_sdc5[] = { |
| 1266 | { |
| 1267 | .start = MSM_SDC5_BASE, |
| 1268 | .end = MSM_SDC5_DML_BASE - 1, |
| 1269 | .flags = IORESOURCE_MEM, |
| 1270 | }, |
| 1271 | { |
| 1272 | .start = SDC5_IRQ_0, |
| 1273 | .end = SDC5_IRQ_0, |
| 1274 | .flags = IORESOURCE_IRQ, |
| 1275 | }, |
| 1276 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1277 | { |
| 1278 | .name = "sdcc_dml_addr", |
| 1279 | .start = MSM_SDC5_DML_BASE, |
| 1280 | .end = MSM_SDC5_BAM_BASE - 1, |
| 1281 | .flags = IORESOURCE_MEM, |
| 1282 | }, |
| 1283 | { |
| 1284 | .name = "sdcc_bam_addr", |
| 1285 | .start = MSM_SDC5_BAM_BASE, |
| 1286 | .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1, |
| 1287 | .flags = IORESOURCE_MEM, |
| 1288 | }, |
| 1289 | { |
| 1290 | .name = "sdcc_bam_irq", |
| 1291 | .start = SDC5_BAM_IRQ, |
| 1292 | .end = SDC5_BAM_IRQ, |
| 1293 | .flags = IORESOURCE_IRQ, |
| 1294 | }, |
| 1295 | #else |
| 1296 | { |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1297 | .name = "sdcc_dma_chnl", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1298 | .start = DMOV_SDC5_CHAN, |
| 1299 | .end = DMOV_SDC5_CHAN, |
| 1300 | .flags = IORESOURCE_DMA, |
| 1301 | }, |
| Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1302 | { |
| 1303 | .name = "sdcc_dma_crci", |
| 1304 | .start = DMOV_SDC5_CRCI, |
| 1305 | .end = DMOV_SDC5_CRCI, |
| 1306 | .flags = IORESOURCE_DMA, |
| 1307 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1308 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1309 | }; |
| 1310 | |
| 1311 | struct platform_device msm_device_sdc1 = { |
| 1312 | .name = "msm_sdcc", |
| 1313 | .id = 1, |
| 1314 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 1315 | .resource = resources_sdc1, |
| 1316 | .dev = { |
| 1317 | .coherent_dma_mask = 0xffffffff, |
| 1318 | }, |
| 1319 | }; |
| 1320 | |
| 1321 | struct platform_device msm_device_sdc2 = { |
| 1322 | .name = "msm_sdcc", |
| 1323 | .id = 2, |
| 1324 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 1325 | .resource = resources_sdc2, |
| 1326 | .dev = { |
| 1327 | .coherent_dma_mask = 0xffffffff, |
| 1328 | }, |
| 1329 | }; |
| 1330 | |
| 1331 | struct platform_device msm_device_sdc3 = { |
| 1332 | .name = "msm_sdcc", |
| 1333 | .id = 3, |
| 1334 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 1335 | .resource = resources_sdc3, |
| 1336 | .dev = { |
| 1337 | .coherent_dma_mask = 0xffffffff, |
| 1338 | }, |
| 1339 | }; |
| 1340 | |
| 1341 | struct platform_device msm_device_sdc4 = { |
| 1342 | .name = "msm_sdcc", |
| 1343 | .id = 4, |
| 1344 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 1345 | .resource = resources_sdc4, |
| 1346 | .dev = { |
| 1347 | .coherent_dma_mask = 0xffffffff, |
| 1348 | }, |
| 1349 | }; |
| 1350 | |
| 1351 | struct platform_device msm_device_sdc5 = { |
| 1352 | .name = "msm_sdcc", |
| 1353 | .id = 5, |
| 1354 | .num_resources = ARRAY_SIZE(resources_sdc5), |
| 1355 | .resource = resources_sdc5, |
| 1356 | .dev = { |
| 1357 | .coherent_dma_mask = 0xffffffff, |
| 1358 | }, |
| 1359 | }; |
| 1360 | |
| 1361 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 1362 | &msm_device_sdc1, |
| 1363 | &msm_device_sdc2, |
| 1364 | &msm_device_sdc3, |
| 1365 | &msm_device_sdc4, |
| 1366 | &msm_device_sdc5, |
| 1367 | }; |
| 1368 | |
| 1369 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 1370 | { |
| 1371 | struct platform_device *pdev; |
| 1372 | |
| 1373 | if (controller < 1 || controller > 5) |
| 1374 | return -EINVAL; |
| 1375 | |
| 1376 | pdev = msm_sdcc_devices[controller-1]; |
| 1377 | pdev->dev.platform_data = plat; |
| 1378 | return platform_device_register(pdev); |
| 1379 | } |
| 1380 | |
| Kevin Chan | 3be1161 | 2012-03-22 20:05:40 -0700 | [diff] [blame] | 1381 | #ifdef CONFIG_MSM_CAMERA_V4L2 |
| 1382 | static struct resource msm_csic0_resources[] = { |
| 1383 | { |
| 1384 | .name = "csic", |
| 1385 | .start = 0x04800000, |
| 1386 | .end = 0x04800000 + 0x00000400 - 1, |
| 1387 | .flags = IORESOURCE_MEM, |
| 1388 | }, |
| 1389 | { |
| 1390 | .name = "csic", |
| 1391 | .start = CSI_0_IRQ, |
| 1392 | .end = CSI_0_IRQ, |
| 1393 | .flags = IORESOURCE_IRQ, |
| 1394 | }, |
| 1395 | }; |
| 1396 | |
| 1397 | static struct resource msm_csic1_resources[] = { |
| 1398 | { |
| 1399 | .name = "csic", |
| 1400 | .start = 0x04900000, |
| 1401 | .end = 0x04900000 + 0x00000400 - 1, |
| 1402 | .flags = IORESOURCE_MEM, |
| 1403 | }, |
| 1404 | { |
| 1405 | .name = "csic", |
| 1406 | .start = CSI_1_IRQ, |
| 1407 | .end = CSI_1_IRQ, |
| 1408 | .flags = IORESOURCE_IRQ, |
| 1409 | }, |
| 1410 | }; |
| 1411 | |
| 1412 | struct resource msm_vfe_resources[] = { |
| 1413 | { |
| 1414 | .name = "msm_vfe", |
| 1415 | .start = 0x04500000, |
| 1416 | .end = 0x04500000 + SZ_1M - 1, |
| 1417 | .flags = IORESOURCE_MEM, |
| 1418 | }, |
| 1419 | { |
| 1420 | .name = "msm_vfe", |
| 1421 | .start = VFE_IRQ, |
| 1422 | .end = VFE_IRQ, |
| 1423 | .flags = IORESOURCE_IRQ, |
| 1424 | }, |
| 1425 | }; |
| 1426 | |
| 1427 | static struct resource msm_vpe_resources[] = { |
| 1428 | { |
| 1429 | .name = "vpe", |
| 1430 | .start = 0x05300000, |
| 1431 | .end = 0x05300000 + SZ_1M - 1, |
| 1432 | .flags = IORESOURCE_MEM, |
| 1433 | }, |
| 1434 | { |
| 1435 | .name = "vpe", |
| 1436 | .start = INT_VPE, |
| 1437 | .end = INT_VPE, |
| 1438 | .flags = IORESOURCE_IRQ, |
| 1439 | }, |
| 1440 | }; |
| 1441 | |
| 1442 | struct platform_device msm_device_csic0 = { |
| 1443 | .name = "msm_csic", |
| 1444 | .id = 0, |
| 1445 | .resource = msm_csic0_resources, |
| 1446 | .num_resources = ARRAY_SIZE(msm_csic0_resources), |
| 1447 | }; |
| 1448 | |
| 1449 | struct platform_device msm_device_csic1 = { |
| 1450 | .name = "msm_csic", |
| 1451 | .id = 1, |
| 1452 | .resource = msm_csic1_resources, |
| 1453 | .num_resources = ARRAY_SIZE(msm_csic1_resources), |
| 1454 | }; |
| 1455 | |
| 1456 | struct platform_device msm_device_vfe = { |
| 1457 | .name = "msm_vfe", |
| 1458 | .id = 0, |
| 1459 | .resource = msm_vfe_resources, |
| 1460 | .num_resources = ARRAY_SIZE(msm_vfe_resources), |
| 1461 | }; |
| 1462 | |
| 1463 | struct platform_device msm_device_vpe = { |
| 1464 | .name = "msm_vpe", |
| 1465 | .id = 0, |
| 1466 | .resource = msm_vpe_resources, |
| 1467 | .num_resources = ARRAY_SIZE(msm_vpe_resources), |
| 1468 | }; |
| 1469 | |
| 1470 | #endif |
| 1471 | |
| 1472 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1473 | #define MIPI_DSI_HW_BASE 0x04700000 |
| 1474 | #define ROTATOR_HW_BASE 0x04E00000 |
| 1475 | #define TVENC_HW_BASE 0x04F00000 |
| 1476 | #define MDP_HW_BASE 0x05100000 |
| 1477 | |
| 1478 | static struct resource msm_mipi_dsi_resources[] = { |
| 1479 | { |
| 1480 | .name = "mipi_dsi", |
| 1481 | .start = MIPI_DSI_HW_BASE, |
| kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1482 | .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1483 | .flags = IORESOURCE_MEM, |
| 1484 | }, |
| 1485 | { |
| 1486 | .start = DSI_IRQ, |
| 1487 | .end = DSI_IRQ, |
| 1488 | .flags = IORESOURCE_IRQ, |
| 1489 | }, |
| 1490 | }; |
| 1491 | |
| 1492 | static struct platform_device msm_mipi_dsi_device = { |
| 1493 | .name = "mipi_dsi", |
| 1494 | .id = 1, |
| 1495 | .num_resources = ARRAY_SIZE(msm_mipi_dsi_resources), |
| 1496 | .resource = msm_mipi_dsi_resources, |
| 1497 | }; |
| 1498 | |
| 1499 | static struct resource msm_mdp_resources[] = { |
| 1500 | { |
| 1501 | .name = "mdp", |
| 1502 | .start = MDP_HW_BASE, |
| kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1503 | .end = MDP_HW_BASE + 0x000F0000 - 1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1504 | .flags = IORESOURCE_MEM, |
| 1505 | }, |
| 1506 | { |
| 1507 | .start = INT_MDP, |
| 1508 | .end = INT_MDP, |
| 1509 | .flags = IORESOURCE_IRQ, |
| 1510 | }, |
| 1511 | }; |
| 1512 | |
| 1513 | static struct platform_device msm_mdp_device = { |
| 1514 | .name = "mdp", |
| 1515 | .id = 0, |
| 1516 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 1517 | .resource = msm_mdp_resources, |
| 1518 | }; |
| 1519 | #ifdef CONFIG_MSM_ROTATOR |
| 1520 | static struct resource resources_msm_rotator[] = { |
| 1521 | { |
| 1522 | .start = 0x04E00000, |
| 1523 | .end = 0x04F00000 - 1, |
| 1524 | .flags = IORESOURCE_MEM, |
| 1525 | }, |
| 1526 | { |
| 1527 | .start = ROT_IRQ, |
| 1528 | .end = ROT_IRQ, |
| 1529 | .flags = IORESOURCE_IRQ, |
| 1530 | }, |
| 1531 | }; |
| 1532 | |
| 1533 | static struct msm_rot_clocks rotator_clocks[] = { |
| 1534 | { |
| Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1535 | .clk_name = "core_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1536 | .clk_type = ROTATOR_CORE_CLK, |
| 1537 | .clk_rate = 160 * 1000 * 1000, |
| 1538 | }, |
| 1539 | { |
| Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1540 | .clk_name = "iface_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1541 | .clk_type = ROTATOR_PCLK, |
| 1542 | .clk_rate = 0, |
| 1543 | }, |
| 1544 | }; |
| 1545 | |
| 1546 | static struct msm_rotator_platform_data rotator_pdata = { |
| 1547 | .number_of_clocks = ARRAY_SIZE(rotator_clocks), |
| 1548 | .hardware_version_number = 0x01010307, |
| 1549 | .rotator_clks = rotator_clocks, |
| Nagamalleswararao Ganji | 5fabbd6 | 2011-11-06 23:10:43 -0800 | [diff] [blame] | 1550 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1551 | .bus_scale_table = &rotator_bus_scale_pdata, |
| 1552 | #endif |
| 1553 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1554 | }; |
| 1555 | |
| 1556 | struct platform_device msm_rotator_device = { |
| 1557 | .name = "msm_rotator", |
| 1558 | .id = 0, |
| 1559 | .num_resources = ARRAY_SIZE(resources_msm_rotator), |
| 1560 | .resource = resources_msm_rotator, |
| 1561 | .dev = { |
| 1562 | .platform_data = &rotator_pdata, |
| 1563 | }, |
| 1564 | }; |
| 1565 | #endif |
| 1566 | |
| 1567 | |
| 1568 | /* Sensors DSPS platform data */ |
| 1569 | #ifdef CONFIG_MSM_DSPS |
| 1570 | |
| 1571 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 1572 | |
| 1573 | #define MHZ (1000*1000) |
| 1574 | |
| Wentao Xu | 7a1c930 | 2011-09-19 17:57:43 -0400 | [diff] [blame] | 1575 | #define TCSR_GSBI_IRQ_MUX_SEL 0x0044 |
| 1576 | |
| 1577 | #define GSBI_IRQ_MUX_SEL_MASK 0xF |
| 1578 | #define GSBI_IRQ_MUX_SEL_DSPS 0xB |
| 1579 | |
| 1580 | static void dsps_init1(struct msm_dsps_platform_data *data) |
| 1581 | { |
| 1582 | int val; |
| 1583 | |
| 1584 | /* route GSBI12 interrutps to DSPS */ |
| 1585 | val = secure_readl(MSM_TCSR_BASE + TCSR_GSBI_IRQ_MUX_SEL); |
| 1586 | val &= ~GSBI_IRQ_MUX_SEL_MASK; |
| 1587 | val |= GSBI_IRQ_MUX_SEL_DSPS; |
| 1588 | secure_writel(val, MSM_TCSR_BASE + TCSR_GSBI_IRQ_MUX_SEL); |
| 1589 | } |
| 1590 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1591 | static struct dsps_clk_info dsps_clks[] = { |
| 1592 | { |
| Matt Wagantall | 5bb16ca | 2012-04-19 11:34:01 -0700 | [diff] [blame] | 1593 | .name = "iface_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1594 | .rate = 0, /* no rate just on/off */ |
| 1595 | }, |
| 1596 | { |
| Matt Wagantall | d86d683 | 2011-08-17 14:06:55 -0700 | [diff] [blame] | 1597 | .name = "mem_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1598 | .rate = 0, /* no rate just on/off */ |
| 1599 | }, |
| 1600 | { |
| 1601 | .name = "gsbi_qup_clk", |
| 1602 | .rate = 24 * MHZ, /* See clk_tbl_gsbi_qup[] */ |
| 1603 | }, |
| 1604 | { |
| 1605 | .name = "dfab_dsps_clk", |
| 1606 | .rate = 64 * MHZ, /* Same rate as USB. */ |
| 1607 | } |
| 1608 | }; |
| 1609 | |
| 1610 | static struct dsps_regulator_info dsps_regs[] = { |
| 1611 | { |
| 1612 | .name = "8058_l5", |
| 1613 | .volt = 2850000, /* in uV */ |
| 1614 | }, |
| 1615 | { |
| 1616 | .name = "8058_s3", |
| 1617 | .volt = 1800000, /* in uV */ |
| 1618 | } |
| 1619 | }; |
| 1620 | |
| 1621 | /* |
| 1622 | * Note: GPIOs field is intialized in run-time at the function |
| 1623 | * msm8x60_init_dsps(). |
| 1624 | */ |
| 1625 | |
| 1626 | struct msm_dsps_platform_data msm_dsps_pdata = { |
| 1627 | .clks = dsps_clks, |
| 1628 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 1629 | .gpios = NULL, |
| 1630 | .gpios_num = 0, |
| 1631 | .regs = dsps_regs, |
| 1632 | .regs_num = ARRAY_SIZE(dsps_regs), |
| Wentao Xu | 7a1c930 | 2011-09-19 17:57:43 -0400 | [diff] [blame] | 1633 | .init = dsps_init1, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1634 | .signature = DSPS_SIGNATURE, |
| 1635 | }; |
| 1636 | |
| 1637 | static struct resource msm_dsps_resources[] = { |
| 1638 | { |
| 1639 | .start = PPSS_REG_PHYS_BASE, |
| 1640 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 1641 | .name = "ppss_reg", |
| 1642 | .flags = IORESOURCE_MEM, |
| 1643 | }, |
| 1644 | }; |
| 1645 | |
| 1646 | struct platform_device msm_dsps_device = { |
| 1647 | .name = "msm_dsps", |
| 1648 | .id = 0, |
| 1649 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 1650 | .resource = msm_dsps_resources, |
| 1651 | .dev.platform_data = &msm_dsps_pdata, |
| 1652 | }; |
| 1653 | |
| 1654 | #endif /* CONFIG_MSM_DSPS */ |
| 1655 | |
| 1656 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1657 | static struct resource msm_tvenc_resources[] = { |
| 1658 | { |
| 1659 | .name = "tvenc", |
| 1660 | .start = TVENC_HW_BASE, |
| 1661 | .end = TVENC_HW_BASE + PAGE_SIZE - 1, |
| 1662 | .flags = IORESOURCE_MEM, |
| 1663 | } |
| 1664 | }; |
| 1665 | |
| 1666 | static struct resource tvout_device_resources[] = { |
| 1667 | { |
| 1668 | .name = "tvout_device_irq", |
| 1669 | .start = TV_ENC_IRQ, |
| 1670 | .end = TV_ENC_IRQ, |
| 1671 | .flags = IORESOURCE_IRQ, |
| 1672 | }, |
| 1673 | }; |
| 1674 | #endif |
| 1675 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 1676 | { |
| 1677 | int ret; |
| 1678 | |
| 1679 | pdev->dev.platform_data = data; |
| 1680 | |
| 1681 | ret = platform_device_register(pdev); |
| 1682 | if (ret) |
| 1683 | dev_err(&pdev->dev, |
| 1684 | "%s: platform_device_register() failed = %d\n", |
| 1685 | __func__, ret); |
| 1686 | } |
| 1687 | |
| 1688 | static struct platform_device msm_lcdc_device = { |
| 1689 | .name = "lcdc", |
| 1690 | .id = 0, |
| 1691 | }; |
| 1692 | |
| 1693 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1694 | static struct platform_device msm_tvenc_device = { |
| 1695 | .name = "tvenc", |
| 1696 | .id = 0, |
| 1697 | .num_resources = ARRAY_SIZE(msm_tvenc_resources), |
| 1698 | .resource = msm_tvenc_resources, |
| 1699 | }; |
| 1700 | |
| 1701 | static struct platform_device msm_tvout_device = { |
| 1702 | .name = "tvout_device", |
| 1703 | .id = 0, |
| 1704 | .num_resources = ARRAY_SIZE(tvout_device_resources), |
| 1705 | .resource = tvout_device_resources, |
| 1706 | }; |
| 1707 | #endif |
| 1708 | |
| 1709 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1710 | static struct platform_device msm_dtv_device = { |
| 1711 | .name = "dtv", |
| 1712 | .id = 0, |
| 1713 | }; |
| 1714 | #endif |
| 1715 | |
| 1716 | void __init msm_fb_register_device(char *name, void *data) |
| 1717 | { |
| 1718 | if (!strncmp(name, "mdp", 3)) |
| 1719 | msm_register_device(&msm_mdp_device, data); |
| 1720 | else if (!strncmp(name, "lcdc", 4)) |
| 1721 | msm_register_device(&msm_lcdc_device, data); |
| 1722 | else if (!strncmp(name, "mipi_dsi", 8)) |
| 1723 | msm_register_device(&msm_mipi_dsi_device, data); |
| 1724 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1725 | else if (!strncmp(name, "tvenc", 5)) |
| 1726 | msm_register_device(&msm_tvenc_device, data); |
| 1727 | else if (!strncmp(name, "tvout_device", 12)) |
| 1728 | msm_register_device(&msm_tvout_device, data); |
| 1729 | #endif |
| 1730 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1731 | else if (!strncmp(name, "dtv", 3)) |
| 1732 | msm_register_device(&msm_dtv_device, data); |
| 1733 | #endif |
| 1734 | else |
| 1735 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 1736 | } |
| 1737 | |
| 1738 | static struct resource resources_otg[] = { |
| 1739 | { |
| 1740 | .start = 0x12500000, |
| 1741 | .end = 0x12500000 + SZ_1K - 1, |
| 1742 | .flags = IORESOURCE_MEM, |
| 1743 | }, |
| 1744 | { |
| 1745 | .start = USB1_HS_IRQ, |
| 1746 | .end = USB1_HS_IRQ, |
| 1747 | .flags = IORESOURCE_IRQ, |
| 1748 | }, |
| 1749 | }; |
| 1750 | |
| 1751 | struct platform_device msm_device_otg = { |
| 1752 | .name = "msm_otg", |
| 1753 | .id = -1, |
| 1754 | .num_resources = ARRAY_SIZE(resources_otg), |
| 1755 | .resource = resources_otg, |
| 1756 | }; |
| 1757 | |
| 1758 | static u64 dma_mask = 0xffffffffULL; |
| 1759 | struct platform_device msm_device_gadget_peripheral = { |
| 1760 | .name = "msm_hsusb", |
| 1761 | .id = -1, |
| 1762 | .dev = { |
| 1763 | .dma_mask = &dma_mask, |
| 1764 | .coherent_dma_mask = 0xffffffffULL, |
| 1765 | }, |
| 1766 | }; |
| 1767 | #ifdef CONFIG_USB_EHCI_MSM_72K |
| 1768 | static struct resource resources_hsusb_host[] = { |
| 1769 | { |
| 1770 | .start = 0x12500000, |
| 1771 | .end = 0x12500000 + SZ_1K - 1, |
| 1772 | .flags = IORESOURCE_MEM, |
| 1773 | }, |
| 1774 | { |
| 1775 | .start = USB1_HS_IRQ, |
| 1776 | .end = USB1_HS_IRQ, |
| 1777 | .flags = IORESOURCE_IRQ, |
| 1778 | }, |
| 1779 | }; |
| 1780 | |
| 1781 | struct platform_device msm_device_hsusb_host = { |
| 1782 | .name = "msm_hsusb_host", |
| 1783 | .id = 0, |
| 1784 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 1785 | .resource = resources_hsusb_host, |
| 1786 | .dev = { |
| 1787 | .dma_mask = &dma_mask, |
| 1788 | .coherent_dma_mask = 0xffffffffULL, |
| 1789 | }, |
| 1790 | }; |
| 1791 | |
| 1792 | static struct platform_device *msm_host_devices[] = { |
| 1793 | &msm_device_hsusb_host, |
| 1794 | }; |
| 1795 | |
| 1796 | int msm_add_host(unsigned int host, struct msm_usb_host_platform_data *plat) |
| 1797 | { |
| 1798 | struct platform_device *pdev; |
| 1799 | |
| 1800 | pdev = msm_host_devices[host]; |
| 1801 | if (!pdev) |
| 1802 | return -ENODEV; |
| 1803 | pdev->dev.platform_data = plat; |
| 1804 | return platform_device_register(pdev); |
| 1805 | } |
| 1806 | #endif |
| 1807 | |
| 1808 | #define MSM_TSIF0_PHYS (0x18200000) |
| 1809 | #define MSM_TSIF1_PHYS (0x18201000) |
| 1810 | #define MSM_TSIF_SIZE (0x200) |
| 1811 | #define TCSR_ADM_0_A_CRCI_MUX_SEL 0x0070 |
| 1812 | |
| 1813 | #define TSIF_0_CLK GPIO_CFG(93, 1, GPIO_CFG_INPUT, \ |
| 1814 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1815 | #define TSIF_0_EN GPIO_CFG(94, 1, GPIO_CFG_INPUT, \ |
| 1816 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1817 | #define TSIF_0_DATA GPIO_CFG(95, 1, GPIO_CFG_INPUT, \ |
| 1818 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1819 | #define TSIF_0_SYNC GPIO_CFG(96, 1, GPIO_CFG_INPUT, \ |
| 1820 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1821 | #define TSIF_1_CLK GPIO_CFG(97, 1, GPIO_CFG_INPUT, \ |
| 1822 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1823 | #define TSIF_1_EN GPIO_CFG(98, 1, GPIO_CFG_INPUT, \ |
| 1824 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1825 | #define TSIF_1_DATA GPIO_CFG(99, 1, GPIO_CFG_INPUT, \ |
| 1826 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1827 | #define TSIF_1_SYNC GPIO_CFG(100, 1, GPIO_CFG_INPUT, \ |
| 1828 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1829 | |
| 1830 | static const struct msm_gpio tsif0_gpios[] = { |
| 1831 | { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", }, |
| 1832 | { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", }, |
| 1833 | { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", }, |
| 1834 | { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", }, |
| 1835 | }; |
| 1836 | |
| 1837 | static const struct msm_gpio tsif1_gpios[] = { |
| 1838 | { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", }, |
| 1839 | { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", }, |
| 1840 | { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", }, |
| 1841 | { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", }, |
| 1842 | }; |
| 1843 | |
| 1844 | static void tsif_release(struct device *dev) |
| 1845 | { |
| 1846 | } |
| 1847 | |
| 1848 | static void tsif_init1(struct msm_tsif_platform_data *data) |
| 1849 | { |
| 1850 | int val; |
| 1851 | |
| 1852 | /* configure mux to use correct tsif instance */ |
| 1853 | val = secure_readl(MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1854 | val |= 0x80000000; |
| 1855 | secure_writel(val, MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1856 | } |
| 1857 | |
| 1858 | struct msm_tsif_platform_data tsif1_platform_data = { |
| 1859 | .num_gpios = ARRAY_SIZE(tsif1_gpios), |
| 1860 | .gpios = tsif1_gpios, |
| Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1861 | .tsif_pclk = "iface_clk", |
| 1862 | .tsif_ref_clk = "ref_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1863 | .init = tsif_init1 |
| 1864 | }; |
| 1865 | |
| 1866 | struct resource tsif1_resources[] = { |
| 1867 | [0] = { |
| 1868 | .flags = IORESOURCE_IRQ, |
| 1869 | .start = TSIF2_IRQ, |
| 1870 | .end = TSIF2_IRQ, |
| 1871 | }, |
| 1872 | [1] = { |
| 1873 | .flags = IORESOURCE_MEM, |
| 1874 | .start = MSM_TSIF1_PHYS, |
| 1875 | .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1, |
| 1876 | }, |
| 1877 | [2] = { |
| 1878 | .flags = IORESOURCE_DMA, |
| 1879 | .start = DMOV_TSIF_CHAN, |
| 1880 | .end = DMOV_TSIF_CRCI, |
| 1881 | }, |
| 1882 | }; |
| 1883 | |
| 1884 | static void tsif_init0(struct msm_tsif_platform_data *data) |
| 1885 | { |
| 1886 | int val; |
| 1887 | |
| 1888 | /* configure mux to use correct tsif instance */ |
| 1889 | val = secure_readl(MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1890 | val &= 0x7FFFFFFF; |
| 1891 | secure_writel(val, MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1892 | } |
| 1893 | |
| 1894 | struct msm_tsif_platform_data tsif0_platform_data = { |
| 1895 | .num_gpios = ARRAY_SIZE(tsif0_gpios), |
| 1896 | .gpios = tsif0_gpios, |
| Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1897 | .tsif_pclk = "iface_clk", |
| 1898 | .tsif_ref_clk = "ref_clk", |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1899 | .init = tsif_init0 |
| 1900 | }; |
| 1901 | struct resource tsif0_resources[] = { |
| 1902 | [0] = { |
| 1903 | .flags = IORESOURCE_IRQ, |
| 1904 | .start = TSIF1_IRQ, |
| 1905 | .end = TSIF1_IRQ, |
| 1906 | }, |
| 1907 | [1] = { |
| 1908 | .flags = IORESOURCE_MEM, |
| 1909 | .start = MSM_TSIF0_PHYS, |
| 1910 | .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1, |
| 1911 | }, |
| 1912 | [2] = { |
| 1913 | .flags = IORESOURCE_DMA, |
| 1914 | .start = DMOV_TSIF_CHAN, |
| 1915 | .end = DMOV_TSIF_CRCI, |
| 1916 | }, |
| 1917 | }; |
| 1918 | |
| 1919 | struct platform_device msm_device_tsif[2] = { |
| 1920 | { |
| 1921 | .name = "msm_tsif", |
| 1922 | .id = 0, |
| 1923 | .num_resources = ARRAY_SIZE(tsif0_resources), |
| 1924 | .resource = tsif0_resources, |
| 1925 | .dev = { |
| 1926 | .release = tsif_release, |
| 1927 | .platform_data = &tsif0_platform_data |
| 1928 | }, |
| 1929 | }, |
| 1930 | { |
| 1931 | .name = "msm_tsif", |
| 1932 | .id = 1, |
| 1933 | .num_resources = ARRAY_SIZE(tsif1_resources), |
| 1934 | .resource = tsif1_resources, |
| 1935 | .dev = { |
| 1936 | .release = tsif_release, |
| 1937 | .platform_data = &tsif1_platform_data |
| 1938 | }, |
| 1939 | } |
| 1940 | }; |
| 1941 | |
| 1942 | struct platform_device msm_device_smd = { |
| 1943 | .name = "msm_smd", |
| 1944 | .id = -1, |
| 1945 | }; |
| 1946 | |
| Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 1947 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 1948 | .pet_time = 10000, |
| 1949 | .bark_time = 11000, |
| 1950 | .has_secure = true, |
| 1951 | }; |
| 1952 | |
| 1953 | struct platform_device msm8660_device_watchdog = { |
| 1954 | .name = "msm_watchdog", |
| 1955 | .id = -1, |
| 1956 | .dev = { |
| 1957 | .platform_data = &msm_watchdog_pdata, |
| 1958 | }, |
| 1959 | }; |
| 1960 | |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1961 | static struct resource msm_dmov_resource_adm0[] = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1962 | { |
| 1963 | .start = INT_ADM0_AARM, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1964 | .flags = IORESOURCE_IRQ, |
| 1965 | }, |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1966 | { |
| 1967 | .start = 0x18320000, |
| 1968 | .end = 0x18320000 + SZ_1M - 1, |
| 1969 | .flags = IORESOURCE_MEM, |
| 1970 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1971 | }; |
| 1972 | |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1973 | static struct resource msm_dmov_resource_adm1[] = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1974 | { |
| 1975 | .start = INT_ADM1_AARM, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1976 | .flags = IORESOURCE_IRQ, |
| 1977 | }, |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1978 | { |
| 1979 | .start = 0x18420000, |
| 1980 | .end = 0x18420000 + SZ_1M - 1, |
| 1981 | .flags = IORESOURCE_MEM, |
| 1982 | }, |
| 1983 | }; |
| 1984 | |
| 1985 | static struct msm_dmov_pdata msm_dmov_pdata_adm0 = { |
| 1986 | .sd = 1, |
| 1987 | .sd_size = 0x800, |
| 1988 | }; |
| 1989 | |
| 1990 | static struct msm_dmov_pdata msm_dmov_pdata_adm1 = { |
| 1991 | .sd = 1, |
| 1992 | .sd_size = 0x800, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1993 | }; |
| 1994 | |
| 1995 | struct platform_device msm_device_dmov_adm0 = { |
| 1996 | .name = "msm_dmov", |
| 1997 | .id = 0, |
| 1998 | .resource = msm_dmov_resource_adm0, |
| 1999 | .num_resources = ARRAY_SIZE(msm_dmov_resource_adm0), |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 2000 | .dev = { |
| 2001 | .platform_data = &msm_dmov_pdata_adm0, |
| 2002 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2003 | }; |
| 2004 | |
| 2005 | struct platform_device msm_device_dmov_adm1 = { |
| 2006 | .name = "msm_dmov", |
| 2007 | .id = 1, |
| 2008 | .resource = msm_dmov_resource_adm1, |
| 2009 | .num_resources = ARRAY_SIZE(msm_dmov_resource_adm1), |
| Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 2010 | .dev = { |
| 2011 | .platform_data = &msm_dmov_pdata_adm1, |
| 2012 | }, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2013 | }; |
| 2014 | |
| 2015 | /* MSM Video core device */ |
| 2016 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2017 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 2018 | { |
| 2019 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2020 | .dst = MSM_BUS_SLAVE_SMI, |
| 2021 | .ab = 0, |
| 2022 | .ib = 0, |
| 2023 | }, |
| 2024 | { |
| 2025 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2026 | .dst = MSM_BUS_SLAVE_SMI, |
| 2027 | .ab = 0, |
| 2028 | .ib = 0, |
| 2029 | }, |
| 2030 | { |
| 2031 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2032 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2033 | .ab = 0, |
| 2034 | .ib = 0, |
| 2035 | }, |
| 2036 | { |
| 2037 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2038 | .dst = MSM_BUS_SLAVE_SMI, |
| 2039 | .ab = 0, |
| 2040 | .ib = 0, |
| 2041 | }, |
| 2042 | }; |
| 2043 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 2044 | { |
| 2045 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2046 | .dst = MSM_BUS_SLAVE_SMI, |
| 2047 | .ab = 54525952, |
| 2048 | .ib = 436207616, |
| 2049 | }, |
| 2050 | { |
| 2051 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2052 | .dst = MSM_BUS_SLAVE_SMI, |
| 2053 | .ab = 72351744, |
| 2054 | .ib = 289406976, |
| 2055 | }, |
| 2056 | { |
| 2057 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2058 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2059 | .ab = 500000, |
| 2060 | .ib = 1000000, |
| 2061 | }, |
| 2062 | { |
| 2063 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2064 | .dst = MSM_BUS_SLAVE_SMI, |
| 2065 | .ab = 500000, |
| 2066 | .ib = 1000000, |
| 2067 | }, |
| 2068 | }; |
| 2069 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 2070 | { |
| 2071 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2072 | .dst = MSM_BUS_SLAVE_SMI, |
| 2073 | .ab = 40894464, |
| 2074 | .ib = 327155712, |
| 2075 | }, |
| 2076 | { |
| 2077 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2078 | .dst = MSM_BUS_SLAVE_SMI, |
| 2079 | .ab = 48234496, |
| 2080 | .ib = 192937984, |
| 2081 | }, |
| 2082 | { |
| 2083 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2084 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2085 | .ab = 500000, |
| 2086 | .ib = 2000000, |
| 2087 | }, |
| 2088 | { |
| 2089 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2090 | .dst = MSM_BUS_SLAVE_SMI, |
| 2091 | .ab = 500000, |
| 2092 | .ib = 2000000, |
| 2093 | }, |
| 2094 | }; |
| 2095 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 2096 | { |
| 2097 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2098 | .dst = MSM_BUS_SLAVE_SMI, |
| 2099 | .ab = 163577856, |
| 2100 | .ib = 1308622848, |
| 2101 | }, |
| 2102 | { |
| 2103 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2104 | .dst = MSM_BUS_SLAVE_SMI, |
| 2105 | .ab = 219152384, |
| 2106 | .ib = 876609536, |
| 2107 | }, |
| 2108 | { |
| 2109 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2110 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2111 | .ab = 1750000, |
| 2112 | .ib = 3500000, |
| 2113 | }, |
| 2114 | { |
| 2115 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2116 | .dst = MSM_BUS_SLAVE_SMI, |
| 2117 | .ab = 1750000, |
| 2118 | .ib = 3500000, |
| 2119 | }, |
| 2120 | }; |
| 2121 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 2122 | { |
| 2123 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2124 | .dst = MSM_BUS_SLAVE_SMI, |
| 2125 | .ab = 121634816, |
| 2126 | .ib = 973078528, |
| 2127 | }, |
| 2128 | { |
| 2129 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2130 | .dst = MSM_BUS_SLAVE_SMI, |
| 2131 | .ab = 155189248, |
| 2132 | .ib = 620756992, |
| 2133 | }, |
| 2134 | { |
| 2135 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2136 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2137 | .ab = 1750000, |
| 2138 | .ib = 7000000, |
| 2139 | }, |
| 2140 | { |
| 2141 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2142 | .dst = MSM_BUS_SLAVE_SMI, |
| 2143 | .ab = 1750000, |
| 2144 | .ib = 7000000, |
| 2145 | }, |
| 2146 | }; |
| 2147 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 2148 | { |
| 2149 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2150 | .dst = MSM_BUS_SLAVE_SMI, |
| 2151 | .ab = 372244480, |
| 2152 | .ib = 1861222400, |
| 2153 | }, |
| 2154 | { |
| 2155 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2156 | .dst = MSM_BUS_SLAVE_SMI, |
| 2157 | .ab = 501219328, |
| 2158 | .ib = 2004877312, |
| 2159 | }, |
| 2160 | { |
| 2161 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2162 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2163 | .ab = 2500000, |
| 2164 | .ib = 5000000, |
| 2165 | }, |
| 2166 | { |
| 2167 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2168 | .dst = MSM_BUS_SLAVE_SMI, |
| 2169 | .ab = 2500000, |
| 2170 | .ib = 5000000, |
| 2171 | }, |
| 2172 | }; |
| 2173 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 2174 | { |
| 2175 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2176 | .dst = MSM_BUS_SLAVE_SMI, |
| 2177 | .ab = 222298112, |
| 2178 | .ib = 1778384896, |
| 2179 | }, |
| 2180 | { |
| 2181 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2182 | .dst = MSM_BUS_SLAVE_SMI, |
| 2183 | .ab = 330301440, |
| 2184 | .ib = 1321205760, |
| 2185 | }, |
| 2186 | { |
| 2187 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2188 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2189 | .ab = 2500000, |
| 2190 | .ib = 700000000, |
| 2191 | }, |
| 2192 | { |
| 2193 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2194 | .dst = MSM_BUS_SLAVE_SMI, |
| 2195 | .ab = 2500000, |
| 2196 | .ib = 10000000, |
| 2197 | }, |
| 2198 | }; |
| 2199 | |
| 2200 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 2201 | { |
| 2202 | ARRAY_SIZE(vidc_init_vectors), |
| 2203 | vidc_init_vectors, |
| 2204 | }, |
| 2205 | { |
| 2206 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 2207 | vidc_venc_vga_vectors, |
| 2208 | }, |
| 2209 | { |
| 2210 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 2211 | vidc_vdec_vga_vectors, |
| 2212 | }, |
| 2213 | { |
| 2214 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 2215 | vidc_venc_720p_vectors, |
| 2216 | }, |
| 2217 | { |
| 2218 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 2219 | vidc_vdec_720p_vectors, |
| 2220 | }, |
| 2221 | { |
| 2222 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 2223 | vidc_venc_1080p_vectors, |
| 2224 | }, |
| 2225 | { |
| 2226 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 2227 | vidc_vdec_1080p_vectors, |
| 2228 | }, |
| 2229 | }; |
| 2230 | |
| 2231 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 2232 | vidc_bus_client_config, |
| 2233 | ARRAY_SIZE(vidc_bus_client_config), |
| 2234 | .name = "vidc", |
| 2235 | }; |
| 2236 | |
| 2237 | #endif |
| 2238 | |
| 2239 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 2240 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 2241 | |
| 2242 | static struct resource msm_device_vidc_resources[] = { |
| 2243 | { |
| 2244 | .start = MSM_VIDC_BASE_PHYS, |
| 2245 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 2246 | .flags = IORESOURCE_MEM, |
| 2247 | }, |
| 2248 | { |
| 2249 | .start = VCODEC_IRQ, |
| 2250 | .end = VCODEC_IRQ, |
| 2251 | .flags = IORESOURCE_IRQ, |
| 2252 | }, |
| 2253 | }; |
| 2254 | |
| 2255 | struct msm_vidc_platform_data vidc_platform_data = { |
| 2256 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2257 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 2258 | #endif |
| Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 2259 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| Deepak Kotur | 59955cb | 2011-12-08 10:23:01 -0800 | [diff] [blame] | 2260 | .memtype = ION_CP_MM_HEAP_ID, |
| Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 2261 | .enable_ion = 1, |
| Deepak kotur | 5f10b27 | 2012-03-15 22:01:39 -0700 | [diff] [blame] | 2262 | .cp_enabled = 0, |
| Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 2263 | #else |
| Deepak Kotur | 12301a7 | 2011-11-09 18:30:29 -0800 | [diff] [blame] | 2264 | .memtype = MEMTYPE_SMI_KERNEL, |
| Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 2265 | .enable_ion = 0, |
| 2266 | #endif |
| Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 2267 | .disable_dmx = 0, |
| Mohan Kumar Gubbihalli Lachma Naik | ed9dc91 | 2012-03-01 19:11:14 -0800 | [diff] [blame] | 2268 | .disable_fullhd = 0, |
| 2269 | .cont_mode_dpb_count = 8 |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2270 | }; |
| 2271 | |
| 2272 | struct platform_device msm_device_vidc = { |
| 2273 | .name = "msm_vidc", |
| 2274 | .id = 0, |
| 2275 | .num_resources = ARRAY_SIZE(msm_device_vidc_resources), |
| 2276 | .resource = msm_device_vidc_resources, |
| 2277 | .dev = { |
| 2278 | .platform_data = &vidc_platform_data, |
| 2279 | }, |
| 2280 | }; |
| 2281 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2282 | #if defined(CONFIG_MSM_RPM_LOG) || defined(CONFIG_MSM_RPM_LOG_MODULE) |
| 2283 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 2284 | .phys_addr_base = 0x00106000, |
| 2285 | .reg_offsets = { |
| 2286 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000C80, |
| 2287 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x00000CA0, |
| 2288 | }, |
| 2289 | .phys_size = SZ_8K, |
| 2290 | .log_len = 4096, /* log's buffer length in bytes */ |
| 2291 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 2292 | }; |
| 2293 | |
| 2294 | struct platform_device msm8660_rpm_log_device = { |
| 2295 | .name = "msm_rpm_log", |
| 2296 | .id = -1, |
| 2297 | .dev = { |
| 2298 | .platform_data = &msm_rpm_log_pdata, |
| 2299 | }, |
| 2300 | }; |
| 2301 | #endif |
| 2302 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2303 | #if defined(CONFIG_MSM_RPM_STATS_LOG) |
| 2304 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 2305 | .phys_addr_base = 0x00107E04, |
| 2306 | .phys_size = SZ_8K, |
| 2307 | }; |
| 2308 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2309 | struct platform_device msm8660_rpm_stat_device = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2310 | .name = "msm_rpm_stat", |
| 2311 | .id = -1, |
| 2312 | .dev = { |
| 2313 | .platform_data = &msm_rpm_stat_pdata, |
| 2314 | }, |
| 2315 | }; |
| 2316 | #endif |
| 2317 | |
| Mona Hossain | ceca615 | 2012-04-10 09:55:41 -0700 | [diff] [blame] | 2318 | #define SHARED_IMEM_TZ_BASE 0x2a05f720 |
| 2319 | static struct resource tzlog_resources[] = { |
| 2320 | { |
| 2321 | .start = SHARED_IMEM_TZ_BASE, |
| 2322 | .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1, |
| 2323 | .flags = IORESOURCE_MEM, |
| 2324 | }, |
| 2325 | }; |
| 2326 | |
| 2327 | struct platform_device msm_device_tz_log = { |
| 2328 | .name = "tz_log", |
| 2329 | .id = 0, |
| 2330 | .num_resources = ARRAY_SIZE(tzlog_resources), |
| 2331 | .resource = tzlog_resources, |
| 2332 | }; |
| 2333 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2334 | #ifdef CONFIG_MSM_MPM |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2335 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2336 | [1] = MSM_GPIO_TO_INT(61), |
| 2337 | [4] = MSM_GPIO_TO_INT(87), |
| 2338 | [5] = MSM_GPIO_TO_INT(88), |
| 2339 | [6] = MSM_GPIO_TO_INT(89), |
| 2340 | [7] = MSM_GPIO_TO_INT(90), |
| 2341 | [8] = MSM_GPIO_TO_INT(91), |
| 2342 | [9] = MSM_GPIO_TO_INT(34), |
| 2343 | [10] = MSM_GPIO_TO_INT(38), |
| 2344 | [11] = MSM_GPIO_TO_INT(42), |
| 2345 | [12] = MSM_GPIO_TO_INT(46), |
| 2346 | [13] = MSM_GPIO_TO_INT(50), |
| 2347 | [14] = MSM_GPIO_TO_INT(54), |
| 2348 | [15] = MSM_GPIO_TO_INT(58), |
| 2349 | [16] = MSM_GPIO_TO_INT(63), |
| 2350 | [17] = MSM_GPIO_TO_INT(160), |
| 2351 | [18] = MSM_GPIO_TO_INT(162), |
| 2352 | [19] = MSM_GPIO_TO_INT(144), |
| 2353 | [20] = MSM_GPIO_TO_INT(146), |
| 2354 | [25] = USB1_HS_IRQ, |
| 2355 | [26] = TV_ENC_IRQ, |
| 2356 | [27] = HDMI_IRQ, |
| 2357 | [29] = MSM_GPIO_TO_INT(123), |
| 2358 | [30] = MSM_GPIO_TO_INT(172), |
| 2359 | [31] = MSM_GPIO_TO_INT(99), |
| 2360 | [32] = MSM_GPIO_TO_INT(96), |
| 2361 | [33] = MSM_GPIO_TO_INT(67), |
| 2362 | [34] = MSM_GPIO_TO_INT(71), |
| 2363 | [35] = MSM_GPIO_TO_INT(105), |
| 2364 | [36] = MSM_GPIO_TO_INT(117), |
| 2365 | [37] = MSM_GPIO_TO_INT(29), |
| 2366 | [38] = MSM_GPIO_TO_INT(30), |
| 2367 | [39] = MSM_GPIO_TO_INT(31), |
| 2368 | [40] = MSM_GPIO_TO_INT(37), |
| 2369 | [41] = MSM_GPIO_TO_INT(40), |
| 2370 | [42] = MSM_GPIO_TO_INT(41), |
| 2371 | [43] = MSM_GPIO_TO_INT(45), |
| 2372 | [44] = MSM_GPIO_TO_INT(51), |
| 2373 | [45] = MSM_GPIO_TO_INT(52), |
| 2374 | [46] = MSM_GPIO_TO_INT(57), |
| 2375 | [47] = MSM_GPIO_TO_INT(73), |
| 2376 | [48] = MSM_GPIO_TO_INT(93), |
| 2377 | [49] = MSM_GPIO_TO_INT(94), |
| 2378 | [50] = MSM_GPIO_TO_INT(103), |
| 2379 | [51] = MSM_GPIO_TO_INT(104), |
| 2380 | [52] = MSM_GPIO_TO_INT(106), |
| 2381 | [53] = MSM_GPIO_TO_INT(115), |
| 2382 | [54] = MSM_GPIO_TO_INT(124), |
| 2383 | [55] = MSM_GPIO_TO_INT(125), |
| 2384 | [56] = MSM_GPIO_TO_INT(126), |
| 2385 | [57] = MSM_GPIO_TO_INT(127), |
| 2386 | [58] = MSM_GPIO_TO_INT(128), |
| 2387 | [59] = MSM_GPIO_TO_INT(129), |
| 2388 | }; |
| 2389 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2390 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2391 | TLMM_MSM_SUMMARY_IRQ, |
| 2392 | RPM_SCSS_CPU0_GP_HIGH_IRQ, |
| 2393 | RPM_SCSS_CPU0_GP_MEDIUM_IRQ, |
| 2394 | RPM_SCSS_CPU0_GP_LOW_IRQ, |
| 2395 | RPM_SCSS_CPU0_WAKE_UP_IRQ, |
| 2396 | RPM_SCSS_CPU1_GP_HIGH_IRQ, |
| 2397 | RPM_SCSS_CPU1_GP_MEDIUM_IRQ, |
| 2398 | RPM_SCSS_CPU1_GP_LOW_IRQ, |
| 2399 | RPM_SCSS_CPU1_WAKE_UP_IRQ, |
| 2400 | MARM_SCSS_GP_IRQ_0, |
| 2401 | MARM_SCSS_GP_IRQ_1, |
| 2402 | MARM_SCSS_GP_IRQ_2, |
| 2403 | MARM_SCSS_GP_IRQ_3, |
| 2404 | MARM_SCSS_GP_IRQ_4, |
| 2405 | MARM_SCSS_GP_IRQ_5, |
| 2406 | MARM_SCSS_GP_IRQ_6, |
| 2407 | MARM_SCSS_GP_IRQ_7, |
| 2408 | MARM_SCSS_GP_IRQ_8, |
| 2409 | MARM_SCSS_GP_IRQ_9, |
| 2410 | LPASS_SCSS_GP_LOW_IRQ, |
| 2411 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 2412 | LPASS_SCSS_GP_HIGH_IRQ, |
| 2413 | SDC4_IRQ_0, |
| 2414 | SPS_MTI_31, |
| 2415 | }; |
| 2416 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2417 | struct msm_mpm_device_data msm8660_mpm_dev_data __initdata = { |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2418 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 2419 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 2420 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 2421 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 2422 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 2423 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 2424 | .mpm_apps_ipc_reg = MSM_GCC_BASE + 0x008, |
| 2425 | .mpm_apps_ipc_val = BIT(1), |
| 2426 | .mpm_ipc_irq = RPM_SCSS_CPU0_GP_MEDIUM_IRQ, |
| 2427 | |
| 2428 | }; |
| 2429 | #endif |
| 2430 | |
| 2431 | |
| 2432 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2433 | struct platform_device msm_bus_sys_fabric = { |
| 2434 | .name = "msm_bus_fabric", |
| 2435 | .id = MSM_BUS_FAB_SYSTEM, |
| 2436 | }; |
| 2437 | struct platform_device msm_bus_apps_fabric = { |
| 2438 | .name = "msm_bus_fabric", |
| 2439 | .id = MSM_BUS_FAB_APPSS, |
| 2440 | }; |
| 2441 | struct platform_device msm_bus_mm_fabric = { |
| 2442 | .name = "msm_bus_fabric", |
| 2443 | .id = MSM_BUS_FAB_MMSS, |
| 2444 | }; |
| 2445 | struct platform_device msm_bus_sys_fpb = { |
| 2446 | .name = "msm_bus_fabric", |
| 2447 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 2448 | }; |
| 2449 | struct platform_device msm_bus_cpss_fpb = { |
| 2450 | .name = "msm_bus_fabric", |
| 2451 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 2452 | }; |
| 2453 | #endif |
| 2454 | |
| Lei Zhou | 01366a4 | 2011-08-19 13:12:00 -0400 | [diff] [blame] | 2455 | #ifdef CONFIG_SND_SOC_MSM8660_APQ |
| 2456 | struct platform_device msm_pcm = { |
| 2457 | .name = "msm-pcm-dsp", |
| 2458 | .id = -1, |
| 2459 | }; |
| 2460 | |
| 2461 | struct platform_device msm_pcm_routing = { |
| 2462 | .name = "msm-pcm-routing", |
| 2463 | .id = -1, |
| 2464 | }; |
| 2465 | |
| 2466 | struct platform_device msm_cpudai0 = { |
| 2467 | .name = "msm-dai-q6", |
| 2468 | .id = PRIMARY_I2S_RX, |
| 2469 | }; |
| 2470 | |
| 2471 | struct platform_device msm_cpudai1 = { |
| 2472 | .name = "msm-dai-q6", |
| 2473 | .id = PRIMARY_I2S_TX, |
| 2474 | }; |
| 2475 | |
| 2476 | struct platform_device msm_cpudai_hdmi_rx = { |
| 2477 | .name = "msm-dai-q6", |
| 2478 | .id = HDMI_RX, |
| 2479 | }; |
| 2480 | |
| 2481 | struct platform_device msm_cpudai_bt_rx = { |
| 2482 | .name = "msm-dai-q6", |
| 2483 | .id = INT_BT_SCO_RX, |
| 2484 | }; |
| 2485 | |
| 2486 | struct platform_device msm_cpudai_bt_tx = { |
| 2487 | .name = "msm-dai-q6", |
| 2488 | .id = INT_BT_SCO_TX, |
| 2489 | }; |
| 2490 | |
| 2491 | struct platform_device msm_cpudai_fm_rx = { |
| 2492 | .name = "msm-dai-q6", |
| 2493 | .id = INT_FM_RX, |
| 2494 | }; |
| 2495 | |
| 2496 | struct platform_device msm_cpudai_fm_tx = { |
| 2497 | .name = "msm-dai-q6", |
| 2498 | .id = INT_FM_TX, |
| 2499 | }; |
| 2500 | |
| 2501 | struct platform_device msm_cpu_fe = { |
| 2502 | .name = "msm-dai-fe", |
| 2503 | .id = -1, |
| 2504 | }; |
| 2505 | |
| 2506 | struct platform_device msm_stub_codec = { |
| 2507 | .name = "msm-stub-codec", |
| 2508 | .id = 1, |
| 2509 | }; |
| 2510 | |
| 2511 | struct platform_device msm_voice = { |
| 2512 | .name = "msm-pcm-voice", |
| 2513 | .id = -1, |
| 2514 | }; |
| 2515 | |
| 2516 | struct platform_device msm_voip = { |
| 2517 | .name = "msm-voip-dsp", |
| 2518 | .id = -1, |
| 2519 | }; |
| 2520 | |
| 2521 | struct platform_device msm_lpa_pcm = { |
| 2522 | .name = "msm-pcm-lpa", |
| 2523 | .id = -1, |
| 2524 | }; |
| 2525 | |
| 2526 | struct platform_device msm_pcm_hostless = { |
| 2527 | .name = "msm-pcm-hostless", |
| 2528 | .id = -1, |
| 2529 | }; |
| 2530 | #endif |
| 2531 | |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2532 | struct platform_device asoc_msm_pcm = { |
| 2533 | .name = "msm-dsp-audio", |
| 2534 | .id = 0, |
| 2535 | }; |
| 2536 | |
| 2537 | struct platform_device asoc_msm_dai0 = { |
| 2538 | .name = "msm-codec-dai", |
| 2539 | .id = 0, |
| 2540 | }; |
| 2541 | |
| 2542 | struct platform_device asoc_msm_dai1 = { |
| 2543 | .name = "msm-cpu-dai", |
| 2544 | .id = 0, |
| 2545 | }; |
| 2546 | |
| 2547 | #if defined (CONFIG_MSM_8x60_VOIP) |
| 2548 | struct platform_device asoc_msm_mvs = { |
| 2549 | .name = "msm-mvs-audio", |
| 2550 | .id = 0, |
| 2551 | }; |
| 2552 | |
| 2553 | struct platform_device asoc_mvs_dai0 = { |
| 2554 | .name = "mvs-codec-dai", |
| 2555 | .id = 0, |
| 2556 | }; |
| 2557 | |
| 2558 | struct platform_device asoc_mvs_dai1 = { |
| 2559 | .name = "mvs-cpu-dai", |
| 2560 | .id = 0, |
| 2561 | }; |
| 2562 | #endif |
| 2563 | |
| Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2564 | static struct fs_driver_data gfx2d0_fs_data = { |
| 2565 | .clks = (struct fs_clk_data[]){ |
| 2566 | { .name = "core_clk" }, |
| 2567 | { .name = "iface_clk" }, |
| 2568 | { 0 } |
| 2569 | }, |
| 2570 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2571 | }; |
| Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2572 | |
| 2573 | static struct fs_driver_data gfx2d1_fs_data = { |
| 2574 | .clks = (struct fs_clk_data[]){ |
| 2575 | { .name = "core_clk" }, |
| 2576 | { .name = "iface_clk" }, |
| 2577 | { 0 } |
| 2578 | }, |
| 2579 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2580 | }; |
| 2581 | |
| 2582 | static struct fs_driver_data gfx3d_fs_data = { |
| 2583 | .clks = (struct fs_clk_data[]){ |
| 2584 | { .name = "core_clk", .reset_rate = 27000000 }, |
| 2585 | { .name = "iface_clk" }, |
| 2586 | { 0 } |
| 2587 | }, |
| 2588 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2589 | }; |
| 2590 | |
| 2591 | static struct fs_driver_data ijpeg_fs_data = { |
| 2592 | .clks = (struct fs_clk_data[]){ |
| 2593 | { .name = "core_clk" }, |
| 2594 | { .name = "iface_clk" }, |
| 2595 | { .name = "bus_clk" }, |
| 2596 | { 0 } |
| 2597 | }, |
| 2598 | .bus_port0 = MSM_BUS_MASTER_JPEG_ENC, |
| 2599 | }; |
| 2600 | |
| 2601 | static struct fs_driver_data mdp_fs_data = { |
| 2602 | .clks = (struct fs_clk_data[]){ |
| 2603 | { .name = "core_clk" }, |
| 2604 | { .name = "iface_clk" }, |
| 2605 | { .name = "bus_clk" }, |
| 2606 | { .name = "vsync_clk" }, |
| 2607 | { .name = "tv_src_clk" }, |
| 2608 | { .name = "tv_clk" }, |
| 2609 | { .name = "pixel_mdp_clk" }, |
| 2610 | { .name = "pixel_lcdc_clk" }, |
| 2611 | { 0 } |
| 2612 | }, |
| 2613 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 2614 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 2615 | }; |
| 2616 | |
| 2617 | static struct fs_driver_data rot_fs_data = { |
| 2618 | .clks = (struct fs_clk_data[]){ |
| 2619 | { .name = "core_clk" }, |
| 2620 | { .name = "iface_clk" }, |
| 2621 | { .name = "bus_clk" }, |
| 2622 | { 0 } |
| 2623 | }, |
| 2624 | .bus_port0 = MSM_BUS_MASTER_ROTATOR, |
| 2625 | }; |
| 2626 | |
| 2627 | static struct fs_driver_data ved_fs_data = { |
| 2628 | .clks = (struct fs_clk_data[]){ |
| 2629 | { .name = "core_clk" }, |
| 2630 | { .name = "iface_clk" }, |
| 2631 | { .name = "bus_clk" }, |
| 2632 | { 0 } |
| 2633 | }, |
| 2634 | .bus_port0 = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2635 | .bus_port1 = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2636 | }; |
| 2637 | |
| 2638 | static struct fs_driver_data vfe_fs_data = { |
| 2639 | .clks = (struct fs_clk_data[]){ |
| 2640 | { .name = "core_clk" }, |
| 2641 | { .name = "iface_clk" }, |
| 2642 | { .name = "bus_clk" }, |
| 2643 | { 0 } |
| 2644 | }, |
| 2645 | .bus_port0 = MSM_BUS_MASTER_VFE, |
| 2646 | }; |
| 2647 | |
| 2648 | static struct fs_driver_data vpe_fs_data = { |
| 2649 | .clks = (struct fs_clk_data[]){ |
| 2650 | { .name = "core_clk" }, |
| 2651 | { .name = "iface_clk" }, |
| 2652 | { .name = "bus_clk" }, |
| 2653 | { 0 } |
| 2654 | }, |
| 2655 | .bus_port0 = MSM_BUS_MASTER_VPE, |
| 2656 | }; |
| 2657 | |
| 2658 | struct platform_device *msm8660_footswitch[] __initdata = { |
| Matt Wagantall | e4454b8 | 2012-05-03 20:48:01 -0700 | [diff] [blame] | 2659 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
| Matt Wagantall | d4aab1e | 2012-05-03 20:26:56 -0700 | [diff] [blame] | 2660 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data), |
| Matt Wagantall | 316f2fc | 2012-05-03 20:41:42 -0700 | [diff] [blame] | 2661 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
| Matt Wagantall | 5e46aac | 2012-05-03 20:20:18 -0700 | [diff] [blame] | 2662 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
| Matt Wagantall | 5c92211 | 2012-05-03 19:25:28 -0700 | [diff] [blame] | 2663 | FS_8X60(FS_VFE, "fs_vfe", NULL, &vfe_fs_data), |
| 2664 | FS_8X60(FS_VPE, "fs_vpe", NULL, &vpe_fs_data), |
| Matt Wagantall | d6fbf23 | 2012-05-03 20:09:28 -0700 | [diff] [blame] | 2665 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
| 2666 | FS_8X60(FS_GFX2D0, "vdd", "kgsl-2d0.0", &gfx2d0_fs_data), |
| 2667 | FS_8X60(FS_GFX2D1, "vdd", "kgsl-2d1.1", &gfx2d1_fs_data), |
| Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2668 | }; |
| 2669 | unsigned msm8660_num_footswitch __initdata = ARRAY_SIZE(msm8660_footswitch); |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2670 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2671 | struct msm_rpm_platform_data msm8660_rpm_data __initdata = { |
| 2672 | .reg_base_addrs = { |
| 2673 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 2674 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 2675 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 2676 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 2677 | }, |
| 2678 | .irq_ack = RPM_SCSS_CPU0_GP_HIGH_IRQ, |
| Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 2679 | .irq_err = RPM_SCSS_CPU0_GP_LOW_IRQ, |
| Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 2680 | .irq_wakeup = RPM_SCSS_CPU0_WAKE_UP_IRQ, |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2681 | .ipc_rpm_reg = MSM_GCC_BASE + 0x008, |
| 2682 | .ipc_rpm_val = 4, |
| 2683 | .target_id = { |
| 2684 | MSM_RPM_MAP(8660, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 8), |
| 2685 | MSM_RPM_MAP(8660, NOTIFICATION_REGISTERED_0, NOTIFICATION, 8), |
| 2686 | MSM_RPM_MAP(8660, INVALIDATE_0, INVALIDATE, 8), |
| 2687 | MSM_RPM_MAP(8660, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 2688 | MSM_RPM_MAP(8660, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 2689 | MSM_RPM_MAP(8660, TRIGGER_SET_FROM, TRIGGER_SET, 1), |
| 2690 | MSM_RPM_MAP(8660, TRIGGER_SET_TO, TRIGGER_SET, 1), |
| 2691 | MSM_RPM_MAP(8660, TRIGGER_SET_TRIGGER, TRIGGER_SET, 1), |
| 2692 | MSM_RPM_MAP(8660, TRIGGER_CLEAR_FROM, TRIGGER_CLEAR, 1), |
| 2693 | MSM_RPM_MAP(8660, TRIGGER_CLEAR_TO, TRIGGER_CLEAR, 1), |
| 2694 | MSM_RPM_MAP(8660, TRIGGER_CLEAR_TRIGGER, TRIGGER_CLEAR, 1), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2695 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2696 | MSM_RPM_MAP(8660, CXO_CLK, CXO_CLK, 1), |
| 2697 | MSM_RPM_MAP(8660, PXO_CLK, PXO_CLK, 1), |
| 2698 | MSM_RPM_MAP(8660, PLL_4, PLL_4, 1), |
| 2699 | MSM_RPM_MAP(8660, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 2700 | MSM_RPM_MAP(8660, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 2701 | MSM_RPM_MAP(8660, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 2702 | MSM_RPM_MAP(8660, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 2703 | MSM_RPM_MAP(8660, SFPB_CLK, SFPB_CLK, 1), |
| 2704 | MSM_RPM_MAP(8660, CFPB_CLK, CFPB_CLK, 1), |
| 2705 | MSM_RPM_MAP(8660, MMFPB_CLK, MMFPB_CLK, 1), |
| 2706 | MSM_RPM_MAP(8660, SMI_CLK, SMI_CLK, 1), |
| 2707 | MSM_RPM_MAP(8660, EBI1_CLK, EBI1_CLK, 1), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2708 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2709 | MSM_RPM_MAP(8660, APPS_L2_CACHE_CTL, APPS_L2_CACHE_CTL, 1), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2710 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2711 | MSM_RPM_MAP(8660, APPS_FABRIC_HALT_0, APPS_FABRIC_HALT, 2), |
| 2712 | MSM_RPM_MAP(8660, APPS_FABRIC_CLOCK_MODE_0, |
| 2713 | APPS_FABRIC_CLOCK_MODE, 3), |
| 2714 | MSM_RPM_MAP(8660, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 6), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2715 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2716 | MSM_RPM_MAP(8660, SYSTEM_FABRIC_HALT_0, SYSTEM_FABRIC_HALT, 2), |
| 2717 | MSM_RPM_MAP(8660, SYSTEM_FABRIC_CLOCK_MODE_0, |
| 2718 | SYSTEM_FABRIC_CLOCK_MODE, 3), |
| 2719 | MSM_RPM_MAP(8660, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 22), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2720 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2721 | MSM_RPM_MAP(8660, MM_FABRIC_HALT_0, MM_FABRIC_HALT, 2), |
| 2722 | MSM_RPM_MAP(8660, MM_FABRIC_CLOCK_MODE_0, |
| 2723 | MM_FABRIC_CLOCK_MODE, 3), |
| 2724 | MSM_RPM_MAP(8660, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2725 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2726 | MSM_RPM_MAP(8660, SMPS0B_0, SMPS0B, 2), |
| 2727 | MSM_RPM_MAP(8660, SMPS1B_0, SMPS1B, 2), |
| 2728 | MSM_RPM_MAP(8660, SMPS2B_0, SMPS2B, 2), |
| 2729 | MSM_RPM_MAP(8660, SMPS3B_0, SMPS3B, 2), |
| 2730 | MSM_RPM_MAP(8660, SMPS4B_0, SMPS4B, 2), |
| 2731 | MSM_RPM_MAP(8660, LDO0B_0, LDO0B, 2), |
| 2732 | MSM_RPM_MAP(8660, LDO1B_0, LDO1B, 2), |
| 2733 | MSM_RPM_MAP(8660, LDO2B_0, LDO2B, 2), |
| 2734 | MSM_RPM_MAP(8660, LDO3B_0, LDO3B, 2), |
| 2735 | MSM_RPM_MAP(8660, LDO4B_0, LDO4B, 2), |
| 2736 | MSM_RPM_MAP(8660, LDO5B_0, LDO5B, 2), |
| 2737 | MSM_RPM_MAP(8660, LDO6B_0, LDO6B, 2), |
| 2738 | MSM_RPM_MAP(8660, LVS0B, LVS0B, 1), |
| 2739 | MSM_RPM_MAP(8660, LVS1B, LVS1B, 1), |
| 2740 | MSM_RPM_MAP(8660, LVS2B, LVS2B, 1), |
| 2741 | MSM_RPM_MAP(8660, LVS3B, LVS3B, 1), |
| 2742 | MSM_RPM_MAP(8660, MVS, MVS, 1), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2743 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2744 | MSM_RPM_MAP(8660, SMPS0_0, SMPS0, 2), |
| 2745 | MSM_RPM_MAP(8660, SMPS1_0, SMPS1, 2), |
| 2746 | MSM_RPM_MAP(8660, SMPS2_0, SMPS2, 2), |
| 2747 | MSM_RPM_MAP(8660, SMPS3_0, SMPS3, 2), |
| 2748 | MSM_RPM_MAP(8660, SMPS4_0, SMPS4, 2), |
| 2749 | MSM_RPM_MAP(8660, LDO0_0, LDO0, 2), |
| 2750 | MSM_RPM_MAP(8660, LDO1_0, LDO1, 2), |
| 2751 | MSM_RPM_MAP(8660, LDO2_0, LDO2, 2), |
| 2752 | MSM_RPM_MAP(8660, LDO3_0, LDO3, 2), |
| 2753 | MSM_RPM_MAP(8660, LDO4_0, LDO4, 2), |
| 2754 | MSM_RPM_MAP(8660, LDO5_0, LDO5, 2), |
| 2755 | MSM_RPM_MAP(8660, LDO6_0, LDO6, 2), |
| 2756 | MSM_RPM_MAP(8660, LDO7_0, LDO7, 2), |
| 2757 | MSM_RPM_MAP(8660, LDO8_0, LDO8, 2), |
| 2758 | MSM_RPM_MAP(8660, LDO9_0, LDO9, 2), |
| 2759 | MSM_RPM_MAP(8660, LDO10_0, LDO10, 2), |
| 2760 | MSM_RPM_MAP(8660, LDO11_0, LDO11, 2), |
| 2761 | MSM_RPM_MAP(8660, LDO12_0, LDO12, 2), |
| 2762 | MSM_RPM_MAP(8660, LDO13_0, LDO13, 2), |
| 2763 | MSM_RPM_MAP(8660, LDO14_0, LDO14, 2), |
| 2764 | MSM_RPM_MAP(8660, LDO15_0, LDO15, 2), |
| 2765 | MSM_RPM_MAP(8660, LDO16_0, LDO16, 2), |
| 2766 | MSM_RPM_MAP(8660, LDO17_0, LDO17, 2), |
| 2767 | MSM_RPM_MAP(8660, LDO18_0, LDO18, 2), |
| 2768 | MSM_RPM_MAP(8660, LDO19_0, LDO19, 2), |
| 2769 | MSM_RPM_MAP(8660, LDO20_0, LDO20, 2), |
| 2770 | MSM_RPM_MAP(8660, LDO21_0, LDO21, 2), |
| 2771 | MSM_RPM_MAP(8660, LDO22_0, LDO22, 2), |
| 2772 | MSM_RPM_MAP(8660, LDO23_0, LDO23, 2), |
| 2773 | MSM_RPM_MAP(8660, LDO24_0, LDO24, 2), |
| 2774 | MSM_RPM_MAP(8660, LDO25_0, LDO25, 2), |
| 2775 | MSM_RPM_MAP(8660, LVS0, LVS0, 1), |
| 2776 | MSM_RPM_MAP(8660, LVS1, LVS1, 1), |
| 2777 | MSM_RPM_MAP(8660, NCP_0, NCP, 2), |
| 2778 | MSM_RPM_MAP(8660, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 2779 | }, |
| 2780 | .target_status = { |
| 2781 | MSM_RPM_STATUS_ID_MAP(8660, VERSION_MAJOR), |
| 2782 | MSM_RPM_STATUS_ID_MAP(8660, VERSION_MINOR), |
| 2783 | MSM_RPM_STATUS_ID_MAP(8660, VERSION_BUILD), |
| 2784 | MSM_RPM_STATUS_ID_MAP(8660, SUPPORTED_RESOURCES_0), |
| 2785 | MSM_RPM_STATUS_ID_MAP(8660, SUPPORTED_RESOURCES_1), |
| 2786 | MSM_RPM_STATUS_ID_MAP(8660, SUPPORTED_RESOURCES_2), |
| 2787 | MSM_RPM_STATUS_ID_MAP(8660, SEQUENCE), |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2788 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2789 | MSM_RPM_STATUS_ID_MAP(8660, CXO_CLK), |
| 2790 | MSM_RPM_STATUS_ID_MAP(8660, PXO_CLK), |
| 2791 | MSM_RPM_STATUS_ID_MAP(8660, PLL_4), |
| 2792 | MSM_RPM_STATUS_ID_MAP(8660, APPS_FABRIC_CLK), |
| 2793 | MSM_RPM_STATUS_ID_MAP(8660, SYSTEM_FABRIC_CLK), |
| 2794 | MSM_RPM_STATUS_ID_MAP(8660, MM_FABRIC_CLK), |
| 2795 | MSM_RPM_STATUS_ID_MAP(8660, DAYTONA_FABRIC_CLK), |
| 2796 | MSM_RPM_STATUS_ID_MAP(8660, SFPB_CLK), |
| 2797 | MSM_RPM_STATUS_ID_MAP(8660, CFPB_CLK), |
| 2798 | MSM_RPM_STATUS_ID_MAP(8660, MMFPB_CLK), |
| 2799 | MSM_RPM_STATUS_ID_MAP(8660, SMI_CLK), |
| 2800 | MSM_RPM_STATUS_ID_MAP(8660, EBI1_CLK), |
| 2801 | |
| 2802 | MSM_RPM_STATUS_ID_MAP(8660, APPS_L2_CACHE_CTL), |
| 2803 | |
| 2804 | MSM_RPM_STATUS_ID_MAP(8660, APPS_FABRIC_HALT), |
| 2805 | MSM_RPM_STATUS_ID_MAP(8660, APPS_FABRIC_CLOCK_MODE), |
| 2806 | MSM_RPM_STATUS_ID_MAP(8660, APPS_FABRIC_ARB), |
| 2807 | |
| 2808 | MSM_RPM_STATUS_ID_MAP(8660, SYSTEM_FABRIC_HALT), |
| 2809 | MSM_RPM_STATUS_ID_MAP(8660, SYSTEM_FABRIC_CLOCK_MODE), |
| 2810 | MSM_RPM_STATUS_ID_MAP(8660, SYSTEM_FABRIC_ARB), |
| 2811 | |
| 2812 | MSM_RPM_STATUS_ID_MAP(8660, MM_FABRIC_HALT), |
| 2813 | MSM_RPM_STATUS_ID_MAP(8660, MM_FABRIC_CLOCK_MODE), |
| 2814 | MSM_RPM_STATUS_ID_MAP(8660, MM_FABRIC_ARB), |
| 2815 | |
| 2816 | |
| 2817 | MSM_RPM_STATUS_ID_MAP(8660, SMPS0B_0), |
| 2818 | MSM_RPM_STATUS_ID_MAP(8660, SMPS0B_1), |
| 2819 | MSM_RPM_STATUS_ID_MAP(8660, SMPS1B_0), |
| 2820 | MSM_RPM_STATUS_ID_MAP(8660, SMPS1B_1), |
| 2821 | MSM_RPM_STATUS_ID_MAP(8660, SMPS2B_0), |
| 2822 | MSM_RPM_STATUS_ID_MAP(8660, SMPS2B_1), |
| 2823 | MSM_RPM_STATUS_ID_MAP(8660, SMPS3B_0), |
| 2824 | MSM_RPM_STATUS_ID_MAP(8660, SMPS3B_1), |
| 2825 | MSM_RPM_STATUS_ID_MAP(8660, SMPS4B_0), |
| 2826 | MSM_RPM_STATUS_ID_MAP(8660, SMPS4B_1), |
| 2827 | MSM_RPM_STATUS_ID_MAP(8660, LDO0B_0), |
| 2828 | MSM_RPM_STATUS_ID_MAP(8660, LDO0B_1), |
| 2829 | MSM_RPM_STATUS_ID_MAP(8660, LDO1B_0), |
| 2830 | MSM_RPM_STATUS_ID_MAP(8660, LDO1B_1), |
| 2831 | MSM_RPM_STATUS_ID_MAP(8660, LDO2B_0), |
| 2832 | MSM_RPM_STATUS_ID_MAP(8660, LDO2B_1), |
| 2833 | MSM_RPM_STATUS_ID_MAP(8660, LDO3B_0), |
| 2834 | MSM_RPM_STATUS_ID_MAP(8660, LDO3B_1), |
| 2835 | MSM_RPM_STATUS_ID_MAP(8660, LDO4B_0), |
| 2836 | MSM_RPM_STATUS_ID_MAP(8660, LDO4B_1), |
| 2837 | MSM_RPM_STATUS_ID_MAP(8660, LDO5B_0), |
| 2838 | MSM_RPM_STATUS_ID_MAP(8660, LDO5B_1), |
| 2839 | MSM_RPM_STATUS_ID_MAP(8660, LDO6B_0), |
| 2840 | MSM_RPM_STATUS_ID_MAP(8660, LDO6B_1), |
| 2841 | MSM_RPM_STATUS_ID_MAP(8660, LVS0B), |
| 2842 | MSM_RPM_STATUS_ID_MAP(8660, LVS1B), |
| 2843 | MSM_RPM_STATUS_ID_MAP(8660, LVS2B), |
| 2844 | MSM_RPM_STATUS_ID_MAP(8660, LVS3B), |
| 2845 | MSM_RPM_STATUS_ID_MAP(8660, MVS), |
| 2846 | |
| 2847 | |
| 2848 | MSM_RPM_STATUS_ID_MAP(8660, SMPS0_0), |
| 2849 | MSM_RPM_STATUS_ID_MAP(8660, SMPS0_1), |
| 2850 | MSM_RPM_STATUS_ID_MAP(8660, SMPS1_0), |
| 2851 | MSM_RPM_STATUS_ID_MAP(8660, SMPS1_1), |
| 2852 | MSM_RPM_STATUS_ID_MAP(8660, SMPS2_0), |
| 2853 | MSM_RPM_STATUS_ID_MAP(8660, SMPS2_1), |
| 2854 | MSM_RPM_STATUS_ID_MAP(8660, SMPS3_0), |
| 2855 | MSM_RPM_STATUS_ID_MAP(8660, SMPS3_1), |
| 2856 | MSM_RPM_STATUS_ID_MAP(8660, SMPS4_0), |
| 2857 | MSM_RPM_STATUS_ID_MAP(8660, SMPS4_1), |
| 2858 | MSM_RPM_STATUS_ID_MAP(8660, LDO0_0), |
| 2859 | MSM_RPM_STATUS_ID_MAP(8660, LDO0_1), |
| 2860 | MSM_RPM_STATUS_ID_MAP(8660, LDO1_0), |
| 2861 | MSM_RPM_STATUS_ID_MAP(8660, LDO1_1), |
| 2862 | MSM_RPM_STATUS_ID_MAP(8660, LDO2_0), |
| 2863 | MSM_RPM_STATUS_ID_MAP(8660, LDO2_1), |
| 2864 | MSM_RPM_STATUS_ID_MAP(8660, LDO3_0), |
| 2865 | MSM_RPM_STATUS_ID_MAP(8660, LDO3_1), |
| 2866 | MSM_RPM_STATUS_ID_MAP(8660, LDO4_0), |
| 2867 | MSM_RPM_STATUS_ID_MAP(8660, LDO4_1), |
| 2868 | MSM_RPM_STATUS_ID_MAP(8660, LDO5_0), |
| 2869 | MSM_RPM_STATUS_ID_MAP(8660, LDO5_1), |
| 2870 | MSM_RPM_STATUS_ID_MAP(8660, LDO6_0), |
| 2871 | MSM_RPM_STATUS_ID_MAP(8660, LDO6_1), |
| 2872 | MSM_RPM_STATUS_ID_MAP(8660, LDO7_0), |
| 2873 | MSM_RPM_STATUS_ID_MAP(8660, LDO7_1), |
| 2874 | MSM_RPM_STATUS_ID_MAP(8660, LDO8_0), |
| 2875 | MSM_RPM_STATUS_ID_MAP(8660, LDO8_1), |
| 2876 | MSM_RPM_STATUS_ID_MAP(8660, LDO9_0), |
| 2877 | MSM_RPM_STATUS_ID_MAP(8660, LDO9_1), |
| 2878 | MSM_RPM_STATUS_ID_MAP(8660, LDO10_0), |
| 2879 | MSM_RPM_STATUS_ID_MAP(8660, LDO10_1), |
| 2880 | MSM_RPM_STATUS_ID_MAP(8660, LDO11_0), |
| 2881 | MSM_RPM_STATUS_ID_MAP(8660, LDO11_1), |
| 2882 | MSM_RPM_STATUS_ID_MAP(8660, LDO12_0), |
| 2883 | MSM_RPM_STATUS_ID_MAP(8660, LDO12_1), |
| 2884 | MSM_RPM_STATUS_ID_MAP(8660, LDO13_0), |
| 2885 | MSM_RPM_STATUS_ID_MAP(8660, LDO13_1), |
| 2886 | MSM_RPM_STATUS_ID_MAP(8660, LDO14_0), |
| 2887 | MSM_RPM_STATUS_ID_MAP(8660, LDO14_1), |
| 2888 | MSM_RPM_STATUS_ID_MAP(8660, LDO15_0), |
| 2889 | MSM_RPM_STATUS_ID_MAP(8660, LDO15_1), |
| 2890 | MSM_RPM_STATUS_ID_MAP(8660, LDO16_0), |
| 2891 | MSM_RPM_STATUS_ID_MAP(8660, LDO16_1), |
| 2892 | MSM_RPM_STATUS_ID_MAP(8660, LDO17_0), |
| 2893 | MSM_RPM_STATUS_ID_MAP(8660, LDO17_1), |
| 2894 | MSM_RPM_STATUS_ID_MAP(8660, LDO18_0), |
| 2895 | MSM_RPM_STATUS_ID_MAP(8660, LDO18_1), |
| 2896 | MSM_RPM_STATUS_ID_MAP(8660, LDO19_0), |
| 2897 | MSM_RPM_STATUS_ID_MAP(8660, LDO19_1), |
| 2898 | MSM_RPM_STATUS_ID_MAP(8660, LDO20_0), |
| 2899 | MSM_RPM_STATUS_ID_MAP(8660, LDO20_1), |
| 2900 | MSM_RPM_STATUS_ID_MAP(8660, LDO21_0), |
| 2901 | MSM_RPM_STATUS_ID_MAP(8660, LDO21_1), |
| 2902 | MSM_RPM_STATUS_ID_MAP(8660, LDO22_0), |
| 2903 | MSM_RPM_STATUS_ID_MAP(8660, LDO22_1), |
| 2904 | MSM_RPM_STATUS_ID_MAP(8660, LDO23_0), |
| 2905 | MSM_RPM_STATUS_ID_MAP(8660, LDO23_1), |
| 2906 | MSM_RPM_STATUS_ID_MAP(8660, LDO24_0), |
| 2907 | MSM_RPM_STATUS_ID_MAP(8660, LDO24_1), |
| 2908 | MSM_RPM_STATUS_ID_MAP(8660, LDO25_0), |
| 2909 | MSM_RPM_STATUS_ID_MAP(8660, LDO25_1), |
| 2910 | MSM_RPM_STATUS_ID_MAP(8660, LVS0), |
| 2911 | MSM_RPM_STATUS_ID_MAP(8660, LVS1), |
| 2912 | MSM_RPM_STATUS_ID_MAP(8660, NCP_0), |
| 2913 | MSM_RPM_STATUS_ID_MAP(8660, NCP_1), |
| 2914 | MSM_RPM_STATUS_ID_MAP(8660, CXO_BUFFERS), |
| 2915 | }, |
| 2916 | .target_ctrl_id = { |
| 2917 | MSM_RPM_CTRL_MAP(8660, VERSION_MAJOR), |
| 2918 | MSM_RPM_CTRL_MAP(8660, VERSION_MINOR), |
| 2919 | MSM_RPM_CTRL_MAP(8660, VERSION_BUILD), |
| 2920 | MSM_RPM_CTRL_MAP(8660, REQ_CTX_0), |
| 2921 | MSM_RPM_CTRL_MAP(8660, REQ_SEL_0), |
| 2922 | MSM_RPM_CTRL_MAP(8660, ACK_CTX_0), |
| 2923 | MSM_RPM_CTRL_MAP(8660, ACK_SEL_0), |
| 2924 | }, |
| 2925 | .sel_invalidate = MSM_RPM_8660_SEL_INVALIDATE, |
| 2926 | .sel_notification = MSM_RPM_8660_SEL_NOTIFICATION, |
| 2927 | .sel_last = MSM_RPM_8660_SEL_LAST, |
| 2928 | .ver = {2, 0, 0}, |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2929 | }; |
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2930 | |
| Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2931 | struct platform_device msm8660_rpm_device = { |
| Maheshkumar Sivasubramanian | 9c8cdc9 | 2011-09-12 14:11:30 -0600 | [diff] [blame] | 2932 | .name = "msm_rpm", |
| 2933 | .id = -1, |
| 2934 | }; |