Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2011-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/list.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/msm_rotator.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 <linux/gpio.h> |
| 20 | #include <asm/clkdev.h> |
| 21 | #include <linux/msm_kgsl.h> |
| 22 | #include <linux/android_pmem.h> |
| 23 | #include <mach/irqs-8960.h> |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 24 | #include <mach/dma.h> |
| 25 | #include <linux/dma-mapping.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 26 | #include <mach/board.h> |
| 27 | #include <mach/msm_iomap.h> |
| 28 | #include <mach/msm_hsusb.h> |
| 29 | #include <mach/msm_sps.h> |
| 30 | #include <mach/rpm.h> |
| 31 | #include <mach/msm_bus_board.h> |
| 32 | #include <mach/msm_memtypes.h> |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame^] | 33 | #include <mach/msm_smd.h> |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 34 | #include <sound/msm-dai-q6.h> |
| 35 | #include <sound/apr_audio.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | #include "clock.h" |
| 37 | #include "devices.h" |
| 38 | #include "devices-msm8x60.h" |
| 39 | #include "footswitch.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 40 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 41 | #include "rpm_log.h" |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 42 | #include "rpm_stats.h" |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 43 | #include "pil-q6v4.h" |
| 44 | #include "scm-pas.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 45 | |
| 46 | #ifdef CONFIG_MSM_MPM |
| 47 | #include "mpm.h" |
| 48 | #endif |
| 49 | #ifdef CONFIG_MSM_DSPS |
| 50 | #include <mach/msm_dsps.h> |
| 51 | #endif |
| 52 | |
| 53 | |
| 54 | /* Address of GSBI blocks */ |
| 55 | #define MSM_GSBI1_PHYS 0x16000000 |
| 56 | #define MSM_GSBI2_PHYS 0x16100000 |
| 57 | #define MSM_GSBI3_PHYS 0x16200000 |
| 58 | #define MSM_GSBI4_PHYS 0x16300000 |
| 59 | #define MSM_GSBI5_PHYS 0x16400000 |
| 60 | #define MSM_GSBI6_PHYS 0x16500000 |
| 61 | #define MSM_GSBI7_PHYS 0x16600000 |
| 62 | #define MSM_GSBI8_PHYS 0x1A000000 |
| 63 | #define MSM_GSBI9_PHYS 0x1A100000 |
| 64 | #define MSM_GSBI10_PHYS 0x1A200000 |
| 65 | #define MSM_GSBI11_PHYS 0x12440000 |
| 66 | #define MSM_GSBI12_PHYS 0x12480000 |
| 67 | |
| 68 | #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000) |
| 69 | #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000) |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 70 | #define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 71 | |
| 72 | /* GSBI QUP devices */ |
| 73 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000) |
| 74 | #define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000) |
| 75 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 76 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 77 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 78 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 79 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 80 | #define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000) |
| 81 | #define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000) |
| 82 | #define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000) |
| 83 | #define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000) |
| 84 | #define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000) |
| 85 | #define MSM_QUP_SIZE SZ_4K |
| 86 | |
| 87 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 88 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 89 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
| 90 | |
Stepan Moskovchenko | be5b45a | 2011-10-17 19:33:34 -0700 | [diff] [blame] | 91 | #define MSM8960_HSUSB_PHYS 0x12500000 |
| 92 | #define MSM8960_HSUSB_SIZE SZ_4K |
| 93 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 94 | static struct resource resources_otg[] = { |
| 95 | { |
| 96 | .start = MSM8960_HSUSB_PHYS, |
| 97 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 98 | .flags = IORESOURCE_MEM, |
| 99 | }, |
| 100 | { |
| 101 | .start = USB1_HS_IRQ, |
| 102 | .end = USB1_HS_IRQ, |
| 103 | .flags = IORESOURCE_IRQ, |
| 104 | }, |
| 105 | }; |
| 106 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 107 | struct platform_device msm8960_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 108 | .name = "msm_otg", |
| 109 | .id = -1, |
| 110 | .num_resources = ARRAY_SIZE(resources_otg), |
| 111 | .resource = resources_otg, |
| 112 | .dev = { |
| 113 | .coherent_dma_mask = 0xffffffff, |
| 114 | }, |
| 115 | }; |
| 116 | |
| 117 | static struct resource resources_hsusb[] = { |
| 118 | { |
| 119 | .start = MSM8960_HSUSB_PHYS, |
| 120 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 121 | .flags = IORESOURCE_MEM, |
| 122 | }, |
| 123 | { |
| 124 | .start = USB1_HS_IRQ, |
| 125 | .end = USB1_HS_IRQ, |
| 126 | .flags = IORESOURCE_IRQ, |
| 127 | }, |
| 128 | }; |
| 129 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 130 | struct platform_device msm8960_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 131 | .name = "msm_hsusb", |
| 132 | .id = -1, |
| 133 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 134 | .resource = resources_hsusb, |
| 135 | .dev = { |
| 136 | .coherent_dma_mask = 0xffffffff, |
| 137 | }, |
| 138 | }; |
| 139 | |
| 140 | static struct resource resources_hsusb_host[] = { |
| 141 | { |
| 142 | .start = MSM8960_HSUSB_PHYS, |
| 143 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1, |
| 144 | .flags = IORESOURCE_MEM, |
| 145 | }, |
| 146 | { |
| 147 | .start = USB1_HS_IRQ, |
| 148 | .end = USB1_HS_IRQ, |
| 149 | .flags = IORESOURCE_IRQ, |
| 150 | }, |
| 151 | }; |
| 152 | |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 153 | static u64 dma_mask = DMA_BIT_MASK(32); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 154 | struct platform_device msm_device_hsusb_host = { |
| 155 | .name = "msm_hsusb_host", |
| 156 | .id = -1, |
| 157 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 158 | .resource = resources_hsusb_host, |
| 159 | .dev = { |
| 160 | .dma_mask = &dma_mask, |
| 161 | .coherent_dma_mask = 0xffffffff, |
| 162 | }, |
| 163 | }; |
| 164 | |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 165 | static struct resource resources_hsic_host[] = { |
| 166 | { |
Stepan Moskovchenko | 8e06ae6 | 2011-10-17 18:01:29 -0700 | [diff] [blame] | 167 | .start = 0x12520000, |
| 168 | .end = 0x12520000 + SZ_4K - 1, |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 169 | .flags = IORESOURCE_MEM, |
| 170 | }, |
| 171 | { |
| 172 | .start = USB_HSIC_IRQ, |
| 173 | .end = USB_HSIC_IRQ, |
| 174 | .flags = IORESOURCE_IRQ, |
| 175 | }, |
Vamsi Krishna | 34f0158 | 2011-12-14 19:54:42 -0800 | [diff] [blame] | 176 | { |
| 177 | .start = MSM_GPIO_TO_INT(69), |
| 178 | .end = MSM_GPIO_TO_INT(69), |
| 179 | .name = "peripheral_status_irq", |
| 180 | .flags = IORESOURCE_IRQ, |
| 181 | }, |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 182 | }; |
| 183 | |
| 184 | struct platform_device msm_device_hsic_host = { |
| 185 | .name = "msm_hsic_host", |
| 186 | .id = -1, |
| 187 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 188 | .resource = resources_hsic_host, |
| 189 | .dev = { |
| 190 | .dma_mask = &dma_mask, |
| 191 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 192 | }, |
| 193 | }; |
| 194 | |
Mona Hossain | 11c03ac | 2011-10-26 12:42:10 -0700 | [diff] [blame] | 195 | #define SHARED_IMEM_TZ_BASE 0x2a03f720 |
| 196 | static struct resource tzlog_resources[] = { |
| 197 | { |
| 198 | .start = SHARED_IMEM_TZ_BASE, |
| 199 | .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1, |
| 200 | .flags = IORESOURCE_MEM, |
| 201 | }, |
| 202 | }; |
| 203 | |
| 204 | struct platform_device msm_device_tz_log = { |
| 205 | .name = "tz_log", |
| 206 | .id = 0, |
| 207 | .num_resources = ARRAY_SIZE(tzlog_resources), |
| 208 | .resource = tzlog_resources, |
| 209 | }; |
| 210 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 211 | static struct resource resources_uart_gsbi2[] = { |
| 212 | { |
| 213 | .start = MSM8960_GSBI2_UARTDM_IRQ, |
| 214 | .end = MSM8960_GSBI2_UARTDM_IRQ, |
| 215 | .flags = IORESOURCE_IRQ, |
| 216 | }, |
| 217 | { |
| 218 | .start = MSM_UART2DM_PHYS, |
| 219 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 220 | .name = "uartdm_resource", |
| 221 | .flags = IORESOURCE_MEM, |
| 222 | }, |
| 223 | { |
| 224 | .start = MSM_GSBI2_PHYS, |
| 225 | .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1, |
| 226 | .name = "gsbi_resource", |
| 227 | .flags = IORESOURCE_MEM, |
| 228 | }, |
| 229 | }; |
| 230 | |
| 231 | struct platform_device msm8960_device_uart_gsbi2 = { |
| 232 | .name = "msm_serial_hsl", |
| 233 | .id = 0, |
| 234 | .num_resources = ARRAY_SIZE(resources_uart_gsbi2), |
| 235 | .resource = resources_uart_gsbi2, |
| 236 | }; |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 237 | /* GSBI 6 used into UARTDM Mode */ |
| 238 | static struct resource msm_uart_dm6_resources[] = { |
| 239 | { |
| 240 | .start = MSM_UART6DM_PHYS, |
| 241 | .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1, |
| 242 | .name = "uartdm_resource", |
| 243 | .flags = IORESOURCE_MEM, |
| 244 | }, |
| 245 | { |
| 246 | .start = GSBI6_UARTDM_IRQ, |
| 247 | .end = GSBI6_UARTDM_IRQ, |
| 248 | .flags = IORESOURCE_IRQ, |
| 249 | }, |
| 250 | { |
| 251 | .start = MSM_GSBI6_PHYS, |
| 252 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 253 | .name = "gsbi_resource", |
| 254 | .flags = IORESOURCE_MEM, |
| 255 | }, |
| 256 | { |
| 257 | .start = DMOV_HSUART_GSBI6_TX_CHAN, |
| 258 | .end = DMOV_HSUART_GSBI6_RX_CHAN, |
| 259 | .name = "uartdm_channels", |
| 260 | .flags = IORESOURCE_DMA, |
| 261 | }, |
| 262 | { |
| 263 | .start = DMOV_HSUART_GSBI6_TX_CRCI, |
| 264 | .end = DMOV_HSUART_GSBI6_RX_CRCI, |
| 265 | .name = "uartdm_crci", |
| 266 | .flags = IORESOURCE_DMA, |
| 267 | }, |
| 268 | }; |
| 269 | static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32); |
| 270 | struct platform_device msm_device_uart_dm6 = { |
| 271 | .name = "msm_serial_hs", |
| 272 | .id = 0, |
| 273 | .num_resources = ARRAY_SIZE(msm_uart_dm6_resources), |
| 274 | .resource = msm_uart_dm6_resources, |
| 275 | .dev = { |
| 276 | .dma_mask = &msm_uart_dm6_dma_mask, |
| 277 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 278 | }, |
| 279 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 280 | |
| 281 | static struct resource resources_uart_gsbi5[] = { |
| 282 | { |
| 283 | .start = GSBI5_UARTDM_IRQ, |
| 284 | .end = GSBI5_UARTDM_IRQ, |
| 285 | .flags = IORESOURCE_IRQ, |
| 286 | }, |
| 287 | { |
| 288 | .start = MSM_UART5DM_PHYS, |
| 289 | .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1, |
| 290 | .name = "uartdm_resource", |
| 291 | .flags = IORESOURCE_MEM, |
| 292 | }, |
| 293 | { |
| 294 | .start = MSM_GSBI5_PHYS, |
| 295 | .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1, |
| 296 | .name = "gsbi_resource", |
| 297 | .flags = IORESOURCE_MEM, |
| 298 | }, |
| 299 | }; |
| 300 | |
| 301 | struct platform_device msm8960_device_uart_gsbi5 = { |
| 302 | .name = "msm_serial_hsl", |
| 303 | .id = 0, |
| 304 | .num_resources = ARRAY_SIZE(resources_uart_gsbi5), |
| 305 | .resource = resources_uart_gsbi5, |
| 306 | }; |
| 307 | /* MSM Video core device */ |
| 308 | #ifdef CONFIG_MSM_BUS_SCALING |
| 309 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 310 | { |
| 311 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 312 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 313 | .ab = 0, |
| 314 | .ib = 0, |
| 315 | }, |
| 316 | { |
| 317 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 318 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 319 | .ab = 0, |
| 320 | .ib = 0, |
| 321 | }, |
| 322 | { |
| 323 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 324 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 325 | .ab = 0, |
| 326 | .ib = 0, |
| 327 | }, |
| 328 | { |
| 329 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 330 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 331 | .ab = 0, |
| 332 | .ib = 0, |
| 333 | }, |
| 334 | }; |
| 335 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 336 | { |
| 337 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 338 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 339 | .ab = 54525952, |
| 340 | .ib = 436207616, |
| 341 | }, |
| 342 | { |
| 343 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 344 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 345 | .ab = 72351744, |
| 346 | .ib = 289406976, |
| 347 | }, |
| 348 | { |
| 349 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 350 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 351 | .ab = 500000, |
| 352 | .ib = 1000000, |
| 353 | }, |
| 354 | { |
| 355 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 356 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 357 | .ab = 500000, |
| 358 | .ib = 1000000, |
| 359 | }, |
| 360 | }; |
| 361 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 362 | { |
| 363 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 364 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 365 | .ab = 40894464, |
| 366 | .ib = 327155712, |
| 367 | }, |
| 368 | { |
| 369 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 370 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 371 | .ab = 48234496, |
| 372 | .ib = 192937984, |
| 373 | }, |
| 374 | { |
| 375 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 376 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 377 | .ab = 500000, |
| 378 | .ib = 2000000, |
| 379 | }, |
| 380 | { |
| 381 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 382 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 383 | .ab = 500000, |
| 384 | .ib = 2000000, |
| 385 | }, |
| 386 | }; |
| 387 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 388 | { |
| 389 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 390 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 391 | .ab = 163577856, |
| 392 | .ib = 1308622848, |
| 393 | }, |
| 394 | { |
| 395 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 396 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 397 | .ab = 219152384, |
| 398 | .ib = 876609536, |
| 399 | }, |
| 400 | { |
| 401 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 402 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 403 | .ab = 1750000, |
| 404 | .ib = 3500000, |
| 405 | }, |
| 406 | { |
| 407 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 408 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 409 | .ab = 1750000, |
| 410 | .ib = 3500000, |
| 411 | }, |
| 412 | }; |
| 413 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 414 | { |
| 415 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 416 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 417 | .ab = 121634816, |
| 418 | .ib = 973078528, |
| 419 | }, |
| 420 | { |
| 421 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 422 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 423 | .ab = 155189248, |
| 424 | .ib = 620756992, |
| 425 | }, |
| 426 | { |
| 427 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 428 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 429 | .ab = 1750000, |
| 430 | .ib = 7000000, |
| 431 | }, |
| 432 | { |
| 433 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 434 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 435 | .ab = 1750000, |
| 436 | .ib = 7000000, |
| 437 | }, |
| 438 | }; |
| 439 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 440 | { |
| 441 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 442 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 443 | .ab = 372244480, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 444 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 445 | }, |
| 446 | { |
| 447 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 448 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 449 | .ab = 501219328, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 450 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 451 | }, |
| 452 | { |
| 453 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 454 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 455 | .ab = 2500000, |
| 456 | .ib = 5000000, |
| 457 | }, |
| 458 | { |
| 459 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 460 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 461 | .ab = 2500000, |
| 462 | .ib = 5000000, |
| 463 | }, |
| 464 | }; |
| 465 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 466 | { |
| 467 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 468 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 469 | .ab = 222298112, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 470 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 471 | }, |
| 472 | { |
| 473 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 474 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 475 | .ab = 330301440, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 476 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 477 | }, |
| 478 | { |
| 479 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 480 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 481 | .ab = 2500000, |
| 482 | .ib = 700000000, |
| 483 | }, |
| 484 | { |
| 485 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 486 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 487 | .ab = 2500000, |
| 488 | .ib = 10000000, |
| 489 | }, |
| 490 | }; |
| 491 | |
| 492 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 493 | { |
| 494 | ARRAY_SIZE(vidc_init_vectors), |
| 495 | vidc_init_vectors, |
| 496 | }, |
| 497 | { |
| 498 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 499 | vidc_venc_vga_vectors, |
| 500 | }, |
| 501 | { |
| 502 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 503 | vidc_vdec_vga_vectors, |
| 504 | }, |
| 505 | { |
| 506 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 507 | vidc_venc_720p_vectors, |
| 508 | }, |
| 509 | { |
| 510 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 511 | vidc_vdec_720p_vectors, |
| 512 | }, |
| 513 | { |
| 514 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 515 | vidc_venc_1080p_vectors, |
| 516 | }, |
| 517 | { |
| 518 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 519 | vidc_vdec_1080p_vectors, |
| 520 | }, |
| 521 | }; |
| 522 | |
| 523 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 524 | vidc_bus_client_config, |
| 525 | ARRAY_SIZE(vidc_bus_client_config), |
| 526 | .name = "vidc", |
| 527 | }; |
| 528 | #endif |
| 529 | |
Mona Hossain | 9c430e3 | 2011-07-27 11:04:47 -0700 | [diff] [blame] | 530 | #ifdef CONFIG_HW_RANDOM_MSM |
| 531 | /* PRNG device */ |
| 532 | #define MSM_PRNG_PHYS 0x1A500000 |
| 533 | static struct resource rng_resources = { |
| 534 | .flags = IORESOURCE_MEM, |
| 535 | .start = MSM_PRNG_PHYS, |
| 536 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 537 | }; |
| 538 | |
| 539 | struct platform_device msm_device_rng = { |
| 540 | .name = "msm_rng", |
| 541 | .id = 0, |
| 542 | .num_resources = 1, |
| 543 | .resource = &rng_resources, |
| 544 | }; |
| 545 | #endif |
| 546 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 547 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 548 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 549 | |
| 550 | static struct resource msm_device_vidc_resources[] = { |
| 551 | { |
| 552 | .start = MSM_VIDC_BASE_PHYS, |
| 553 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 554 | .flags = IORESOURCE_MEM, |
| 555 | }, |
| 556 | { |
| 557 | .start = VCODEC_IRQ, |
| 558 | .end = VCODEC_IRQ, |
| 559 | .flags = IORESOURCE_IRQ, |
| 560 | }, |
| 561 | }; |
| 562 | |
| 563 | struct msm_vidc_platform_data vidc_platform_data = { |
| 564 | #ifdef CONFIG_MSM_BUS_SCALING |
| 565 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 566 | #endif |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 567 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
Olav Haugan | b5be799 | 2011-11-18 14:29:02 -0800 | [diff] [blame] | 568 | .memtype = ION_CP_MM_HEAP_ID, |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 569 | .enable_ion = 1, |
| 570 | #else |
Deepak Kotur | 12301a7 | 2011-11-09 18:30:29 -0800 | [diff] [blame] | 571 | .memtype = MEMTYPE_EBI1, |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 572 | .enable_ion = 0, |
| 573 | #endif |
Deepika Pepakayala | bebc762 | 2011-12-01 15:13:43 -0800 | [diff] [blame] | 574 | .disable_dmx = 0, |
Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 575 | .disable_fullhd = 0, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 576 | }; |
| 577 | |
| 578 | struct platform_device msm_device_vidc = { |
| 579 | .name = "msm_vidc", |
| 580 | .id = 0, |
| 581 | .num_resources = ARRAY_SIZE(msm_device_vidc_resources), |
| 582 | .resource = msm_device_vidc_resources, |
| 583 | .dev = { |
| 584 | .platform_data = &vidc_platform_data, |
| 585 | }, |
| 586 | }; |
| 587 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 588 | #define MSM_SDC1_BASE 0x12400000 |
| 589 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 590 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 591 | #define MSM_SDC2_BASE 0x12140000 |
| 592 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 593 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 594 | #define MSM_SDC2_BASE 0x12140000 |
| 595 | #define MSM_SDC3_BASE 0x12180000 |
| 596 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 597 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 598 | #define MSM_SDC4_BASE 0x121C0000 |
| 599 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 600 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 601 | #define MSM_SDC5_BASE 0x12200000 |
| 602 | #define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800) |
| 603 | #define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000) |
| 604 | |
| 605 | static struct resource resources_sdc1[] = { |
| 606 | { |
| 607 | .name = "core_mem", |
| 608 | .flags = IORESOURCE_MEM, |
| 609 | .start = MSM_SDC1_BASE, |
| 610 | .end = MSM_SDC1_DML_BASE - 1, |
| 611 | }, |
| 612 | { |
| 613 | .name = "core_irq", |
| 614 | .flags = IORESOURCE_IRQ, |
| 615 | .start = SDC1_IRQ_0, |
| 616 | .end = SDC1_IRQ_0 |
| 617 | }, |
| 618 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 619 | { |
| 620 | .name = "sdcc_dml_addr", |
| 621 | .start = MSM_SDC1_DML_BASE, |
| 622 | .end = MSM_SDC1_BAM_BASE - 1, |
| 623 | .flags = IORESOURCE_MEM, |
| 624 | }, |
| 625 | { |
| 626 | .name = "sdcc_bam_addr", |
| 627 | .start = MSM_SDC1_BAM_BASE, |
| 628 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 629 | .flags = IORESOURCE_MEM, |
| 630 | }, |
| 631 | { |
| 632 | .name = "sdcc_bam_irq", |
| 633 | .start = SDC1_BAM_IRQ, |
| 634 | .end = SDC1_BAM_IRQ, |
| 635 | .flags = IORESOURCE_IRQ, |
| 636 | }, |
| 637 | #endif |
| 638 | }; |
| 639 | |
| 640 | static struct resource resources_sdc2[] = { |
| 641 | { |
| 642 | .name = "core_mem", |
| 643 | .flags = IORESOURCE_MEM, |
| 644 | .start = MSM_SDC2_BASE, |
| 645 | .end = MSM_SDC2_DML_BASE - 1, |
| 646 | }, |
| 647 | { |
| 648 | .name = "core_irq", |
| 649 | .flags = IORESOURCE_IRQ, |
| 650 | .start = SDC2_IRQ_0, |
| 651 | .end = SDC2_IRQ_0 |
| 652 | }, |
| 653 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 654 | { |
| 655 | .name = "sdcc_dml_addr", |
| 656 | .start = MSM_SDC2_DML_BASE, |
| 657 | .end = MSM_SDC2_BAM_BASE - 1, |
| 658 | .flags = IORESOURCE_MEM, |
| 659 | }, |
| 660 | { |
| 661 | .name = "sdcc_bam_addr", |
| 662 | .start = MSM_SDC2_BAM_BASE, |
| 663 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 664 | .flags = IORESOURCE_MEM, |
| 665 | }, |
| 666 | { |
| 667 | .name = "sdcc_bam_irq", |
| 668 | .start = SDC2_BAM_IRQ, |
| 669 | .end = SDC2_BAM_IRQ, |
| 670 | .flags = IORESOURCE_IRQ, |
| 671 | }, |
| 672 | #endif |
| 673 | }; |
| 674 | |
| 675 | static struct resource resources_sdc3[] = { |
| 676 | { |
| 677 | .name = "core_mem", |
| 678 | .flags = IORESOURCE_MEM, |
| 679 | .start = MSM_SDC3_BASE, |
| 680 | .end = MSM_SDC3_DML_BASE - 1, |
| 681 | }, |
| 682 | { |
| 683 | .name = "core_irq", |
| 684 | .flags = IORESOURCE_IRQ, |
| 685 | .start = SDC3_IRQ_0, |
| 686 | .end = SDC3_IRQ_0 |
| 687 | }, |
| 688 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 689 | { |
| 690 | .name = "sdcc_dml_addr", |
| 691 | .start = MSM_SDC3_DML_BASE, |
| 692 | .end = MSM_SDC3_BAM_BASE - 1, |
| 693 | .flags = IORESOURCE_MEM, |
| 694 | }, |
| 695 | { |
| 696 | .name = "sdcc_bam_addr", |
| 697 | .start = MSM_SDC3_BAM_BASE, |
| 698 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 699 | .flags = IORESOURCE_MEM, |
| 700 | }, |
| 701 | { |
| 702 | .name = "sdcc_bam_irq", |
| 703 | .start = SDC3_BAM_IRQ, |
| 704 | .end = SDC3_BAM_IRQ, |
| 705 | .flags = IORESOURCE_IRQ, |
| 706 | }, |
| 707 | #endif |
| 708 | }; |
| 709 | |
| 710 | static struct resource resources_sdc4[] = { |
| 711 | { |
| 712 | .name = "core_mem", |
| 713 | .flags = IORESOURCE_MEM, |
| 714 | .start = MSM_SDC4_BASE, |
| 715 | .end = MSM_SDC4_DML_BASE - 1, |
| 716 | }, |
| 717 | { |
| 718 | .name = "core_irq", |
| 719 | .flags = IORESOURCE_IRQ, |
| 720 | .start = SDC4_IRQ_0, |
| 721 | .end = SDC4_IRQ_0 |
| 722 | }, |
| 723 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 724 | { |
| 725 | .name = "sdcc_dml_addr", |
| 726 | .start = MSM_SDC4_DML_BASE, |
| 727 | .end = MSM_SDC4_BAM_BASE - 1, |
| 728 | .flags = IORESOURCE_MEM, |
| 729 | }, |
| 730 | { |
| 731 | .name = "sdcc_bam_addr", |
| 732 | .start = MSM_SDC4_BAM_BASE, |
| 733 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 734 | .flags = IORESOURCE_MEM, |
| 735 | }, |
| 736 | { |
| 737 | .name = "sdcc_bam_irq", |
| 738 | .start = SDC4_BAM_IRQ, |
| 739 | .end = SDC4_BAM_IRQ, |
| 740 | .flags = IORESOURCE_IRQ, |
| 741 | }, |
| 742 | #endif |
| 743 | }; |
| 744 | |
| 745 | static struct resource resources_sdc5[] = { |
| 746 | { |
| 747 | .name = "core_mem", |
| 748 | .flags = IORESOURCE_MEM, |
| 749 | .start = MSM_SDC5_BASE, |
| 750 | .end = MSM_SDC5_DML_BASE - 1, |
| 751 | }, |
| 752 | { |
| 753 | .name = "core_irq", |
| 754 | .flags = IORESOURCE_IRQ, |
| 755 | .start = SDC5_IRQ_0, |
| 756 | .end = SDC5_IRQ_0 |
| 757 | }, |
| 758 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 759 | { |
| 760 | .name = "sdcc_dml_addr", |
| 761 | .start = MSM_SDC5_DML_BASE, |
| 762 | .end = MSM_SDC5_BAM_BASE - 1, |
| 763 | .flags = IORESOURCE_MEM, |
| 764 | }, |
| 765 | { |
| 766 | .name = "sdcc_bam_addr", |
| 767 | .start = MSM_SDC5_BAM_BASE, |
| 768 | .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1, |
| 769 | .flags = IORESOURCE_MEM, |
| 770 | }, |
| 771 | { |
| 772 | .name = "sdcc_bam_irq", |
| 773 | .start = SDC5_BAM_IRQ, |
| 774 | .end = SDC5_BAM_IRQ, |
| 775 | .flags = IORESOURCE_IRQ, |
| 776 | }, |
| 777 | #endif |
| 778 | }; |
| 779 | |
| 780 | struct platform_device msm_device_sdc1 = { |
| 781 | .name = "msm_sdcc", |
| 782 | .id = 1, |
| 783 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 784 | .resource = resources_sdc1, |
| 785 | .dev = { |
| 786 | .coherent_dma_mask = 0xffffffff, |
| 787 | }, |
| 788 | }; |
| 789 | |
| 790 | struct platform_device msm_device_sdc2 = { |
| 791 | .name = "msm_sdcc", |
| 792 | .id = 2, |
| 793 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 794 | .resource = resources_sdc2, |
| 795 | .dev = { |
| 796 | .coherent_dma_mask = 0xffffffff, |
| 797 | }, |
| 798 | }; |
| 799 | |
| 800 | struct platform_device msm_device_sdc3 = { |
| 801 | .name = "msm_sdcc", |
| 802 | .id = 3, |
| 803 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 804 | .resource = resources_sdc3, |
| 805 | .dev = { |
| 806 | .coherent_dma_mask = 0xffffffff, |
| 807 | }, |
| 808 | }; |
| 809 | |
| 810 | struct platform_device msm_device_sdc4 = { |
| 811 | .name = "msm_sdcc", |
| 812 | .id = 4, |
| 813 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 814 | .resource = resources_sdc4, |
| 815 | .dev = { |
| 816 | .coherent_dma_mask = 0xffffffff, |
| 817 | }, |
| 818 | }; |
| 819 | |
| 820 | struct platform_device msm_device_sdc5 = { |
| 821 | .name = "msm_sdcc", |
| 822 | .id = 5, |
| 823 | .num_resources = ARRAY_SIZE(resources_sdc5), |
| 824 | .resource = resources_sdc5, |
| 825 | .dev = { |
| 826 | .coherent_dma_mask = 0xffffffff, |
| 827 | }, |
| 828 | }; |
| 829 | |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 830 | #define MSM_LPASS_QDSP6SS_PHYS 0x28800000 |
| 831 | #define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0) |
| 832 | |
| 833 | static struct resource msm_8960_q6_lpass_resources[] = { |
| 834 | { |
| 835 | .start = MSM_LPASS_QDSP6SS_PHYS, |
| 836 | .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1, |
| 837 | .flags = IORESOURCE_MEM, |
| 838 | }, |
| 839 | }; |
| 840 | |
| 841 | static struct pil_q6v4_pdata msm_8960_q6_lpass_data = { |
| 842 | .strap_tcm_base = 0x01460000, |
| 843 | .strap_ahb_upper = 0x00290000, |
| 844 | .strap_ahb_lower = 0x00000280, |
| 845 | .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL, |
| 846 | .name = "q6", |
| 847 | .pas_id = PAS_Q6, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 848 | .bus_port = MSM_BUS_MASTER_LPASS_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 849 | }; |
| 850 | |
| 851 | struct platform_device msm_8960_q6_lpass = { |
| 852 | .name = "pil_qdsp6v4", |
| 853 | .id = 0, |
| 854 | .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources), |
| 855 | .resource = msm_8960_q6_lpass_resources, |
| 856 | .dev.platform_data = &msm_8960_q6_lpass_data, |
| 857 | }; |
| 858 | |
| 859 | #define MSM_MSS_ENABLE_PHYS 0x08B00000 |
| 860 | #define MSM_FW_QDSP6SS_PHYS 0x08800000 |
| 861 | #define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C) |
| 862 | #define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044) |
| 863 | |
| 864 | static struct resource msm_8960_q6_mss_fw_resources[] = { |
| 865 | { |
| 866 | .start = MSM_FW_QDSP6SS_PHYS, |
| 867 | .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1, |
| 868 | .flags = IORESOURCE_MEM, |
| 869 | }, |
| 870 | { |
| 871 | .start = MSM_MSS_ENABLE_PHYS, |
| 872 | .end = MSM_MSS_ENABLE_PHYS + 4 - 1, |
| 873 | .flags = IORESOURCE_MEM, |
| 874 | }, |
| 875 | }; |
| 876 | |
| 877 | static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = { |
| 878 | .strap_tcm_base = 0x00400000, |
| 879 | .strap_ahb_upper = 0x00090000, |
| 880 | .strap_ahb_lower = 0x00000080, |
| 881 | .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL, |
| 882 | .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL, |
| 883 | .name = "modem_fw", |
| 884 | .depends = "q6", |
| 885 | .pas_id = PAS_MODEM_FW, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 886 | .bus_port = MSM_BUS_MASTER_MSS_FW_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 887 | }; |
| 888 | |
| 889 | struct platform_device msm_8960_q6_mss_fw = { |
| 890 | .name = "pil_qdsp6v4", |
| 891 | .id = 1, |
| 892 | .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources), |
| 893 | .resource = msm_8960_q6_mss_fw_resources, |
| 894 | .dev.platform_data = &msm_8960_q6_mss_fw_data, |
| 895 | }; |
| 896 | |
| 897 | #define MSM_SW_QDSP6SS_PHYS 0x08900000 |
| 898 | #define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040) |
| 899 | #define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68) |
| 900 | |
| 901 | static struct resource msm_8960_q6_mss_sw_resources[] = { |
| 902 | { |
| 903 | .start = MSM_SW_QDSP6SS_PHYS, |
| 904 | .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1, |
| 905 | .flags = IORESOURCE_MEM, |
| 906 | }, |
| 907 | { |
| 908 | .start = MSM_MSS_ENABLE_PHYS, |
| 909 | .end = MSM_MSS_ENABLE_PHYS + 4 - 1, |
| 910 | .flags = IORESOURCE_MEM, |
| 911 | }, |
| 912 | }; |
| 913 | |
| 914 | static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = { |
| 915 | .strap_tcm_base = 0x00420000, |
| 916 | .strap_ahb_upper = 0x00090000, |
| 917 | .strap_ahb_lower = 0x00000080, |
| 918 | .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL, |
| 919 | .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL, |
| 920 | .name = "modem", |
| 921 | .depends = "modem_fw", |
| 922 | .pas_id = PAS_MODEM_SW, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 923 | .bus_port = MSM_BUS_MASTER_MSS_SW_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 924 | }; |
| 925 | |
| 926 | struct platform_device msm_8960_q6_mss_sw = { |
| 927 | .name = "pil_qdsp6v4", |
| 928 | .id = 2, |
| 929 | .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources), |
| 930 | .resource = msm_8960_q6_mss_sw_resources, |
| 931 | .dev.platform_data = &msm_8960_q6_mss_sw_data, |
| 932 | }; |
| 933 | |
Stephen Boyd | 322a992 | 2011-09-20 01:05:54 -0700 | [diff] [blame] | 934 | static struct resource msm_8960_riva_resources[] = { |
| 935 | { |
| 936 | .start = 0x03204000, |
| 937 | .end = 0x03204000 + SZ_256 - 1, |
| 938 | .flags = IORESOURCE_MEM, |
| 939 | }, |
| 940 | }; |
| 941 | |
| 942 | struct platform_device msm_8960_riva = { |
| 943 | .name = "pil_riva", |
| 944 | .id = -1, |
| 945 | .num_resources = ARRAY_SIZE(msm_8960_riva_resources), |
| 946 | .resource = msm_8960_riva_resources, |
| 947 | }; |
| 948 | |
Stephen Boyd | d89eebe | 2011-09-28 23:28:11 -0700 | [diff] [blame] | 949 | struct platform_device msm_pil_tzapps = { |
| 950 | .name = "pil_tzapps", |
| 951 | .id = -1, |
| 952 | }; |
| 953 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame^] | 954 | static struct resource smd_resource[] = { |
| 955 | { |
| 956 | .name = "a9_m2a_0", |
| 957 | .start = INT_A9_M2A_0, |
| 958 | .flags = IORESOURCE_IRQ, |
| 959 | }, |
| 960 | { |
| 961 | .name = "a9_m2a_5", |
| 962 | .start = INT_A9_M2A_5, |
| 963 | .flags = IORESOURCE_IRQ, |
| 964 | }, |
| 965 | { |
| 966 | .name = "adsp_a11", |
| 967 | .start = INT_ADSP_A11, |
| 968 | .flags = IORESOURCE_IRQ, |
| 969 | }, |
| 970 | { |
| 971 | .name = "adsp_a11_smsm", |
| 972 | .start = INT_ADSP_A11_SMSM, |
| 973 | .flags = IORESOURCE_IRQ, |
| 974 | }, |
| 975 | { |
| 976 | .name = "dsps_a11", |
| 977 | .start = INT_DSPS_A11, |
| 978 | .flags = IORESOURCE_IRQ, |
| 979 | }, |
| 980 | { |
| 981 | .name = "dsps_a11_smsm", |
| 982 | .start = INT_DSPS_A11_SMSM, |
| 983 | .flags = IORESOURCE_IRQ, |
| 984 | }, |
| 985 | { |
| 986 | .name = "wcnss_a11", |
| 987 | .start = INT_WCNSS_A11, |
| 988 | .flags = IORESOURCE_IRQ, |
| 989 | }, |
| 990 | { |
| 991 | .name = "wcnss_a11_smsm", |
| 992 | .start = INT_WCNSS_A11_SMSM, |
| 993 | .flags = IORESOURCE_IRQ, |
| 994 | }, |
| 995 | }; |
| 996 | |
| 997 | static struct smd_subsystem_config smd_config_list[] = { |
| 998 | { |
| 999 | .irq_config_id = SMD_MODEM, |
| 1000 | .subsys_name = "modem", |
| 1001 | .edge = SMD_APPS_MODEM, |
| 1002 | |
| 1003 | .smd_int.irq_name = "a9_m2a_0", |
| 1004 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1005 | .smd_int.irq_id = -1, |
| 1006 | .smd_int.device_name = "smd_dev", |
| 1007 | .smd_int.dev_id = 0, |
| 1008 | .smd_int.out_bit_pos = 1 << 3, |
| 1009 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1010 | .smd_int.out_offset = 0x8, |
| 1011 | |
| 1012 | .smsm_int.irq_name = "a9_m2a_5", |
| 1013 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1014 | .smsm_int.irq_id = -1, |
| 1015 | .smsm_int.device_name = "smd_smsm", |
| 1016 | .smsm_int.dev_id = 0, |
| 1017 | .smsm_int.out_bit_pos = 1 << 4, |
| 1018 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1019 | .smsm_int.out_offset = 0x8, |
| 1020 | }, |
| 1021 | { |
| 1022 | .irq_config_id = SMD_Q6, |
| 1023 | .subsys_name = "q6", |
| 1024 | .edge = SMD_APPS_QDSP, |
| 1025 | |
| 1026 | .smd_int.irq_name = "adsp_a11", |
| 1027 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1028 | .smd_int.irq_id = -1, |
| 1029 | .smd_int.device_name = "smd_dev", |
| 1030 | .smd_int.dev_id = 0, |
| 1031 | .smd_int.out_bit_pos = 1 << 15, |
| 1032 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1033 | .smd_int.out_offset = 0x8, |
| 1034 | |
| 1035 | .smsm_int.irq_name = "adsp_a11_smsm", |
| 1036 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1037 | .smsm_int.irq_id = -1, |
| 1038 | .smsm_int.device_name = "smd_smsm", |
| 1039 | .smsm_int.dev_id = 0, |
| 1040 | .smsm_int.out_bit_pos = 1 << 14, |
| 1041 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1042 | .smsm_int.out_offset = 0x8, |
| 1043 | }, |
| 1044 | { |
| 1045 | .irq_config_id = SMD_DSPS, |
| 1046 | .subsys_name = "dsps", |
| 1047 | .edge = SMD_APPS_DSPS, |
| 1048 | |
| 1049 | .smd_int.irq_name = "dsps_a11", |
| 1050 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1051 | .smd_int.irq_id = -1, |
| 1052 | .smd_int.device_name = "smd_dev", |
| 1053 | .smd_int.dev_id = 0, |
| 1054 | .smd_int.out_bit_pos = 1, |
| 1055 | .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1056 | .smd_int.out_offset = 0x4080, |
| 1057 | |
| 1058 | .smsm_int.irq_name = "dsps_a11_smsm", |
| 1059 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1060 | .smsm_int.irq_id = -1, |
| 1061 | .smsm_int.device_name = "smd_smsm", |
| 1062 | .smsm_int.dev_id = 0, |
| 1063 | .smsm_int.out_bit_pos = 1, |
| 1064 | .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1065 | .smsm_int.out_offset = 0x4094, |
| 1066 | }, |
| 1067 | { |
| 1068 | .irq_config_id = SMD_WCNSS, |
| 1069 | .subsys_name = "wcnss", |
| 1070 | .edge = SMD_APPS_WCNSS, |
| 1071 | |
| 1072 | .smd_int.irq_name = "wcnss_a11", |
| 1073 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1074 | .smd_int.irq_id = -1, |
| 1075 | .smd_int.device_name = "smd_dev", |
| 1076 | .smd_int.dev_id = 0, |
| 1077 | .smd_int.out_bit_pos = 1 << 25, |
| 1078 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1079 | .smd_int.out_offset = 0x8, |
| 1080 | |
| 1081 | .smsm_int.irq_name = "wcnss_a11_smsm", |
| 1082 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1083 | .smsm_int.irq_id = -1, |
| 1084 | .smsm_int.device_name = "smd_smsm", |
| 1085 | .smsm_int.dev_id = 0, |
| 1086 | .smsm_int.out_bit_pos = 1 << 23, |
| 1087 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1088 | .smsm_int.out_offset = 0x8, |
| 1089 | }, |
| 1090 | }; |
| 1091 | |
| 1092 | static struct smd_platform smd_platform_data = { |
| 1093 | .num_ss_configs = ARRAY_SIZE(smd_config_list), |
| 1094 | .smd_ss_configs = smd_config_list, |
| 1095 | }; |
| 1096 | |
| 1097 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1098 | struct platform_device msm_device_smd = { |
| 1099 | .name = "msm_smd", |
| 1100 | .id = -1, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame^] | 1101 | .resource = smd_resource, |
| 1102 | .num_resources = ARRAY_SIZE(smd_resource), |
| 1103 | .dev = { |
| 1104 | .platform_data = &smd_platform_data, |
| 1105 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1106 | }; |
| 1107 | |
| 1108 | struct platform_device msm_device_bam_dmux = { |
| 1109 | .name = "BAM_RMNT", |
| 1110 | .id = -1, |
| 1111 | }; |
| 1112 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 1113 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 1114 | .pet_time = 10000, |
| 1115 | .bark_time = 11000, |
| 1116 | .has_secure = true, |
| 1117 | }; |
| 1118 | |
| 1119 | struct platform_device msm8960_device_watchdog = { |
| 1120 | .name = "msm_watchdog", |
| 1121 | .id = -1, |
| 1122 | .dev = { |
| 1123 | .platform_data = &msm_watchdog_pdata, |
| 1124 | }, |
| 1125 | }; |
| 1126 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 1127 | static struct resource msm_dmov_resource[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1128 | { |
| 1129 | .start = ADM_0_SCSS_1_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1130 | .flags = IORESOURCE_IRQ, |
| 1131 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1132 | { |
| 1133 | .start = 0x18320000, |
| 1134 | .end = 0x18320000 + SZ_1M - 1, |
| 1135 | .flags = IORESOURCE_MEM, |
| 1136 | }, |
| 1137 | }; |
| 1138 | |
| 1139 | static struct msm_dmov_pdata msm_dmov_pdata = { |
| 1140 | .sd = 1, |
| 1141 | .sd_size = 0x800, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1142 | }; |
| 1143 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 1144 | struct platform_device msm8960_device_dmov = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1145 | .name = "msm_dmov", |
| 1146 | .id = -1, |
| 1147 | .resource = msm_dmov_resource, |
| 1148 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1149 | .dev = { |
| 1150 | .platform_data = &msm_dmov_pdata, |
| 1151 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1152 | }; |
| 1153 | |
| 1154 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 1155 | &msm_device_sdc1, |
| 1156 | &msm_device_sdc2, |
| 1157 | &msm_device_sdc3, |
| 1158 | &msm_device_sdc4, |
| 1159 | &msm_device_sdc5, |
| 1160 | }; |
| 1161 | |
| 1162 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 1163 | { |
| 1164 | struct platform_device *pdev; |
| 1165 | |
| 1166 | if (controller < 1 || controller > 5) |
| 1167 | return -EINVAL; |
| 1168 | |
| 1169 | pdev = msm_sdcc_devices[controller-1]; |
| 1170 | pdev->dev.platform_data = plat; |
| 1171 | return platform_device_register(pdev); |
| 1172 | } |
| 1173 | |
| 1174 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 1175 | { |
| 1176 | .name = "gsbi_qup_i2c_addr", |
| 1177 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1178 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1179 | .flags = IORESOURCE_MEM, |
| 1180 | }, |
| 1181 | { |
| 1182 | .name = "qup_phys_addr", |
| 1183 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1184 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1185 | .flags = IORESOURCE_MEM, |
| 1186 | }, |
| 1187 | { |
| 1188 | .name = "qup_err_intr", |
| 1189 | .start = GSBI4_QUP_IRQ, |
| 1190 | .end = GSBI4_QUP_IRQ, |
| 1191 | .flags = IORESOURCE_IRQ, |
| 1192 | }, |
| 1193 | }; |
| 1194 | |
| 1195 | struct platform_device msm8960_device_qup_i2c_gsbi4 = { |
| 1196 | .name = "qup_i2c", |
| 1197 | .id = 4, |
| 1198 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 1199 | .resource = resources_qup_i2c_gsbi4, |
| 1200 | }; |
| 1201 | |
| 1202 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 1203 | { |
| 1204 | .name = "gsbi_qup_i2c_addr", |
| 1205 | .start = MSM_GSBI3_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1206 | .end = MSM_GSBI3_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1207 | .flags = IORESOURCE_MEM, |
| 1208 | }, |
| 1209 | { |
| 1210 | .name = "qup_phys_addr", |
| 1211 | .start = MSM_GSBI3_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1212 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1213 | .flags = IORESOURCE_MEM, |
| 1214 | }, |
| 1215 | { |
| 1216 | .name = "qup_err_intr", |
| 1217 | .start = GSBI3_QUP_IRQ, |
| 1218 | .end = GSBI3_QUP_IRQ, |
| 1219 | .flags = IORESOURCE_IRQ, |
| 1220 | }, |
| 1221 | }; |
| 1222 | |
| 1223 | struct platform_device msm8960_device_qup_i2c_gsbi3 = { |
| 1224 | .name = "qup_i2c", |
| 1225 | .id = 3, |
| 1226 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 1227 | .resource = resources_qup_i2c_gsbi3, |
| 1228 | }; |
| 1229 | |
| 1230 | static struct resource resources_qup_i2c_gsbi10[] = { |
| 1231 | { |
| 1232 | .name = "gsbi_qup_i2c_addr", |
| 1233 | .start = MSM_GSBI10_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1234 | .end = MSM_GSBI10_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1235 | .flags = IORESOURCE_MEM, |
| 1236 | }, |
| 1237 | { |
| 1238 | .name = "qup_phys_addr", |
| 1239 | .start = MSM_GSBI10_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1240 | .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1241 | .flags = IORESOURCE_MEM, |
| 1242 | }, |
| 1243 | { |
| 1244 | .name = "qup_err_intr", |
| 1245 | .start = GSBI10_QUP_IRQ, |
| 1246 | .end = GSBI10_QUP_IRQ, |
| 1247 | .flags = IORESOURCE_IRQ, |
| 1248 | }, |
| 1249 | }; |
| 1250 | |
| 1251 | struct platform_device msm8960_device_qup_i2c_gsbi10 = { |
| 1252 | .name = "qup_i2c", |
| 1253 | .id = 10, |
| 1254 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10), |
| 1255 | .resource = resources_qup_i2c_gsbi10, |
| 1256 | }; |
| 1257 | |
| 1258 | static struct resource resources_qup_i2c_gsbi12[] = { |
| 1259 | { |
| 1260 | .name = "gsbi_qup_i2c_addr", |
| 1261 | .start = MSM_GSBI12_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1262 | .end = MSM_GSBI12_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1263 | .flags = IORESOURCE_MEM, |
| 1264 | }, |
| 1265 | { |
| 1266 | .name = "qup_phys_addr", |
| 1267 | .start = MSM_GSBI12_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1268 | .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1269 | .flags = IORESOURCE_MEM, |
| 1270 | }, |
| 1271 | { |
| 1272 | .name = "qup_err_intr", |
| 1273 | .start = GSBI12_QUP_IRQ, |
| 1274 | .end = GSBI12_QUP_IRQ, |
| 1275 | .flags = IORESOURCE_IRQ, |
| 1276 | }, |
| 1277 | }; |
| 1278 | |
| 1279 | struct platform_device msm8960_device_qup_i2c_gsbi12 = { |
| 1280 | .name = "qup_i2c", |
| 1281 | .id = 12, |
| 1282 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12), |
| 1283 | .resource = resources_qup_i2c_gsbi12, |
| 1284 | }; |
| 1285 | |
| 1286 | #ifdef CONFIG_MSM_CAMERA |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1287 | static struct resource msm_cam_gsbi4_i2c_mux_resources[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1288 | { |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1289 | .name = "i2c_mux_rw", |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1290 | .start = 0x008003E0, |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1291 | .end = 0x008003E0 + SZ_8 - 1, |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1292 | .flags = IORESOURCE_MEM, |
| 1293 | }, |
| 1294 | { |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1295 | .name = "i2c_mux_ctl", |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1296 | .start = 0x008020B8, |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1297 | .end = 0x008020B8 + SZ_4 - 1, |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1298 | .flags = IORESOURCE_MEM, |
| 1299 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1300 | }; |
| 1301 | |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1302 | struct platform_device msm8960_device_i2c_mux_gsbi4 = { |
| 1303 | .name = "msm_cam_i2c_mux", |
| 1304 | .id = 0, |
| 1305 | .resource = msm_cam_gsbi4_i2c_mux_resources, |
| 1306 | .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources), |
| 1307 | }; |
Kevin Chan | f6216f2 | 2011-10-25 18:40:11 -0700 | [diff] [blame] | 1308 | |
| 1309 | static struct resource msm_csiphy0_resources[] = { |
| 1310 | { |
| 1311 | .name = "csiphy", |
| 1312 | .start = 0x04800C00, |
| 1313 | .end = 0x04800C00 + SZ_1K - 1, |
| 1314 | .flags = IORESOURCE_MEM, |
| 1315 | }, |
| 1316 | { |
| 1317 | .name = "csiphy", |
| 1318 | .start = CSIPHY_4LN_IRQ, |
| 1319 | .end = CSIPHY_4LN_IRQ, |
| 1320 | .flags = IORESOURCE_IRQ, |
| 1321 | }, |
| 1322 | }; |
| 1323 | |
| 1324 | static struct resource msm_csiphy1_resources[] = { |
| 1325 | { |
| 1326 | .name = "csiphy", |
| 1327 | .start = 0x04801000, |
| 1328 | .end = 0x04801000 + SZ_1K - 1, |
| 1329 | .flags = IORESOURCE_MEM, |
| 1330 | }, |
| 1331 | { |
| 1332 | .name = "csiphy", |
| 1333 | .start = MSM8960_CSIPHY_2LN_IRQ, |
| 1334 | .end = MSM8960_CSIPHY_2LN_IRQ, |
| 1335 | .flags = IORESOURCE_IRQ, |
| 1336 | }, |
| 1337 | }; |
| 1338 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1339 | static struct resource msm_csiphy2_resources[] = { |
| 1340 | { |
| 1341 | .name = "csiphy", |
| 1342 | .start = 0x04801400, |
| 1343 | .end = 0x04801400 + SZ_1K - 1, |
| 1344 | .flags = IORESOURCE_MEM, |
| 1345 | }, |
| 1346 | { |
| 1347 | .name = "csiphy", |
| 1348 | .start = MSM8960_CSIPHY_2_2LN_IRQ, |
| 1349 | .end = MSM8960_CSIPHY_2_2LN_IRQ, |
| 1350 | .flags = IORESOURCE_IRQ, |
| 1351 | }, |
| 1352 | }; |
| 1353 | |
Kevin Chan | f6216f2 | 2011-10-25 18:40:11 -0700 | [diff] [blame] | 1354 | struct platform_device msm8960_device_csiphy0 = { |
| 1355 | .name = "msm_csiphy", |
| 1356 | .id = 0, |
| 1357 | .resource = msm_csiphy0_resources, |
| 1358 | .num_resources = ARRAY_SIZE(msm_csiphy0_resources), |
| 1359 | }; |
| 1360 | |
| 1361 | struct platform_device msm8960_device_csiphy1 = { |
| 1362 | .name = "msm_csiphy", |
| 1363 | .id = 1, |
| 1364 | .resource = msm_csiphy1_resources, |
| 1365 | .num_resources = ARRAY_SIZE(msm_csiphy1_resources), |
| 1366 | }; |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1367 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1368 | struct platform_device msm8960_device_csiphy2 = { |
| 1369 | .name = "msm_csiphy", |
| 1370 | .id = 2, |
| 1371 | .resource = msm_csiphy2_resources, |
| 1372 | .num_resources = ARRAY_SIZE(msm_csiphy2_resources), |
| 1373 | }; |
| 1374 | |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1375 | static struct resource msm_csid0_resources[] = { |
| 1376 | { |
| 1377 | .name = "csid", |
| 1378 | .start = 0x04800000, |
| 1379 | .end = 0x04800000 + SZ_1K - 1, |
| 1380 | .flags = IORESOURCE_MEM, |
| 1381 | }, |
| 1382 | { |
| 1383 | .name = "csid", |
| 1384 | .start = CSI_0_IRQ, |
| 1385 | .end = CSI_0_IRQ, |
| 1386 | .flags = IORESOURCE_IRQ, |
| 1387 | }, |
| 1388 | }; |
| 1389 | |
| 1390 | static struct resource msm_csid1_resources[] = { |
| 1391 | { |
| 1392 | .name = "csid", |
| 1393 | .start = 0x04800400, |
| 1394 | .end = 0x04800400 + SZ_1K - 1, |
| 1395 | .flags = IORESOURCE_MEM, |
| 1396 | }, |
| 1397 | { |
| 1398 | .name = "csid", |
| 1399 | .start = CSI_1_IRQ, |
| 1400 | .end = CSI_1_IRQ, |
| 1401 | .flags = IORESOURCE_IRQ, |
| 1402 | }, |
| 1403 | }; |
| 1404 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1405 | static struct resource msm_csid2_resources[] = { |
| 1406 | { |
| 1407 | .name = "csid", |
| 1408 | .start = 0x04801800, |
| 1409 | .end = 0x04801800 + SZ_1K - 1, |
| 1410 | .flags = IORESOURCE_MEM, |
| 1411 | }, |
| 1412 | { |
| 1413 | .name = "csid", |
| 1414 | .start = CSI_2_IRQ, |
| 1415 | .end = CSI_2_IRQ, |
| 1416 | .flags = IORESOURCE_IRQ, |
| 1417 | }, |
| 1418 | }; |
| 1419 | |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1420 | struct platform_device msm8960_device_csid0 = { |
| 1421 | .name = "msm_csid", |
| 1422 | .id = 0, |
| 1423 | .resource = msm_csid0_resources, |
| 1424 | .num_resources = ARRAY_SIZE(msm_csid0_resources), |
| 1425 | }; |
| 1426 | |
| 1427 | struct platform_device msm8960_device_csid1 = { |
| 1428 | .name = "msm_csid", |
| 1429 | .id = 1, |
| 1430 | .resource = msm_csid1_resources, |
| 1431 | .num_resources = ARRAY_SIZE(msm_csid1_resources), |
| 1432 | }; |
Kevin Chan | e12c667 | 2011-10-26 11:55:26 -0700 | [diff] [blame] | 1433 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1434 | struct platform_device msm8960_device_csid2 = { |
| 1435 | .name = "msm_csid", |
| 1436 | .id = 2, |
| 1437 | .resource = msm_csid2_resources, |
| 1438 | .num_resources = ARRAY_SIZE(msm_csid2_resources), |
| 1439 | }; |
| 1440 | |
Kevin Chan | e12c667 | 2011-10-26 11:55:26 -0700 | [diff] [blame] | 1441 | struct resource msm_ispif_resources[] = { |
| 1442 | { |
| 1443 | .name = "ispif", |
| 1444 | .start = 0x04800800, |
| 1445 | .end = 0x04800800 + SZ_1K - 1, |
| 1446 | .flags = IORESOURCE_MEM, |
| 1447 | }, |
| 1448 | { |
| 1449 | .name = "ispif", |
| 1450 | .start = ISPIF_IRQ, |
| 1451 | .end = ISPIF_IRQ, |
| 1452 | .flags = IORESOURCE_IRQ, |
| 1453 | }, |
| 1454 | }; |
| 1455 | |
| 1456 | struct platform_device msm8960_device_ispif = { |
| 1457 | .name = "msm_ispif", |
| 1458 | .id = 0, |
| 1459 | .resource = msm_ispif_resources, |
| 1460 | .num_resources = ARRAY_SIZE(msm_ispif_resources), |
| 1461 | }; |
Kevin Chan | 5827c55 | 2011-10-28 18:36:32 -0700 | [diff] [blame] | 1462 | |
| 1463 | static struct resource msm_vfe_resources[] = { |
| 1464 | { |
| 1465 | .name = "vfe32", |
| 1466 | .start = 0x04500000, |
| 1467 | .end = 0x04500000 + SZ_1M - 1, |
| 1468 | .flags = IORESOURCE_MEM, |
| 1469 | }, |
| 1470 | { |
| 1471 | .name = "vfe32", |
| 1472 | .start = VFE_IRQ, |
| 1473 | .end = VFE_IRQ, |
| 1474 | .flags = IORESOURCE_IRQ, |
| 1475 | }, |
| 1476 | }; |
| 1477 | |
| 1478 | struct platform_device msm8960_device_vfe = { |
| 1479 | .name = "msm_vfe", |
| 1480 | .id = 0, |
| 1481 | .resource = msm_vfe_resources, |
| 1482 | .num_resources = ARRAY_SIZE(msm_vfe_resources), |
| 1483 | }; |
Kevin Chan | a085312 | 2011-11-07 19:48:44 -0800 | [diff] [blame] | 1484 | |
| 1485 | static struct resource msm_vpe_resources[] = { |
| 1486 | { |
| 1487 | .name = "vpe", |
| 1488 | .start = 0x05300000, |
| 1489 | .end = 0x05300000 + SZ_1M - 1, |
| 1490 | .flags = IORESOURCE_MEM, |
| 1491 | }, |
| 1492 | { |
| 1493 | .name = "vpe", |
| 1494 | .start = VPE_IRQ, |
| 1495 | .end = VPE_IRQ, |
| 1496 | .flags = IORESOURCE_IRQ, |
| 1497 | }, |
| 1498 | }; |
| 1499 | |
| 1500 | struct platform_device msm8960_device_vpe = { |
| 1501 | .name = "msm_vpe", |
| 1502 | .id = 0, |
| 1503 | .resource = msm_vpe_resources, |
| 1504 | .num_resources = ARRAY_SIZE(msm_vpe_resources), |
| 1505 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1506 | #endif |
| 1507 | |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1508 | static struct resource resources_ssbi_pmic[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1509 | { |
| 1510 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 1511 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 1512 | .flags = IORESOURCE_MEM, |
| 1513 | }, |
| 1514 | }; |
| 1515 | |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1516 | struct platform_device msm8960_device_ssbi_pmic = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1517 | .name = "msm_ssbi", |
| 1518 | .id = 0, |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1519 | .resource = resources_ssbi_pmic, |
| 1520 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1521 | }; |
| 1522 | |
| 1523 | static struct resource resources_qup_spi_gsbi1[] = { |
| 1524 | { |
| 1525 | .name = "spi_base", |
| 1526 | .start = MSM_GSBI1_QUP_PHYS, |
| 1527 | .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1, |
| 1528 | .flags = IORESOURCE_MEM, |
| 1529 | }, |
| 1530 | { |
| 1531 | .name = "gsbi_base", |
| 1532 | .start = MSM_GSBI1_PHYS, |
| 1533 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 1534 | .flags = IORESOURCE_MEM, |
| 1535 | }, |
| 1536 | { |
| 1537 | .name = "spi_irq_in", |
| 1538 | .start = MSM8960_GSBI1_QUP_IRQ, |
| 1539 | .end = MSM8960_GSBI1_QUP_IRQ, |
| 1540 | .flags = IORESOURCE_IRQ, |
| 1541 | }, |
Harini Jayaraman | aac8e34 | 2011-08-09 19:25:23 -0600 | [diff] [blame] | 1542 | { |
| 1543 | .name = "spi_clk", |
| 1544 | .start = 9, |
| 1545 | .end = 9, |
| 1546 | .flags = IORESOURCE_IO, |
| 1547 | }, |
| 1548 | { |
Harini Jayaraman | aac8e34 | 2011-08-09 19:25:23 -0600 | [diff] [blame] | 1549 | .name = "spi_miso", |
| 1550 | .start = 7, |
| 1551 | .end = 7, |
| 1552 | .flags = IORESOURCE_IO, |
| 1553 | }, |
| 1554 | { |
| 1555 | .name = "spi_mosi", |
| 1556 | .start = 6, |
| 1557 | .end = 6, |
| 1558 | .flags = IORESOURCE_IO, |
| 1559 | }, |
Harini Jayaraman | 8392e43 | 2011-11-29 18:26:17 -0700 | [diff] [blame] | 1560 | { |
| 1561 | .name = "spi_cs", |
| 1562 | .start = 8, |
| 1563 | .end = 8, |
| 1564 | .flags = IORESOURCE_IO, |
| 1565 | }, |
| 1566 | { |
| 1567 | .name = "spi_cs1", |
| 1568 | .start = 14, |
| 1569 | .end = 14, |
| 1570 | .flags = IORESOURCE_IO, |
| 1571 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1572 | }; |
| 1573 | |
| 1574 | struct platform_device msm8960_device_qup_spi_gsbi1 = { |
| 1575 | .name = "spi_qsd", |
| 1576 | .id = 0, |
| 1577 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1), |
| 1578 | .resource = resources_qup_spi_gsbi1, |
| 1579 | }; |
| 1580 | |
| 1581 | struct platform_device msm_pcm = { |
| 1582 | .name = "msm-pcm-dsp", |
| 1583 | .id = -1, |
| 1584 | }; |
| 1585 | |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 1586 | struct platform_device msm_multi_ch_pcm = { |
| 1587 | .name = "msm-multi-ch-pcm-dsp", |
| 1588 | .id = -1, |
| 1589 | }; |
| 1590 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1591 | struct platform_device msm_pcm_routing = { |
| 1592 | .name = "msm-pcm-routing", |
| 1593 | .id = -1, |
| 1594 | }; |
| 1595 | |
| 1596 | struct platform_device msm_cpudai0 = { |
| 1597 | .name = "msm-dai-q6", |
| 1598 | .id = 0x4000, |
| 1599 | }; |
| 1600 | |
| 1601 | struct platform_device msm_cpudai1 = { |
| 1602 | .name = "msm-dai-q6", |
| 1603 | .id = 0x4001, |
| 1604 | }; |
| 1605 | |
| 1606 | struct platform_device msm_cpudai_hdmi_rx = { |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 1607 | .name = "msm-dai-q6-hdmi", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1608 | .id = 8, |
| 1609 | }; |
| 1610 | |
| 1611 | struct platform_device msm_cpudai_bt_rx = { |
| 1612 | .name = "msm-dai-q6", |
| 1613 | .id = 0x3000, |
| 1614 | }; |
| 1615 | |
| 1616 | struct platform_device msm_cpudai_bt_tx = { |
| 1617 | .name = "msm-dai-q6", |
| 1618 | .id = 0x3001, |
| 1619 | }; |
| 1620 | |
| 1621 | struct platform_device msm_cpudai_fm_rx = { |
| 1622 | .name = "msm-dai-q6", |
| 1623 | .id = 0x3004, |
| 1624 | }; |
| 1625 | |
| 1626 | struct platform_device msm_cpudai_fm_tx = { |
| 1627 | .name = "msm-dai-q6", |
| 1628 | .id = 0x3005, |
| 1629 | }; |
| 1630 | |
Helen Zeng | 0705a5f | 2011-10-14 15:29:52 -0700 | [diff] [blame] | 1631 | struct platform_device msm_cpudai_incall_music_rx = { |
| 1632 | .name = "msm-dai-q6", |
| 1633 | .id = 0x8005, |
| 1634 | }; |
| 1635 | |
Helen Zeng | e3d716a | 2011-10-14 16:32:16 -0700 | [diff] [blame] | 1636 | struct platform_device msm_cpudai_incall_record_rx = { |
| 1637 | .name = "msm-dai-q6", |
| 1638 | .id = 0x8004, |
| 1639 | }; |
| 1640 | |
| 1641 | struct platform_device msm_cpudai_incall_record_tx = { |
| 1642 | .name = "msm-dai-q6", |
| 1643 | .id = 0x8003, |
| 1644 | }; |
| 1645 | |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1646 | /* |
| 1647 | * Machine specific data for AUX PCM Interface |
| 1648 | * which the driver will be unware of. |
| 1649 | */ |
| 1650 | struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = { |
| 1651 | .clk = "pcm_clk", |
| 1652 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 1653 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 1654 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 1655 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 1656 | .slot = 0, |
| 1657 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 1658 | .pcm_clk_rate = 2048000, |
| 1659 | }; |
| 1660 | |
| 1661 | struct platform_device msm_cpudai_auxpcm_rx = { |
| 1662 | .name = "msm-dai-q6", |
| 1663 | .id = 2, |
| 1664 | .dev = { |
| 1665 | .platform_data = &auxpcm_rx_pdata, |
| 1666 | }, |
| 1667 | }; |
| 1668 | |
| 1669 | struct platform_device msm_cpudai_auxpcm_tx = { |
| 1670 | .name = "msm-dai-q6", |
| 1671 | .id = 3, |
| 1672 | }; |
| 1673 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1674 | struct platform_device msm_cpu_fe = { |
| 1675 | .name = "msm-dai-fe", |
| 1676 | .id = -1, |
| 1677 | }; |
| 1678 | |
| 1679 | struct platform_device msm_stub_codec = { |
| 1680 | .name = "msm-stub-codec", |
| 1681 | .id = 1, |
| 1682 | }; |
| 1683 | |
| 1684 | struct platform_device msm_voice = { |
| 1685 | .name = "msm-pcm-voice", |
| 1686 | .id = -1, |
| 1687 | }; |
| 1688 | |
| 1689 | struct platform_device msm_voip = { |
| 1690 | .name = "msm-voip-dsp", |
| 1691 | .id = -1, |
| 1692 | }; |
| 1693 | |
| 1694 | struct platform_device msm_lpa_pcm = { |
| 1695 | .name = "msm-pcm-lpa", |
| 1696 | .id = -1, |
| 1697 | }; |
| 1698 | |
Asish Bhattacharya | 96bb6f4 | 2011-11-01 20:36:09 +0530 | [diff] [blame] | 1699 | struct platform_device msm_compr_dsp = { |
| 1700 | .name = "msm-compr-dsp", |
| 1701 | .id = -1, |
| 1702 | }; |
| 1703 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1704 | struct platform_device msm_pcm_hostless = { |
| 1705 | .name = "msm-pcm-hostless", |
| 1706 | .id = -1, |
| 1707 | }; |
| 1708 | |
Laxminath Kasam | cee1d60 | 2011-08-01 19:26:57 +0530 | [diff] [blame] | 1709 | struct platform_device msm_cpudai_afe_01_rx = { |
| 1710 | .name = "msm-dai-q6", |
| 1711 | .id = 0xE0, |
| 1712 | }; |
| 1713 | |
| 1714 | struct platform_device msm_cpudai_afe_01_tx = { |
| 1715 | .name = "msm-dai-q6", |
| 1716 | .id = 0xF0, |
| 1717 | }; |
| 1718 | |
| 1719 | struct platform_device msm_cpudai_afe_02_rx = { |
| 1720 | .name = "msm-dai-q6", |
| 1721 | .id = 0xF1, |
| 1722 | }; |
| 1723 | |
| 1724 | struct platform_device msm_cpudai_afe_02_tx = { |
| 1725 | .name = "msm-dai-q6", |
| 1726 | .id = 0xE1, |
| 1727 | }; |
| 1728 | |
| 1729 | struct platform_device msm_pcm_afe = { |
| 1730 | .name = "msm-pcm-afe", |
| 1731 | .id = -1, |
| 1732 | }; |
| 1733 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1734 | struct platform_device *msm_footswitch_devices[] = { |
Ravishangar Kalyanam | b31a0e4 | 2012-01-19 16:02:34 -0800 | [diff] [blame] | 1735 | FS_8X60(FS_MDP, "fs_mdp"), |
Nagamalleswararao Ganji | fd7454a | 2011-08-09 10:56:40 -0700 | [diff] [blame] | 1736 | FS_8X60(FS_ROT, "fs_rot"), |
Shuzhen Wang | 4d28c09 | 2011-07-14 15:40:33 -0700 | [diff] [blame] | 1737 | FS_8X60(FS_IJPEG, "fs_ijpeg"), |
| 1738 | FS_8X60(FS_VFE, "fs_vfe"), |
| 1739 | FS_8X60(FS_VPE, "fs_vpe"), |
Lucille Sylvester | a610fb1 | 2011-07-22 17:22:20 -0600 | [diff] [blame] | 1740 | FS_8X60(FS_GFX3D, "fs_gfx3d"), |
| 1741 | FS_8X60(FS_GFX2D0, "fs_gfx2d0"), |
| 1742 | FS_8X60(FS_GFX2D1, "fs_gfx2d1"), |
Gopikrishnaiah Anandan | 031eb94 | 2011-07-28 13:24:00 -0700 | [diff] [blame] | 1743 | FS_8X60(FS_VED, "fs_ved"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1744 | }; |
| 1745 | unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices); |
| 1746 | |
| 1747 | #ifdef CONFIG_MSM_ROTATOR |
| 1748 | #define ROTATOR_HW_BASE 0x04E00000 |
| 1749 | static struct resource resources_msm_rotator[] = { |
| 1750 | { |
| 1751 | .start = ROTATOR_HW_BASE, |
| 1752 | .end = ROTATOR_HW_BASE + 0x100000 - 1, |
| 1753 | .flags = IORESOURCE_MEM, |
| 1754 | }, |
| 1755 | { |
| 1756 | .start = ROT_IRQ, |
| 1757 | .end = ROT_IRQ, |
| 1758 | .flags = IORESOURCE_IRQ, |
| 1759 | }, |
| 1760 | }; |
| 1761 | |
| 1762 | static struct msm_rot_clocks rotator_clocks[] = { |
| 1763 | { |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1764 | .clk_name = "core_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1765 | .clk_type = ROTATOR_CORE_CLK, |
Nagamalleswararao Ganji | 0bb10734 | 2011-10-10 20:55:32 -0700 | [diff] [blame] | 1766 | .clk_rate = 200 * 1000 * 1000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1767 | }, |
| 1768 | { |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1769 | .clk_name = "iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1770 | .clk_type = ROTATOR_PCLK, |
| 1771 | .clk_rate = 0, |
| 1772 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1773 | }; |
| 1774 | |
| 1775 | static struct msm_rotator_platform_data rotator_pdata = { |
| 1776 | .number_of_clocks = ARRAY_SIZE(rotator_clocks), |
| 1777 | .hardware_version_number = 0x01020309, |
| 1778 | .rotator_clks = rotator_clocks, |
| 1779 | .regulator_name = "fs_rot", |
Nagamalleswararao Ganji | 5fabbd6 | 2011-11-06 23:10:43 -0800 | [diff] [blame] | 1780 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1781 | .bus_scale_table = &rotator_bus_scale_pdata, |
| 1782 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1783 | }; |
| 1784 | |
| 1785 | struct platform_device msm_rotator_device = { |
| 1786 | .name = "msm_rotator", |
| 1787 | .id = 0, |
| 1788 | .num_resources = ARRAY_SIZE(resources_msm_rotator), |
| 1789 | .resource = resources_msm_rotator, |
| 1790 | .dev = { |
| 1791 | .platform_data = &rotator_pdata, |
| 1792 | }, |
| 1793 | }; |
| 1794 | #endif |
| 1795 | |
| 1796 | #define MIPI_DSI_HW_BASE 0x04700000 |
| 1797 | #define MDP_HW_BASE 0x05100000 |
| 1798 | |
| 1799 | static struct resource msm_mipi_dsi1_resources[] = { |
| 1800 | { |
| 1801 | .name = "mipi_dsi", |
| 1802 | .start = MIPI_DSI_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1803 | .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1804 | .flags = IORESOURCE_MEM, |
| 1805 | }, |
| 1806 | { |
| 1807 | .start = DSI1_IRQ, |
| 1808 | .end = DSI1_IRQ, |
| 1809 | .flags = IORESOURCE_IRQ, |
| 1810 | }, |
| 1811 | }; |
| 1812 | |
| 1813 | struct platform_device msm_mipi_dsi1_device = { |
| 1814 | .name = "mipi_dsi", |
| 1815 | .id = 1, |
| 1816 | .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources), |
| 1817 | .resource = msm_mipi_dsi1_resources, |
| 1818 | }; |
| 1819 | |
| 1820 | static struct resource msm_mdp_resources[] = { |
| 1821 | { |
| 1822 | .name = "mdp", |
| 1823 | .start = MDP_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1824 | .end = MDP_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1825 | .flags = IORESOURCE_MEM, |
| 1826 | }, |
| 1827 | { |
| 1828 | .start = MDP_IRQ, |
| 1829 | .end = MDP_IRQ, |
| 1830 | .flags = IORESOURCE_IRQ, |
| 1831 | }, |
| 1832 | }; |
| 1833 | |
| 1834 | static struct platform_device msm_mdp_device = { |
| 1835 | .name = "mdp", |
| 1836 | .id = 0, |
| 1837 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 1838 | .resource = msm_mdp_resources, |
| 1839 | }; |
| 1840 | |
| 1841 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 1842 | { |
| 1843 | int ret; |
| 1844 | |
| 1845 | pdev->dev.platform_data = data; |
| 1846 | ret = platform_device_register(pdev); |
| 1847 | if (ret) |
| 1848 | dev_err(&pdev->dev, |
| 1849 | "%s: platform_device_register() failed = %d\n", |
| 1850 | __func__, ret); |
| 1851 | } |
| 1852 | |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 1853 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1854 | static struct platform_device msm_dtv_device = { |
| 1855 | .name = "dtv", |
| 1856 | .id = 0, |
| 1857 | }; |
| 1858 | #endif |
| 1859 | |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 1860 | struct platform_device msm_lvds_device = { |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 1861 | .name = "lvds", |
| 1862 | .id = 0, |
| 1863 | }; |
| 1864 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1865 | void __init msm_fb_register_device(char *name, void *data) |
| 1866 | { |
| 1867 | if (!strncmp(name, "mdp", 3)) |
| 1868 | msm_register_device(&msm_mdp_device, data); |
| 1869 | else if (!strncmp(name, "mipi_dsi", 8)) |
| 1870 | msm_register_device(&msm_mipi_dsi1_device, data); |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 1871 | else if (!strncmp(name, "lvds", 4)) |
| 1872 | msm_register_device(&msm_lvds_device, data); |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 1873 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1874 | else if (!strncmp(name, "dtv", 3)) |
| 1875 | msm_register_device(&msm_dtv_device, data); |
| 1876 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1877 | else |
| 1878 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 1879 | } |
| 1880 | |
| 1881 | static struct resource resources_sps[] = { |
| 1882 | { |
| 1883 | .name = "pipe_mem", |
| 1884 | .start = 0x12800000, |
| 1885 | .end = 0x12800000 + 0x4000 - 1, |
| 1886 | .flags = IORESOURCE_MEM, |
| 1887 | }, |
| 1888 | { |
| 1889 | .name = "bamdma_dma", |
| 1890 | .start = 0x12240000, |
| 1891 | .end = 0x12240000 + 0x1000 - 1, |
| 1892 | .flags = IORESOURCE_MEM, |
| 1893 | }, |
| 1894 | { |
| 1895 | .name = "bamdma_bam", |
| 1896 | .start = 0x12244000, |
| 1897 | .end = 0x12244000 + 0x4000 - 1, |
| 1898 | .flags = IORESOURCE_MEM, |
| 1899 | }, |
| 1900 | { |
| 1901 | .name = "bamdma_irq", |
| 1902 | .start = SPS_BAM_DMA_IRQ, |
| 1903 | .end = SPS_BAM_DMA_IRQ, |
| 1904 | .flags = IORESOURCE_IRQ, |
| 1905 | }, |
| 1906 | }; |
| 1907 | |
| 1908 | struct msm_sps_platform_data msm_sps_pdata = { |
| 1909 | .bamdma_restricted_pipes = 0x06, |
| 1910 | }; |
| 1911 | |
| 1912 | struct platform_device msm_device_sps = { |
| 1913 | .name = "msm_sps", |
| 1914 | .id = -1, |
| 1915 | .num_resources = ARRAY_SIZE(resources_sps), |
| 1916 | .resource = resources_sps, |
| 1917 | .dev.platform_data = &msm_sps_pdata, |
| 1918 | }; |
| 1919 | |
| 1920 | #ifdef CONFIG_MSM_MPM |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1921 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
Praveen Chidambaram | b3d857c | 2011-05-31 16:28:07 -0600 | [diff] [blame] | 1922 | [1] = MSM_GPIO_TO_INT(46), |
| 1923 | [2] = MSM_GPIO_TO_INT(150), |
| 1924 | [4] = MSM_GPIO_TO_INT(103), |
| 1925 | [5] = MSM_GPIO_TO_INT(104), |
| 1926 | [6] = MSM_GPIO_TO_INT(105), |
| 1927 | [7] = MSM_GPIO_TO_INT(106), |
| 1928 | [8] = MSM_GPIO_TO_INT(107), |
| 1929 | [9] = MSM_GPIO_TO_INT(7), |
| 1930 | [10] = MSM_GPIO_TO_INT(11), |
| 1931 | [11] = MSM_GPIO_TO_INT(15), |
| 1932 | [12] = MSM_GPIO_TO_INT(19), |
| 1933 | [13] = MSM_GPIO_TO_INT(23), |
| 1934 | [14] = MSM_GPIO_TO_INT(27), |
| 1935 | [15] = MSM_GPIO_TO_INT(31), |
| 1936 | [16] = MSM_GPIO_TO_INT(35), |
| 1937 | [19] = MSM_GPIO_TO_INT(90), |
| 1938 | [20] = MSM_GPIO_TO_INT(92), |
| 1939 | [23] = MSM_GPIO_TO_INT(85), |
| 1940 | [24] = MSM_GPIO_TO_INT(83), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1941 | [25] = USB1_HS_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1942 | [27] = HDMI_IRQ, |
Praveen Chidambaram | b3d857c | 2011-05-31 16:28:07 -0600 | [diff] [blame] | 1943 | [29] = MSM_GPIO_TO_INT(10), |
| 1944 | [30] = MSM_GPIO_TO_INT(102), |
| 1945 | [31] = MSM_GPIO_TO_INT(81), |
| 1946 | [32] = MSM_GPIO_TO_INT(78), |
| 1947 | [33] = MSM_GPIO_TO_INT(94), |
| 1948 | [34] = MSM_GPIO_TO_INT(72), |
| 1949 | [35] = MSM_GPIO_TO_INT(39), |
| 1950 | [36] = MSM_GPIO_TO_INT(43), |
| 1951 | [37] = MSM_GPIO_TO_INT(61), |
| 1952 | [38] = MSM_GPIO_TO_INT(50), |
| 1953 | [39] = MSM_GPIO_TO_INT(42), |
| 1954 | [41] = MSM_GPIO_TO_INT(62), |
| 1955 | [42] = MSM_GPIO_TO_INT(76), |
| 1956 | [43] = MSM_GPIO_TO_INT(75), |
| 1957 | [44] = MSM_GPIO_TO_INT(70), |
| 1958 | [45] = MSM_GPIO_TO_INT(69), |
| 1959 | [46] = MSM_GPIO_TO_INT(67), |
| 1960 | [47] = MSM_GPIO_TO_INT(65), |
| 1961 | [48] = MSM_GPIO_TO_INT(58), |
| 1962 | [49] = MSM_GPIO_TO_INT(54), |
| 1963 | [50] = MSM_GPIO_TO_INT(52), |
| 1964 | [51] = MSM_GPIO_TO_INT(49), |
| 1965 | [52] = MSM_GPIO_TO_INT(40), |
| 1966 | [53] = MSM_GPIO_TO_INT(37), |
| 1967 | [54] = MSM_GPIO_TO_INT(24), |
| 1968 | [55] = MSM_GPIO_TO_INT(14), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1969 | }; |
| 1970 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1971 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1972 | TLMM_MSM_SUMMARY_IRQ, |
| 1973 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1974 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1975 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1976 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 1977 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 1978 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 1979 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 1980 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 1981 | MSS_TO_APPS_IRQ_0, |
| 1982 | MSS_TO_APPS_IRQ_1, |
| 1983 | MSS_TO_APPS_IRQ_2, |
| 1984 | MSS_TO_APPS_IRQ_3, |
| 1985 | MSS_TO_APPS_IRQ_4, |
| 1986 | MSS_TO_APPS_IRQ_5, |
| 1987 | MSS_TO_APPS_IRQ_6, |
| 1988 | MSS_TO_APPS_IRQ_7, |
| 1989 | MSS_TO_APPS_IRQ_8, |
| 1990 | MSS_TO_APPS_IRQ_9, |
| 1991 | LPASS_SCSS_GP_LOW_IRQ, |
| 1992 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1993 | LPASS_SCSS_GP_HIGH_IRQ, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 1994 | SPS_MTI_30, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1995 | SPS_MTI_31, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 1996 | RIVA_APSS_SPARE_IRQ, |
David Collins | 84ecd0a | 2011-09-27 21:11:11 -0700 | [diff] [blame] | 1997 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 1998 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1999 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2000 | }; |
| 2001 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2002 | struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2003 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 2004 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 2005 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 2006 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 2007 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 2008 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 2009 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 2010 | .mpm_apps_ipc_val = BIT(1), |
| 2011 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 2012 | |
| 2013 | }; |
| 2014 | #endif |
| 2015 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 2016 | static struct clk_lookup msm_clocks_8960_dummy[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2017 | CLK_DUMMY("pll2", PLL2, NULL, 0), |
| 2018 | CLK_DUMMY("pll8", PLL8, NULL, 0), |
| 2019 | CLK_DUMMY("pll4", PLL4, NULL, 0), |
| 2020 | |
| 2021 | CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0), |
| 2022 | CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0), |
| 2023 | CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0), |
| 2024 | CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0), |
| 2025 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 2026 | CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0), |
| 2027 | CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0), |
| 2028 | CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0), |
| 2029 | CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0), |
| 2030 | CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0), |
| 2031 | CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0), |
| 2032 | CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0), |
| 2033 | CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0), |
| 2034 | CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0), |
| 2035 | CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0), |
| 2036 | CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0), |
| 2037 | |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 2038 | CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF), |
| 2039 | CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF), |
| 2040 | CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF), |
| 2041 | CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF), |
| 2042 | CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF), |
| 2043 | CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF), |
| 2044 | CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF), |
| 2045 | CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF), |
| 2046 | CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF), |
| 2047 | CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF), |
| 2048 | CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF), |
| 2049 | CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 2050 | CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF), |
| 2051 | CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF), |
| 2052 | CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF), |
| 2053 | CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF), |
| 2054 | CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF), |
| 2055 | CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF), |
| 2056 | CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF), |
| 2057 | CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF), |
| 2058 | CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF), |
| 2059 | CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF), |
| 2060 | CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF), |
| 2061 | CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 2062 | CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF), |
Matt Wagantall | d86d683 | 2011-08-17 14:06:55 -0700 | [diff] [blame] | 2063 | CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF), |
Matt Wagantall | c120529 | 2011-08-11 17:19:31 -0700 | [diff] [blame] | 2064 | CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 2065 | CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF), |
| 2066 | CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF), |
| 2067 | CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF), |
| 2068 | CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF), |
| 2069 | CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 2070 | CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 2071 | CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 2072 | CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF), |
| 2073 | CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF), |
| 2074 | CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF), |
| 2075 | CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF), |
| 2076 | CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF), |
| 2077 | CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF), |
| 2078 | CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF), |
| 2079 | CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 2080 | CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF), |
| 2081 | CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 2082 | CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF), |
| 2083 | CLK_DUMMY("iface_clk", GSBI2_P_CLK, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2084 | "msm_serial_hsl.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 2085 | CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 2086 | CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 2087 | CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 2088 | CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 2089 | CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF), |
| 2090 | CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF), |
| 2091 | CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF), |
| 2092 | CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF), |
| 2093 | CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF), |
| 2094 | CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF), |
| 2095 | CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 2096 | CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 2097 | CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF), |
| 2098 | CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF), |
| 2099 | CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 2100 | CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF), |
| 2101 | CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF), |
| 2102 | CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF), |
| 2103 | CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF), |
| 2104 | CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 2105 | CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF), |
| 2106 | CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 2107 | CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF), |
| 2108 | CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF), |
| 2109 | CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF), |
| 2110 | CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF), |
| 2111 | CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2112 | CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF), |
| 2113 | CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF), |
| 2114 | CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF), |
| 2115 | CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF), |
| 2116 | CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF), |
| 2117 | CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF), |
| 2118 | CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF), |
| 2119 | CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF), |
| 2120 | CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF), |
| 2121 | CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF), |
| 2122 | CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF), |
| 2123 | CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF), |
| 2124 | CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF), |
| 2125 | CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF), |
| 2126 | CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 2127 | CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF), |
| 2128 | CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF), |
| 2129 | CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2130 | CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 2131 | CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 2132 | CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2133 | CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF), |
| 2134 | CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF), |
| 2135 | CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 2136 | CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2137 | CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF), |
| 2138 | CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF), |
| 2139 | CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 2140 | CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2141 | CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF), |
| 2142 | CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF), |
| 2143 | CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF), |
| 2144 | CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF), |
| 2145 | CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF), |
| 2146 | CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF), |
| 2147 | CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF), |
| 2148 | CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF), |
| 2149 | CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 2150 | CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2151 | CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF), |
| 2152 | CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF), |
| 2153 | CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF), |
| 2154 | CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF), |
| 2155 | CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF), |
| 2156 | CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF), |
| 2157 | CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF), |
| 2158 | CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF), |
| 2159 | CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF), |
| 2160 | CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 2161 | CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF), |
| 2162 | CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF), |
| 2163 | CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2164 | CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF), |
| 2165 | CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF), |
| 2166 | CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF), |
| 2167 | CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 2168 | CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2169 | CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF), |
Matt Wagantall | e604d71 | 2011-10-21 15:38:18 -0700 | [diff] [blame] | 2170 | CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 2171 | CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2172 | CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF), |
| 2173 | CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF), |
| 2174 | CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF), |
| 2175 | CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF), |
| 2176 | CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF), |
| 2177 | CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF), |
| 2178 | CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF), |
| 2179 | CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF), |
| 2180 | CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF), |
| 2181 | CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF), |
| 2182 | CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 2183 | CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 2184 | CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 2185 | CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 2186 | CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF), |
Matt Wagantall | e604d71 | 2011-10-21 15:38:18 -0700 | [diff] [blame] | 2187 | CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0), |
| 2188 | CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0), |
| 2189 | CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0), |
| 2190 | CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0), |
| 2191 | CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0), |
| 2192 | CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2193 | |
| 2194 | CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 2195 | CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 2196 | CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0), |
| 2197 | CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0), |
| 2198 | CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0), |
| 2199 | CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0), |
| 2200 | CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2201 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 2202 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
| 2203 | }; |
| 2204 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 2205 | struct clock_init_data msm8960_dummy_clock_init_data __initdata = { |
| 2206 | .table = msm_clocks_8960_dummy, |
| 2207 | .size = ARRAY_SIZE(msm_clocks_8960_dummy), |
| 2208 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2209 | |
| 2210 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 2211 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
Sagar Dharia | cc96945 | 2011-09-19 10:34:30 -0600 | [diff] [blame] | 2212 | #define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2213 | /* Board info for the slimbus slave device */ |
| 2214 | static struct resource slimbus_res[] = { |
| 2215 | { |
| 2216 | .start = LPASS_SLIMBUS_PHYS, |
| 2217 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 2218 | .flags = IORESOURCE_MEM, |
| 2219 | .name = "slimbus_physical", |
| 2220 | }, |
| 2221 | { |
| 2222 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 2223 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 2224 | .flags = IORESOURCE_MEM, |
| 2225 | .name = "slimbus_bam_physical", |
| 2226 | }, |
| 2227 | { |
Sagar Dharia | cc96945 | 2011-09-19 10:34:30 -0600 | [diff] [blame] | 2228 | .start = LPASS_SLIMBUS_SLEW, |
| 2229 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 2230 | .flags = IORESOURCE_MEM, |
| 2231 | .name = "slimbus_slew_reg", |
| 2232 | }, |
| 2233 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2234 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 2235 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 2236 | .flags = IORESOURCE_IRQ, |
| 2237 | .name = "slimbus_irq", |
| 2238 | }, |
| 2239 | { |
| 2240 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 2241 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 2242 | .flags = IORESOURCE_IRQ, |
| 2243 | .name = "slimbus_bam_irq", |
| 2244 | }, |
| 2245 | }; |
| 2246 | |
| 2247 | struct platform_device msm_slim_ctrl = { |
| 2248 | .name = "msm_slim_ctrl", |
| 2249 | .id = 1, |
| 2250 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 2251 | .resource = slimbus_res, |
| 2252 | .dev = { |
| 2253 | .coherent_dma_mask = 0xffffffffULL, |
| 2254 | }, |
| 2255 | }; |
| 2256 | |
| 2257 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2258 | static struct msm_bus_vectors grp3d_init_vectors[] = { |
| 2259 | { |
| 2260 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2261 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2262 | .ab = 0, |
| 2263 | .ib = 0, |
| 2264 | }, |
| 2265 | }; |
| 2266 | |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2267 | static struct msm_bus_vectors grp3d_low_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2268 | { |
| 2269 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2270 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2271 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2272 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2273 | }, |
| 2274 | }; |
| 2275 | |
| 2276 | static struct msm_bus_vectors grp3d_nominal_low_vectors[] = { |
| 2277 | { |
| 2278 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2279 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2280 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2281 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2282 | }, |
| 2283 | }; |
| 2284 | |
| 2285 | static struct msm_bus_vectors grp3d_nominal_high_vectors[] = { |
| 2286 | { |
| 2287 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2288 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2289 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2290 | .ib = KGSL_CONVERT_TO_MBPS(2656), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2291 | }, |
| 2292 | }; |
| 2293 | |
| 2294 | static struct msm_bus_vectors grp3d_max_vectors[] = { |
| 2295 | { |
| 2296 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2297 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2298 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2299 | .ib = KGSL_CONVERT_TO_MBPS(3968), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2300 | }, |
| 2301 | }; |
| 2302 | |
| 2303 | static struct msm_bus_paths grp3d_bus_scale_usecases[] = { |
| 2304 | { |
| 2305 | ARRAY_SIZE(grp3d_init_vectors), |
| 2306 | grp3d_init_vectors, |
| 2307 | }, |
| 2308 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2309 | ARRAY_SIZE(grp3d_low_vectors), |
| 2310 | grp3d_low_vectors, |
| 2311 | }, |
| 2312 | { |
| 2313 | ARRAY_SIZE(grp3d_nominal_low_vectors), |
| 2314 | grp3d_nominal_low_vectors, |
| 2315 | }, |
| 2316 | { |
| 2317 | ARRAY_SIZE(grp3d_nominal_high_vectors), |
| 2318 | grp3d_nominal_high_vectors, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2319 | }, |
| 2320 | { |
| 2321 | ARRAY_SIZE(grp3d_max_vectors), |
| 2322 | grp3d_max_vectors, |
| 2323 | }, |
| 2324 | }; |
| 2325 | |
| 2326 | static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = { |
| 2327 | grp3d_bus_scale_usecases, |
| 2328 | ARRAY_SIZE(grp3d_bus_scale_usecases), |
| 2329 | .name = "grp3d", |
| 2330 | }; |
| 2331 | |
| 2332 | static struct msm_bus_vectors grp2d0_init_vectors[] = { |
| 2333 | { |
| 2334 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2335 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2336 | .ab = 0, |
| 2337 | .ib = 0, |
| 2338 | }, |
| 2339 | }; |
| 2340 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2341 | static struct msm_bus_vectors grp2d0_nominal_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2342 | { |
| 2343 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2344 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2345 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2346 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2347 | }, |
| 2348 | }; |
| 2349 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2350 | static struct msm_bus_vectors grp2d0_max_vectors[] = { |
| 2351 | { |
| 2352 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2353 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2354 | .ab = 0, |
| 2355 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
| 2356 | }, |
| 2357 | }; |
| 2358 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2359 | static struct msm_bus_paths grp2d0_bus_scale_usecases[] = { |
| 2360 | { |
| 2361 | ARRAY_SIZE(grp2d0_init_vectors), |
| 2362 | grp2d0_init_vectors, |
| 2363 | }, |
| 2364 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2365 | ARRAY_SIZE(grp2d0_nominal_vectors), |
| 2366 | grp2d0_nominal_vectors, |
| 2367 | }, |
| 2368 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2369 | ARRAY_SIZE(grp2d0_max_vectors), |
| 2370 | grp2d0_max_vectors, |
| 2371 | }, |
| 2372 | }; |
| 2373 | |
| 2374 | struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = { |
| 2375 | grp2d0_bus_scale_usecases, |
| 2376 | ARRAY_SIZE(grp2d0_bus_scale_usecases), |
| 2377 | .name = "grp2d0", |
| 2378 | }; |
| 2379 | |
| 2380 | static struct msm_bus_vectors grp2d1_init_vectors[] = { |
| 2381 | { |
| 2382 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2383 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2384 | .ab = 0, |
| 2385 | .ib = 0, |
| 2386 | }, |
| 2387 | }; |
| 2388 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2389 | static struct msm_bus_vectors grp2d1_nominal_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2390 | { |
| 2391 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2392 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2393 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2394 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2395 | }, |
| 2396 | }; |
| 2397 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2398 | static struct msm_bus_vectors grp2d1_max_vectors[] = { |
| 2399 | { |
| 2400 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2401 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2402 | .ab = 0, |
| 2403 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
| 2404 | }, |
| 2405 | }; |
| 2406 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2407 | static struct msm_bus_paths grp2d1_bus_scale_usecases[] = { |
| 2408 | { |
| 2409 | ARRAY_SIZE(grp2d1_init_vectors), |
| 2410 | grp2d1_init_vectors, |
| 2411 | }, |
| 2412 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2413 | ARRAY_SIZE(grp2d1_nominal_vectors), |
| 2414 | grp2d1_nominal_vectors, |
| 2415 | }, |
| 2416 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2417 | ARRAY_SIZE(grp2d1_max_vectors), |
| 2418 | grp2d1_max_vectors, |
| 2419 | }, |
| 2420 | }; |
| 2421 | |
| 2422 | struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = { |
| 2423 | grp2d1_bus_scale_usecases, |
| 2424 | ARRAY_SIZE(grp2d1_bus_scale_usecases), |
| 2425 | .name = "grp2d1", |
| 2426 | }; |
| 2427 | #endif |
| 2428 | |
| 2429 | static struct resource kgsl_3d0_resources[] = { |
| 2430 | { |
| 2431 | .name = KGSL_3D0_REG_MEMORY, |
| 2432 | .start = 0x04300000, /* GFX3D address */ |
| 2433 | .end = 0x0431ffff, |
| 2434 | .flags = IORESOURCE_MEM, |
| 2435 | }, |
| 2436 | { |
| 2437 | .name = KGSL_3D0_IRQ, |
| 2438 | .start = GFX3D_IRQ, |
| 2439 | .end = GFX3D_IRQ, |
| 2440 | .flags = IORESOURCE_IRQ, |
| 2441 | }, |
| 2442 | }; |
| 2443 | |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2444 | static const char *kgsl_3d0_iommu_ctx_names[] = { |
| 2445 | "gfx3d_user", |
| 2446 | /* priv_ctx goes here */ |
| 2447 | }; |
| 2448 | |
| 2449 | static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = { |
| 2450 | { |
| 2451 | .iommu_ctx_names = kgsl_3d0_iommu_ctx_names, |
| 2452 | .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctx_names), |
| 2453 | .physstart = 0x07C00000, |
| 2454 | .physend = 0x07C00000 + SZ_1M - 1, |
| 2455 | }, |
| 2456 | }; |
| 2457 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2458 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2459 | .pwrlevel = { |
| 2460 | { |
| 2461 | .gpu_freq = 400000000, |
| 2462 | .bus_freq = 4, |
| 2463 | .io_fraction = 0, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2464 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2465 | { |
| 2466 | .gpu_freq = 300000000, |
| 2467 | .bus_freq = 3, |
| 2468 | .io_fraction = 33, |
| 2469 | }, |
| 2470 | { |
| 2471 | .gpu_freq = 200000000, |
| 2472 | .bus_freq = 2, |
| 2473 | .io_fraction = 100, |
| 2474 | }, |
| 2475 | { |
| 2476 | .gpu_freq = 128000000, |
| 2477 | .bus_freq = 1, |
| 2478 | .io_fraction = 100, |
| 2479 | }, |
| 2480 | { |
| 2481 | .gpu_freq = 27000000, |
| 2482 | .bus_freq = 0, |
| 2483 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2484 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2485 | .init_level = 0, |
| 2486 | .num_levels = 5, |
| 2487 | .set_grp_async = NULL, |
Lucille Sylvester | 93650bb | 2011-11-02 14:37:10 -0700 | [diff] [blame] | 2488 | .idle_timeout = HZ/20, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2489 | .nap_allowed = true, |
| 2490 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2491 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2492 | .bus_scale_table = &grp3d_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2493 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2494 | .iommu_data = kgsl_3d0_iommu_data, |
| 2495 | .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2496 | }; |
| 2497 | |
| 2498 | struct platform_device msm_kgsl_3d0 = { |
| 2499 | .name = "kgsl-3d0", |
| 2500 | .id = 0, |
| 2501 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 2502 | .resource = kgsl_3d0_resources, |
| 2503 | .dev = { |
| 2504 | .platform_data = &kgsl_3d0_pdata, |
| 2505 | }, |
| 2506 | }; |
| 2507 | |
| 2508 | static struct resource kgsl_2d0_resources[] = { |
| 2509 | { |
| 2510 | .name = KGSL_2D0_REG_MEMORY, |
| 2511 | .start = 0x04100000, /* Z180 base address */ |
| 2512 | .end = 0x04100FFF, |
| 2513 | .flags = IORESOURCE_MEM, |
| 2514 | }, |
| 2515 | { |
| 2516 | .name = KGSL_2D0_IRQ, |
| 2517 | .start = GFX2D0_IRQ, |
| 2518 | .end = GFX2D0_IRQ, |
| 2519 | .flags = IORESOURCE_IRQ, |
| 2520 | }, |
| 2521 | }; |
| 2522 | |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2523 | static const char *kgsl_2d0_iommu_ctx_names[] = { |
| 2524 | "gfx2d0_2d0", |
| 2525 | }; |
| 2526 | |
| 2527 | static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = { |
| 2528 | { |
| 2529 | .iommu_ctx_names = kgsl_2d0_iommu_ctx_names, |
| 2530 | .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctx_names), |
| 2531 | .physstart = 0x07D00000, |
| 2532 | .physend = 0x07D00000 + SZ_1M - 1, |
| 2533 | }, |
| 2534 | }; |
| 2535 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2536 | static struct kgsl_device_platform_data kgsl_2d0_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2537 | .pwrlevel = { |
| 2538 | { |
| 2539 | .gpu_freq = 200000000, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2540 | .bus_freq = 2, |
| 2541 | }, |
| 2542 | { |
| 2543 | .gpu_freq = 96000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2544 | .bus_freq = 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2545 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2546 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2547 | .gpu_freq = 27000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2548 | .bus_freq = 0, |
| 2549 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2550 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2551 | .init_level = 0, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2552 | .num_levels = 3, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2553 | .set_grp_async = NULL, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2554 | .idle_timeout = HZ/5, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2555 | .nap_allowed = true, |
| 2556 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2557 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2558 | .bus_scale_table = &grp2d0_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2559 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2560 | .iommu_data = kgsl_2d0_iommu_data, |
| 2561 | .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2562 | }; |
| 2563 | |
| 2564 | struct platform_device msm_kgsl_2d0 = { |
| 2565 | .name = "kgsl-2d0", |
| 2566 | .id = 0, |
| 2567 | .num_resources = ARRAY_SIZE(kgsl_2d0_resources), |
| 2568 | .resource = kgsl_2d0_resources, |
| 2569 | .dev = { |
| 2570 | .platform_data = &kgsl_2d0_pdata, |
| 2571 | }, |
| 2572 | }; |
| 2573 | |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2574 | static const char *kgsl_2d1_iommu_ctx_names[] = { |
Jeremy Gebben | 5c4c113 | 2012-02-27 11:26:49 -0700 | [diff] [blame] | 2575 | "gfx2d1_2d1", |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2576 | }; |
| 2577 | |
| 2578 | static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = { |
| 2579 | { |
| 2580 | .iommu_ctx_names = kgsl_2d1_iommu_ctx_names, |
| 2581 | .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctx_names), |
| 2582 | .physstart = 0x07E00000, |
| 2583 | .physend = 0x07E00000 + SZ_1M - 1, |
| 2584 | }, |
| 2585 | }; |
| 2586 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2587 | static struct resource kgsl_2d1_resources[] = { |
| 2588 | { |
| 2589 | .name = KGSL_2D1_REG_MEMORY, |
| 2590 | .start = 0x04200000, /* Z180 device 1 base address */ |
| 2591 | .end = 0x04200FFF, |
| 2592 | .flags = IORESOURCE_MEM, |
| 2593 | }, |
| 2594 | { |
| 2595 | .name = KGSL_2D1_IRQ, |
| 2596 | .start = GFX2D1_IRQ, |
| 2597 | .end = GFX2D1_IRQ, |
| 2598 | .flags = IORESOURCE_IRQ, |
| 2599 | }, |
| 2600 | }; |
| 2601 | |
| 2602 | static struct kgsl_device_platform_data kgsl_2d1_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2603 | .pwrlevel = { |
| 2604 | { |
| 2605 | .gpu_freq = 200000000, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2606 | .bus_freq = 2, |
| 2607 | }, |
| 2608 | { |
| 2609 | .gpu_freq = 96000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2610 | .bus_freq = 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2611 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2612 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2613 | .gpu_freq = 27000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2614 | .bus_freq = 0, |
| 2615 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2616 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2617 | .init_level = 0, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2618 | .num_levels = 3, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2619 | .set_grp_async = NULL, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2620 | .idle_timeout = HZ/5, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2621 | .nap_allowed = true, |
| 2622 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2623 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2624 | .bus_scale_table = &grp2d1_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2625 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2626 | .iommu_data = kgsl_2d1_iommu_data, |
| 2627 | .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2628 | }; |
| 2629 | |
| 2630 | struct platform_device msm_kgsl_2d1 = { |
| 2631 | .name = "kgsl-2d1", |
| 2632 | .id = 1, |
| 2633 | .num_resources = ARRAY_SIZE(kgsl_2d1_resources), |
| 2634 | .resource = kgsl_2d1_resources, |
| 2635 | .dev = { |
| 2636 | .platform_data = &kgsl_2d1_pdata, |
| 2637 | }, |
| 2638 | }; |
| 2639 | |
| 2640 | #ifdef CONFIG_MSM_GEMINI |
| 2641 | static struct resource msm_gemini_resources[] = { |
| 2642 | { |
| 2643 | .start = 0x04600000, |
| 2644 | .end = 0x04600000 + SZ_1M - 1, |
| 2645 | .flags = IORESOURCE_MEM, |
| 2646 | }, |
| 2647 | { |
| 2648 | .start = JPEG_IRQ, |
| 2649 | .end = JPEG_IRQ, |
| 2650 | .flags = IORESOURCE_IRQ, |
| 2651 | }, |
| 2652 | }; |
| 2653 | |
| 2654 | struct platform_device msm8960_gemini_device = { |
| 2655 | .name = "msm_gemini", |
| 2656 | .resource = msm_gemini_resources, |
| 2657 | .num_resources = ARRAY_SIZE(msm_gemini_resources), |
| 2658 | }; |
| 2659 | #endif |
| 2660 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2661 | struct msm_rpm_platform_data msm8960_rpm_data __initdata = { |
| 2662 | .reg_base_addrs = { |
| 2663 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 2664 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 2665 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 2666 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 2667 | }, |
| 2668 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 2669 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 2670 | .ipc_rpm_val = 4, |
| 2671 | .target_id = { |
| 2672 | MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 2673 | MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 2674 | MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8), |
| 2675 | MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 2676 | MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 2677 | MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1), |
| 2678 | MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1), |
| 2679 | MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1), |
| 2680 | MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 2681 | MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 2682 | MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 2683 | MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 2684 | MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1), |
| 2685 | MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1), |
| 2686 | MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1), |
| 2687 | MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1), |
| 2688 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0, |
| 2689 | APPS_FABRIC_CFG_HALT, 2), |
| 2690 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0, |
| 2691 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 2692 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL, |
| 2693 | APPS_FABRIC_CFG_IOCTL, 1), |
| 2694 | MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 2695 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0, |
| 2696 | SYS_FABRIC_CFG_HALT, 2), |
| 2697 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0, |
| 2698 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 2699 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL, |
| 2700 | SYS_FABRIC_CFG_IOCTL, 1), |
| 2701 | MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0, |
| 2702 | SYSTEM_FABRIC_ARB, 29), |
| 2703 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0, |
| 2704 | MMSS_FABRIC_CFG_HALT, 2), |
| 2705 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0, |
| 2706 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 2707 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL, |
| 2708 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 2709 | MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23), |
| 2710 | MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2), |
| 2711 | MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2), |
| 2712 | MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2), |
| 2713 | MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2), |
| 2714 | MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2), |
| 2715 | MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2), |
| 2716 | MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2), |
| 2717 | MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2), |
| 2718 | MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2), |
| 2719 | MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2), |
| 2720 | MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2), |
| 2721 | MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2), |
| 2722 | MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2), |
| 2723 | MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2), |
| 2724 | MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2), |
| 2725 | MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2), |
| 2726 | MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2), |
| 2727 | MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2), |
| 2728 | MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2), |
| 2729 | MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2), |
| 2730 | MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2), |
| 2731 | MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2), |
| 2732 | MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2), |
| 2733 | MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2), |
| 2734 | MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2), |
| 2735 | MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2), |
| 2736 | MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2), |
| 2737 | MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2), |
| 2738 | MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2), |
| 2739 | MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2), |
| 2740 | MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2), |
| 2741 | MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2), |
| 2742 | MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2), |
| 2743 | MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2), |
| 2744 | MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2), |
| 2745 | MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2), |
| 2746 | MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2), |
| 2747 | MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 2748 | MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 2749 | MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1), |
| 2750 | MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1), |
| 2751 | MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1), |
| 2752 | MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1), |
| 2753 | MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1), |
| 2754 | MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1), |
| 2755 | MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1), |
| 2756 | MSM_RPM_MAP(8960, NCP_0, NCP, 2), |
| 2757 | MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 2758 | MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 2759 | MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 2760 | MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2), |
| 2761 | MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1), |
| 2762 | }, |
| 2763 | .target_status = { |
| 2764 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR), |
| 2765 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR), |
| 2766 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD), |
| 2767 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0), |
| 2768 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1), |
| 2769 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2), |
| 2770 | MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0), |
| 2771 | MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE), |
| 2772 | MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL), |
| 2773 | MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK), |
| 2774 | MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK), |
| 2775 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK), |
| 2776 | MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK), |
| 2777 | MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK), |
| 2778 | MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK), |
| 2779 | MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK), |
| 2780 | MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK), |
| 2781 | MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK), |
| 2782 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK), |
| 2783 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT), |
| 2784 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD), |
| 2785 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL), |
| 2786 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB), |
| 2787 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT), |
| 2788 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD), |
| 2789 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL), |
| 2790 | MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB), |
| 2791 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT), |
| 2792 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD), |
| 2793 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL), |
| 2794 | MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB), |
| 2795 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0), |
| 2796 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1), |
| 2797 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0), |
| 2798 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1), |
| 2799 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0), |
| 2800 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1), |
| 2801 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0), |
| 2802 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1), |
| 2803 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0), |
| 2804 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1), |
| 2805 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0), |
| 2806 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1), |
| 2807 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0), |
| 2808 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1), |
| 2809 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0), |
| 2810 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1), |
| 2811 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0), |
| 2812 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1), |
| 2813 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0), |
| 2814 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1), |
| 2815 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0), |
| 2816 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1), |
| 2817 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0), |
| 2818 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1), |
| 2819 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0), |
| 2820 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1), |
| 2821 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0), |
| 2822 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1), |
| 2823 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0), |
| 2824 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1), |
| 2825 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0), |
| 2826 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1), |
| 2827 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0), |
| 2828 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1), |
| 2829 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0), |
| 2830 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1), |
| 2831 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0), |
| 2832 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1), |
| 2833 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0), |
| 2834 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1), |
| 2835 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0), |
| 2836 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1), |
| 2837 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0), |
| 2838 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1), |
| 2839 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0), |
| 2840 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1), |
| 2841 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0), |
| 2842 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1), |
| 2843 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0), |
| 2844 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1), |
| 2845 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0), |
| 2846 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1), |
| 2847 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0), |
| 2848 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1), |
| 2849 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0), |
| 2850 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1), |
| 2851 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0), |
| 2852 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1), |
| 2853 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0), |
| 2854 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1), |
| 2855 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0), |
| 2856 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1), |
| 2857 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0), |
| 2858 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1), |
| 2859 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0), |
| 2860 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1), |
| 2861 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0), |
| 2862 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1), |
| 2863 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0), |
| 2864 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1), |
| 2865 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0), |
| 2866 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1), |
| 2867 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0), |
| 2868 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1), |
| 2869 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0), |
| 2870 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1), |
| 2871 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0), |
| 2872 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1), |
| 2873 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1), |
| 2874 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2), |
| 2875 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3), |
| 2876 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4), |
| 2877 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5), |
| 2878 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6), |
| 2879 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7), |
| 2880 | MSM_RPM_STATUS_ID_MAP(8960, NCP_0), |
| 2881 | MSM_RPM_STATUS_ID_MAP(8960, NCP_1), |
| 2882 | MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS), |
| 2883 | MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH), |
| 2884 | MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH), |
| 2885 | MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0), |
| 2886 | MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1), |
| 2887 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE), |
| 2888 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE), |
| 2889 | }, |
| 2890 | .target_ctrl_id = { |
| 2891 | MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR), |
| 2892 | MSM_RPM_CTRL_MAP(8960, VERSION_MINOR), |
| 2893 | MSM_RPM_CTRL_MAP(8960, VERSION_BUILD), |
| 2894 | MSM_RPM_CTRL_MAP(8960, REQ_CTX_0), |
| 2895 | MSM_RPM_CTRL_MAP(8960, REQ_SEL_0), |
| 2896 | MSM_RPM_CTRL_MAP(8960, ACK_CTX_0), |
| 2897 | MSM_RPM_CTRL_MAP(8960, ACK_SEL_0), |
| 2898 | }, |
| 2899 | .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE, |
| 2900 | .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION, |
| 2901 | .sel_last = MSM_RPM_8960_SEL_LAST, |
| 2902 | .ver = {3, 0, 0}, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2903 | }; |
Praveen Chidambaram | 8985b01 | 2011-12-16 13:38:59 -0700 | [diff] [blame] | 2904 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2905 | struct platform_device msm8960_rpm_device = { |
Maheshkumar Sivasubramanian | 9c8cdc9 | 2011-09-12 14:11:30 -0600 | [diff] [blame] | 2906 | .name = "msm_rpm", |
| 2907 | .id = -1, |
| 2908 | }; |
| 2909 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2910 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 2911 | .phys_addr_base = 0x0010C000, |
| 2912 | .reg_offsets = { |
| 2913 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 2914 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 2915 | }, |
| 2916 | .phys_size = SZ_8K, |
| 2917 | .log_len = 4096, /* log's buffer length in bytes */ |
| 2918 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 2919 | }; |
| 2920 | |
| 2921 | struct platform_device msm8960_rpm_log_device = { |
| 2922 | .name = "msm_rpm_log", |
| 2923 | .id = -1, |
| 2924 | .dev = { |
| 2925 | .platform_data = &msm_rpm_log_pdata, |
| 2926 | }, |
| 2927 | }; |
| 2928 | |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 2929 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 2930 | .phys_addr_base = 0x0010D204, |
| 2931 | .phys_size = SZ_8K, |
| 2932 | }; |
| 2933 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2934 | struct platform_device msm8960_rpm_stat_device = { |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 2935 | .name = "msm_rpm_stat", |
| 2936 | .id = -1, |
| 2937 | .dev = { |
| 2938 | .platform_data = &msm_rpm_stat_pdata, |
| 2939 | }, |
| 2940 | }; |
Maheshkumar Sivasubramanian | 9c8cdc9 | 2011-09-12 14:11:30 -0600 | [diff] [blame] | 2941 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2942 | struct platform_device msm_bus_sys_fabric = { |
| 2943 | .name = "msm_bus_fabric", |
| 2944 | .id = MSM_BUS_FAB_SYSTEM, |
| 2945 | }; |
| 2946 | struct platform_device msm_bus_apps_fabric = { |
| 2947 | .name = "msm_bus_fabric", |
| 2948 | .id = MSM_BUS_FAB_APPSS, |
| 2949 | }; |
| 2950 | struct platform_device msm_bus_mm_fabric = { |
| 2951 | .name = "msm_bus_fabric", |
| 2952 | .id = MSM_BUS_FAB_MMSS, |
| 2953 | }; |
| 2954 | struct platform_device msm_bus_sys_fpb = { |
| 2955 | .name = "msm_bus_fabric", |
| 2956 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 2957 | }; |
| 2958 | struct platform_device msm_bus_cpss_fpb = { |
| 2959 | .name = "msm_bus_fabric", |
| 2960 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 2961 | }; |
| 2962 | |
| 2963 | /* Sensors DSPS platform data */ |
| 2964 | #ifdef CONFIG_MSM_DSPS |
| 2965 | |
| 2966 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 2967 | |
| 2968 | static struct dsps_clk_info dsps_clks[] = {}; |
| 2969 | static struct dsps_regulator_info dsps_regs[] = {}; |
| 2970 | |
| 2971 | /* |
| 2972 | * Note: GPIOs field is intialized in run-time at the function |
| 2973 | * msm8960_init_dsps(). |
| 2974 | */ |
| 2975 | |
| 2976 | struct msm_dsps_platform_data msm_dsps_pdata = { |
| 2977 | .clks = dsps_clks, |
| 2978 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 2979 | .gpios = NULL, |
| 2980 | .gpios_num = 0, |
| 2981 | .regs = dsps_regs, |
| 2982 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 2983 | .dsps_pwr_ctl_en = 1, |
| 2984 | .signature = DSPS_SIGNATURE, |
| 2985 | }; |
| 2986 | |
| 2987 | static struct resource msm_dsps_resources[] = { |
| 2988 | { |
| 2989 | .start = PPSS_REG_PHYS_BASE, |
| 2990 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 2991 | .name = "ppss_reg", |
| 2992 | .flags = IORESOURCE_MEM, |
| 2993 | }, |
Wentao Xu | a55500b | 2011-08-16 18:15:04 -0400 | [diff] [blame] | 2994 | |
| 2995 | { |
| 2996 | .start = PPSS_WDOG_TIMER_IRQ, |
| 2997 | .end = PPSS_WDOG_TIMER_IRQ, |
| 2998 | .name = "ppss_wdog", |
| 2999 | .flags = IORESOURCE_IRQ, |
| 3000 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3001 | }; |
| 3002 | |
| 3003 | struct platform_device msm_dsps_device = { |
| 3004 | .name = "msm_dsps", |
| 3005 | .id = 0, |
| 3006 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 3007 | .resource = msm_dsps_resources, |
| 3008 | .dev.platform_data = &msm_dsps_pdata, |
| 3009 | }; |
| 3010 | |
| 3011 | #endif /* CONFIG_MSM_DSPS */ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3012 | |
| 3013 | #ifdef CONFIG_MSM_QDSS |
| 3014 | |
| 3015 | #define MSM_QDSS_PHYS_BASE 0x01A00000 |
| 3016 | #define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000) |
| 3017 | #define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000) |
| 3018 | #define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000) |
| 3019 | #define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000) |
| 3020 | |
| 3021 | static struct resource msm_etb_resources[] = { |
| 3022 | { |
| 3023 | .start = MSM_ETB_PHYS_BASE, |
| 3024 | .end = MSM_ETB_PHYS_BASE + SZ_4K - 1, |
| 3025 | .flags = IORESOURCE_MEM, |
| 3026 | }, |
| 3027 | }; |
| 3028 | |
| 3029 | struct platform_device msm_etb_device = { |
| 3030 | .name = "msm_etb", |
| 3031 | .id = 0, |
| 3032 | .num_resources = ARRAY_SIZE(msm_etb_resources), |
| 3033 | .resource = msm_etb_resources, |
| 3034 | }; |
| 3035 | |
| 3036 | static struct resource msm_tpiu_resources[] = { |
| 3037 | { |
| 3038 | .start = MSM_TPIU_PHYS_BASE, |
| 3039 | .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1, |
| 3040 | .flags = IORESOURCE_MEM, |
| 3041 | }, |
| 3042 | }; |
| 3043 | |
| 3044 | struct platform_device msm_tpiu_device = { |
| 3045 | .name = "msm_tpiu", |
| 3046 | .id = 0, |
| 3047 | .num_resources = ARRAY_SIZE(msm_tpiu_resources), |
| 3048 | .resource = msm_tpiu_resources, |
| 3049 | }; |
| 3050 | |
| 3051 | static struct resource msm_funnel_resources[] = { |
| 3052 | { |
| 3053 | .start = MSM_FUNNEL_PHYS_BASE, |
| 3054 | .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1, |
| 3055 | .flags = IORESOURCE_MEM, |
| 3056 | }, |
| 3057 | }; |
| 3058 | |
| 3059 | struct platform_device msm_funnel_device = { |
| 3060 | .name = "msm_funnel", |
| 3061 | .id = 0, |
| 3062 | .num_resources = ARRAY_SIZE(msm_funnel_resources), |
| 3063 | .resource = msm_funnel_resources, |
| 3064 | }; |
| 3065 | |
| 3066 | static struct resource msm_ptm_resources[] = { |
| 3067 | { |
| 3068 | .start = MSM_PTM_PHYS_BASE, |
| 3069 | .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1, |
| 3070 | .flags = IORESOURCE_MEM, |
| 3071 | }, |
| 3072 | }; |
| 3073 | |
| 3074 | struct platform_device msm_ptm_device = { |
| 3075 | .name = "msm_ptm", |
| 3076 | .id = 0, |
| 3077 | .num_resources = ARRAY_SIZE(msm_ptm_resources), |
| 3078 | .resource = msm_ptm_resources, |
| 3079 | }; |
| 3080 | |
| 3081 | #endif |