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