Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. |
| 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> |
| 18 | #include <mach/irqs.h> |
| 19 | #include <mach/dma.h> |
| 20 | #include <asm/mach/mmc.h> |
| 21 | #include <asm/clkdev.h> |
| 22 | #include <linux/msm_kgsl.h> |
| 23 | #include <linux/msm_rotator.h> |
| 24 | #include <mach/msm_hsusb.h> |
| 25 | #include "footswitch.h" |
| 26 | #include "clock.h" |
| 27 | #include "clock-rpm.h" |
| 28 | #include "clock-voter.h" |
| 29 | #include "devices.h" |
| 30 | #include "devices-msm8x60.h" |
| 31 | #include <linux/dma-mapping.h> |
| 32 | #include <linux/irq.h> |
| 33 | #include <linux/clk.h> |
| 34 | #include <asm/hardware/gic.h> |
| 35 | #include <asm/mach-types.h> |
| 36 | #include <asm/clkdev.h> |
| 37 | #include <mach/msm_serial_hs_lite.h> |
| 38 | #include <mach/msm_bus.h> |
| 39 | #include <mach/msm_bus_board.h> |
| 40 | #include <mach/socinfo.h> |
| 41 | #include <mach/msm_memtypes.h> |
| 42 | #include <mach/msm_tsif.h> |
| 43 | #include <mach/scm-io.h> |
| 44 | #ifdef CONFIG_MSM_DSPS |
| 45 | #include <mach/msm_dsps.h> |
| 46 | #endif |
| 47 | #include <linux/android_pmem.h> |
| 48 | #include <linux/gpio.h> |
| 49 | #include <linux/delay.h> |
| 50 | #include <mach/mdm.h> |
| 51 | #include <mach/rpm.h> |
| 52 | #include <mach/board.h> |
| 53 | #include "rpm_stats.h" |
| 54 | #include "mpm.h" |
| 55 | |
| 56 | /* Address of GSBI blocks */ |
| 57 | #define MSM_GSBI1_PHYS 0x16000000 |
| 58 | #define MSM_GSBI2_PHYS 0x16100000 |
| 59 | #define MSM_GSBI3_PHYS 0x16200000 |
| 60 | #define MSM_GSBI4_PHYS 0x16300000 |
| 61 | #define MSM_GSBI5_PHYS 0x16400000 |
| 62 | #define MSM_GSBI6_PHYS 0x16500000 |
| 63 | #define MSM_GSBI7_PHYS 0x16600000 |
| 64 | #define MSM_GSBI8_PHYS 0x19800000 |
| 65 | #define MSM_GSBI9_PHYS 0x19900000 |
| 66 | #define MSM_GSBI10_PHYS 0x19A00000 |
| 67 | #define MSM_GSBI11_PHYS 0x19B00000 |
| 68 | #define MSM_GSBI12_PHYS 0x19C00000 |
| 69 | |
| 70 | /* GSBI QUPe devices */ |
| 71 | #define MSM_GSBI1_QUP_PHYS 0x16080000 |
| 72 | #define MSM_GSBI2_QUP_PHYS 0x16180000 |
| 73 | #define MSM_GSBI3_QUP_PHYS 0x16280000 |
| 74 | #define MSM_GSBI4_QUP_PHYS 0x16380000 |
| 75 | #define MSM_GSBI5_QUP_PHYS 0x16480000 |
| 76 | #define MSM_GSBI6_QUP_PHYS 0x16580000 |
| 77 | #define MSM_GSBI7_QUP_PHYS 0x16680000 |
| 78 | #define MSM_GSBI8_QUP_PHYS 0x19880000 |
| 79 | #define MSM_GSBI9_QUP_PHYS 0x19980000 |
| 80 | #define MSM_GSBI10_QUP_PHYS 0x19A80000 |
| 81 | #define MSM_GSBI11_QUP_PHYS 0x19B80000 |
| 82 | #define MSM_GSBI12_QUP_PHYS 0x19C80000 |
| 83 | |
| 84 | /* GSBI UART devices */ |
| 85 | #define MSM_UART1DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
| 86 | #define INT_UART1DM_IRQ GSBI6_UARTDM_IRQ |
| 87 | #define INT_UART2DM_IRQ GSBI12_UARTDM_IRQ |
| 88 | #define MSM_UART2DM_PHYS 0x19C40000 |
| 89 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
| 90 | #define INT_UART3DM_IRQ GSBI3_UARTDM_IRQ |
| 91 | #define TCSR_BASE_PHYS 0x16b00000 |
| 92 | |
| 93 | /* PRNG device */ |
| 94 | #define MSM_PRNG_PHYS 0x16C00000 |
| 95 | #define MSM_UART9DM_PHYS (MSM_GSBI9_PHYS + 0x40000) |
| 96 | #define INT_UART9DM_IRQ GSBI9_UARTDM_IRQ |
| 97 | |
| 98 | static void charm_ap2mdm_kpdpwr_on(void) |
| 99 | { |
| 100 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 0); |
Laura Abbott | eda2337 | 2011-08-17 09:25:56 -0700 | [diff] [blame] | 101 | gpio_direction_output(AP2MDM_KPDPWR_N, 1); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | static void charm_ap2mdm_kpdpwr_off(void) |
| 105 | { |
| 106 | int i; |
| 107 | |
| 108 | gpio_direction_output(AP2MDM_ERRFATAL, 1); |
| 109 | |
| 110 | for (i = 20; i > 0; i--) { |
| 111 | if (gpio_get_value(MDM2AP_STATUS) == 0) |
| 112 | break; |
| 113 | msleep(100); |
| 114 | } |
| 115 | gpio_direction_output(AP2MDM_ERRFATAL, 0); |
| 116 | |
| 117 | if (i == 0) { |
| 118 | pr_err("%s: MDM2AP_STATUS never went low. Doing a hard reset \ |
| 119 | of the charm modem.\n", __func__); |
| 120 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 1); |
| 121 | /* |
| 122 | * Currently, there is a debounce timer on the charm PMIC. It is |
| 123 | * necessary to hold the AP2MDM_PMIC_RESET low for ~3.5 seconds |
| 124 | * for the reset to fully take place. Sleep here to ensure the |
| 125 | * reset has occured before the function exits. |
| 126 | */ |
| 127 | msleep(4000); |
| 128 | gpio_direction_output(AP2MDM_PMIC_RESET_N, 0); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | static struct resource charm_resources[] = { |
| 133 | /* MDM2AP_ERRFATAL */ |
| 134 | { |
| 135 | .start = MSM_GPIO_TO_INT(MDM2AP_ERRFATAL), |
| 136 | .end = MSM_GPIO_TO_INT(MDM2AP_ERRFATAL), |
| 137 | .flags = IORESOURCE_IRQ, |
| 138 | }, |
| 139 | /* MDM2AP_STATUS */ |
| 140 | { |
| 141 | .start = MSM_GPIO_TO_INT(MDM2AP_STATUS), |
| 142 | .end = MSM_GPIO_TO_INT(MDM2AP_STATUS), |
| 143 | .flags = IORESOURCE_IRQ, |
| 144 | } |
| 145 | }; |
| 146 | |
| 147 | static struct charm_platform_data mdm_platform_data = { |
| 148 | .charm_modem_on = charm_ap2mdm_kpdpwr_on, |
| 149 | .charm_modem_off = charm_ap2mdm_kpdpwr_off, |
| 150 | }; |
| 151 | |
| 152 | struct platform_device msm_charm_modem = { |
| 153 | .name = "charm_modem", |
| 154 | .id = -1, |
| 155 | .num_resources = ARRAY_SIZE(charm_resources), |
| 156 | .resource = charm_resources, |
| 157 | .dev = { |
| 158 | .platform_data = &mdm_platform_data, |
| 159 | }, |
| 160 | }; |
| 161 | |
| 162 | #ifdef CONFIG_MSM_DSPS |
| 163 | #define GSBI12_DEV (&msm_dsps_device.dev) |
| 164 | #else |
| 165 | #define GSBI12_DEV (&msm_gsbi12_qup_i2c_device.dev) |
| 166 | #endif |
| 167 | |
| 168 | void __init msm8x60_init_irq(void) |
| 169 | { |
| 170 | unsigned int i; |
| 171 | |
| 172 | msm_mpm_irq_extn_init(); |
| 173 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, (void *)MSM_QGIC_CPU_BASE); |
| 174 | |
| 175 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ |
| 176 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); |
| 177 | |
| 178 | /* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet |
| 179 | * as they are configured as level, which does not play nice with |
| 180 | * handle_percpu_irq. |
| 181 | */ |
| 182 | for (i = GIC_PPI_START; i < GIC_SPI_START; i++) { |
| 183 | if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE) |
| 184 | irq_set_handler(i, handle_percpu_irq); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | static struct resource msm_uart1_dm_resources[] = { |
| 189 | { |
| 190 | .start = MSM_UART1DM_PHYS, |
| 191 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 192 | .flags = IORESOURCE_MEM, |
| 193 | }, |
| 194 | { |
| 195 | .start = INT_UART1DM_IRQ, |
| 196 | .end = INT_UART1DM_IRQ, |
| 197 | .flags = IORESOURCE_IRQ, |
| 198 | }, |
| 199 | { |
| 200 | /* GSBI6 is UARTDM1 */ |
| 201 | .start = MSM_GSBI6_PHYS, |
| 202 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 203 | .name = "gsbi_resource", |
| 204 | .flags = IORESOURCE_MEM, |
| 205 | }, |
| 206 | { |
| 207 | .start = DMOV_HSUART1_TX_CHAN, |
| 208 | .end = DMOV_HSUART1_RX_CHAN, |
| 209 | .name = "uartdm_channels", |
| 210 | .flags = IORESOURCE_DMA, |
| 211 | }, |
| 212 | { |
| 213 | .start = DMOV_HSUART1_TX_CRCI, |
| 214 | .end = DMOV_HSUART1_RX_CRCI, |
| 215 | .name = "uartdm_crci", |
| 216 | .flags = IORESOURCE_DMA, |
| 217 | }, |
| 218 | }; |
| 219 | |
| 220 | static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32); |
| 221 | |
| 222 | struct platform_device msm_device_uart_dm1 = { |
| 223 | .name = "msm_serial_hs", |
| 224 | .id = 0, |
| 225 | .num_resources = ARRAY_SIZE(msm_uart1_dm_resources), |
| 226 | .resource = msm_uart1_dm_resources, |
| 227 | .dev = { |
| 228 | .dma_mask = &msm_uart_dm1_dma_mask, |
| 229 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 230 | }, |
| 231 | }; |
| 232 | |
| 233 | static struct resource msm_uart3_dm_resources[] = { |
| 234 | { |
| 235 | .start = MSM_UART3DM_PHYS, |
| 236 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 237 | .name = "uartdm_resource", |
| 238 | .flags = IORESOURCE_MEM, |
| 239 | }, |
| 240 | { |
| 241 | .start = INT_UART3DM_IRQ, |
| 242 | .end = INT_UART3DM_IRQ, |
| 243 | .flags = IORESOURCE_IRQ, |
| 244 | }, |
| 245 | { |
| 246 | .start = MSM_GSBI3_PHYS, |
| 247 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 248 | .name = "gsbi_resource", |
| 249 | .flags = IORESOURCE_MEM, |
| 250 | }, |
| 251 | }; |
| 252 | |
| 253 | struct platform_device msm_device_uart_dm3 = { |
| 254 | .name = "msm_serial_hsl", |
| 255 | .id = 2, |
| 256 | .num_resources = ARRAY_SIZE(msm_uart3_dm_resources), |
| 257 | .resource = msm_uart3_dm_resources, |
| 258 | }; |
| 259 | |
| 260 | static struct resource msm_uart12_dm_resources[] = { |
| 261 | { |
| 262 | .start = MSM_UART2DM_PHYS, |
| 263 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 264 | .name = "uartdm_resource", |
| 265 | .flags = IORESOURCE_MEM, |
| 266 | }, |
| 267 | { |
| 268 | .start = INT_UART2DM_IRQ, |
| 269 | .end = INT_UART2DM_IRQ, |
| 270 | .flags = IORESOURCE_IRQ, |
| 271 | }, |
| 272 | { |
| 273 | /* GSBI 12 is UARTDM2 */ |
| 274 | .start = MSM_GSBI12_PHYS, |
| 275 | .end = MSM_GSBI12_PHYS + PAGE_SIZE - 1, |
| 276 | .name = "gsbi_resource", |
| 277 | .flags = IORESOURCE_MEM, |
| 278 | }, |
| 279 | }; |
| 280 | |
| 281 | struct platform_device msm_device_uart_dm12 = { |
| 282 | .name = "msm_serial_hsl", |
| 283 | .id = 0, |
| 284 | .num_resources = ARRAY_SIZE(msm_uart12_dm_resources), |
| 285 | .resource = msm_uart12_dm_resources, |
| 286 | }; |
| 287 | |
| 288 | #ifdef CONFIG_MSM_GSBI9_UART |
| 289 | static struct msm_serial_hslite_platform_data uart_gsbi9_pdata = { |
| 290 | .config_gpio = 1, |
| 291 | .uart_tx_gpio = 67, |
| 292 | .uart_rx_gpio = 66, |
| 293 | }; |
| 294 | |
| 295 | static struct resource msm_uart_gsbi9_resources[] = { |
| 296 | { |
| 297 | .start = MSM_UART9DM_PHYS, |
| 298 | .end = MSM_UART9DM_PHYS + PAGE_SIZE - 1, |
| 299 | .name = "uartdm_resource", |
| 300 | .flags = IORESOURCE_MEM, |
| 301 | }, |
| 302 | { |
| 303 | .start = INT_UART9DM_IRQ, |
| 304 | .end = INT_UART9DM_IRQ, |
| 305 | .flags = IORESOURCE_IRQ, |
| 306 | }, |
| 307 | { |
| 308 | /* GSBI 9 is UART_GSBI9 */ |
| 309 | .start = MSM_GSBI9_PHYS, |
| 310 | .end = MSM_GSBI9_PHYS + PAGE_SIZE - 1, |
| 311 | .name = "gsbi_resource", |
| 312 | .flags = IORESOURCE_MEM, |
| 313 | }, |
| 314 | }; |
| 315 | struct platform_device *msm_device_uart_gsbi9; |
| 316 | struct platform_device *msm_add_gsbi9_uart(void) |
| 317 | { |
| 318 | return platform_device_register_resndata(NULL, "msm_serial_hsl", |
| 319 | 1, msm_uart_gsbi9_resources, |
| 320 | ARRAY_SIZE(msm_uart_gsbi9_resources), |
| 321 | &uart_gsbi9_pdata, |
| 322 | sizeof(uart_gsbi9_pdata)); |
| 323 | } |
| 324 | #endif |
| 325 | |
| 326 | static struct resource gsbi3_qup_i2c_resources[] = { |
| 327 | { |
| 328 | .name = "qup_phys_addr", |
| 329 | .start = MSM_GSBI3_QUP_PHYS, |
| 330 | .end = MSM_GSBI3_QUP_PHYS + SZ_4K - 1, |
| 331 | .flags = IORESOURCE_MEM, |
| 332 | }, |
| 333 | { |
| 334 | .name = "gsbi_qup_i2c_addr", |
| 335 | .start = MSM_GSBI3_PHYS, |
| 336 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 337 | .flags = IORESOURCE_MEM, |
| 338 | }, |
| 339 | { |
| 340 | .name = "qup_err_intr", |
| 341 | .start = GSBI3_QUP_IRQ, |
| 342 | .end = GSBI3_QUP_IRQ, |
| 343 | .flags = IORESOURCE_IRQ, |
| 344 | }, |
| 345 | { |
| 346 | .name = "i2c_clk", |
| 347 | .start = 44, |
| 348 | .end = 44, |
| 349 | .flags = IORESOURCE_IO, |
| 350 | }, |
| 351 | { |
| 352 | .name = "i2c_sda", |
| 353 | .start = 43, |
| 354 | .end = 43, |
| 355 | .flags = IORESOURCE_IO, |
| 356 | }, |
| 357 | }; |
| 358 | |
| 359 | static struct resource gsbi4_qup_i2c_resources[] = { |
| 360 | { |
| 361 | .name = "qup_phys_addr", |
| 362 | .start = MSM_GSBI4_QUP_PHYS, |
| 363 | .end = MSM_GSBI4_QUP_PHYS + SZ_4K - 1, |
| 364 | .flags = IORESOURCE_MEM, |
| 365 | }, |
| 366 | { |
| 367 | .name = "gsbi_qup_i2c_addr", |
| 368 | .start = MSM_GSBI4_PHYS, |
| 369 | .end = MSM_GSBI4_PHYS + 4 - 1, |
| 370 | .flags = IORESOURCE_MEM, |
| 371 | }, |
| 372 | { |
| 373 | .name = "qup_err_intr", |
| 374 | .start = GSBI4_QUP_IRQ, |
| 375 | .end = GSBI4_QUP_IRQ, |
| 376 | .flags = IORESOURCE_IRQ, |
| 377 | }, |
| 378 | }; |
| 379 | |
| 380 | static struct resource gsbi7_qup_i2c_resources[] = { |
| 381 | { |
| 382 | .name = "qup_phys_addr", |
| 383 | .start = MSM_GSBI7_QUP_PHYS, |
| 384 | .end = MSM_GSBI7_QUP_PHYS + SZ_4K - 1, |
| 385 | .flags = IORESOURCE_MEM, |
| 386 | }, |
| 387 | { |
| 388 | .name = "gsbi_qup_i2c_addr", |
| 389 | .start = MSM_GSBI7_PHYS, |
| 390 | .end = MSM_GSBI7_PHYS + 4 - 1, |
| 391 | .flags = IORESOURCE_MEM, |
| 392 | }, |
| 393 | { |
| 394 | .name = "qup_err_intr", |
| 395 | .start = GSBI7_QUP_IRQ, |
| 396 | .end = GSBI7_QUP_IRQ, |
| 397 | .flags = IORESOURCE_IRQ, |
| 398 | }, |
| 399 | { |
| 400 | .name = "i2c_clk", |
| 401 | .start = 60, |
| 402 | .end = 60, |
| 403 | .flags = IORESOURCE_IO, |
| 404 | }, |
| 405 | { |
| 406 | .name = "i2c_sda", |
| 407 | .start = 59, |
| 408 | .end = 59, |
| 409 | .flags = IORESOURCE_IO, |
| 410 | }, |
| 411 | }; |
| 412 | |
| 413 | static struct resource gsbi8_qup_i2c_resources[] = { |
| 414 | { |
| 415 | .name = "qup_phys_addr", |
| 416 | .start = MSM_GSBI8_QUP_PHYS, |
| 417 | .end = MSM_GSBI8_QUP_PHYS + SZ_4K - 1, |
| 418 | .flags = IORESOURCE_MEM, |
| 419 | }, |
| 420 | { |
| 421 | .name = "gsbi_qup_i2c_addr", |
| 422 | .start = MSM_GSBI8_PHYS, |
| 423 | .end = MSM_GSBI8_PHYS + 4 - 1, |
| 424 | .flags = IORESOURCE_MEM, |
| 425 | }, |
| 426 | { |
| 427 | .name = "qup_err_intr", |
| 428 | .start = GSBI8_QUP_IRQ, |
| 429 | .end = GSBI8_QUP_IRQ, |
| 430 | .flags = IORESOURCE_IRQ, |
| 431 | }, |
| 432 | }; |
| 433 | |
| 434 | static struct resource gsbi9_qup_i2c_resources[] = { |
| 435 | { |
| 436 | .name = "qup_phys_addr", |
| 437 | .start = MSM_GSBI9_QUP_PHYS, |
| 438 | .end = MSM_GSBI9_QUP_PHYS + SZ_4K - 1, |
| 439 | .flags = IORESOURCE_MEM, |
| 440 | }, |
| 441 | { |
| 442 | .name = "gsbi_qup_i2c_addr", |
| 443 | .start = MSM_GSBI9_PHYS, |
| 444 | .end = MSM_GSBI9_PHYS + 4 - 1, |
| 445 | .flags = IORESOURCE_MEM, |
| 446 | }, |
| 447 | { |
| 448 | .name = "qup_err_intr", |
| 449 | .start = GSBI9_QUP_IRQ, |
| 450 | .end = GSBI9_QUP_IRQ, |
| 451 | .flags = IORESOURCE_IRQ, |
| 452 | }, |
| 453 | }; |
| 454 | |
| 455 | static struct resource gsbi12_qup_i2c_resources[] = { |
| 456 | { |
| 457 | .name = "qup_phys_addr", |
| 458 | .start = MSM_GSBI12_QUP_PHYS, |
| 459 | .end = MSM_GSBI12_QUP_PHYS + SZ_4K - 1, |
| 460 | .flags = IORESOURCE_MEM, |
| 461 | }, |
| 462 | { |
| 463 | .name = "gsbi_qup_i2c_addr", |
| 464 | .start = MSM_GSBI12_PHYS, |
| 465 | .end = MSM_GSBI12_PHYS + 4 - 1, |
| 466 | .flags = IORESOURCE_MEM, |
| 467 | }, |
| 468 | { |
| 469 | .name = "qup_err_intr", |
| 470 | .start = GSBI12_QUP_IRQ, |
| 471 | .end = GSBI12_QUP_IRQ, |
| 472 | .flags = IORESOURCE_IRQ, |
| 473 | }, |
| 474 | }; |
| 475 | |
| 476 | #ifdef CONFIG_MSM_BUS_SCALING |
| 477 | static struct msm_bus_vectors grp3d_init_vectors[] = { |
| 478 | { |
| 479 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 480 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 481 | .ab = 0, |
| 482 | .ib = 0, |
| 483 | }, |
| 484 | }; |
| 485 | |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 486 | static struct msm_bus_vectors grp3d_low_vectors[] = { |
| 487 | { |
| 488 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 489 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 490 | .ab = 0, |
| 491 | .ib = 990000000U, |
| 492 | }, |
| 493 | }; |
| 494 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 495 | static struct msm_bus_vectors grp3d_nominal_low_vectors[] = { |
| 496 | { |
| 497 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 498 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 499 | .ab = 0, |
| 500 | .ib = 1300000000U, |
| 501 | }, |
| 502 | }; |
| 503 | |
| 504 | static struct msm_bus_vectors grp3d_nominal_high_vectors[] = { |
| 505 | { |
| 506 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 507 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 508 | .ab = 0, |
| 509 | .ib = 2008000000U, |
| 510 | }, |
| 511 | }; |
| 512 | |
| 513 | static struct msm_bus_vectors grp3d_max_vectors[] = { |
| 514 | { |
| 515 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 516 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 517 | .ab = 0, |
| 518 | .ib = 2484000000U, |
| 519 | }, |
| 520 | }; |
| 521 | |
| 522 | static struct msm_bus_paths grp3d_bus_scale_usecases[] = { |
| 523 | { |
| 524 | ARRAY_SIZE(grp3d_init_vectors), |
| 525 | grp3d_init_vectors, |
| 526 | }, |
| 527 | { |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 528 | ARRAY_SIZE(grp3d_low_vectors), |
| 529 | grp3d_init_vectors, |
| 530 | }, |
| 531 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 532 | ARRAY_SIZE(grp3d_nominal_low_vectors), |
| 533 | grp3d_nominal_low_vectors, |
| 534 | }, |
| 535 | { |
| 536 | ARRAY_SIZE(grp3d_nominal_high_vectors), |
| 537 | grp3d_nominal_high_vectors, |
| 538 | }, |
| 539 | { |
| 540 | ARRAY_SIZE(grp3d_max_vectors), |
| 541 | grp3d_max_vectors, |
| 542 | }, |
| 543 | }; |
| 544 | |
| 545 | static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = { |
| 546 | grp3d_bus_scale_usecases, |
| 547 | ARRAY_SIZE(grp3d_bus_scale_usecases), |
| 548 | .name = "grp3d", |
| 549 | }; |
| 550 | |
| 551 | static struct msm_bus_vectors grp2d0_init_vectors[] = { |
| 552 | { |
| 553 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 554 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 555 | .ab = 0, |
| 556 | .ib = 0, |
| 557 | }, |
| 558 | }; |
| 559 | |
| 560 | static struct msm_bus_vectors grp2d0_max_vectors[] = { |
| 561 | { |
| 562 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 563 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 564 | .ab = 0, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 565 | .ib = 990000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 566 | }, |
| 567 | }; |
| 568 | |
| 569 | static struct msm_bus_paths grp2d0_bus_scale_usecases[] = { |
| 570 | { |
| 571 | ARRAY_SIZE(grp2d0_init_vectors), |
| 572 | grp2d0_init_vectors, |
| 573 | }, |
| 574 | { |
| 575 | ARRAY_SIZE(grp2d0_max_vectors), |
| 576 | grp2d0_max_vectors, |
| 577 | }, |
| 578 | }; |
| 579 | |
| 580 | static struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = { |
| 581 | grp2d0_bus_scale_usecases, |
| 582 | ARRAY_SIZE(grp2d0_bus_scale_usecases), |
| 583 | .name = "grp2d0", |
| 584 | }; |
| 585 | |
| 586 | static struct msm_bus_vectors grp2d1_init_vectors[] = { |
| 587 | { |
| 588 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 589 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 590 | .ab = 0, |
| 591 | .ib = 0, |
| 592 | }, |
| 593 | }; |
| 594 | |
| 595 | static struct msm_bus_vectors grp2d1_max_vectors[] = { |
| 596 | { |
| 597 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 598 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 599 | .ab = 0, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 600 | .ib = 990000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 601 | }, |
| 602 | }; |
| 603 | |
| 604 | static struct msm_bus_paths grp2d1_bus_scale_usecases[] = { |
| 605 | { |
| 606 | ARRAY_SIZE(grp2d1_init_vectors), |
| 607 | grp2d1_init_vectors, |
| 608 | }, |
| 609 | { |
| 610 | ARRAY_SIZE(grp2d1_max_vectors), |
| 611 | grp2d1_max_vectors, |
| 612 | }, |
| 613 | }; |
| 614 | |
| 615 | static struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = { |
| 616 | grp2d1_bus_scale_usecases, |
| 617 | ARRAY_SIZE(grp2d1_bus_scale_usecases), |
| 618 | .name = "grp2d1", |
| 619 | }; |
| 620 | #endif |
| 621 | |
| 622 | #ifdef CONFIG_HW_RANDOM_MSM |
| 623 | static struct resource rng_resources = { |
| 624 | .flags = IORESOURCE_MEM, |
| 625 | .start = MSM_PRNG_PHYS, |
| 626 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 627 | }; |
| 628 | |
| 629 | struct platform_device msm_device_rng = { |
| 630 | .name = "msm_rng", |
| 631 | .id = 0, |
| 632 | .num_resources = 1, |
| 633 | .resource = &rng_resources, |
| 634 | }; |
| 635 | #endif |
| 636 | |
| 637 | static struct resource kgsl_3d0_resources[] = { |
| 638 | { |
| 639 | .name = KGSL_3D0_REG_MEMORY, |
| 640 | .start = 0x04300000, /* GFX3D address */ |
| 641 | .end = 0x0431ffff, |
| 642 | .flags = IORESOURCE_MEM, |
| 643 | }, |
| 644 | { |
| 645 | .name = KGSL_3D0_IRQ, |
| 646 | .start = GFX3D_IRQ, |
| 647 | .end = GFX3D_IRQ, |
| 648 | .flags = IORESOURCE_IRQ, |
| 649 | }, |
| 650 | }; |
| 651 | |
| 652 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
| 653 | .pwr_data = { |
| 654 | .pwrlevel = { |
| 655 | { |
| 656 | .gpu_freq = 266667000, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 657 | .bus_freq = 4, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 658 | }, |
| 659 | { |
| 660 | .gpu_freq = 228571000, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 661 | .bus_freq = 3, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 662 | }, |
| 663 | { |
| 664 | .gpu_freq = 200000000, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 665 | .bus_freq = 2, |
| 666 | }, |
| 667 | { |
| 668 | .gpu_freq = 177778000, |
| 669 | .bus_freq = 1 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 670 | }, |
| 671 | { |
| 672 | .gpu_freq = 27000000, |
| 673 | .bus_freq = 0, |
| 674 | }, |
| 675 | }, |
| 676 | .init_level = 0, |
Lucille Sylvester | 293217d | 2011-08-19 17:50:52 -0600 | [diff] [blame^] | 677 | .num_levels = 5, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 678 | .set_grp_async = NULL, |
| 679 | .idle_timeout = HZ/5, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 680 | .nap_allowed = true, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 681 | }, |
| 682 | .clk = { |
| 683 | .name = { |
| 684 | .clk = "gfx3d_clk", |
| 685 | .pclk = "gfx3d_pclk", |
| 686 | }, |
| 687 | #ifdef CONFIG_MSM_BUS_SCALING |
| 688 | .bus_scale_table = &grp3d_bus_scale_pdata, |
| 689 | #endif |
| 690 | }, |
| 691 | .imem_clk_name = { |
| 692 | .clk = NULL, |
| 693 | .pclk = "imem_pclk", |
| 694 | }, |
| 695 | }; |
| 696 | |
| 697 | struct platform_device msm_kgsl_3d0 = { |
| 698 | .name = "kgsl-3d0", |
| 699 | .id = 0, |
| 700 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 701 | .resource = kgsl_3d0_resources, |
| 702 | .dev = { |
| 703 | .platform_data = &kgsl_3d0_pdata, |
| 704 | }, |
| 705 | }; |
| 706 | |
| 707 | static struct resource kgsl_2d0_resources[] = { |
| 708 | { |
| 709 | .name = KGSL_2D0_REG_MEMORY, |
| 710 | .start = 0x04100000, /* Z180 base address */ |
| 711 | .end = 0x04100FFF, |
| 712 | .flags = IORESOURCE_MEM, |
| 713 | }, |
| 714 | { |
| 715 | .name = KGSL_2D0_IRQ, |
| 716 | .start = GFX2D0_IRQ, |
| 717 | .end = GFX2D0_IRQ, |
| 718 | .flags = IORESOURCE_IRQ, |
| 719 | }, |
| 720 | }; |
| 721 | |
| 722 | static struct kgsl_device_platform_data kgsl_2d0_pdata = { |
| 723 | .pwr_data = { |
| 724 | .pwrlevel = { |
| 725 | { |
| 726 | .gpu_freq = 200000000, |
| 727 | .bus_freq = 1, |
| 728 | }, |
| 729 | { |
| 730 | .gpu_freq = 200000000, |
| 731 | .bus_freq = 0, |
| 732 | }, |
| 733 | }, |
| 734 | .init_level = 0, |
| 735 | .num_levels = 2, |
| 736 | .set_grp_async = NULL, |
| 737 | .idle_timeout = HZ/10, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 738 | .nap_allowed = true, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 739 | }, |
| 740 | .clk = { |
| 741 | .name = { |
| 742 | /* note: 2d clocks disabled on v1 */ |
| 743 | .clk = "gfx2d0_clk", |
| 744 | .pclk = "gfx2d0_pclk", |
| 745 | }, |
| 746 | #ifdef CONFIG_MSM_BUS_SCALING |
| 747 | .bus_scale_table = &grp2d0_bus_scale_pdata, |
| 748 | #endif |
| 749 | }, |
| 750 | }; |
| 751 | |
| 752 | struct platform_device msm_kgsl_2d0 = { |
| 753 | .name = "kgsl-2d0", |
| 754 | .id = 0, |
| 755 | .num_resources = ARRAY_SIZE(kgsl_2d0_resources), |
| 756 | .resource = kgsl_2d0_resources, |
| 757 | .dev = { |
| 758 | .platform_data = &kgsl_2d0_pdata, |
| 759 | }, |
| 760 | }; |
| 761 | |
| 762 | static struct resource kgsl_2d1_resources[] = { |
| 763 | { |
| 764 | .name = KGSL_2D1_REG_MEMORY, |
| 765 | .start = 0x04200000, /* Z180 device 1 base address */ |
| 766 | .end = 0x04200FFF, |
| 767 | .flags = IORESOURCE_MEM, |
| 768 | }, |
| 769 | { |
| 770 | .name = KGSL_2D1_IRQ, |
| 771 | .start = GFX2D1_IRQ, |
| 772 | .end = GFX2D1_IRQ, |
| 773 | .flags = IORESOURCE_IRQ, |
| 774 | }, |
| 775 | }; |
| 776 | |
| 777 | static struct kgsl_device_platform_data kgsl_2d1_pdata = { |
| 778 | .pwr_data = { |
| 779 | .pwrlevel = { |
| 780 | { |
| 781 | .gpu_freq = 200000000, |
| 782 | .bus_freq = 1, |
| 783 | }, |
| 784 | { |
| 785 | .gpu_freq = 200000000, |
| 786 | .bus_freq = 0, |
| 787 | }, |
| 788 | }, |
| 789 | .init_level = 0, |
| 790 | .num_levels = 2, |
| 791 | .set_grp_async = NULL, |
| 792 | .idle_timeout = HZ/10, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 793 | .nap_allowed = true, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 794 | }, |
| 795 | .clk = { |
| 796 | .name = { |
| 797 | .clk = "gfx2d1_clk", |
| 798 | .pclk = "gfx2d1_pclk", |
| 799 | }, |
| 800 | #ifdef CONFIG_MSM_BUS_SCALING |
| 801 | .bus_scale_table = &grp2d1_bus_scale_pdata, |
| 802 | #endif |
| 803 | }, |
| 804 | }; |
| 805 | |
| 806 | struct platform_device msm_kgsl_2d1 = { |
| 807 | .name = "kgsl-2d1", |
| 808 | .id = 1, |
| 809 | .num_resources = ARRAY_SIZE(kgsl_2d1_resources), |
| 810 | .resource = kgsl_2d1_resources, |
| 811 | .dev = { |
| 812 | .platform_data = &kgsl_2d1_pdata, |
| 813 | }, |
| 814 | }; |
| 815 | |
| 816 | /* |
| 817 | * this a software workaround for not having two distinct board |
| 818 | * files for 8660v1 and 8660v2. 8660v1 has a faulty 2d clock, and |
| 819 | * this workaround detects the cpu version to tell if the kernel is on a |
| 820 | * 8660v1, and should disable the 2d core. it is called from the board file |
| 821 | */ |
| 822 | void __init msm8x60_check_2d_hardware(void) |
| 823 | { |
| 824 | if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1) && |
| 825 | (SOCINFO_VERSION_MINOR(socinfo_get_version()) == 0)) { |
| 826 | printk(KERN_WARNING "kgsl: 2D cores disabled on 8660v1\n"); |
| 827 | kgsl_2d0_pdata.clk.name.clk = NULL; |
| 828 | kgsl_2d1_pdata.clk.name.clk = NULL; |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | /* Use GSBI3 QUP for /dev/i2c-0 */ |
| 833 | struct platform_device msm_gsbi3_qup_i2c_device = { |
| 834 | .name = "qup_i2c", |
| 835 | .id = MSM_GSBI3_QUP_I2C_BUS_ID, |
| 836 | .num_resources = ARRAY_SIZE(gsbi3_qup_i2c_resources), |
| 837 | .resource = gsbi3_qup_i2c_resources, |
| 838 | }; |
| 839 | |
| 840 | /* Use GSBI4 QUP for /dev/i2c-1 */ |
| 841 | struct platform_device msm_gsbi4_qup_i2c_device = { |
| 842 | .name = "qup_i2c", |
| 843 | .id = MSM_GSBI4_QUP_I2C_BUS_ID, |
| 844 | .num_resources = ARRAY_SIZE(gsbi4_qup_i2c_resources), |
| 845 | .resource = gsbi4_qup_i2c_resources, |
| 846 | }; |
| 847 | |
| 848 | /* Use GSBI8 QUP for /dev/i2c-3 */ |
| 849 | struct platform_device msm_gsbi8_qup_i2c_device = { |
| 850 | .name = "qup_i2c", |
| 851 | .id = MSM_GSBI8_QUP_I2C_BUS_ID, |
| 852 | .num_resources = ARRAY_SIZE(gsbi8_qup_i2c_resources), |
| 853 | .resource = gsbi8_qup_i2c_resources, |
| 854 | }; |
| 855 | |
| 856 | /* Use GSBI9 QUP for /dev/i2c-2 */ |
| 857 | struct platform_device msm_gsbi9_qup_i2c_device = { |
| 858 | .name = "qup_i2c", |
| 859 | .id = MSM_GSBI9_QUP_I2C_BUS_ID, |
| 860 | .num_resources = ARRAY_SIZE(gsbi9_qup_i2c_resources), |
| 861 | .resource = gsbi9_qup_i2c_resources, |
| 862 | }; |
| 863 | |
| 864 | /* Use GSBI7 QUP for /dev/i2c-4 (Marimba) */ |
| 865 | struct platform_device msm_gsbi7_qup_i2c_device = { |
| 866 | .name = "qup_i2c", |
| 867 | .id = MSM_GSBI7_QUP_I2C_BUS_ID, |
| 868 | .num_resources = ARRAY_SIZE(gsbi7_qup_i2c_resources), |
| 869 | .resource = gsbi7_qup_i2c_resources, |
| 870 | }; |
| 871 | |
| 872 | /* Use GSBI12 QUP for /dev/i2c-5 (Sensors) */ |
| 873 | struct platform_device msm_gsbi12_qup_i2c_device = { |
| 874 | .name = "qup_i2c", |
| 875 | .id = MSM_GSBI12_QUP_I2C_BUS_ID, |
| 876 | .num_resources = ARRAY_SIZE(gsbi12_qup_i2c_resources), |
| 877 | .resource = gsbi12_qup_i2c_resources, |
| 878 | }; |
| 879 | |
| 880 | #ifdef CONFIG_I2C_SSBI |
| 881 | /* 8058 PMIC SSBI on /dev/i2c-6 */ |
| 882 | #define MSM_SSBI1_PMIC1C_PHYS 0x00500000 |
| 883 | static struct resource msm_ssbi1_resources[] = { |
| 884 | { |
| 885 | .name = "ssbi_base", |
| 886 | .start = MSM_SSBI1_PMIC1C_PHYS, |
| 887 | .end = MSM_SSBI1_PMIC1C_PHYS + SZ_4K - 1, |
| 888 | .flags = IORESOURCE_MEM, |
| 889 | }, |
| 890 | }; |
| 891 | |
| 892 | struct platform_device msm_device_ssbi1 = { |
| 893 | .name = "i2c_ssbi", |
| 894 | .id = MSM_SSBI1_I2C_BUS_ID, |
| 895 | .num_resources = ARRAY_SIZE(msm_ssbi1_resources), |
| 896 | .resource = msm_ssbi1_resources, |
| 897 | }; |
| 898 | |
| 899 | /* 8901 PMIC SSBI on /dev/i2c-7 */ |
| 900 | #define MSM_SSBI2_PMIC2B_PHYS 0x00C00000 |
| 901 | static struct resource msm_ssbi2_resources[] = { |
| 902 | { |
| 903 | .name = "ssbi_base", |
| 904 | .start = MSM_SSBI2_PMIC2B_PHYS, |
| 905 | .end = MSM_SSBI2_PMIC2B_PHYS + SZ_4K - 1, |
| 906 | .flags = IORESOURCE_MEM, |
| 907 | }, |
| 908 | }; |
| 909 | |
| 910 | struct platform_device msm_device_ssbi2 = { |
| 911 | .name = "i2c_ssbi", |
| 912 | .id = MSM_SSBI2_I2C_BUS_ID, |
| 913 | .num_resources = ARRAY_SIZE(msm_ssbi2_resources), |
| 914 | .resource = msm_ssbi2_resources, |
| 915 | }; |
| 916 | |
| 917 | /* CODEC SSBI on /dev/i2c-8 */ |
| 918 | #define MSM_SSBI3_PHYS 0x18700000 |
| 919 | static struct resource msm_ssbi3_resources[] = { |
| 920 | { |
| 921 | .name = "ssbi_base", |
| 922 | .start = MSM_SSBI3_PHYS, |
| 923 | .end = MSM_SSBI3_PHYS + SZ_4K - 1, |
| 924 | .flags = IORESOURCE_MEM, |
| 925 | }, |
| 926 | }; |
| 927 | |
| 928 | struct platform_device msm_device_ssbi3 = { |
| 929 | .name = "i2c_ssbi", |
| 930 | .id = MSM_SSBI3_I2C_BUS_ID, |
| 931 | .num_resources = ARRAY_SIZE(msm_ssbi3_resources), |
| 932 | .resource = msm_ssbi3_resources, |
| 933 | }; |
| 934 | #endif /* CONFIG_I2C_SSBI */ |
| 935 | |
| 936 | static struct resource gsbi1_qup_spi_resources[] = { |
| 937 | { |
| 938 | .name = "spi_base", |
| 939 | .start = MSM_GSBI1_QUP_PHYS, |
| 940 | .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1, |
| 941 | .flags = IORESOURCE_MEM, |
| 942 | }, |
| 943 | { |
| 944 | .name = "gsbi_base", |
| 945 | .start = MSM_GSBI1_PHYS, |
| 946 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 947 | .flags = IORESOURCE_MEM, |
| 948 | }, |
| 949 | { |
| 950 | .name = "spi_irq_in", |
| 951 | .start = GSBI1_QUP_IRQ, |
| 952 | .end = GSBI1_QUP_IRQ, |
| 953 | .flags = IORESOURCE_IRQ, |
| 954 | }, |
| 955 | { |
| 956 | .name = "spidm_channels", |
| 957 | .start = 5, |
| 958 | .end = 6, |
| 959 | .flags = IORESOURCE_DMA, |
| 960 | }, |
| 961 | { |
| 962 | .name = "spidm_crci", |
| 963 | .start = 8, |
| 964 | .end = 7, |
| 965 | .flags = IORESOURCE_DMA, |
| 966 | }, |
| 967 | { |
| 968 | .name = "spi_clk", |
| 969 | .start = 36, |
| 970 | .end = 36, |
| 971 | .flags = IORESOURCE_IO, |
| 972 | }, |
| 973 | { |
| 974 | .name = "spi_cs", |
| 975 | .start = 35, |
| 976 | .end = 35, |
| 977 | .flags = IORESOURCE_IO, |
| 978 | }, |
| 979 | { |
| 980 | .name = "spi_miso", |
| 981 | .start = 34, |
| 982 | .end = 34, |
| 983 | .flags = IORESOURCE_IO, |
| 984 | }, |
| 985 | { |
| 986 | .name = "spi_mosi", |
| 987 | .start = 33, |
| 988 | .end = 33, |
| 989 | .flags = IORESOURCE_IO, |
| 990 | }, |
| 991 | }; |
| 992 | |
| 993 | /* Use GSBI1 QUP for SPI-0 */ |
| 994 | struct platform_device msm_gsbi1_qup_spi_device = { |
| 995 | .name = "spi_qsd", |
| 996 | .id = 0, |
| 997 | .num_resources = ARRAY_SIZE(gsbi1_qup_spi_resources), |
| 998 | .resource = gsbi1_qup_spi_resources, |
| 999 | }; |
| 1000 | |
| 1001 | |
| 1002 | static struct resource gsbi10_qup_spi_resources[] = { |
| 1003 | { |
| 1004 | .name = "spi_base", |
| 1005 | .start = MSM_GSBI10_QUP_PHYS, |
| 1006 | .end = MSM_GSBI10_QUP_PHYS + SZ_4K - 1, |
| 1007 | .flags = IORESOURCE_MEM, |
| 1008 | }, |
| 1009 | { |
| 1010 | .name = "gsbi_base", |
| 1011 | .start = MSM_GSBI10_PHYS, |
| 1012 | .end = MSM_GSBI10_PHYS + 4 - 1, |
| 1013 | .flags = IORESOURCE_MEM, |
| 1014 | }, |
| 1015 | { |
| 1016 | .name = "spi_irq_in", |
| 1017 | .start = GSBI10_QUP_IRQ, |
| 1018 | .end = GSBI10_QUP_IRQ, |
| 1019 | .flags = IORESOURCE_IRQ, |
| 1020 | }, |
| 1021 | { |
| 1022 | .name = "spi_clk", |
| 1023 | .start = 73, |
| 1024 | .end = 73, |
| 1025 | .flags = IORESOURCE_IO, |
| 1026 | }, |
| 1027 | { |
| 1028 | .name = "spi_cs", |
| 1029 | .start = 72, |
| 1030 | .end = 72, |
| 1031 | .flags = IORESOURCE_IO, |
| 1032 | }, |
| 1033 | { |
| 1034 | .name = "spi_mosi", |
| 1035 | .start = 70, |
| 1036 | .end = 70, |
| 1037 | .flags = IORESOURCE_IO, |
| 1038 | }, |
| 1039 | }; |
| 1040 | |
| 1041 | /* Use GSBI10 QUP for SPI-1 */ |
| 1042 | struct platform_device msm_gsbi10_qup_spi_device = { |
| 1043 | .name = "spi_qsd", |
| 1044 | .id = 1, |
| 1045 | .num_resources = ARRAY_SIZE(gsbi10_qup_spi_resources), |
| 1046 | .resource = gsbi10_qup_spi_resources, |
| 1047 | }; |
| 1048 | #define MSM_SDC1_BASE 0x12400000 |
| 1049 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 1050 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 1051 | #define MSM_SDC2_BASE 0x12140000 |
| 1052 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 1053 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 1054 | #define MSM_SDC3_BASE 0x12180000 |
| 1055 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 1056 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 1057 | #define MSM_SDC4_BASE 0x121C0000 |
| 1058 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 1059 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 1060 | #define MSM_SDC5_BASE 0x12200000 |
| 1061 | #define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800) |
| 1062 | #define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000) |
| 1063 | |
| 1064 | static struct resource resources_sdc1[] = { |
| 1065 | { |
| 1066 | .start = MSM_SDC1_BASE, |
| 1067 | .end = MSM_SDC1_DML_BASE - 1, |
| 1068 | .flags = IORESOURCE_MEM, |
| 1069 | }, |
| 1070 | { |
| 1071 | .start = SDC1_IRQ_0, |
| 1072 | .end = SDC1_IRQ_0, |
| 1073 | .flags = IORESOURCE_IRQ, |
| 1074 | }, |
| 1075 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1076 | { |
| 1077 | .name = "sdcc_dml_addr", |
| 1078 | .start = MSM_SDC1_DML_BASE, |
| 1079 | .end = MSM_SDC1_BAM_BASE - 1, |
| 1080 | .flags = IORESOURCE_MEM, |
| 1081 | }, |
| 1082 | { |
| 1083 | .name = "sdcc_bam_addr", |
| 1084 | .start = MSM_SDC1_BAM_BASE, |
| 1085 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 1086 | .flags = IORESOURCE_MEM, |
| 1087 | }, |
| 1088 | { |
| 1089 | .name = "sdcc_bam_irq", |
| 1090 | .start = SDC1_BAM_IRQ, |
| 1091 | .end = SDC1_BAM_IRQ, |
| 1092 | .flags = IORESOURCE_IRQ, |
| 1093 | }, |
| 1094 | #else |
| 1095 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1096 | .name = "sdcc_dma_chnl", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1097 | .start = DMOV_SDC1_CHAN, |
| 1098 | .end = DMOV_SDC1_CHAN, |
| 1099 | .flags = IORESOURCE_DMA, |
| 1100 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1101 | { |
| 1102 | .name = "sdcc_dma_crci", |
| 1103 | .start = DMOV_SDC1_CRCI, |
| 1104 | .end = DMOV_SDC1_CRCI, |
| 1105 | .flags = IORESOURCE_DMA, |
| 1106 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1107 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1108 | }; |
| 1109 | |
| 1110 | static struct resource resources_sdc2[] = { |
| 1111 | { |
| 1112 | .start = MSM_SDC2_BASE, |
| 1113 | .end = MSM_SDC2_DML_BASE - 1, |
| 1114 | .flags = IORESOURCE_MEM, |
| 1115 | }, |
| 1116 | { |
| 1117 | .start = SDC2_IRQ_0, |
| 1118 | .end = SDC2_IRQ_0, |
| 1119 | .flags = IORESOURCE_IRQ, |
| 1120 | }, |
| 1121 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1122 | { |
| 1123 | .name = "sdcc_dml_addr", |
| 1124 | .start = MSM_SDC2_DML_BASE, |
| 1125 | .end = MSM_SDC2_BAM_BASE - 1, |
| 1126 | .flags = IORESOURCE_MEM, |
| 1127 | }, |
| 1128 | { |
| 1129 | .name = "sdcc_bam_addr", |
| 1130 | .start = MSM_SDC2_BAM_BASE, |
| 1131 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 1132 | .flags = IORESOURCE_MEM, |
| 1133 | }, |
| 1134 | { |
| 1135 | .name = "sdcc_bam_irq", |
| 1136 | .start = SDC2_BAM_IRQ, |
| 1137 | .end = SDC2_BAM_IRQ, |
| 1138 | .flags = IORESOURCE_IRQ, |
| 1139 | }, |
| 1140 | #else |
| 1141 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1142 | .name = "sdcc_dma_chnl", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1143 | .start = DMOV_SDC2_CHAN, |
| 1144 | .end = DMOV_SDC2_CHAN, |
| 1145 | .flags = IORESOURCE_DMA, |
| 1146 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1147 | { |
| 1148 | .name = "sdcc_dma_crci", |
| 1149 | .start = DMOV_SDC2_CRCI, |
| 1150 | .end = DMOV_SDC2_CRCI, |
| 1151 | .flags = IORESOURCE_DMA, |
| 1152 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1153 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1154 | }; |
| 1155 | |
| 1156 | static struct resource resources_sdc3[] = { |
| 1157 | { |
| 1158 | .start = MSM_SDC3_BASE, |
| 1159 | .end = MSM_SDC3_DML_BASE - 1, |
| 1160 | .flags = IORESOURCE_MEM, |
| 1161 | }, |
| 1162 | { |
| 1163 | .start = SDC3_IRQ_0, |
| 1164 | .end = SDC3_IRQ_0, |
| 1165 | .flags = IORESOURCE_IRQ, |
| 1166 | }, |
| 1167 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1168 | { |
| 1169 | .name = "sdcc_dml_addr", |
| 1170 | .start = MSM_SDC3_DML_BASE, |
| 1171 | .end = MSM_SDC3_BAM_BASE - 1, |
| 1172 | .flags = IORESOURCE_MEM, |
| 1173 | }, |
| 1174 | { |
| 1175 | .name = "sdcc_bam_addr", |
| 1176 | .start = MSM_SDC3_BAM_BASE, |
| 1177 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 1178 | .flags = IORESOURCE_MEM, |
| 1179 | }, |
| 1180 | { |
| 1181 | .name = "sdcc_bam_irq", |
| 1182 | .start = SDC3_BAM_IRQ, |
| 1183 | .end = SDC3_BAM_IRQ, |
| 1184 | .flags = IORESOURCE_IRQ, |
| 1185 | }, |
| 1186 | #else |
| 1187 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1188 | .name = "sdcc_dma_chnl", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1189 | .start = DMOV_SDC3_CHAN, |
| 1190 | .end = DMOV_SDC3_CHAN, |
| 1191 | .flags = IORESOURCE_DMA, |
| 1192 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1193 | { |
| 1194 | .name = "sdcc_dma_crci", |
| 1195 | .start = DMOV_SDC3_CRCI, |
| 1196 | .end = DMOV_SDC3_CRCI, |
| 1197 | .flags = IORESOURCE_DMA, |
| 1198 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1199 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1200 | }; |
| 1201 | |
| 1202 | static struct resource resources_sdc4[] = { |
| 1203 | { |
| 1204 | .start = MSM_SDC4_BASE, |
| 1205 | .end = MSM_SDC4_DML_BASE - 1, |
| 1206 | .flags = IORESOURCE_MEM, |
| 1207 | }, |
| 1208 | { |
| 1209 | .start = SDC4_IRQ_0, |
| 1210 | .end = SDC4_IRQ_0, |
| 1211 | .flags = IORESOURCE_IRQ, |
| 1212 | }, |
| 1213 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1214 | { |
| 1215 | .name = "sdcc_dml_addr", |
| 1216 | .start = MSM_SDC4_DML_BASE, |
| 1217 | .end = MSM_SDC4_BAM_BASE - 1, |
| 1218 | .flags = IORESOURCE_MEM, |
| 1219 | }, |
| 1220 | { |
| 1221 | .name = "sdcc_bam_addr", |
| 1222 | .start = MSM_SDC4_BAM_BASE, |
| 1223 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 1224 | .flags = IORESOURCE_MEM, |
| 1225 | }, |
| 1226 | { |
| 1227 | .name = "sdcc_bam_irq", |
| 1228 | .start = SDC4_BAM_IRQ, |
| 1229 | .end = SDC4_BAM_IRQ, |
| 1230 | .flags = IORESOURCE_IRQ, |
| 1231 | }, |
| 1232 | #else |
| 1233 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1234 | .name = "sdcc_dma_chnl", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1235 | .start = DMOV_SDC4_CHAN, |
| 1236 | .end = DMOV_SDC4_CHAN, |
| 1237 | .flags = IORESOURCE_DMA, |
| 1238 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1239 | { |
| 1240 | .name = "sdcc_dma_crci", |
| 1241 | .start = DMOV_SDC4_CRCI, |
| 1242 | .end = DMOV_SDC4_CRCI, |
| 1243 | .flags = IORESOURCE_DMA, |
| 1244 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1245 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1246 | }; |
| 1247 | |
| 1248 | static struct resource resources_sdc5[] = { |
| 1249 | { |
| 1250 | .start = MSM_SDC5_BASE, |
| 1251 | .end = MSM_SDC5_DML_BASE - 1, |
| 1252 | .flags = IORESOURCE_MEM, |
| 1253 | }, |
| 1254 | { |
| 1255 | .start = SDC5_IRQ_0, |
| 1256 | .end = SDC5_IRQ_0, |
| 1257 | .flags = IORESOURCE_IRQ, |
| 1258 | }, |
| 1259 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1260 | { |
| 1261 | .name = "sdcc_dml_addr", |
| 1262 | .start = MSM_SDC5_DML_BASE, |
| 1263 | .end = MSM_SDC5_BAM_BASE - 1, |
| 1264 | .flags = IORESOURCE_MEM, |
| 1265 | }, |
| 1266 | { |
| 1267 | .name = "sdcc_bam_addr", |
| 1268 | .start = MSM_SDC5_BAM_BASE, |
| 1269 | .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1, |
| 1270 | .flags = IORESOURCE_MEM, |
| 1271 | }, |
| 1272 | { |
| 1273 | .name = "sdcc_bam_irq", |
| 1274 | .start = SDC5_BAM_IRQ, |
| 1275 | .end = SDC5_BAM_IRQ, |
| 1276 | .flags = IORESOURCE_IRQ, |
| 1277 | }, |
| 1278 | #else |
| 1279 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1280 | .name = "sdcc_dma_chnl", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1281 | .start = DMOV_SDC5_CHAN, |
| 1282 | .end = DMOV_SDC5_CHAN, |
| 1283 | .flags = IORESOURCE_DMA, |
| 1284 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 1285 | { |
| 1286 | .name = "sdcc_dma_crci", |
| 1287 | .start = DMOV_SDC5_CRCI, |
| 1288 | .end = DMOV_SDC5_CRCI, |
| 1289 | .flags = IORESOURCE_DMA, |
| 1290 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1291 | #endif /* CONFIG_MMC_MSM_SPS_SUPPORT */ |
| 1292 | }; |
| 1293 | |
| 1294 | struct platform_device msm_device_sdc1 = { |
| 1295 | .name = "msm_sdcc", |
| 1296 | .id = 1, |
| 1297 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 1298 | .resource = resources_sdc1, |
| 1299 | .dev = { |
| 1300 | .coherent_dma_mask = 0xffffffff, |
| 1301 | }, |
| 1302 | }; |
| 1303 | |
| 1304 | struct platform_device msm_device_sdc2 = { |
| 1305 | .name = "msm_sdcc", |
| 1306 | .id = 2, |
| 1307 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 1308 | .resource = resources_sdc2, |
| 1309 | .dev = { |
| 1310 | .coherent_dma_mask = 0xffffffff, |
| 1311 | }, |
| 1312 | }; |
| 1313 | |
| 1314 | struct platform_device msm_device_sdc3 = { |
| 1315 | .name = "msm_sdcc", |
| 1316 | .id = 3, |
| 1317 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 1318 | .resource = resources_sdc3, |
| 1319 | .dev = { |
| 1320 | .coherent_dma_mask = 0xffffffff, |
| 1321 | }, |
| 1322 | }; |
| 1323 | |
| 1324 | struct platform_device msm_device_sdc4 = { |
| 1325 | .name = "msm_sdcc", |
| 1326 | .id = 4, |
| 1327 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 1328 | .resource = resources_sdc4, |
| 1329 | .dev = { |
| 1330 | .coherent_dma_mask = 0xffffffff, |
| 1331 | }, |
| 1332 | }; |
| 1333 | |
| 1334 | struct platform_device msm_device_sdc5 = { |
| 1335 | .name = "msm_sdcc", |
| 1336 | .id = 5, |
| 1337 | .num_resources = ARRAY_SIZE(resources_sdc5), |
| 1338 | .resource = resources_sdc5, |
| 1339 | .dev = { |
| 1340 | .coherent_dma_mask = 0xffffffff, |
| 1341 | }, |
| 1342 | }; |
| 1343 | |
| 1344 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 1345 | &msm_device_sdc1, |
| 1346 | &msm_device_sdc2, |
| 1347 | &msm_device_sdc3, |
| 1348 | &msm_device_sdc4, |
| 1349 | &msm_device_sdc5, |
| 1350 | }; |
| 1351 | |
| 1352 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 1353 | { |
| 1354 | struct platform_device *pdev; |
| 1355 | |
| 1356 | if (controller < 1 || controller > 5) |
| 1357 | return -EINVAL; |
| 1358 | |
| 1359 | pdev = msm_sdcc_devices[controller-1]; |
| 1360 | pdev->dev.platform_data = plat; |
| 1361 | return platform_device_register(pdev); |
| 1362 | } |
| 1363 | |
| 1364 | #define MIPI_DSI_HW_BASE 0x04700000 |
| 1365 | #define ROTATOR_HW_BASE 0x04E00000 |
| 1366 | #define TVENC_HW_BASE 0x04F00000 |
| 1367 | #define MDP_HW_BASE 0x05100000 |
| 1368 | |
| 1369 | static struct resource msm_mipi_dsi_resources[] = { |
| 1370 | { |
| 1371 | .name = "mipi_dsi", |
| 1372 | .start = MIPI_DSI_HW_BASE, |
| 1373 | .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1, |
| 1374 | .flags = IORESOURCE_MEM, |
| 1375 | }, |
| 1376 | { |
| 1377 | .start = DSI_IRQ, |
| 1378 | .end = DSI_IRQ, |
| 1379 | .flags = IORESOURCE_IRQ, |
| 1380 | }, |
| 1381 | }; |
| 1382 | |
| 1383 | static struct platform_device msm_mipi_dsi_device = { |
| 1384 | .name = "mipi_dsi", |
| 1385 | .id = 1, |
| 1386 | .num_resources = ARRAY_SIZE(msm_mipi_dsi_resources), |
| 1387 | .resource = msm_mipi_dsi_resources, |
| 1388 | }; |
| 1389 | |
| 1390 | static struct resource msm_mdp_resources[] = { |
| 1391 | { |
| 1392 | .name = "mdp", |
| 1393 | .start = MDP_HW_BASE, |
| 1394 | .end = MDP_HW_BASE + 0x000F0000 - 1, |
| 1395 | .flags = IORESOURCE_MEM, |
| 1396 | }, |
| 1397 | { |
| 1398 | .start = INT_MDP, |
| 1399 | .end = INT_MDP, |
| 1400 | .flags = IORESOURCE_IRQ, |
| 1401 | }, |
| 1402 | }; |
| 1403 | |
| 1404 | static struct platform_device msm_mdp_device = { |
| 1405 | .name = "mdp", |
| 1406 | .id = 0, |
| 1407 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 1408 | .resource = msm_mdp_resources, |
| 1409 | }; |
| 1410 | #ifdef CONFIG_MSM_ROTATOR |
| 1411 | static struct resource resources_msm_rotator[] = { |
| 1412 | { |
| 1413 | .start = 0x04E00000, |
| 1414 | .end = 0x04F00000 - 1, |
| 1415 | .flags = IORESOURCE_MEM, |
| 1416 | }, |
| 1417 | { |
| 1418 | .start = ROT_IRQ, |
| 1419 | .end = ROT_IRQ, |
| 1420 | .flags = IORESOURCE_IRQ, |
| 1421 | }, |
| 1422 | }; |
| 1423 | |
| 1424 | static struct msm_rot_clocks rotator_clocks[] = { |
| 1425 | { |
| 1426 | .clk_name = "rot_clk", |
| 1427 | .clk_type = ROTATOR_CORE_CLK, |
| 1428 | .clk_rate = 160 * 1000 * 1000, |
| 1429 | }, |
| 1430 | { |
| 1431 | .clk_name = "rotator_pclk", |
| 1432 | .clk_type = ROTATOR_PCLK, |
| 1433 | .clk_rate = 0, |
| 1434 | }, |
| 1435 | }; |
| 1436 | |
| 1437 | static struct msm_rotator_platform_data rotator_pdata = { |
| 1438 | .number_of_clocks = ARRAY_SIZE(rotator_clocks), |
| 1439 | .hardware_version_number = 0x01010307, |
| 1440 | .rotator_clks = rotator_clocks, |
| 1441 | .regulator_name = "fs_rot", |
| 1442 | }; |
| 1443 | |
| 1444 | struct platform_device msm_rotator_device = { |
| 1445 | .name = "msm_rotator", |
| 1446 | .id = 0, |
| 1447 | .num_resources = ARRAY_SIZE(resources_msm_rotator), |
| 1448 | .resource = resources_msm_rotator, |
| 1449 | .dev = { |
| 1450 | .platform_data = &rotator_pdata, |
| 1451 | }, |
| 1452 | }; |
| 1453 | #endif |
| 1454 | |
| 1455 | |
| 1456 | /* Sensors DSPS platform data */ |
| 1457 | #ifdef CONFIG_MSM_DSPS |
| 1458 | |
| 1459 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 1460 | |
| 1461 | #define MHZ (1000*1000) |
| 1462 | |
| 1463 | static struct dsps_clk_info dsps_clks[] = { |
| 1464 | { |
| 1465 | .name = "ppss_pclk", |
| 1466 | .rate = 0, /* no rate just on/off */ |
| 1467 | }, |
| 1468 | { |
| 1469 | .name = "pmem_clk", |
| 1470 | .rate = 0, /* no rate just on/off */ |
| 1471 | }, |
| 1472 | { |
| 1473 | .name = "gsbi_qup_clk", |
| 1474 | .rate = 24 * MHZ, /* See clk_tbl_gsbi_qup[] */ |
| 1475 | }, |
| 1476 | { |
| 1477 | .name = "dfab_dsps_clk", |
| 1478 | .rate = 64 * MHZ, /* Same rate as USB. */ |
| 1479 | } |
| 1480 | }; |
| 1481 | |
| 1482 | static struct dsps_regulator_info dsps_regs[] = { |
| 1483 | { |
| 1484 | .name = "8058_l5", |
| 1485 | .volt = 2850000, /* in uV */ |
| 1486 | }, |
| 1487 | { |
| 1488 | .name = "8058_s3", |
| 1489 | .volt = 1800000, /* in uV */ |
| 1490 | } |
| 1491 | }; |
| 1492 | |
| 1493 | /* |
| 1494 | * Note: GPIOs field is intialized in run-time at the function |
| 1495 | * msm8x60_init_dsps(). |
| 1496 | */ |
| 1497 | |
| 1498 | struct msm_dsps_platform_data msm_dsps_pdata = { |
| 1499 | .clks = dsps_clks, |
| 1500 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 1501 | .gpios = NULL, |
| 1502 | .gpios_num = 0, |
| 1503 | .regs = dsps_regs, |
| 1504 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 1505 | .signature = DSPS_SIGNATURE, |
| 1506 | }; |
| 1507 | |
| 1508 | static struct resource msm_dsps_resources[] = { |
| 1509 | { |
| 1510 | .start = PPSS_REG_PHYS_BASE, |
| 1511 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 1512 | .name = "ppss_reg", |
| 1513 | .flags = IORESOURCE_MEM, |
| 1514 | }, |
| 1515 | }; |
| 1516 | |
| 1517 | struct platform_device msm_dsps_device = { |
| 1518 | .name = "msm_dsps", |
| 1519 | .id = 0, |
| 1520 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 1521 | .resource = msm_dsps_resources, |
| 1522 | .dev.platform_data = &msm_dsps_pdata, |
| 1523 | }; |
| 1524 | |
| 1525 | #endif /* CONFIG_MSM_DSPS */ |
| 1526 | |
| 1527 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1528 | static struct resource msm_tvenc_resources[] = { |
| 1529 | { |
| 1530 | .name = "tvenc", |
| 1531 | .start = TVENC_HW_BASE, |
| 1532 | .end = TVENC_HW_BASE + PAGE_SIZE - 1, |
| 1533 | .flags = IORESOURCE_MEM, |
| 1534 | } |
| 1535 | }; |
| 1536 | |
| 1537 | static struct resource tvout_device_resources[] = { |
| 1538 | { |
| 1539 | .name = "tvout_device_irq", |
| 1540 | .start = TV_ENC_IRQ, |
| 1541 | .end = TV_ENC_IRQ, |
| 1542 | .flags = IORESOURCE_IRQ, |
| 1543 | }, |
| 1544 | }; |
| 1545 | #endif |
| 1546 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 1547 | { |
| 1548 | int ret; |
| 1549 | |
| 1550 | pdev->dev.platform_data = data; |
| 1551 | |
| 1552 | ret = platform_device_register(pdev); |
| 1553 | if (ret) |
| 1554 | dev_err(&pdev->dev, |
| 1555 | "%s: platform_device_register() failed = %d\n", |
| 1556 | __func__, ret); |
| 1557 | } |
| 1558 | |
| 1559 | static struct platform_device msm_lcdc_device = { |
| 1560 | .name = "lcdc", |
| 1561 | .id = 0, |
| 1562 | }; |
| 1563 | |
| 1564 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1565 | static struct platform_device msm_tvenc_device = { |
| 1566 | .name = "tvenc", |
| 1567 | .id = 0, |
| 1568 | .num_resources = ARRAY_SIZE(msm_tvenc_resources), |
| 1569 | .resource = msm_tvenc_resources, |
| 1570 | }; |
| 1571 | |
| 1572 | static struct platform_device msm_tvout_device = { |
| 1573 | .name = "tvout_device", |
| 1574 | .id = 0, |
| 1575 | .num_resources = ARRAY_SIZE(tvout_device_resources), |
| 1576 | .resource = tvout_device_resources, |
| 1577 | }; |
| 1578 | #endif |
| 1579 | |
| 1580 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1581 | static struct platform_device msm_dtv_device = { |
| 1582 | .name = "dtv", |
| 1583 | .id = 0, |
| 1584 | }; |
| 1585 | #endif |
| 1586 | |
| 1587 | void __init msm_fb_register_device(char *name, void *data) |
| 1588 | { |
| 1589 | if (!strncmp(name, "mdp", 3)) |
| 1590 | msm_register_device(&msm_mdp_device, data); |
| 1591 | else if (!strncmp(name, "lcdc", 4)) |
| 1592 | msm_register_device(&msm_lcdc_device, data); |
| 1593 | else if (!strncmp(name, "mipi_dsi", 8)) |
| 1594 | msm_register_device(&msm_mipi_dsi_device, data); |
| 1595 | #ifdef CONFIG_FB_MSM_TVOUT |
| 1596 | else if (!strncmp(name, "tvenc", 5)) |
| 1597 | msm_register_device(&msm_tvenc_device, data); |
| 1598 | else if (!strncmp(name, "tvout_device", 12)) |
| 1599 | msm_register_device(&msm_tvout_device, data); |
| 1600 | #endif |
| 1601 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1602 | else if (!strncmp(name, "dtv", 3)) |
| 1603 | msm_register_device(&msm_dtv_device, data); |
| 1604 | #endif |
| 1605 | else |
| 1606 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 1607 | } |
| 1608 | |
| 1609 | static struct resource resources_otg[] = { |
| 1610 | { |
| 1611 | .start = 0x12500000, |
| 1612 | .end = 0x12500000 + SZ_1K - 1, |
| 1613 | .flags = IORESOURCE_MEM, |
| 1614 | }, |
| 1615 | { |
| 1616 | .start = USB1_HS_IRQ, |
| 1617 | .end = USB1_HS_IRQ, |
| 1618 | .flags = IORESOURCE_IRQ, |
| 1619 | }, |
| 1620 | }; |
| 1621 | |
| 1622 | struct platform_device msm_device_otg = { |
| 1623 | .name = "msm_otg", |
| 1624 | .id = -1, |
| 1625 | .num_resources = ARRAY_SIZE(resources_otg), |
| 1626 | .resource = resources_otg, |
| 1627 | }; |
| 1628 | |
| 1629 | static u64 dma_mask = 0xffffffffULL; |
| 1630 | struct platform_device msm_device_gadget_peripheral = { |
| 1631 | .name = "msm_hsusb", |
| 1632 | .id = -1, |
| 1633 | .dev = { |
| 1634 | .dma_mask = &dma_mask, |
| 1635 | .coherent_dma_mask = 0xffffffffULL, |
| 1636 | }, |
| 1637 | }; |
| 1638 | #ifdef CONFIG_USB_EHCI_MSM_72K |
| 1639 | static struct resource resources_hsusb_host[] = { |
| 1640 | { |
| 1641 | .start = 0x12500000, |
| 1642 | .end = 0x12500000 + SZ_1K - 1, |
| 1643 | .flags = IORESOURCE_MEM, |
| 1644 | }, |
| 1645 | { |
| 1646 | .start = USB1_HS_IRQ, |
| 1647 | .end = USB1_HS_IRQ, |
| 1648 | .flags = IORESOURCE_IRQ, |
| 1649 | }, |
| 1650 | }; |
| 1651 | |
| 1652 | struct platform_device msm_device_hsusb_host = { |
| 1653 | .name = "msm_hsusb_host", |
| 1654 | .id = 0, |
| 1655 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 1656 | .resource = resources_hsusb_host, |
| 1657 | .dev = { |
| 1658 | .dma_mask = &dma_mask, |
| 1659 | .coherent_dma_mask = 0xffffffffULL, |
| 1660 | }, |
| 1661 | }; |
| 1662 | |
| 1663 | static struct platform_device *msm_host_devices[] = { |
| 1664 | &msm_device_hsusb_host, |
| 1665 | }; |
| 1666 | |
| 1667 | int msm_add_host(unsigned int host, struct msm_usb_host_platform_data *plat) |
| 1668 | { |
| 1669 | struct platform_device *pdev; |
| 1670 | |
| 1671 | pdev = msm_host_devices[host]; |
| 1672 | if (!pdev) |
| 1673 | return -ENODEV; |
| 1674 | pdev->dev.platform_data = plat; |
| 1675 | return platform_device_register(pdev); |
| 1676 | } |
| 1677 | #endif |
| 1678 | |
| 1679 | #define MSM_TSIF0_PHYS (0x18200000) |
| 1680 | #define MSM_TSIF1_PHYS (0x18201000) |
| 1681 | #define MSM_TSIF_SIZE (0x200) |
| 1682 | #define TCSR_ADM_0_A_CRCI_MUX_SEL 0x0070 |
| 1683 | |
| 1684 | #define TSIF_0_CLK GPIO_CFG(93, 1, GPIO_CFG_INPUT, \ |
| 1685 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1686 | #define TSIF_0_EN GPIO_CFG(94, 1, GPIO_CFG_INPUT, \ |
| 1687 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1688 | #define TSIF_0_DATA GPIO_CFG(95, 1, GPIO_CFG_INPUT, \ |
| 1689 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1690 | #define TSIF_0_SYNC GPIO_CFG(96, 1, GPIO_CFG_INPUT, \ |
| 1691 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1692 | #define TSIF_1_CLK GPIO_CFG(97, 1, GPIO_CFG_INPUT, \ |
| 1693 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1694 | #define TSIF_1_EN GPIO_CFG(98, 1, GPIO_CFG_INPUT, \ |
| 1695 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1696 | #define TSIF_1_DATA GPIO_CFG(99, 1, GPIO_CFG_INPUT, \ |
| 1697 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1698 | #define TSIF_1_SYNC GPIO_CFG(100, 1, GPIO_CFG_INPUT, \ |
| 1699 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1700 | |
| 1701 | static const struct msm_gpio tsif0_gpios[] = { |
| 1702 | { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", }, |
| 1703 | { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", }, |
| 1704 | { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", }, |
| 1705 | { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", }, |
| 1706 | }; |
| 1707 | |
| 1708 | static const struct msm_gpio tsif1_gpios[] = { |
| 1709 | { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", }, |
| 1710 | { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", }, |
| 1711 | { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", }, |
| 1712 | { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", }, |
| 1713 | }; |
| 1714 | |
| 1715 | static void tsif_release(struct device *dev) |
| 1716 | { |
| 1717 | } |
| 1718 | |
| 1719 | static void tsif_init1(struct msm_tsif_platform_data *data) |
| 1720 | { |
| 1721 | int val; |
| 1722 | |
| 1723 | /* configure mux to use correct tsif instance */ |
| 1724 | val = secure_readl(MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1725 | val |= 0x80000000; |
| 1726 | secure_writel(val, MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1727 | } |
| 1728 | |
| 1729 | struct msm_tsif_platform_data tsif1_platform_data = { |
| 1730 | .num_gpios = ARRAY_SIZE(tsif1_gpios), |
| 1731 | .gpios = tsif1_gpios, |
| 1732 | .tsif_pclk = "tsif_pclk", |
| 1733 | .tsif_ref_clk = "tsif_ref_clk", |
| 1734 | .init = tsif_init1 |
| 1735 | }; |
| 1736 | |
| 1737 | struct resource tsif1_resources[] = { |
| 1738 | [0] = { |
| 1739 | .flags = IORESOURCE_IRQ, |
| 1740 | .start = TSIF2_IRQ, |
| 1741 | .end = TSIF2_IRQ, |
| 1742 | }, |
| 1743 | [1] = { |
| 1744 | .flags = IORESOURCE_MEM, |
| 1745 | .start = MSM_TSIF1_PHYS, |
| 1746 | .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1, |
| 1747 | }, |
| 1748 | [2] = { |
| 1749 | .flags = IORESOURCE_DMA, |
| 1750 | .start = DMOV_TSIF_CHAN, |
| 1751 | .end = DMOV_TSIF_CRCI, |
| 1752 | }, |
| 1753 | }; |
| 1754 | |
| 1755 | static void tsif_init0(struct msm_tsif_platform_data *data) |
| 1756 | { |
| 1757 | int val; |
| 1758 | |
| 1759 | /* configure mux to use correct tsif instance */ |
| 1760 | val = secure_readl(MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1761 | val &= 0x7FFFFFFF; |
| 1762 | secure_writel(val, MSM_TCSR_BASE + TCSR_ADM_0_A_CRCI_MUX_SEL); |
| 1763 | } |
| 1764 | |
| 1765 | struct msm_tsif_platform_data tsif0_platform_data = { |
| 1766 | .num_gpios = ARRAY_SIZE(tsif0_gpios), |
| 1767 | .gpios = tsif0_gpios, |
| 1768 | .tsif_pclk = "tsif_pclk", |
| 1769 | .tsif_ref_clk = "tsif_ref_clk", |
| 1770 | .init = tsif_init0 |
| 1771 | }; |
| 1772 | struct resource tsif0_resources[] = { |
| 1773 | [0] = { |
| 1774 | .flags = IORESOURCE_IRQ, |
| 1775 | .start = TSIF1_IRQ, |
| 1776 | .end = TSIF1_IRQ, |
| 1777 | }, |
| 1778 | [1] = { |
| 1779 | .flags = IORESOURCE_MEM, |
| 1780 | .start = MSM_TSIF0_PHYS, |
| 1781 | .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1, |
| 1782 | }, |
| 1783 | [2] = { |
| 1784 | .flags = IORESOURCE_DMA, |
| 1785 | .start = DMOV_TSIF_CHAN, |
| 1786 | .end = DMOV_TSIF_CRCI, |
| 1787 | }, |
| 1788 | }; |
| 1789 | |
| 1790 | struct platform_device msm_device_tsif[2] = { |
| 1791 | { |
| 1792 | .name = "msm_tsif", |
| 1793 | .id = 0, |
| 1794 | .num_resources = ARRAY_SIZE(tsif0_resources), |
| 1795 | .resource = tsif0_resources, |
| 1796 | .dev = { |
| 1797 | .release = tsif_release, |
| 1798 | .platform_data = &tsif0_platform_data |
| 1799 | }, |
| 1800 | }, |
| 1801 | { |
| 1802 | .name = "msm_tsif", |
| 1803 | .id = 1, |
| 1804 | .num_resources = ARRAY_SIZE(tsif1_resources), |
| 1805 | .resource = tsif1_resources, |
| 1806 | .dev = { |
| 1807 | .release = tsif_release, |
| 1808 | .platform_data = &tsif1_platform_data |
| 1809 | }, |
| 1810 | } |
| 1811 | }; |
| 1812 | |
| 1813 | struct platform_device msm_device_smd = { |
| 1814 | .name = "msm_smd", |
| 1815 | .id = -1, |
| 1816 | }; |
| 1817 | |
| 1818 | struct resource msm_dmov_resource_adm0[] = { |
| 1819 | { |
| 1820 | .start = INT_ADM0_AARM, |
| 1821 | .end = (resource_size_t)MSM_DMOV_ADM0_BASE, |
| 1822 | .flags = IORESOURCE_IRQ, |
| 1823 | }, |
| 1824 | }; |
| 1825 | |
| 1826 | struct resource msm_dmov_resource_adm1[] = { |
| 1827 | { |
| 1828 | .start = INT_ADM1_AARM, |
| 1829 | .end = (resource_size_t)MSM_DMOV_ADM1_BASE, |
| 1830 | .flags = IORESOURCE_IRQ, |
| 1831 | }, |
| 1832 | }; |
| 1833 | |
| 1834 | struct platform_device msm_device_dmov_adm0 = { |
| 1835 | .name = "msm_dmov", |
| 1836 | .id = 0, |
| 1837 | .resource = msm_dmov_resource_adm0, |
| 1838 | .num_resources = ARRAY_SIZE(msm_dmov_resource_adm0), |
| 1839 | }; |
| 1840 | |
| 1841 | struct platform_device msm_device_dmov_adm1 = { |
| 1842 | .name = "msm_dmov", |
| 1843 | .id = 1, |
| 1844 | .resource = msm_dmov_resource_adm1, |
| 1845 | .num_resources = ARRAY_SIZE(msm_dmov_resource_adm1), |
| 1846 | }; |
| 1847 | |
| 1848 | /* MSM Video core device */ |
| 1849 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1850 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 1851 | { |
| 1852 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1853 | .dst = MSM_BUS_SLAVE_SMI, |
| 1854 | .ab = 0, |
| 1855 | .ib = 0, |
| 1856 | }, |
| 1857 | { |
| 1858 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1859 | .dst = MSM_BUS_SLAVE_SMI, |
| 1860 | .ab = 0, |
| 1861 | .ib = 0, |
| 1862 | }, |
| 1863 | { |
| 1864 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1865 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1866 | .ab = 0, |
| 1867 | .ib = 0, |
| 1868 | }, |
| 1869 | { |
| 1870 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1871 | .dst = MSM_BUS_SLAVE_SMI, |
| 1872 | .ab = 0, |
| 1873 | .ib = 0, |
| 1874 | }, |
| 1875 | }; |
| 1876 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 1877 | { |
| 1878 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1879 | .dst = MSM_BUS_SLAVE_SMI, |
| 1880 | .ab = 54525952, |
| 1881 | .ib = 436207616, |
| 1882 | }, |
| 1883 | { |
| 1884 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1885 | .dst = MSM_BUS_SLAVE_SMI, |
| 1886 | .ab = 72351744, |
| 1887 | .ib = 289406976, |
| 1888 | }, |
| 1889 | { |
| 1890 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1891 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1892 | .ab = 500000, |
| 1893 | .ib = 1000000, |
| 1894 | }, |
| 1895 | { |
| 1896 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1897 | .dst = MSM_BUS_SLAVE_SMI, |
| 1898 | .ab = 500000, |
| 1899 | .ib = 1000000, |
| 1900 | }, |
| 1901 | }; |
| 1902 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 1903 | { |
| 1904 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1905 | .dst = MSM_BUS_SLAVE_SMI, |
| 1906 | .ab = 40894464, |
| 1907 | .ib = 327155712, |
| 1908 | }, |
| 1909 | { |
| 1910 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1911 | .dst = MSM_BUS_SLAVE_SMI, |
| 1912 | .ab = 48234496, |
| 1913 | .ib = 192937984, |
| 1914 | }, |
| 1915 | { |
| 1916 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1917 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1918 | .ab = 500000, |
| 1919 | .ib = 2000000, |
| 1920 | }, |
| 1921 | { |
| 1922 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1923 | .dst = MSM_BUS_SLAVE_SMI, |
| 1924 | .ab = 500000, |
| 1925 | .ib = 2000000, |
| 1926 | }, |
| 1927 | }; |
| 1928 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 1929 | { |
| 1930 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1931 | .dst = MSM_BUS_SLAVE_SMI, |
| 1932 | .ab = 163577856, |
| 1933 | .ib = 1308622848, |
| 1934 | }, |
| 1935 | { |
| 1936 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1937 | .dst = MSM_BUS_SLAVE_SMI, |
| 1938 | .ab = 219152384, |
| 1939 | .ib = 876609536, |
| 1940 | }, |
| 1941 | { |
| 1942 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1943 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1944 | .ab = 1750000, |
| 1945 | .ib = 3500000, |
| 1946 | }, |
| 1947 | { |
| 1948 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1949 | .dst = MSM_BUS_SLAVE_SMI, |
| 1950 | .ab = 1750000, |
| 1951 | .ib = 3500000, |
| 1952 | }, |
| 1953 | }; |
| 1954 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 1955 | { |
| 1956 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1957 | .dst = MSM_BUS_SLAVE_SMI, |
| 1958 | .ab = 121634816, |
| 1959 | .ib = 973078528, |
| 1960 | }, |
| 1961 | { |
| 1962 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1963 | .dst = MSM_BUS_SLAVE_SMI, |
| 1964 | .ab = 155189248, |
| 1965 | .ib = 620756992, |
| 1966 | }, |
| 1967 | { |
| 1968 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1969 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1970 | .ab = 1750000, |
| 1971 | .ib = 7000000, |
| 1972 | }, |
| 1973 | { |
| 1974 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1975 | .dst = MSM_BUS_SLAVE_SMI, |
| 1976 | .ab = 1750000, |
| 1977 | .ib = 7000000, |
| 1978 | }, |
| 1979 | }; |
| 1980 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 1981 | { |
| 1982 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1983 | .dst = MSM_BUS_SLAVE_SMI, |
| 1984 | .ab = 372244480, |
| 1985 | .ib = 1861222400, |
| 1986 | }, |
| 1987 | { |
| 1988 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1989 | .dst = MSM_BUS_SLAVE_SMI, |
| 1990 | .ab = 501219328, |
| 1991 | .ib = 2004877312, |
| 1992 | }, |
| 1993 | { |
| 1994 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1995 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1996 | .ab = 2500000, |
| 1997 | .ib = 5000000, |
| 1998 | }, |
| 1999 | { |
| 2000 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2001 | .dst = MSM_BUS_SLAVE_SMI, |
| 2002 | .ab = 2500000, |
| 2003 | .ib = 5000000, |
| 2004 | }, |
| 2005 | }; |
| 2006 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 2007 | { |
| 2008 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2009 | .dst = MSM_BUS_SLAVE_SMI, |
| 2010 | .ab = 222298112, |
| 2011 | .ib = 1778384896, |
| 2012 | }, |
| 2013 | { |
| 2014 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2015 | .dst = MSM_BUS_SLAVE_SMI, |
| 2016 | .ab = 330301440, |
| 2017 | .ib = 1321205760, |
| 2018 | }, |
| 2019 | { |
| 2020 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2021 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2022 | .ab = 2500000, |
| 2023 | .ib = 700000000, |
| 2024 | }, |
| 2025 | { |
| 2026 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 2027 | .dst = MSM_BUS_SLAVE_SMI, |
| 2028 | .ab = 2500000, |
| 2029 | .ib = 10000000, |
| 2030 | }, |
| 2031 | }; |
| 2032 | |
| 2033 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 2034 | { |
| 2035 | ARRAY_SIZE(vidc_init_vectors), |
| 2036 | vidc_init_vectors, |
| 2037 | }, |
| 2038 | { |
| 2039 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 2040 | vidc_venc_vga_vectors, |
| 2041 | }, |
| 2042 | { |
| 2043 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 2044 | vidc_vdec_vga_vectors, |
| 2045 | }, |
| 2046 | { |
| 2047 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 2048 | vidc_venc_720p_vectors, |
| 2049 | }, |
| 2050 | { |
| 2051 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 2052 | vidc_vdec_720p_vectors, |
| 2053 | }, |
| 2054 | { |
| 2055 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 2056 | vidc_venc_1080p_vectors, |
| 2057 | }, |
| 2058 | { |
| 2059 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 2060 | vidc_vdec_1080p_vectors, |
| 2061 | }, |
| 2062 | }; |
| 2063 | |
| 2064 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 2065 | vidc_bus_client_config, |
| 2066 | ARRAY_SIZE(vidc_bus_client_config), |
| 2067 | .name = "vidc", |
| 2068 | }; |
| 2069 | |
| 2070 | #endif |
| 2071 | |
| 2072 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 2073 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 2074 | |
| 2075 | static struct resource msm_device_vidc_resources[] = { |
| 2076 | { |
| 2077 | .start = MSM_VIDC_BASE_PHYS, |
| 2078 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 2079 | .flags = IORESOURCE_MEM, |
| 2080 | }, |
| 2081 | { |
| 2082 | .start = VCODEC_IRQ, |
| 2083 | .end = VCODEC_IRQ, |
| 2084 | .flags = IORESOURCE_IRQ, |
| 2085 | }, |
| 2086 | }; |
| 2087 | |
| 2088 | struct msm_vidc_platform_data vidc_platform_data = { |
| 2089 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2090 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 2091 | #endif |
| 2092 | .memtype = MEMTYPE_SMI_KERNEL |
| 2093 | }; |
| 2094 | |
| 2095 | struct platform_device msm_device_vidc = { |
| 2096 | .name = "msm_vidc", |
| 2097 | .id = 0, |
| 2098 | .num_resources = ARRAY_SIZE(msm_device_vidc_resources), |
| 2099 | .resource = msm_device_vidc_resources, |
| 2100 | .dev = { |
| 2101 | .platform_data = &vidc_platform_data, |
| 2102 | }, |
| 2103 | }; |
| 2104 | |
| 2105 | #if defined(CONFIG_MSM_RPM_STATS_LOG) |
| 2106 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 2107 | .phys_addr_base = 0x00107E04, |
| 2108 | .phys_size = SZ_8K, |
| 2109 | }; |
| 2110 | |
| 2111 | struct platform_device msm_rpm_stat_device = { |
| 2112 | .name = "msm_rpm_stat", |
| 2113 | .id = -1, |
| 2114 | .dev = { |
| 2115 | .platform_data = &msm_rpm_stat_pdata, |
| 2116 | }, |
| 2117 | }; |
| 2118 | #endif |
| 2119 | |
| 2120 | #ifdef CONFIG_MSM_MPM |
| 2121 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = { |
| 2122 | [1] = MSM_GPIO_TO_INT(61), |
| 2123 | [4] = MSM_GPIO_TO_INT(87), |
| 2124 | [5] = MSM_GPIO_TO_INT(88), |
| 2125 | [6] = MSM_GPIO_TO_INT(89), |
| 2126 | [7] = MSM_GPIO_TO_INT(90), |
| 2127 | [8] = MSM_GPIO_TO_INT(91), |
| 2128 | [9] = MSM_GPIO_TO_INT(34), |
| 2129 | [10] = MSM_GPIO_TO_INT(38), |
| 2130 | [11] = MSM_GPIO_TO_INT(42), |
| 2131 | [12] = MSM_GPIO_TO_INT(46), |
| 2132 | [13] = MSM_GPIO_TO_INT(50), |
| 2133 | [14] = MSM_GPIO_TO_INT(54), |
| 2134 | [15] = MSM_GPIO_TO_INT(58), |
| 2135 | [16] = MSM_GPIO_TO_INT(63), |
| 2136 | [17] = MSM_GPIO_TO_INT(160), |
| 2137 | [18] = MSM_GPIO_TO_INT(162), |
| 2138 | [19] = MSM_GPIO_TO_INT(144), |
| 2139 | [20] = MSM_GPIO_TO_INT(146), |
| 2140 | [25] = USB1_HS_IRQ, |
| 2141 | [26] = TV_ENC_IRQ, |
| 2142 | [27] = HDMI_IRQ, |
| 2143 | [29] = MSM_GPIO_TO_INT(123), |
| 2144 | [30] = MSM_GPIO_TO_INT(172), |
| 2145 | [31] = MSM_GPIO_TO_INT(99), |
| 2146 | [32] = MSM_GPIO_TO_INT(96), |
| 2147 | [33] = MSM_GPIO_TO_INT(67), |
| 2148 | [34] = MSM_GPIO_TO_INT(71), |
| 2149 | [35] = MSM_GPIO_TO_INT(105), |
| 2150 | [36] = MSM_GPIO_TO_INT(117), |
| 2151 | [37] = MSM_GPIO_TO_INT(29), |
| 2152 | [38] = MSM_GPIO_TO_INT(30), |
| 2153 | [39] = MSM_GPIO_TO_INT(31), |
| 2154 | [40] = MSM_GPIO_TO_INT(37), |
| 2155 | [41] = MSM_GPIO_TO_INT(40), |
| 2156 | [42] = MSM_GPIO_TO_INT(41), |
| 2157 | [43] = MSM_GPIO_TO_INT(45), |
| 2158 | [44] = MSM_GPIO_TO_INT(51), |
| 2159 | [45] = MSM_GPIO_TO_INT(52), |
| 2160 | [46] = MSM_GPIO_TO_INT(57), |
| 2161 | [47] = MSM_GPIO_TO_INT(73), |
| 2162 | [48] = MSM_GPIO_TO_INT(93), |
| 2163 | [49] = MSM_GPIO_TO_INT(94), |
| 2164 | [50] = MSM_GPIO_TO_INT(103), |
| 2165 | [51] = MSM_GPIO_TO_INT(104), |
| 2166 | [52] = MSM_GPIO_TO_INT(106), |
| 2167 | [53] = MSM_GPIO_TO_INT(115), |
| 2168 | [54] = MSM_GPIO_TO_INT(124), |
| 2169 | [55] = MSM_GPIO_TO_INT(125), |
| 2170 | [56] = MSM_GPIO_TO_INT(126), |
| 2171 | [57] = MSM_GPIO_TO_INT(127), |
| 2172 | [58] = MSM_GPIO_TO_INT(128), |
| 2173 | [59] = MSM_GPIO_TO_INT(129), |
| 2174 | }; |
| 2175 | |
| 2176 | static uint16_t msm_mpm_bypassed_apps_irqs[] = { |
| 2177 | TLMM_MSM_SUMMARY_IRQ, |
| 2178 | RPM_SCSS_CPU0_GP_HIGH_IRQ, |
| 2179 | RPM_SCSS_CPU0_GP_MEDIUM_IRQ, |
| 2180 | RPM_SCSS_CPU0_GP_LOW_IRQ, |
| 2181 | RPM_SCSS_CPU0_WAKE_UP_IRQ, |
| 2182 | RPM_SCSS_CPU1_GP_HIGH_IRQ, |
| 2183 | RPM_SCSS_CPU1_GP_MEDIUM_IRQ, |
| 2184 | RPM_SCSS_CPU1_GP_LOW_IRQ, |
| 2185 | RPM_SCSS_CPU1_WAKE_UP_IRQ, |
| 2186 | MARM_SCSS_GP_IRQ_0, |
| 2187 | MARM_SCSS_GP_IRQ_1, |
| 2188 | MARM_SCSS_GP_IRQ_2, |
| 2189 | MARM_SCSS_GP_IRQ_3, |
| 2190 | MARM_SCSS_GP_IRQ_4, |
| 2191 | MARM_SCSS_GP_IRQ_5, |
| 2192 | MARM_SCSS_GP_IRQ_6, |
| 2193 | MARM_SCSS_GP_IRQ_7, |
| 2194 | MARM_SCSS_GP_IRQ_8, |
| 2195 | MARM_SCSS_GP_IRQ_9, |
| 2196 | LPASS_SCSS_GP_LOW_IRQ, |
| 2197 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 2198 | LPASS_SCSS_GP_HIGH_IRQ, |
| 2199 | SDC4_IRQ_0, |
| 2200 | SPS_MTI_31, |
| 2201 | }; |
| 2202 | |
| 2203 | struct msm_mpm_device_data msm_mpm_dev_data = { |
| 2204 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 2205 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 2206 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 2207 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 2208 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 2209 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 2210 | .mpm_apps_ipc_reg = MSM_GCC_BASE + 0x008, |
| 2211 | .mpm_apps_ipc_val = BIT(1), |
| 2212 | .mpm_ipc_irq = RPM_SCSS_CPU0_GP_MEDIUM_IRQ, |
| 2213 | |
| 2214 | }; |
| 2215 | #endif |
| 2216 | |
| 2217 | |
| 2218 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2219 | struct platform_device msm_bus_sys_fabric = { |
| 2220 | .name = "msm_bus_fabric", |
| 2221 | .id = MSM_BUS_FAB_SYSTEM, |
| 2222 | }; |
| 2223 | struct platform_device msm_bus_apps_fabric = { |
| 2224 | .name = "msm_bus_fabric", |
| 2225 | .id = MSM_BUS_FAB_APPSS, |
| 2226 | }; |
| 2227 | struct platform_device msm_bus_mm_fabric = { |
| 2228 | .name = "msm_bus_fabric", |
| 2229 | .id = MSM_BUS_FAB_MMSS, |
| 2230 | }; |
| 2231 | struct platform_device msm_bus_sys_fpb = { |
| 2232 | .name = "msm_bus_fabric", |
| 2233 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 2234 | }; |
| 2235 | struct platform_device msm_bus_cpss_fpb = { |
| 2236 | .name = "msm_bus_fabric", |
| 2237 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 2238 | }; |
| 2239 | #endif |
| 2240 | |
| 2241 | struct platform_device asoc_msm_pcm = { |
| 2242 | .name = "msm-dsp-audio", |
| 2243 | .id = 0, |
| 2244 | }; |
| 2245 | |
| 2246 | struct platform_device asoc_msm_dai0 = { |
| 2247 | .name = "msm-codec-dai", |
| 2248 | .id = 0, |
| 2249 | }; |
| 2250 | |
| 2251 | struct platform_device asoc_msm_dai1 = { |
| 2252 | .name = "msm-cpu-dai", |
| 2253 | .id = 0, |
| 2254 | }; |
| 2255 | |
| 2256 | #if defined (CONFIG_MSM_8x60_VOIP) |
| 2257 | struct platform_device asoc_msm_mvs = { |
| 2258 | .name = "msm-mvs-audio", |
| 2259 | .id = 0, |
| 2260 | }; |
| 2261 | |
| 2262 | struct platform_device asoc_mvs_dai0 = { |
| 2263 | .name = "mvs-codec-dai", |
| 2264 | .id = 0, |
| 2265 | }; |
| 2266 | |
| 2267 | struct platform_device asoc_mvs_dai1 = { |
| 2268 | .name = "mvs-cpu-dai", |
| 2269 | .id = 0, |
| 2270 | }; |
| 2271 | #endif |
| 2272 | |
| 2273 | struct platform_device *msm_footswitch_devices[] = { |
| 2274 | FS_8X60(FS_IJPEG, "fs_ijpeg"), |
| 2275 | FS_8X60(FS_MDP, "fs_mdp"), |
| 2276 | FS_8X60(FS_ROT, "fs_rot"), |
| 2277 | FS_8X60(FS_VED, "fs_ved"), |
| 2278 | FS_8X60(FS_VFE, "fs_vfe"), |
| 2279 | FS_8X60(FS_VPE, "fs_vpe"), |
| 2280 | FS_8X60(FS_GFX3D, "fs_gfx3d"), |
| 2281 | FS_8X60(FS_GFX2D0, "fs_gfx2d0"), |
| 2282 | FS_8X60(FS_GFX2D1, "fs_gfx2d1"), |
| 2283 | }; |
| 2284 | unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices); |
| 2285 | |
| 2286 | #ifdef CONFIG_MSM_RPM |
| 2287 | struct msm_rpm_map_data rpm_map_data[] __initdata = { |
| 2288 | MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 2289 | MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 2290 | MSM_RPM_MAP(TRIGGER_SET_FROM, TRIGGER_SET, 1), |
| 2291 | MSM_RPM_MAP(TRIGGER_SET_TO, TRIGGER_SET, 1), |
| 2292 | MSM_RPM_MAP(TRIGGER_SET_TRIGGER, TRIGGER_SET, 1), |
| 2293 | MSM_RPM_MAP(TRIGGER_CLEAR_FROM, TRIGGER_CLEAR, 1), |
| 2294 | MSM_RPM_MAP(TRIGGER_CLEAR_TO, TRIGGER_CLEAR, 1), |
| 2295 | MSM_RPM_MAP(TRIGGER_CLEAR_TRIGGER, TRIGGER_CLEAR, 1), |
| 2296 | |
| 2297 | MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1), |
| 2298 | MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1), |
| 2299 | MSM_RPM_MAP(PLL_4, PLL_4, 1), |
| 2300 | MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 2301 | MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 2302 | MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 2303 | MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 2304 | MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1), |
| 2305 | MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1), |
| 2306 | MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1), |
| 2307 | MSM_RPM_MAP(SMI_CLK, SMI_CLK, 1), |
| 2308 | MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1), |
| 2309 | |
| 2310 | MSM_RPM_MAP(APPS_L2_CACHE_CTL, APPS_L2_CACHE_CTL, 1), |
| 2311 | |
| 2312 | MSM_RPM_MAP(APPS_FABRIC_HALT_0, APPS_FABRIC_HALT, 2), |
| 2313 | MSM_RPM_MAP(APPS_FABRIC_CLOCK_MODE_0, APPS_FABRIC_CLOCK_MODE, 3), |
| 2314 | MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 6), |
| 2315 | |
| 2316 | MSM_RPM_MAP(SYSTEM_FABRIC_HALT_0, SYSTEM_FABRIC_HALT, 2), |
| 2317 | MSM_RPM_MAP(SYSTEM_FABRIC_CLOCK_MODE_0, SYSTEM_FABRIC_CLOCK_MODE, 3), |
| 2318 | MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 22), |
| 2319 | |
| 2320 | MSM_RPM_MAP(MM_FABRIC_HALT_0, MM_FABRIC_HALT, 2), |
| 2321 | MSM_RPM_MAP(MM_FABRIC_CLOCK_MODE_0, MM_FABRIC_CLOCK_MODE, 3), |
| 2322 | MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23), |
| 2323 | |
| 2324 | MSM_RPM_MAP(SMPS0B_0, SMPS0B, 2), |
| 2325 | MSM_RPM_MAP(SMPS1B_0, SMPS1B, 2), |
| 2326 | MSM_RPM_MAP(SMPS2B_0, SMPS2B, 2), |
| 2327 | MSM_RPM_MAP(SMPS3B_0, SMPS3B, 2), |
| 2328 | MSM_RPM_MAP(SMPS4B_0, SMPS4B, 2), |
| 2329 | MSM_RPM_MAP(LDO0B_0, LDO0B, 2), |
| 2330 | MSM_RPM_MAP(LDO1B_0, LDO1B, 2), |
| 2331 | MSM_RPM_MAP(LDO2B_0, LDO2B, 2), |
| 2332 | MSM_RPM_MAP(LDO3B_0, LDO3B, 2), |
| 2333 | MSM_RPM_MAP(LDO4B_0, LDO4B, 2), |
| 2334 | MSM_RPM_MAP(LDO5B_0, LDO5B, 2), |
| 2335 | MSM_RPM_MAP(LDO6B_0, LDO6B, 2), |
| 2336 | MSM_RPM_MAP(LVS0B, LVS0B, 1), |
| 2337 | MSM_RPM_MAP(LVS1B, LVS1B, 1), |
| 2338 | MSM_RPM_MAP(LVS2B, LVS2B, 1), |
| 2339 | MSM_RPM_MAP(LVS3B, LVS3B, 1), |
| 2340 | MSM_RPM_MAP(MVS, MVS, 1), |
| 2341 | |
| 2342 | MSM_RPM_MAP(SMPS0_0, SMPS0, 2), |
| 2343 | MSM_RPM_MAP(SMPS1_0, SMPS1, 2), |
| 2344 | MSM_RPM_MAP(SMPS2_0, SMPS2, 2), |
| 2345 | MSM_RPM_MAP(SMPS3_0, SMPS3, 2), |
| 2346 | MSM_RPM_MAP(SMPS4_0, SMPS4, 2), |
| 2347 | MSM_RPM_MAP(LDO0_0, LDO0, 2), |
| 2348 | MSM_RPM_MAP(LDO1_0, LDO1, 2), |
| 2349 | MSM_RPM_MAP(LDO2_0, LDO2, 2), |
| 2350 | MSM_RPM_MAP(LDO3_0, LDO3, 2), |
| 2351 | MSM_RPM_MAP(LDO4_0, LDO4, 2), |
| 2352 | MSM_RPM_MAP(LDO5_0, LDO5, 2), |
| 2353 | MSM_RPM_MAP(LDO6_0, LDO6, 2), |
| 2354 | MSM_RPM_MAP(LDO7_0, LDO7, 2), |
| 2355 | MSM_RPM_MAP(LDO8_0, LDO8, 2), |
| 2356 | MSM_RPM_MAP(LDO9_0, LDO9, 2), |
| 2357 | MSM_RPM_MAP(LDO10_0, LDO10, 2), |
| 2358 | MSM_RPM_MAP(LDO11_0, LDO11, 2), |
| 2359 | MSM_RPM_MAP(LDO12_0, LDO12, 2), |
| 2360 | MSM_RPM_MAP(LDO13_0, LDO13, 2), |
| 2361 | MSM_RPM_MAP(LDO14_0, LDO14, 2), |
| 2362 | MSM_RPM_MAP(LDO15_0, LDO15, 2), |
| 2363 | MSM_RPM_MAP(LDO16_0, LDO16, 2), |
| 2364 | MSM_RPM_MAP(LDO17_0, LDO17, 2), |
| 2365 | MSM_RPM_MAP(LDO18_0, LDO18, 2), |
| 2366 | MSM_RPM_MAP(LDO19_0, LDO19, 2), |
| 2367 | MSM_RPM_MAP(LDO20_0, LDO20, 2), |
| 2368 | MSM_RPM_MAP(LDO21_0, LDO21, 2), |
| 2369 | MSM_RPM_MAP(LDO22_0, LDO22, 2), |
| 2370 | MSM_RPM_MAP(LDO23_0, LDO23, 2), |
| 2371 | MSM_RPM_MAP(LDO24_0, LDO24, 2), |
| 2372 | MSM_RPM_MAP(LDO25_0, LDO25, 2), |
| 2373 | MSM_RPM_MAP(LVS0, LVS0, 1), |
| 2374 | MSM_RPM_MAP(LVS1, LVS1, 1), |
| 2375 | MSM_RPM_MAP(NCP_0, NCP, 2), |
| 2376 | |
| 2377 | MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1), |
| 2378 | }; |
| 2379 | unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data); |
| 2380 | |
| 2381 | #endif |