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> |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 34 | #include <mach/msm_dcvs.h> |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 35 | #include <mach/msm_rtb.h> |
Laura Abbott | 2ae8f36 | 2012-04-12 11:03:04 -0700 | [diff] [blame] | 36 | #include <mach/msm_cache_dump.h> |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 37 | #include <sound/msm-dai-q6.h> |
| 38 | #include <sound/apr_audio.h> |
Joel Nider | a126194 | 2011-09-12 16:30:09 +0300 | [diff] [blame] | 39 | #include <mach/msm_tsif.h> |
Pratik Patel | 1403f2a | 2012-03-21 10:10:00 -0700 | [diff] [blame] | 40 | #include <mach/qdss.h> |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 41 | #include <mach/msm_serial_hs_lite.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 42 | #include "clock.h" |
| 43 | #include "devices.h" |
| 44 | #include "devices-msm8x60.h" |
| 45 | #include "footswitch.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 46 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 47 | #include "rpm_log.h" |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 48 | #include "rpm_stats.h" |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 49 | #include "pil-q6v4.h" |
| 50 | #include "scm-pas.h" |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 51 | #include <mach/msm_dcvs.h> |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 52 | #include <mach/iommu_domains.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 53 | |
| 54 | #ifdef CONFIG_MSM_MPM |
Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 55 | #include <mach/mpm.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 56 | #endif |
| 57 | #ifdef CONFIG_MSM_DSPS |
| 58 | #include <mach/msm_dsps.h> |
| 59 | #endif |
| 60 | |
| 61 | |
| 62 | /* Address of GSBI blocks */ |
| 63 | #define MSM_GSBI1_PHYS 0x16000000 |
| 64 | #define MSM_GSBI2_PHYS 0x16100000 |
| 65 | #define MSM_GSBI3_PHYS 0x16200000 |
| 66 | #define MSM_GSBI4_PHYS 0x16300000 |
| 67 | #define MSM_GSBI5_PHYS 0x16400000 |
| 68 | #define MSM_GSBI6_PHYS 0x16500000 |
| 69 | #define MSM_GSBI7_PHYS 0x16600000 |
| 70 | #define MSM_GSBI8_PHYS 0x1A000000 |
| 71 | #define MSM_GSBI9_PHYS 0x1A100000 |
| 72 | #define MSM_GSBI10_PHYS 0x1A200000 |
| 73 | #define MSM_GSBI11_PHYS 0x12440000 |
| 74 | #define MSM_GSBI12_PHYS 0x12480000 |
| 75 | |
| 76 | #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000) |
| 77 | #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000) |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 78 | #define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 79 | #define MSM_UART8DM_PHYS (MSM_GSBI8_PHYS + 0x40000) |
Mayank Rana | e009c92 | 2012-03-22 03:02:06 +0530 | [diff] [blame] | 80 | #define MSM_UART9DM_PHYS (MSM_GSBI9_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 81 | |
| 82 | /* GSBI QUP devices */ |
| 83 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000) |
| 84 | #define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000) |
| 85 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 86 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 87 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 88 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 89 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 90 | #define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000) |
| 91 | #define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000) |
| 92 | #define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000) |
| 93 | #define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000) |
| 94 | #define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000) |
| 95 | #define MSM_QUP_SIZE SZ_4K |
| 96 | |
| 97 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 98 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 99 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
| 100 | |
Stepan Moskovchenko | be5b45a | 2011-10-17 19:33:34 -0700 | [diff] [blame] | 101 | #define MSM8960_HSUSB_PHYS 0x12500000 |
| 102 | #define MSM8960_HSUSB_SIZE SZ_4K |
| 103 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 104 | static struct resource resources_otg[] = { |
| 105 | { |
| 106 | .start = MSM8960_HSUSB_PHYS, |
| 107 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 108 | .flags = IORESOURCE_MEM, |
| 109 | }, |
| 110 | { |
| 111 | .start = USB1_HS_IRQ, |
| 112 | .end = USB1_HS_IRQ, |
| 113 | .flags = IORESOURCE_IRQ, |
| 114 | }, |
| 115 | }; |
| 116 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 117 | struct platform_device msm8960_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 118 | .name = "msm_otg", |
| 119 | .id = -1, |
| 120 | .num_resources = ARRAY_SIZE(resources_otg), |
| 121 | .resource = resources_otg, |
| 122 | .dev = { |
| 123 | .coherent_dma_mask = 0xffffffff, |
| 124 | }, |
| 125 | }; |
| 126 | |
| 127 | static struct resource resources_hsusb[] = { |
| 128 | { |
| 129 | .start = MSM8960_HSUSB_PHYS, |
| 130 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 131 | .flags = IORESOURCE_MEM, |
| 132 | }, |
| 133 | { |
| 134 | .start = USB1_HS_IRQ, |
| 135 | .end = USB1_HS_IRQ, |
| 136 | .flags = IORESOURCE_IRQ, |
| 137 | }, |
| 138 | }; |
| 139 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 140 | struct platform_device msm8960_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 141 | .name = "msm_hsusb", |
| 142 | .id = -1, |
| 143 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 144 | .resource = resources_hsusb, |
| 145 | .dev = { |
| 146 | .coherent_dma_mask = 0xffffffff, |
| 147 | }, |
| 148 | }; |
| 149 | |
| 150 | static struct resource resources_hsusb_host[] = { |
| 151 | { |
| 152 | .start = MSM8960_HSUSB_PHYS, |
| 153 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1, |
| 154 | .flags = IORESOURCE_MEM, |
| 155 | }, |
| 156 | { |
| 157 | .start = USB1_HS_IRQ, |
| 158 | .end = USB1_HS_IRQ, |
| 159 | .flags = IORESOURCE_IRQ, |
| 160 | }, |
| 161 | }; |
| 162 | |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 163 | static u64 dma_mask = DMA_BIT_MASK(32); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 164 | struct platform_device msm_device_hsusb_host = { |
| 165 | .name = "msm_hsusb_host", |
| 166 | .id = -1, |
| 167 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 168 | .resource = resources_hsusb_host, |
| 169 | .dev = { |
| 170 | .dma_mask = &dma_mask, |
| 171 | .coherent_dma_mask = 0xffffffff, |
| 172 | }, |
| 173 | }; |
| 174 | |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 175 | static struct resource resources_hsic_host[] = { |
| 176 | { |
Stepan Moskovchenko | 8e06ae6 | 2011-10-17 18:01:29 -0700 | [diff] [blame] | 177 | .start = 0x12520000, |
| 178 | .end = 0x12520000 + SZ_4K - 1, |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 179 | .flags = IORESOURCE_MEM, |
| 180 | }, |
| 181 | { |
| 182 | .start = USB_HSIC_IRQ, |
| 183 | .end = USB_HSIC_IRQ, |
| 184 | .flags = IORESOURCE_IRQ, |
| 185 | }, |
Vamsi Krishna | 34f0158 | 2011-12-14 19:54:42 -0800 | [diff] [blame] | 186 | { |
| 187 | .start = MSM_GPIO_TO_INT(69), |
| 188 | .end = MSM_GPIO_TO_INT(69), |
| 189 | .name = "peripheral_status_irq", |
| 190 | .flags = IORESOURCE_IRQ, |
| 191 | }, |
Vijayavardhan Vennapusa | eb56648 | 2011-09-18 07:48:37 +0530 | [diff] [blame] | 192 | }; |
| 193 | |
| 194 | struct platform_device msm_device_hsic_host = { |
| 195 | .name = "msm_hsic_host", |
| 196 | .id = -1, |
| 197 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 198 | .resource = resources_hsic_host, |
| 199 | .dev = { |
| 200 | .dma_mask = &dma_mask, |
| 201 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 202 | }, |
| 203 | }; |
| 204 | |
Mona Hossain | 11c03ac | 2011-10-26 12:42:10 -0700 | [diff] [blame] | 205 | #define SHARED_IMEM_TZ_BASE 0x2a03f720 |
| 206 | static struct resource tzlog_resources[] = { |
| 207 | { |
| 208 | .start = SHARED_IMEM_TZ_BASE, |
| 209 | .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1, |
| 210 | .flags = IORESOURCE_MEM, |
| 211 | }, |
| 212 | }; |
| 213 | |
| 214 | struct platform_device msm_device_tz_log = { |
| 215 | .name = "tz_log", |
| 216 | .id = 0, |
| 217 | .num_resources = ARRAY_SIZE(tzlog_resources), |
| 218 | .resource = tzlog_resources, |
| 219 | }; |
| 220 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 221 | static struct resource resources_uart_gsbi2[] = { |
| 222 | { |
| 223 | .start = MSM8960_GSBI2_UARTDM_IRQ, |
| 224 | .end = MSM8960_GSBI2_UARTDM_IRQ, |
| 225 | .flags = IORESOURCE_IRQ, |
| 226 | }, |
| 227 | { |
| 228 | .start = MSM_UART2DM_PHYS, |
| 229 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 230 | .name = "uartdm_resource", |
| 231 | .flags = IORESOURCE_MEM, |
| 232 | }, |
| 233 | { |
| 234 | .start = MSM_GSBI2_PHYS, |
| 235 | .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1, |
| 236 | .name = "gsbi_resource", |
| 237 | .flags = IORESOURCE_MEM, |
| 238 | }, |
| 239 | }; |
| 240 | |
| 241 | struct platform_device msm8960_device_uart_gsbi2 = { |
| 242 | .name = "msm_serial_hsl", |
| 243 | .id = 0, |
| 244 | .num_resources = ARRAY_SIZE(resources_uart_gsbi2), |
| 245 | .resource = resources_uart_gsbi2, |
| 246 | }; |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 247 | /* GSBI 6 used into UARTDM Mode */ |
| 248 | static struct resource msm_uart_dm6_resources[] = { |
| 249 | { |
| 250 | .start = MSM_UART6DM_PHYS, |
| 251 | .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1, |
| 252 | .name = "uartdm_resource", |
| 253 | .flags = IORESOURCE_MEM, |
| 254 | }, |
| 255 | { |
| 256 | .start = GSBI6_UARTDM_IRQ, |
| 257 | .end = GSBI6_UARTDM_IRQ, |
| 258 | .flags = IORESOURCE_IRQ, |
| 259 | }, |
| 260 | { |
| 261 | .start = MSM_GSBI6_PHYS, |
| 262 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 263 | .name = "gsbi_resource", |
| 264 | .flags = IORESOURCE_MEM, |
| 265 | }, |
| 266 | { |
| 267 | .start = DMOV_HSUART_GSBI6_TX_CHAN, |
| 268 | .end = DMOV_HSUART_GSBI6_RX_CHAN, |
| 269 | .name = "uartdm_channels", |
| 270 | .flags = IORESOURCE_DMA, |
| 271 | }, |
| 272 | { |
| 273 | .start = DMOV_HSUART_GSBI6_TX_CRCI, |
| 274 | .end = DMOV_HSUART_GSBI6_RX_CRCI, |
| 275 | .name = "uartdm_crci", |
| 276 | .flags = IORESOURCE_DMA, |
| 277 | }, |
| 278 | }; |
| 279 | static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32); |
| 280 | struct platform_device msm_device_uart_dm6 = { |
| 281 | .name = "msm_serial_hs", |
| 282 | .id = 0, |
| 283 | .num_resources = ARRAY_SIZE(msm_uart_dm6_resources), |
| 284 | .resource = msm_uart_dm6_resources, |
| 285 | .dev = { |
| 286 | .dma_mask = &msm_uart_dm6_dma_mask, |
| 287 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 288 | }, |
| 289 | }; |
Mayank Rana | e009c92 | 2012-03-22 03:02:06 +0530 | [diff] [blame] | 290 | /* |
| 291 | * GSBI 9 used into UARTDM Mode |
| 292 | * For 8960 Fusion 2.2 Primary IPC |
| 293 | */ |
| 294 | static struct resource msm_uart_dm9_resources[] = { |
| 295 | { |
| 296 | .start = MSM_UART9DM_PHYS, |
| 297 | .end = MSM_UART9DM_PHYS + PAGE_SIZE - 1, |
| 298 | .name = "uartdm_resource", |
| 299 | .flags = IORESOURCE_MEM, |
| 300 | }, |
| 301 | { |
| 302 | .start = GSBI9_UARTDM_IRQ, |
| 303 | .end = GSBI9_UARTDM_IRQ, |
| 304 | .flags = IORESOURCE_IRQ, |
| 305 | }, |
| 306 | { |
| 307 | .start = MSM_GSBI9_PHYS, |
| 308 | .end = MSM_GSBI9_PHYS + 4 - 1, |
| 309 | .name = "gsbi_resource", |
| 310 | .flags = IORESOURCE_MEM, |
| 311 | }, |
| 312 | { |
| 313 | .start = DMOV_HSUART_GSBI9_TX_CHAN, |
| 314 | .end = DMOV_HSUART_GSBI9_RX_CHAN, |
| 315 | .name = "uartdm_channels", |
| 316 | .flags = IORESOURCE_DMA, |
| 317 | }, |
| 318 | { |
| 319 | .start = DMOV_HSUART_GSBI9_TX_CRCI, |
| 320 | .end = DMOV_HSUART_GSBI9_RX_CRCI, |
| 321 | .name = "uartdm_crci", |
| 322 | .flags = IORESOURCE_DMA, |
| 323 | }, |
| 324 | }; |
| 325 | static u64 msm_uart_dm9_dma_mask = DMA_BIT_MASK(32); |
| 326 | struct platform_device msm_device_uart_dm9 = { |
| 327 | .name = "msm_serial_hs", |
| 328 | .id = 1, |
| 329 | .num_resources = ARRAY_SIZE(msm_uart_dm9_resources), |
| 330 | .resource = msm_uart_dm9_resources, |
| 331 | .dev = { |
| 332 | .dma_mask = &msm_uart_dm9_dma_mask, |
| 333 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 334 | }, |
| 335 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 336 | |
| 337 | static struct resource resources_uart_gsbi5[] = { |
| 338 | { |
| 339 | .start = GSBI5_UARTDM_IRQ, |
| 340 | .end = GSBI5_UARTDM_IRQ, |
| 341 | .flags = IORESOURCE_IRQ, |
| 342 | }, |
| 343 | { |
| 344 | .start = MSM_UART5DM_PHYS, |
| 345 | .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1, |
| 346 | .name = "uartdm_resource", |
| 347 | .flags = IORESOURCE_MEM, |
| 348 | }, |
| 349 | { |
| 350 | .start = MSM_GSBI5_PHYS, |
| 351 | .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1, |
| 352 | .name = "gsbi_resource", |
| 353 | .flags = IORESOURCE_MEM, |
| 354 | }, |
| 355 | }; |
| 356 | |
| 357 | struct platform_device msm8960_device_uart_gsbi5 = { |
| 358 | .name = "msm_serial_hsl", |
| 359 | .id = 0, |
| 360 | .num_resources = ARRAY_SIZE(resources_uart_gsbi5), |
| 361 | .resource = resources_uart_gsbi5, |
| 362 | }; |
Stepan Moskovchenko | 2b4b1cd | 2012-03-29 18:21:04 -0700 | [diff] [blame] | 363 | |
| 364 | static struct msm_serial_hslite_platform_data uart_gsbi8_pdata = { |
| 365 | .line = 0, |
| 366 | }; |
| 367 | |
| 368 | static struct resource resources_uart_gsbi8[] = { |
| 369 | { |
| 370 | .start = GSBI8_UARTDM_IRQ, |
| 371 | .end = GSBI8_UARTDM_IRQ, |
| 372 | .flags = IORESOURCE_IRQ, |
| 373 | }, |
| 374 | { |
| 375 | .start = MSM_UART8DM_PHYS, |
| 376 | .end = MSM_UART8DM_PHYS + PAGE_SIZE - 1, |
| 377 | .name = "uartdm_resource", |
| 378 | .flags = IORESOURCE_MEM, |
| 379 | }, |
| 380 | { |
| 381 | .start = MSM_GSBI8_PHYS, |
| 382 | .end = MSM_GSBI8_PHYS + PAGE_SIZE - 1, |
| 383 | .name = "gsbi_resource", |
| 384 | .flags = IORESOURCE_MEM, |
| 385 | }, |
| 386 | }; |
| 387 | |
| 388 | struct platform_device msm8960_device_uart_gsbi8 = { |
| 389 | .name = "msm_serial_hsl", |
| 390 | .id = 1, |
| 391 | .num_resources = ARRAY_SIZE(resources_uart_gsbi8), |
| 392 | .resource = resources_uart_gsbi8, |
| 393 | .dev.platform_data = &uart_gsbi8_pdata, |
| 394 | }; |
| 395 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 396 | /* MSM Video core device */ |
| 397 | #ifdef CONFIG_MSM_BUS_SCALING |
| 398 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 399 | { |
| 400 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 401 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 402 | .ab = 0, |
| 403 | .ib = 0, |
| 404 | }, |
| 405 | { |
| 406 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 407 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 408 | .ab = 0, |
| 409 | .ib = 0, |
| 410 | }, |
| 411 | { |
| 412 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 413 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 414 | .ab = 0, |
| 415 | .ib = 0, |
| 416 | }, |
| 417 | { |
| 418 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 419 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 420 | .ab = 0, |
| 421 | .ib = 0, |
| 422 | }, |
| 423 | }; |
| 424 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 425 | { |
| 426 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 427 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 428 | .ab = 54525952, |
| 429 | .ib = 436207616, |
| 430 | }, |
| 431 | { |
| 432 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 433 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 434 | .ab = 72351744, |
| 435 | .ib = 289406976, |
| 436 | }, |
| 437 | { |
| 438 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 439 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 440 | .ab = 500000, |
| 441 | .ib = 1000000, |
| 442 | }, |
| 443 | { |
| 444 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 445 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 446 | .ab = 500000, |
| 447 | .ib = 1000000, |
| 448 | }, |
| 449 | }; |
| 450 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 451 | { |
| 452 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 453 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 454 | .ab = 40894464, |
| 455 | .ib = 327155712, |
| 456 | }, |
| 457 | { |
| 458 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 459 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 460 | .ab = 48234496, |
| 461 | .ib = 192937984, |
| 462 | }, |
| 463 | { |
| 464 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 465 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 466 | .ab = 500000, |
| 467 | .ib = 2000000, |
| 468 | }, |
| 469 | { |
| 470 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 471 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 472 | .ab = 500000, |
| 473 | .ib = 2000000, |
| 474 | }, |
| 475 | }; |
| 476 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 477 | { |
| 478 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 479 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 480 | .ab = 163577856, |
| 481 | .ib = 1308622848, |
| 482 | }, |
| 483 | { |
| 484 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 485 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 486 | .ab = 219152384, |
| 487 | .ib = 876609536, |
| 488 | }, |
| 489 | { |
| 490 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 491 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 492 | .ab = 1750000, |
| 493 | .ib = 3500000, |
| 494 | }, |
| 495 | { |
| 496 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 497 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 498 | .ab = 1750000, |
| 499 | .ib = 3500000, |
| 500 | }, |
| 501 | }; |
| 502 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 503 | { |
| 504 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 505 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 506 | .ab = 121634816, |
| 507 | .ib = 973078528, |
| 508 | }, |
| 509 | { |
| 510 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 511 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 512 | .ab = 155189248, |
| 513 | .ib = 620756992, |
| 514 | }, |
| 515 | { |
| 516 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 517 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 518 | .ab = 1750000, |
| 519 | .ib = 7000000, |
| 520 | }, |
| 521 | { |
| 522 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 523 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 524 | .ab = 1750000, |
| 525 | .ib = 7000000, |
| 526 | }, |
| 527 | }; |
| 528 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 529 | { |
| 530 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 531 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 532 | .ab = 372244480, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 533 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 534 | }, |
| 535 | { |
| 536 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 537 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 538 | .ab = 501219328, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 539 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 540 | }, |
| 541 | { |
| 542 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 543 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 544 | .ab = 2500000, |
| 545 | .ib = 5000000, |
| 546 | }, |
| 547 | { |
| 548 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 549 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 550 | .ab = 2500000, |
| 551 | .ib = 5000000, |
| 552 | }, |
| 553 | }; |
| 554 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 555 | { |
| 556 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 557 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 558 | .ab = 222298112, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 559 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 560 | }, |
| 561 | { |
| 562 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 563 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 564 | .ab = 330301440, |
Gopikrishnaiah Anandan | 3e6bdda | 2011-11-04 16:05:04 -0700 | [diff] [blame] | 565 | .ib = 2560000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 566 | }, |
| 567 | { |
| 568 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 569 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 570 | .ab = 2500000, |
| 571 | .ib = 700000000, |
| 572 | }, |
| 573 | { |
| 574 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 575 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 576 | .ab = 2500000, |
| 577 | .ib = 10000000, |
| 578 | }, |
| 579 | }; |
Deva Ramasubramanian | 837ae36 | 2012-05-12 23:26:53 -0700 | [diff] [blame] | 580 | static struct msm_bus_vectors vidc_venc_1080p_turbo_vectors[] = { |
| 581 | { |
| 582 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 583 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 584 | .ab = 222298112, |
| 585 | .ib = 3522000000U, |
| 586 | }, |
| 587 | { |
| 588 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 589 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 590 | .ab = 330301440, |
| 591 | .ib = 3522000000U, |
| 592 | }, |
| 593 | { |
| 594 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 595 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 596 | .ab = 2500000, |
| 597 | .ib = 700000000, |
| 598 | }, |
| 599 | { |
| 600 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 601 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 602 | .ab = 2500000, |
| 603 | .ib = 10000000, |
| 604 | }, |
| 605 | }; |
| 606 | static struct msm_bus_vectors vidc_vdec_1080p_turbo_vectors[] = { |
| 607 | { |
| 608 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 609 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 610 | .ab = 222298112, |
| 611 | .ib = 3522000000U, |
| 612 | }, |
| 613 | { |
| 614 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 615 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 616 | .ab = 330301440, |
| 617 | .ib = 3522000000U, |
| 618 | }, |
| 619 | { |
| 620 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 621 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 622 | .ab = 2500000, |
| 623 | .ib = 700000000, |
| 624 | }, |
| 625 | { |
| 626 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 627 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 628 | .ab = 2500000, |
| 629 | .ib = 10000000, |
| 630 | }, |
| 631 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 632 | |
| 633 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 634 | { |
| 635 | ARRAY_SIZE(vidc_init_vectors), |
| 636 | vidc_init_vectors, |
| 637 | }, |
| 638 | { |
| 639 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 640 | vidc_venc_vga_vectors, |
| 641 | }, |
| 642 | { |
| 643 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 644 | vidc_vdec_vga_vectors, |
| 645 | }, |
| 646 | { |
| 647 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 648 | vidc_venc_720p_vectors, |
| 649 | }, |
| 650 | { |
| 651 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 652 | vidc_vdec_720p_vectors, |
| 653 | }, |
| 654 | { |
| 655 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 656 | vidc_venc_1080p_vectors, |
| 657 | }, |
| 658 | { |
| 659 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 660 | vidc_vdec_1080p_vectors, |
| 661 | }, |
Deva Ramasubramanian | 837ae36 | 2012-05-12 23:26:53 -0700 | [diff] [blame] | 662 | { |
| 663 | ARRAY_SIZE(vidc_venc_1080p_turbo_vectors), |
| 664 | vidc_vdec_1080p_turbo_vectors, |
| 665 | }, |
| 666 | { |
| 667 | ARRAY_SIZE(vidc_vdec_1080p_turbo_vectors), |
| 668 | vidc_vdec_1080p_turbo_vectors, |
| 669 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 670 | }; |
| 671 | |
| 672 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 673 | vidc_bus_client_config, |
| 674 | ARRAY_SIZE(vidc_bus_client_config), |
| 675 | .name = "vidc", |
| 676 | }; |
| 677 | #endif |
| 678 | |
Mona Hossain | 9c430e3 | 2011-07-27 11:04:47 -0700 | [diff] [blame] | 679 | #ifdef CONFIG_HW_RANDOM_MSM |
| 680 | /* PRNG device */ |
| 681 | #define MSM_PRNG_PHYS 0x1A500000 |
| 682 | static struct resource rng_resources = { |
| 683 | .flags = IORESOURCE_MEM, |
| 684 | .start = MSM_PRNG_PHYS, |
| 685 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 686 | }; |
| 687 | |
| 688 | struct platform_device msm_device_rng = { |
| 689 | .name = "msm_rng", |
| 690 | .id = 0, |
| 691 | .num_resources = 1, |
| 692 | .resource = &rng_resources, |
| 693 | }; |
| 694 | #endif |
| 695 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 696 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 697 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 698 | |
| 699 | static struct resource msm_device_vidc_resources[] = { |
| 700 | { |
| 701 | .start = MSM_VIDC_BASE_PHYS, |
| 702 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 703 | .flags = IORESOURCE_MEM, |
| 704 | }, |
| 705 | { |
| 706 | .start = VCODEC_IRQ, |
| 707 | .end = VCODEC_IRQ, |
| 708 | .flags = IORESOURCE_IRQ, |
| 709 | }, |
| 710 | }; |
| 711 | |
| 712 | struct msm_vidc_platform_data vidc_platform_data = { |
| 713 | #ifdef CONFIG_MSM_BUS_SCALING |
| 714 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 715 | #endif |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 716 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
Olav Haugan | b5be799 | 2011-11-18 14:29:02 -0800 | [diff] [blame] | 717 | .memtype = ION_CP_MM_HEAP_ID, |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 718 | .enable_ion = 1, |
Deepak kotur | 5f10b27 | 2012-03-15 22:01:39 -0700 | [diff] [blame] | 719 | .cp_enabled = 1, |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 720 | #else |
Deepak Kotur | 12301a7 | 2011-11-09 18:30:29 -0800 | [diff] [blame] | 721 | .memtype = MEMTYPE_EBI1, |
Deepak Kotur | cb4f672 | 2011-10-31 14:06:57 -0700 | [diff] [blame] | 722 | .enable_ion = 0, |
| 723 | #endif |
Deepika Pepakayala | bebc762 | 2011-12-01 15:13:43 -0800 | [diff] [blame] | 724 | .disable_dmx = 0, |
Rajeshwar Kurapaty | c155c35 | 2011-12-17 06:35:32 +0530 | [diff] [blame] | 725 | .disable_fullhd = 0, |
Mohan Kumar Gubbihalli Lachma Naik | ed9dc91 | 2012-03-01 19:11:14 -0800 | [diff] [blame] | 726 | .cont_mode_dpb_count = 18, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 727 | }; |
| 728 | |
| 729 | struct platform_device msm_device_vidc = { |
| 730 | .name = "msm_vidc", |
| 731 | .id = 0, |
| 732 | .num_resources = ARRAY_SIZE(msm_device_vidc_resources), |
| 733 | .resource = msm_device_vidc_resources, |
| 734 | .dev = { |
| 735 | .platform_data = &vidc_platform_data, |
| 736 | }, |
| 737 | }; |
| 738 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 739 | #define MSM_SDC1_BASE 0x12400000 |
| 740 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 741 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 742 | #define MSM_SDC2_BASE 0x12140000 |
| 743 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 744 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 745 | #define MSM_SDC3_BASE 0x12180000 |
| 746 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 747 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 748 | #define MSM_SDC4_BASE 0x121C0000 |
| 749 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 750 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 751 | #define MSM_SDC5_BASE 0x12200000 |
| 752 | #define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800) |
| 753 | #define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000) |
| 754 | |
| 755 | static struct resource resources_sdc1[] = { |
| 756 | { |
| 757 | .name = "core_mem", |
| 758 | .flags = IORESOURCE_MEM, |
| 759 | .start = MSM_SDC1_BASE, |
| 760 | .end = MSM_SDC1_DML_BASE - 1, |
| 761 | }, |
| 762 | { |
| 763 | .name = "core_irq", |
| 764 | .flags = IORESOURCE_IRQ, |
| 765 | .start = SDC1_IRQ_0, |
| 766 | .end = SDC1_IRQ_0 |
| 767 | }, |
| 768 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 769 | { |
| 770 | .name = "sdcc_dml_addr", |
| 771 | .start = MSM_SDC1_DML_BASE, |
| 772 | .end = MSM_SDC1_BAM_BASE - 1, |
| 773 | .flags = IORESOURCE_MEM, |
| 774 | }, |
| 775 | { |
| 776 | .name = "sdcc_bam_addr", |
| 777 | .start = MSM_SDC1_BAM_BASE, |
| 778 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 779 | .flags = IORESOURCE_MEM, |
| 780 | }, |
| 781 | { |
| 782 | .name = "sdcc_bam_irq", |
| 783 | .start = SDC1_BAM_IRQ, |
| 784 | .end = SDC1_BAM_IRQ, |
| 785 | .flags = IORESOURCE_IRQ, |
| 786 | }, |
| 787 | #endif |
| 788 | }; |
| 789 | |
| 790 | static struct resource resources_sdc2[] = { |
| 791 | { |
| 792 | .name = "core_mem", |
| 793 | .flags = IORESOURCE_MEM, |
| 794 | .start = MSM_SDC2_BASE, |
| 795 | .end = MSM_SDC2_DML_BASE - 1, |
| 796 | }, |
| 797 | { |
| 798 | .name = "core_irq", |
| 799 | .flags = IORESOURCE_IRQ, |
| 800 | .start = SDC2_IRQ_0, |
| 801 | .end = SDC2_IRQ_0 |
| 802 | }, |
| 803 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 804 | { |
| 805 | .name = "sdcc_dml_addr", |
| 806 | .start = MSM_SDC2_DML_BASE, |
| 807 | .end = MSM_SDC2_BAM_BASE - 1, |
| 808 | .flags = IORESOURCE_MEM, |
| 809 | }, |
| 810 | { |
| 811 | .name = "sdcc_bam_addr", |
| 812 | .start = MSM_SDC2_BAM_BASE, |
| 813 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 814 | .flags = IORESOURCE_MEM, |
| 815 | }, |
| 816 | { |
| 817 | .name = "sdcc_bam_irq", |
| 818 | .start = SDC2_BAM_IRQ, |
| 819 | .end = SDC2_BAM_IRQ, |
| 820 | .flags = IORESOURCE_IRQ, |
| 821 | }, |
| 822 | #endif |
| 823 | }; |
| 824 | |
| 825 | static struct resource resources_sdc3[] = { |
| 826 | { |
| 827 | .name = "core_mem", |
| 828 | .flags = IORESOURCE_MEM, |
| 829 | .start = MSM_SDC3_BASE, |
| 830 | .end = MSM_SDC3_DML_BASE - 1, |
| 831 | }, |
| 832 | { |
| 833 | .name = "core_irq", |
| 834 | .flags = IORESOURCE_IRQ, |
| 835 | .start = SDC3_IRQ_0, |
| 836 | .end = SDC3_IRQ_0 |
| 837 | }, |
| 838 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 839 | { |
| 840 | .name = "sdcc_dml_addr", |
| 841 | .start = MSM_SDC3_DML_BASE, |
| 842 | .end = MSM_SDC3_BAM_BASE - 1, |
| 843 | .flags = IORESOURCE_MEM, |
| 844 | }, |
| 845 | { |
| 846 | .name = "sdcc_bam_addr", |
| 847 | .start = MSM_SDC3_BAM_BASE, |
| 848 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 849 | .flags = IORESOURCE_MEM, |
| 850 | }, |
| 851 | { |
| 852 | .name = "sdcc_bam_irq", |
| 853 | .start = SDC3_BAM_IRQ, |
| 854 | .end = SDC3_BAM_IRQ, |
| 855 | .flags = IORESOURCE_IRQ, |
| 856 | }, |
| 857 | #endif |
| 858 | }; |
| 859 | |
| 860 | static struct resource resources_sdc4[] = { |
| 861 | { |
| 862 | .name = "core_mem", |
| 863 | .flags = IORESOURCE_MEM, |
| 864 | .start = MSM_SDC4_BASE, |
| 865 | .end = MSM_SDC4_DML_BASE - 1, |
| 866 | }, |
| 867 | { |
| 868 | .name = "core_irq", |
| 869 | .flags = IORESOURCE_IRQ, |
| 870 | .start = SDC4_IRQ_0, |
| 871 | .end = SDC4_IRQ_0 |
| 872 | }, |
| 873 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 874 | { |
| 875 | .name = "sdcc_dml_addr", |
| 876 | .start = MSM_SDC4_DML_BASE, |
| 877 | .end = MSM_SDC4_BAM_BASE - 1, |
| 878 | .flags = IORESOURCE_MEM, |
| 879 | }, |
| 880 | { |
| 881 | .name = "sdcc_bam_addr", |
| 882 | .start = MSM_SDC4_BAM_BASE, |
| 883 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 884 | .flags = IORESOURCE_MEM, |
| 885 | }, |
| 886 | { |
| 887 | .name = "sdcc_bam_irq", |
| 888 | .start = SDC4_BAM_IRQ, |
| 889 | .end = SDC4_BAM_IRQ, |
| 890 | .flags = IORESOURCE_IRQ, |
| 891 | }, |
| 892 | #endif |
| 893 | }; |
| 894 | |
| 895 | static struct resource resources_sdc5[] = { |
| 896 | { |
| 897 | .name = "core_mem", |
| 898 | .flags = IORESOURCE_MEM, |
| 899 | .start = MSM_SDC5_BASE, |
| 900 | .end = MSM_SDC5_DML_BASE - 1, |
| 901 | }, |
| 902 | { |
| 903 | .name = "core_irq", |
| 904 | .flags = IORESOURCE_IRQ, |
| 905 | .start = SDC5_IRQ_0, |
| 906 | .end = SDC5_IRQ_0 |
| 907 | }, |
| 908 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 909 | { |
| 910 | .name = "sdcc_dml_addr", |
| 911 | .start = MSM_SDC5_DML_BASE, |
| 912 | .end = MSM_SDC5_BAM_BASE - 1, |
| 913 | .flags = IORESOURCE_MEM, |
| 914 | }, |
| 915 | { |
| 916 | .name = "sdcc_bam_addr", |
| 917 | .start = MSM_SDC5_BAM_BASE, |
| 918 | .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1, |
| 919 | .flags = IORESOURCE_MEM, |
| 920 | }, |
| 921 | { |
| 922 | .name = "sdcc_bam_irq", |
| 923 | .start = SDC5_BAM_IRQ, |
| 924 | .end = SDC5_BAM_IRQ, |
| 925 | .flags = IORESOURCE_IRQ, |
| 926 | }, |
| 927 | #endif |
| 928 | }; |
| 929 | |
| 930 | struct platform_device msm_device_sdc1 = { |
| 931 | .name = "msm_sdcc", |
| 932 | .id = 1, |
| 933 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 934 | .resource = resources_sdc1, |
| 935 | .dev = { |
| 936 | .coherent_dma_mask = 0xffffffff, |
| 937 | }, |
| 938 | }; |
| 939 | |
| 940 | struct platform_device msm_device_sdc2 = { |
| 941 | .name = "msm_sdcc", |
| 942 | .id = 2, |
| 943 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 944 | .resource = resources_sdc2, |
| 945 | .dev = { |
| 946 | .coherent_dma_mask = 0xffffffff, |
| 947 | }, |
| 948 | }; |
| 949 | |
| 950 | struct platform_device msm_device_sdc3 = { |
| 951 | .name = "msm_sdcc", |
| 952 | .id = 3, |
| 953 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 954 | .resource = resources_sdc3, |
| 955 | .dev = { |
| 956 | .coherent_dma_mask = 0xffffffff, |
| 957 | }, |
| 958 | }; |
| 959 | |
| 960 | struct platform_device msm_device_sdc4 = { |
| 961 | .name = "msm_sdcc", |
| 962 | .id = 4, |
| 963 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 964 | .resource = resources_sdc4, |
| 965 | .dev = { |
| 966 | .coherent_dma_mask = 0xffffffff, |
| 967 | }, |
| 968 | }; |
| 969 | |
| 970 | struct platform_device msm_device_sdc5 = { |
| 971 | .name = "msm_sdcc", |
| 972 | .id = 5, |
| 973 | .num_resources = ARRAY_SIZE(resources_sdc5), |
| 974 | .resource = resources_sdc5, |
| 975 | .dev = { |
| 976 | .coherent_dma_mask = 0xffffffff, |
| 977 | }, |
| 978 | }; |
| 979 | |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 980 | #define MSM_LPASS_QDSP6SS_PHYS 0x28800000 |
| 981 | #define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0) |
| 982 | |
| 983 | static struct resource msm_8960_q6_lpass_resources[] = { |
| 984 | { |
| 985 | .start = MSM_LPASS_QDSP6SS_PHYS, |
| 986 | .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1, |
| 987 | .flags = IORESOURCE_MEM, |
| 988 | }, |
| 989 | }; |
| 990 | |
| 991 | static struct pil_q6v4_pdata msm_8960_q6_lpass_data = { |
| 992 | .strap_tcm_base = 0x01460000, |
| 993 | .strap_ahb_upper = 0x00290000, |
| 994 | .strap_ahb_lower = 0x00000280, |
| 995 | .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL, |
| 996 | .name = "q6", |
| 997 | .pas_id = PAS_Q6, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 998 | .bus_port = MSM_BUS_MASTER_LPASS_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 999 | }; |
| 1000 | |
| 1001 | struct platform_device msm_8960_q6_lpass = { |
| 1002 | .name = "pil_qdsp6v4", |
| 1003 | .id = 0, |
| 1004 | .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources), |
| 1005 | .resource = msm_8960_q6_lpass_resources, |
| 1006 | .dev.platform_data = &msm_8960_q6_lpass_data, |
| 1007 | }; |
| 1008 | |
| 1009 | #define MSM_MSS_ENABLE_PHYS 0x08B00000 |
| 1010 | #define MSM_FW_QDSP6SS_PHYS 0x08800000 |
| 1011 | #define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C) |
| 1012 | #define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044) |
| 1013 | |
| 1014 | static struct resource msm_8960_q6_mss_fw_resources[] = { |
| 1015 | { |
| 1016 | .start = MSM_FW_QDSP6SS_PHYS, |
| 1017 | .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1, |
| 1018 | .flags = IORESOURCE_MEM, |
| 1019 | }, |
| 1020 | { |
| 1021 | .start = MSM_MSS_ENABLE_PHYS, |
| 1022 | .end = MSM_MSS_ENABLE_PHYS + 4 - 1, |
| 1023 | .flags = IORESOURCE_MEM, |
| 1024 | }, |
| 1025 | }; |
| 1026 | |
| 1027 | static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = { |
| 1028 | .strap_tcm_base = 0x00400000, |
| 1029 | .strap_ahb_upper = 0x00090000, |
| 1030 | .strap_ahb_lower = 0x00000080, |
| 1031 | .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL, |
| 1032 | .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL, |
| 1033 | .name = "modem_fw", |
| 1034 | .depends = "q6", |
| 1035 | .pas_id = PAS_MODEM_FW, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 1036 | .bus_port = MSM_BUS_MASTER_MSS_FW_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 1037 | }; |
| 1038 | |
| 1039 | struct platform_device msm_8960_q6_mss_fw = { |
| 1040 | .name = "pil_qdsp6v4", |
| 1041 | .id = 1, |
| 1042 | .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources), |
| 1043 | .resource = msm_8960_q6_mss_fw_resources, |
| 1044 | .dev.platform_data = &msm_8960_q6_mss_fw_data, |
| 1045 | }; |
| 1046 | |
| 1047 | #define MSM_SW_QDSP6SS_PHYS 0x08900000 |
| 1048 | #define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040) |
| 1049 | #define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68) |
| 1050 | |
| 1051 | static struct resource msm_8960_q6_mss_sw_resources[] = { |
| 1052 | { |
| 1053 | .start = MSM_SW_QDSP6SS_PHYS, |
| 1054 | .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1, |
| 1055 | .flags = IORESOURCE_MEM, |
| 1056 | }, |
| 1057 | { |
| 1058 | .start = MSM_MSS_ENABLE_PHYS, |
| 1059 | .end = MSM_MSS_ENABLE_PHYS + 4 - 1, |
| 1060 | .flags = IORESOURCE_MEM, |
| 1061 | }, |
| 1062 | }; |
| 1063 | |
| 1064 | static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = { |
| 1065 | .strap_tcm_base = 0x00420000, |
| 1066 | .strap_ahb_upper = 0x00090000, |
| 1067 | .strap_ahb_lower = 0x00000080, |
| 1068 | .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL, |
| 1069 | .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL, |
| 1070 | .name = "modem", |
| 1071 | .depends = "modem_fw", |
| 1072 | .pas_id = PAS_MODEM_SW, |
Matt Wagantall | 6e4aafb | 2011-09-09 17:53:54 -0700 | [diff] [blame] | 1073 | .bus_port = MSM_BUS_MASTER_MSS_SW_PROC, |
Stephen Boyd | eb81988 | 2011-08-29 14:46:30 -0700 | [diff] [blame] | 1074 | }; |
| 1075 | |
| 1076 | struct platform_device msm_8960_q6_mss_sw = { |
| 1077 | .name = "pil_qdsp6v4", |
| 1078 | .id = 2, |
| 1079 | .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources), |
| 1080 | .resource = msm_8960_q6_mss_sw_resources, |
| 1081 | .dev.platform_data = &msm_8960_q6_mss_sw_data, |
| 1082 | }; |
| 1083 | |
Stephen Boyd | 322a992 | 2011-09-20 01:05:54 -0700 | [diff] [blame] | 1084 | static struct resource msm_8960_riva_resources[] = { |
| 1085 | { |
| 1086 | .start = 0x03204000, |
| 1087 | .end = 0x03204000 + SZ_256 - 1, |
| 1088 | .flags = IORESOURCE_MEM, |
| 1089 | }, |
| 1090 | }; |
| 1091 | |
| 1092 | struct platform_device msm_8960_riva = { |
| 1093 | .name = "pil_riva", |
| 1094 | .id = -1, |
| 1095 | .num_resources = ARRAY_SIZE(msm_8960_riva_resources), |
| 1096 | .resource = msm_8960_riva_resources, |
| 1097 | }; |
| 1098 | |
Stephen Boyd | d89eebe | 2011-09-28 23:28:11 -0700 | [diff] [blame] | 1099 | struct platform_device msm_pil_tzapps = { |
| 1100 | .name = "pil_tzapps", |
| 1101 | .id = -1, |
| 1102 | }; |
| 1103 | |
Stephen Boyd | 25c4a0b | 2011-09-20 00:12:36 -0700 | [diff] [blame] | 1104 | struct platform_device msm_pil_dsps = { |
| 1105 | .name = "pil_dsps", |
| 1106 | .id = -1, |
| 1107 | .dev.platform_data = "dsps", |
| 1108 | }; |
| 1109 | |
Stephen Boyd | 7b973de | 2012-03-09 12:26:16 -0800 | [diff] [blame] | 1110 | struct platform_device msm_pil_vidc = { |
| 1111 | .name = "pil_vidc", |
| 1112 | .id = -1, |
| 1113 | }; |
| 1114 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1115 | static struct resource smd_resource[] = { |
| 1116 | { |
| 1117 | .name = "a9_m2a_0", |
| 1118 | .start = INT_A9_M2A_0, |
| 1119 | .flags = IORESOURCE_IRQ, |
| 1120 | }, |
| 1121 | { |
| 1122 | .name = "a9_m2a_5", |
| 1123 | .start = INT_A9_M2A_5, |
| 1124 | .flags = IORESOURCE_IRQ, |
| 1125 | }, |
| 1126 | { |
| 1127 | .name = "adsp_a11", |
| 1128 | .start = INT_ADSP_A11, |
| 1129 | .flags = IORESOURCE_IRQ, |
| 1130 | }, |
| 1131 | { |
| 1132 | .name = "adsp_a11_smsm", |
| 1133 | .start = INT_ADSP_A11_SMSM, |
| 1134 | .flags = IORESOURCE_IRQ, |
| 1135 | }, |
| 1136 | { |
| 1137 | .name = "dsps_a11", |
| 1138 | .start = INT_DSPS_A11, |
| 1139 | .flags = IORESOURCE_IRQ, |
| 1140 | }, |
| 1141 | { |
| 1142 | .name = "dsps_a11_smsm", |
| 1143 | .start = INT_DSPS_A11_SMSM, |
| 1144 | .flags = IORESOURCE_IRQ, |
| 1145 | }, |
| 1146 | { |
| 1147 | .name = "wcnss_a11", |
| 1148 | .start = INT_WCNSS_A11, |
| 1149 | .flags = IORESOURCE_IRQ, |
| 1150 | }, |
| 1151 | { |
| 1152 | .name = "wcnss_a11_smsm", |
| 1153 | .start = INT_WCNSS_A11_SMSM, |
| 1154 | .flags = IORESOURCE_IRQ, |
| 1155 | }, |
| 1156 | }; |
| 1157 | |
| 1158 | static struct smd_subsystem_config smd_config_list[] = { |
| 1159 | { |
| 1160 | .irq_config_id = SMD_MODEM, |
| 1161 | .subsys_name = "modem", |
| 1162 | .edge = SMD_APPS_MODEM, |
| 1163 | |
| 1164 | .smd_int.irq_name = "a9_m2a_0", |
| 1165 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1166 | .smd_int.irq_id = -1, |
| 1167 | .smd_int.device_name = "smd_dev", |
| 1168 | .smd_int.dev_id = 0, |
| 1169 | .smd_int.out_bit_pos = 1 << 3, |
| 1170 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1171 | .smd_int.out_offset = 0x8, |
| 1172 | |
| 1173 | .smsm_int.irq_name = "a9_m2a_5", |
| 1174 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1175 | .smsm_int.irq_id = -1, |
| 1176 | .smsm_int.device_name = "smd_smsm", |
| 1177 | .smsm_int.dev_id = 0, |
| 1178 | .smsm_int.out_bit_pos = 1 << 4, |
| 1179 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1180 | .smsm_int.out_offset = 0x8, |
| 1181 | }, |
| 1182 | { |
| 1183 | .irq_config_id = SMD_Q6, |
| 1184 | .subsys_name = "q6", |
| 1185 | .edge = SMD_APPS_QDSP, |
| 1186 | |
| 1187 | .smd_int.irq_name = "adsp_a11", |
| 1188 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1189 | .smd_int.irq_id = -1, |
| 1190 | .smd_int.device_name = "smd_dev", |
| 1191 | .smd_int.dev_id = 0, |
| 1192 | .smd_int.out_bit_pos = 1 << 15, |
| 1193 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1194 | .smd_int.out_offset = 0x8, |
| 1195 | |
| 1196 | .smsm_int.irq_name = "adsp_a11_smsm", |
| 1197 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1198 | .smsm_int.irq_id = -1, |
| 1199 | .smsm_int.device_name = "smd_smsm", |
| 1200 | .smsm_int.dev_id = 0, |
| 1201 | .smsm_int.out_bit_pos = 1 << 14, |
| 1202 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1203 | .smsm_int.out_offset = 0x8, |
| 1204 | }, |
| 1205 | { |
| 1206 | .irq_config_id = SMD_DSPS, |
| 1207 | .subsys_name = "dsps", |
| 1208 | .edge = SMD_APPS_DSPS, |
| 1209 | |
| 1210 | .smd_int.irq_name = "dsps_a11", |
| 1211 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1212 | .smd_int.irq_id = -1, |
| 1213 | .smd_int.device_name = "smd_dev", |
| 1214 | .smd_int.dev_id = 0, |
| 1215 | .smd_int.out_bit_pos = 1, |
| 1216 | .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1217 | .smd_int.out_offset = 0x4080, |
| 1218 | |
| 1219 | .smsm_int.irq_name = "dsps_a11_smsm", |
| 1220 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1221 | .smsm_int.irq_id = -1, |
| 1222 | .smsm_int.device_name = "smd_smsm", |
| 1223 | .smsm_int.dev_id = 0, |
| 1224 | .smsm_int.out_bit_pos = 1, |
| 1225 | .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1226 | .smsm_int.out_offset = 0x4094, |
| 1227 | }, |
| 1228 | { |
| 1229 | .irq_config_id = SMD_WCNSS, |
| 1230 | .subsys_name = "wcnss", |
| 1231 | .edge = SMD_APPS_WCNSS, |
| 1232 | |
| 1233 | .smd_int.irq_name = "wcnss_a11", |
| 1234 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1235 | .smd_int.irq_id = -1, |
| 1236 | .smd_int.device_name = "smd_dev", |
| 1237 | .smd_int.dev_id = 0, |
| 1238 | .smd_int.out_bit_pos = 1 << 25, |
| 1239 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1240 | .smd_int.out_offset = 0x8, |
| 1241 | |
| 1242 | .smsm_int.irq_name = "wcnss_a11_smsm", |
| 1243 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1244 | .smsm_int.irq_id = -1, |
| 1245 | .smsm_int.device_name = "smd_smsm", |
| 1246 | .smsm_int.dev_id = 0, |
| 1247 | .smsm_int.out_bit_pos = 1 << 23, |
| 1248 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1249 | .smsm_int.out_offset = 0x8, |
| 1250 | }, |
| 1251 | }; |
| 1252 | |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1253 | static struct smd_subsystem_restart_config smd_ssr_config = { |
| 1254 | .disable_smsm_reset_handshake = 1, |
| 1255 | }; |
| 1256 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1257 | static struct smd_platform smd_platform_data = { |
| 1258 | .num_ss_configs = ARRAY_SIZE(smd_config_list), |
| 1259 | .smd_ss_configs = smd_config_list, |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1260 | .smd_ssr_config = &smd_ssr_config, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1261 | }; |
| 1262 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1263 | struct platform_device msm_device_smd = { |
| 1264 | .name = "msm_smd", |
| 1265 | .id = -1, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1266 | .resource = smd_resource, |
| 1267 | .num_resources = ARRAY_SIZE(smd_resource), |
| 1268 | .dev = { |
| 1269 | .platform_data = &smd_platform_data, |
| 1270 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1271 | }; |
| 1272 | |
| 1273 | struct platform_device msm_device_bam_dmux = { |
| 1274 | .name = "BAM_RMNT", |
| 1275 | .id = -1, |
| 1276 | }; |
| 1277 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 1278 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 1279 | .pet_time = 10000, |
| 1280 | .bark_time = 11000, |
| 1281 | .has_secure = true, |
| 1282 | }; |
| 1283 | |
| 1284 | struct platform_device msm8960_device_watchdog = { |
| 1285 | .name = "msm_watchdog", |
| 1286 | .id = -1, |
| 1287 | .dev = { |
| 1288 | .platform_data = &msm_watchdog_pdata, |
| 1289 | }, |
| 1290 | }; |
| 1291 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 1292 | static struct resource msm_dmov_resource[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1293 | { |
| 1294 | .start = ADM_0_SCSS_1_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1295 | .flags = IORESOURCE_IRQ, |
| 1296 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1297 | { |
| 1298 | .start = 0x18320000, |
| 1299 | .end = 0x18320000 + SZ_1M - 1, |
| 1300 | .flags = IORESOURCE_MEM, |
| 1301 | }, |
| 1302 | }; |
| 1303 | |
| 1304 | static struct msm_dmov_pdata msm_dmov_pdata = { |
| 1305 | .sd = 1, |
| 1306 | .sd_size = 0x800, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1307 | }; |
| 1308 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 1309 | struct platform_device msm8960_device_dmov = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1310 | .name = "msm_dmov", |
| 1311 | .id = -1, |
| 1312 | .resource = msm_dmov_resource, |
| 1313 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 1314 | .dev = { |
| 1315 | .platform_data = &msm_dmov_pdata, |
| 1316 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1317 | }; |
| 1318 | |
| 1319 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 1320 | &msm_device_sdc1, |
| 1321 | &msm_device_sdc2, |
| 1322 | &msm_device_sdc3, |
| 1323 | &msm_device_sdc4, |
| 1324 | &msm_device_sdc5, |
| 1325 | }; |
| 1326 | |
| 1327 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 1328 | { |
| 1329 | struct platform_device *pdev; |
| 1330 | |
| 1331 | if (controller < 1 || controller > 5) |
| 1332 | return -EINVAL; |
| 1333 | |
| 1334 | pdev = msm_sdcc_devices[controller-1]; |
| 1335 | pdev->dev.platform_data = plat; |
| 1336 | return platform_device_register(pdev); |
| 1337 | } |
| 1338 | |
| 1339 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 1340 | { |
| 1341 | .name = "gsbi_qup_i2c_addr", |
| 1342 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1343 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1344 | .flags = IORESOURCE_MEM, |
| 1345 | }, |
| 1346 | { |
| 1347 | .name = "qup_phys_addr", |
| 1348 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1349 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1350 | .flags = IORESOURCE_MEM, |
| 1351 | }, |
| 1352 | { |
| 1353 | .name = "qup_err_intr", |
| 1354 | .start = GSBI4_QUP_IRQ, |
| 1355 | .end = GSBI4_QUP_IRQ, |
| 1356 | .flags = IORESOURCE_IRQ, |
| 1357 | }, |
| 1358 | }; |
| 1359 | |
| 1360 | struct platform_device msm8960_device_qup_i2c_gsbi4 = { |
| 1361 | .name = "qup_i2c", |
| 1362 | .id = 4, |
| 1363 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 1364 | .resource = resources_qup_i2c_gsbi4, |
| 1365 | }; |
| 1366 | |
| 1367 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 1368 | { |
| 1369 | .name = "gsbi_qup_i2c_addr", |
| 1370 | .start = MSM_GSBI3_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1371 | .end = MSM_GSBI3_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1372 | .flags = IORESOURCE_MEM, |
| 1373 | }, |
| 1374 | { |
| 1375 | .name = "qup_phys_addr", |
| 1376 | .start = MSM_GSBI3_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1377 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1378 | .flags = IORESOURCE_MEM, |
| 1379 | }, |
| 1380 | { |
| 1381 | .name = "qup_err_intr", |
| 1382 | .start = GSBI3_QUP_IRQ, |
| 1383 | .end = GSBI3_QUP_IRQ, |
| 1384 | .flags = IORESOURCE_IRQ, |
| 1385 | }, |
| 1386 | }; |
| 1387 | |
| 1388 | struct platform_device msm8960_device_qup_i2c_gsbi3 = { |
| 1389 | .name = "qup_i2c", |
| 1390 | .id = 3, |
| 1391 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 1392 | .resource = resources_qup_i2c_gsbi3, |
| 1393 | }; |
| 1394 | |
Harini Jayaraman | fe6ff416 | 2012-03-14 11:25:40 -0600 | [diff] [blame] | 1395 | static struct resource resources_qup_i2c_gsbi9[] = { |
| 1396 | { |
| 1397 | .name = "gsbi_qup_i2c_addr", |
| 1398 | .start = MSM_GSBI9_PHYS, |
| 1399 | .end = MSM_GSBI9_PHYS + 4 - 1, |
| 1400 | .flags = IORESOURCE_MEM, |
| 1401 | }, |
| 1402 | { |
| 1403 | .name = "qup_phys_addr", |
| 1404 | .start = MSM_GSBI9_QUP_PHYS, |
| 1405 | .end = MSM_GSBI9_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 1406 | .flags = IORESOURCE_MEM, |
| 1407 | }, |
| 1408 | { |
| 1409 | .name = "qup_err_intr", |
| 1410 | .start = GSBI9_QUP_IRQ, |
| 1411 | .end = GSBI9_QUP_IRQ, |
| 1412 | .flags = IORESOURCE_IRQ, |
| 1413 | }, |
| 1414 | }; |
| 1415 | |
| 1416 | struct platform_device msm8960_device_qup_i2c_gsbi9 = { |
| 1417 | .name = "qup_i2c", |
| 1418 | .id = 0, |
| 1419 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi9), |
| 1420 | .resource = resources_qup_i2c_gsbi9, |
| 1421 | }; |
| 1422 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1423 | static struct resource resources_qup_i2c_gsbi10[] = { |
| 1424 | { |
| 1425 | .name = "gsbi_qup_i2c_addr", |
| 1426 | .start = MSM_GSBI10_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1427 | .end = MSM_GSBI10_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1428 | .flags = IORESOURCE_MEM, |
| 1429 | }, |
| 1430 | { |
| 1431 | .name = "qup_phys_addr", |
| 1432 | .start = MSM_GSBI10_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1433 | .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1434 | .flags = IORESOURCE_MEM, |
| 1435 | }, |
| 1436 | { |
| 1437 | .name = "qup_err_intr", |
| 1438 | .start = GSBI10_QUP_IRQ, |
| 1439 | .end = GSBI10_QUP_IRQ, |
| 1440 | .flags = IORESOURCE_IRQ, |
| 1441 | }, |
| 1442 | }; |
| 1443 | |
| 1444 | struct platform_device msm8960_device_qup_i2c_gsbi10 = { |
| 1445 | .name = "qup_i2c", |
| 1446 | .id = 10, |
| 1447 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10), |
| 1448 | .resource = resources_qup_i2c_gsbi10, |
| 1449 | }; |
| 1450 | |
| 1451 | static struct resource resources_qup_i2c_gsbi12[] = { |
| 1452 | { |
| 1453 | .name = "gsbi_qup_i2c_addr", |
| 1454 | .start = MSM_GSBI12_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1455 | .end = MSM_GSBI12_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1456 | .flags = IORESOURCE_MEM, |
| 1457 | }, |
| 1458 | { |
| 1459 | .name = "qup_phys_addr", |
| 1460 | .start = MSM_GSBI12_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 1461 | .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1462 | .flags = IORESOURCE_MEM, |
| 1463 | }, |
| 1464 | { |
| 1465 | .name = "qup_err_intr", |
| 1466 | .start = GSBI12_QUP_IRQ, |
| 1467 | .end = GSBI12_QUP_IRQ, |
| 1468 | .flags = IORESOURCE_IRQ, |
| 1469 | }, |
| 1470 | }; |
| 1471 | |
| 1472 | struct platform_device msm8960_device_qup_i2c_gsbi12 = { |
| 1473 | .name = "qup_i2c", |
| 1474 | .id = 12, |
| 1475 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12), |
| 1476 | .resource = resources_qup_i2c_gsbi12, |
| 1477 | }; |
| 1478 | |
| 1479 | #ifdef CONFIG_MSM_CAMERA |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1480 | static struct resource msm_cam_gsbi4_i2c_mux_resources[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1481 | { |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1482 | .name = "i2c_mux_rw", |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1483 | .start = 0x008003E0, |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1484 | .end = 0x008003E0 + SZ_8 - 1, |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1485 | .flags = IORESOURCE_MEM, |
| 1486 | }, |
| 1487 | { |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1488 | .name = "i2c_mux_ctl", |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1489 | .start = 0x008020B8, |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1490 | .end = 0x008020B8 + SZ_4 - 1, |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1491 | .flags = IORESOURCE_MEM, |
| 1492 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1493 | }; |
| 1494 | |
Kevin Chan | bb8ef86 | 2012-02-14 13:03:04 -0800 | [diff] [blame] | 1495 | struct platform_device msm8960_device_i2c_mux_gsbi4 = { |
| 1496 | .name = "msm_cam_i2c_mux", |
| 1497 | .id = 0, |
| 1498 | .resource = msm_cam_gsbi4_i2c_mux_resources, |
| 1499 | .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources), |
| 1500 | }; |
Kevin Chan | f6216f2 | 2011-10-25 18:40:11 -0700 | [diff] [blame] | 1501 | |
| 1502 | static struct resource msm_csiphy0_resources[] = { |
| 1503 | { |
| 1504 | .name = "csiphy", |
| 1505 | .start = 0x04800C00, |
| 1506 | .end = 0x04800C00 + SZ_1K - 1, |
| 1507 | .flags = IORESOURCE_MEM, |
| 1508 | }, |
| 1509 | { |
| 1510 | .name = "csiphy", |
| 1511 | .start = CSIPHY_4LN_IRQ, |
| 1512 | .end = CSIPHY_4LN_IRQ, |
| 1513 | .flags = IORESOURCE_IRQ, |
| 1514 | }, |
| 1515 | }; |
| 1516 | |
| 1517 | static struct resource msm_csiphy1_resources[] = { |
| 1518 | { |
| 1519 | .name = "csiphy", |
| 1520 | .start = 0x04801000, |
| 1521 | .end = 0x04801000 + SZ_1K - 1, |
| 1522 | .flags = IORESOURCE_MEM, |
| 1523 | }, |
| 1524 | { |
| 1525 | .name = "csiphy", |
| 1526 | .start = MSM8960_CSIPHY_2LN_IRQ, |
| 1527 | .end = MSM8960_CSIPHY_2LN_IRQ, |
| 1528 | .flags = IORESOURCE_IRQ, |
| 1529 | }, |
| 1530 | }; |
| 1531 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1532 | static struct resource msm_csiphy2_resources[] = { |
| 1533 | { |
| 1534 | .name = "csiphy", |
| 1535 | .start = 0x04801400, |
| 1536 | .end = 0x04801400 + SZ_1K - 1, |
| 1537 | .flags = IORESOURCE_MEM, |
| 1538 | }, |
| 1539 | { |
| 1540 | .name = "csiphy", |
| 1541 | .start = MSM8960_CSIPHY_2_2LN_IRQ, |
| 1542 | .end = MSM8960_CSIPHY_2_2LN_IRQ, |
| 1543 | .flags = IORESOURCE_IRQ, |
| 1544 | }, |
| 1545 | }; |
| 1546 | |
Kevin Chan | f6216f2 | 2011-10-25 18:40:11 -0700 | [diff] [blame] | 1547 | struct platform_device msm8960_device_csiphy0 = { |
| 1548 | .name = "msm_csiphy", |
| 1549 | .id = 0, |
| 1550 | .resource = msm_csiphy0_resources, |
| 1551 | .num_resources = ARRAY_SIZE(msm_csiphy0_resources), |
| 1552 | }; |
| 1553 | |
| 1554 | struct platform_device msm8960_device_csiphy1 = { |
| 1555 | .name = "msm_csiphy", |
| 1556 | .id = 1, |
| 1557 | .resource = msm_csiphy1_resources, |
| 1558 | .num_resources = ARRAY_SIZE(msm_csiphy1_resources), |
| 1559 | }; |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1560 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1561 | struct platform_device msm8960_device_csiphy2 = { |
| 1562 | .name = "msm_csiphy", |
| 1563 | .id = 2, |
| 1564 | .resource = msm_csiphy2_resources, |
| 1565 | .num_resources = ARRAY_SIZE(msm_csiphy2_resources), |
| 1566 | }; |
| 1567 | |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1568 | static struct resource msm_csid0_resources[] = { |
| 1569 | { |
| 1570 | .name = "csid", |
| 1571 | .start = 0x04800000, |
| 1572 | .end = 0x04800000 + SZ_1K - 1, |
| 1573 | .flags = IORESOURCE_MEM, |
| 1574 | }, |
| 1575 | { |
| 1576 | .name = "csid", |
| 1577 | .start = CSI_0_IRQ, |
| 1578 | .end = CSI_0_IRQ, |
| 1579 | .flags = IORESOURCE_IRQ, |
| 1580 | }, |
| 1581 | }; |
| 1582 | |
| 1583 | static struct resource msm_csid1_resources[] = { |
| 1584 | { |
| 1585 | .name = "csid", |
| 1586 | .start = 0x04800400, |
| 1587 | .end = 0x04800400 + SZ_1K - 1, |
| 1588 | .flags = IORESOURCE_MEM, |
| 1589 | }, |
| 1590 | { |
| 1591 | .name = "csid", |
| 1592 | .start = CSI_1_IRQ, |
| 1593 | .end = CSI_1_IRQ, |
| 1594 | .flags = IORESOURCE_IRQ, |
| 1595 | }, |
| 1596 | }; |
| 1597 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1598 | static struct resource msm_csid2_resources[] = { |
| 1599 | { |
| 1600 | .name = "csid", |
| 1601 | .start = 0x04801800, |
| 1602 | .end = 0x04801800 + SZ_1K - 1, |
| 1603 | .flags = IORESOURCE_MEM, |
| 1604 | }, |
| 1605 | { |
| 1606 | .name = "csid", |
| 1607 | .start = CSI_2_IRQ, |
| 1608 | .end = CSI_2_IRQ, |
| 1609 | .flags = IORESOURCE_IRQ, |
| 1610 | }, |
| 1611 | }; |
| 1612 | |
Kevin Chan | c8b52e8 | 2011-10-25 23:20:21 -0700 | [diff] [blame] | 1613 | struct platform_device msm8960_device_csid0 = { |
| 1614 | .name = "msm_csid", |
| 1615 | .id = 0, |
| 1616 | .resource = msm_csid0_resources, |
| 1617 | .num_resources = ARRAY_SIZE(msm_csid0_resources), |
| 1618 | }; |
| 1619 | |
| 1620 | struct platform_device msm8960_device_csid1 = { |
| 1621 | .name = "msm_csid", |
| 1622 | .id = 1, |
| 1623 | .resource = msm_csid1_resources, |
| 1624 | .num_resources = ARRAY_SIZE(msm_csid1_resources), |
| 1625 | }; |
Kevin Chan | e12c667 | 2011-10-26 11:55:26 -0700 | [diff] [blame] | 1626 | |
Sreesudhan Ramakrish Ramkumar | b1edcd0 | 2012-01-17 11:33:05 -0800 | [diff] [blame] | 1627 | struct platform_device msm8960_device_csid2 = { |
| 1628 | .name = "msm_csid", |
| 1629 | .id = 2, |
| 1630 | .resource = msm_csid2_resources, |
| 1631 | .num_resources = ARRAY_SIZE(msm_csid2_resources), |
| 1632 | }; |
| 1633 | |
Kevin Chan | e12c667 | 2011-10-26 11:55:26 -0700 | [diff] [blame] | 1634 | struct resource msm_ispif_resources[] = { |
| 1635 | { |
| 1636 | .name = "ispif", |
| 1637 | .start = 0x04800800, |
| 1638 | .end = 0x04800800 + SZ_1K - 1, |
| 1639 | .flags = IORESOURCE_MEM, |
| 1640 | }, |
| 1641 | { |
| 1642 | .name = "ispif", |
| 1643 | .start = ISPIF_IRQ, |
| 1644 | .end = ISPIF_IRQ, |
| 1645 | .flags = IORESOURCE_IRQ, |
| 1646 | }, |
| 1647 | }; |
| 1648 | |
| 1649 | struct platform_device msm8960_device_ispif = { |
| 1650 | .name = "msm_ispif", |
| 1651 | .id = 0, |
| 1652 | .resource = msm_ispif_resources, |
| 1653 | .num_resources = ARRAY_SIZE(msm_ispif_resources), |
| 1654 | }; |
Kevin Chan | 5827c55 | 2011-10-28 18:36:32 -0700 | [diff] [blame] | 1655 | |
| 1656 | static struct resource msm_vfe_resources[] = { |
| 1657 | { |
| 1658 | .name = "vfe32", |
| 1659 | .start = 0x04500000, |
| 1660 | .end = 0x04500000 + SZ_1M - 1, |
| 1661 | .flags = IORESOURCE_MEM, |
| 1662 | }, |
| 1663 | { |
| 1664 | .name = "vfe32", |
| 1665 | .start = VFE_IRQ, |
| 1666 | .end = VFE_IRQ, |
| 1667 | .flags = IORESOURCE_IRQ, |
| 1668 | }, |
| 1669 | }; |
| 1670 | |
| 1671 | struct platform_device msm8960_device_vfe = { |
| 1672 | .name = "msm_vfe", |
| 1673 | .id = 0, |
| 1674 | .resource = msm_vfe_resources, |
| 1675 | .num_resources = ARRAY_SIZE(msm_vfe_resources), |
| 1676 | }; |
Kevin Chan | a085312 | 2011-11-07 19:48:44 -0800 | [diff] [blame] | 1677 | |
| 1678 | static struct resource msm_vpe_resources[] = { |
| 1679 | { |
| 1680 | .name = "vpe", |
| 1681 | .start = 0x05300000, |
| 1682 | .end = 0x05300000 + SZ_1M - 1, |
| 1683 | .flags = IORESOURCE_MEM, |
| 1684 | }, |
| 1685 | { |
| 1686 | .name = "vpe", |
| 1687 | .start = VPE_IRQ, |
| 1688 | .end = VPE_IRQ, |
| 1689 | .flags = IORESOURCE_IRQ, |
| 1690 | }, |
| 1691 | }; |
| 1692 | |
| 1693 | struct platform_device msm8960_device_vpe = { |
| 1694 | .name = "msm_vpe", |
| 1695 | .id = 0, |
| 1696 | .resource = msm_vpe_resources, |
| 1697 | .num_resources = ARRAY_SIZE(msm_vpe_resources), |
| 1698 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1699 | #endif |
| 1700 | |
Joel Nider | a126194 | 2011-09-12 16:30:09 +0300 | [diff] [blame] | 1701 | #define MSM_TSIF0_PHYS (0x18200000) |
| 1702 | #define MSM_TSIF1_PHYS (0x18201000) |
| 1703 | #define MSM_TSIF_SIZE (0x200) |
| 1704 | |
| 1705 | #define TSIF_0_CLK GPIO_CFG(75, 1, GPIO_CFG_INPUT, \ |
| 1706 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1707 | #define TSIF_0_EN GPIO_CFG(76, 1, GPIO_CFG_INPUT, \ |
| 1708 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1709 | #define TSIF_0_DATA GPIO_CFG(77, 1, GPIO_CFG_INPUT, \ |
| 1710 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1711 | #define TSIF_0_SYNC GPIO_CFG(82, 1, GPIO_CFG_INPUT, \ |
| 1712 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1713 | #define TSIF_1_CLK GPIO_CFG(79, 1, GPIO_CFG_INPUT, \ |
| 1714 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1715 | #define TSIF_1_EN GPIO_CFG(80, 1, GPIO_CFG_INPUT, \ |
| 1716 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1717 | #define TSIF_1_DATA GPIO_CFG(81, 1, GPIO_CFG_INPUT, \ |
| 1718 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1719 | #define TSIF_1_SYNC GPIO_CFG(78, 1, GPIO_CFG_INPUT, \ |
| 1720 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 1721 | |
| 1722 | static const struct msm_gpio tsif0_gpios[] = { |
| 1723 | { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", }, |
| 1724 | { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", }, |
| 1725 | { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", }, |
| 1726 | { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", }, |
| 1727 | }; |
| 1728 | |
| 1729 | static const struct msm_gpio tsif1_gpios[] = { |
| 1730 | { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", }, |
| 1731 | { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", }, |
| 1732 | { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", }, |
| 1733 | { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", }, |
| 1734 | }; |
| 1735 | |
| 1736 | struct msm_tsif_platform_data tsif1_platform_data = { |
| 1737 | .num_gpios = ARRAY_SIZE(tsif1_gpios), |
| 1738 | .gpios = tsif1_gpios, |
| 1739 | .tsif_pclk = "tsif_pclk", |
| 1740 | .tsif_ref_clk = "tsif_ref_clk", |
| 1741 | }; |
| 1742 | |
| 1743 | struct resource tsif1_resources[] = { |
| 1744 | [0] = { |
| 1745 | .flags = IORESOURCE_IRQ, |
| 1746 | .start = TSIF2_IRQ, |
| 1747 | .end = TSIF2_IRQ, |
| 1748 | }, |
| 1749 | [1] = { |
| 1750 | .flags = IORESOURCE_MEM, |
| 1751 | .start = MSM_TSIF1_PHYS, |
| 1752 | .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1, |
| 1753 | }, |
| 1754 | [2] = { |
| 1755 | .flags = IORESOURCE_DMA, |
| 1756 | .start = DMOV_TSIF_CHAN, |
| 1757 | .end = DMOV_TSIF_CRCI, |
| 1758 | }, |
| 1759 | }; |
| 1760 | |
| 1761 | struct msm_tsif_platform_data tsif0_platform_data = { |
| 1762 | .num_gpios = ARRAY_SIZE(tsif0_gpios), |
| 1763 | .gpios = tsif0_gpios, |
| 1764 | .tsif_pclk = "tsif_pclk", |
| 1765 | .tsif_ref_clk = "tsif_ref_clk", |
| 1766 | }; |
| 1767 | struct resource tsif0_resources[] = { |
| 1768 | [0] = { |
| 1769 | .flags = IORESOURCE_IRQ, |
| 1770 | .start = TSIF1_IRQ, |
| 1771 | .end = TSIF1_IRQ, |
| 1772 | }, |
| 1773 | [1] = { |
| 1774 | .flags = IORESOURCE_MEM, |
| 1775 | .start = MSM_TSIF0_PHYS, |
| 1776 | .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1, |
| 1777 | }, |
| 1778 | [2] = { |
| 1779 | .flags = IORESOURCE_DMA, |
| 1780 | .start = DMOV_TSIF_CHAN, |
| 1781 | .end = DMOV_TSIF_CRCI, |
| 1782 | }, |
| 1783 | }; |
| 1784 | |
| 1785 | struct platform_device msm_device_tsif[2] = { |
| 1786 | { |
| 1787 | .name = "msm_tsif", |
| 1788 | .id = 0, |
| 1789 | .num_resources = ARRAY_SIZE(tsif0_resources), |
| 1790 | .resource = tsif0_resources, |
| 1791 | .dev = { |
| 1792 | .platform_data = &tsif0_platform_data |
| 1793 | }, |
| 1794 | }, |
| 1795 | { |
| 1796 | .name = "msm_tsif", |
| 1797 | .id = 1, |
| 1798 | .num_resources = ARRAY_SIZE(tsif1_resources), |
| 1799 | .resource = tsif1_resources, |
| 1800 | .dev = { |
| 1801 | .platform_data = &tsif1_platform_data |
| 1802 | }, |
| 1803 | } |
| 1804 | }; |
| 1805 | |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1806 | static struct resource resources_ssbi_pmic[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1807 | { |
| 1808 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 1809 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 1810 | .flags = IORESOURCE_MEM, |
| 1811 | }, |
| 1812 | }; |
| 1813 | |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1814 | struct platform_device msm8960_device_ssbi_pmic = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1815 | .name = "msm_ssbi", |
| 1816 | .id = 0, |
Jay Chokshi | 33c044a | 2011-12-07 13:05:40 -0800 | [diff] [blame] | 1817 | .resource = resources_ssbi_pmic, |
| 1818 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1819 | }; |
| 1820 | |
| 1821 | static struct resource resources_qup_spi_gsbi1[] = { |
| 1822 | { |
| 1823 | .name = "spi_base", |
| 1824 | .start = MSM_GSBI1_QUP_PHYS, |
| 1825 | .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1, |
| 1826 | .flags = IORESOURCE_MEM, |
| 1827 | }, |
| 1828 | { |
| 1829 | .name = "gsbi_base", |
| 1830 | .start = MSM_GSBI1_PHYS, |
| 1831 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 1832 | .flags = IORESOURCE_MEM, |
| 1833 | }, |
| 1834 | { |
| 1835 | .name = "spi_irq_in", |
| 1836 | .start = MSM8960_GSBI1_QUP_IRQ, |
| 1837 | .end = MSM8960_GSBI1_QUP_IRQ, |
| 1838 | .flags = IORESOURCE_IRQ, |
| 1839 | }, |
Harini Jayaraman | aac8e34 | 2011-08-09 19:25:23 -0600 | [diff] [blame] | 1840 | { |
| 1841 | .name = "spi_clk", |
| 1842 | .start = 9, |
| 1843 | .end = 9, |
| 1844 | .flags = IORESOURCE_IO, |
| 1845 | }, |
| 1846 | { |
Harini Jayaraman | aac8e34 | 2011-08-09 19:25:23 -0600 | [diff] [blame] | 1847 | .name = "spi_miso", |
| 1848 | .start = 7, |
| 1849 | .end = 7, |
| 1850 | .flags = IORESOURCE_IO, |
| 1851 | }, |
| 1852 | { |
| 1853 | .name = "spi_mosi", |
| 1854 | .start = 6, |
| 1855 | .end = 6, |
| 1856 | .flags = IORESOURCE_IO, |
| 1857 | }, |
Harini Jayaraman | 8392e43 | 2011-11-29 18:26:17 -0700 | [diff] [blame] | 1858 | { |
| 1859 | .name = "spi_cs", |
| 1860 | .start = 8, |
| 1861 | .end = 8, |
| 1862 | .flags = IORESOURCE_IO, |
| 1863 | }, |
| 1864 | { |
| 1865 | .name = "spi_cs1", |
| 1866 | .start = 14, |
| 1867 | .end = 14, |
| 1868 | .flags = IORESOURCE_IO, |
| 1869 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1870 | }; |
| 1871 | |
| 1872 | struct platform_device msm8960_device_qup_spi_gsbi1 = { |
| 1873 | .name = "spi_qsd", |
| 1874 | .id = 0, |
| 1875 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1), |
| 1876 | .resource = resources_qup_spi_gsbi1, |
| 1877 | }; |
| 1878 | |
| 1879 | struct platform_device msm_pcm = { |
| 1880 | .name = "msm-pcm-dsp", |
| 1881 | .id = -1, |
| 1882 | }; |
| 1883 | |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 1884 | struct platform_device msm_multi_ch_pcm = { |
| 1885 | .name = "msm-multi-ch-pcm-dsp", |
| 1886 | .id = -1, |
| 1887 | }; |
| 1888 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1889 | struct platform_device msm_pcm_routing = { |
| 1890 | .name = "msm-pcm-routing", |
| 1891 | .id = -1, |
| 1892 | }; |
| 1893 | |
| 1894 | struct platform_device msm_cpudai0 = { |
| 1895 | .name = "msm-dai-q6", |
| 1896 | .id = 0x4000, |
| 1897 | }; |
| 1898 | |
| 1899 | struct platform_device msm_cpudai1 = { |
| 1900 | .name = "msm-dai-q6", |
| 1901 | .id = 0x4001, |
| 1902 | }; |
| 1903 | |
Kiran Kandi | 97fe19d | 2012-05-20 22:34:04 -0700 | [diff] [blame] | 1904 | struct platform_device msm8960_cpudai_slimbus_2_rx = { |
| 1905 | .name = "msm-dai-q6", |
| 1906 | .id = 0x4004, |
| 1907 | }; |
| 1908 | |
Kiran Kandi | 1e6371d | 2012-03-29 11:48:57 -0700 | [diff] [blame] | 1909 | struct platform_device msm8960_cpudai_slimbus_2_tx = { |
| 1910 | .name = "msm-dai-q6", |
| 1911 | .id = 0x4005, |
| 1912 | }; |
| 1913 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1914 | struct platform_device msm_cpudai_hdmi_rx = { |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 1915 | .name = "msm-dai-q6-hdmi", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1916 | .id = 8, |
| 1917 | }; |
| 1918 | |
| 1919 | struct platform_device msm_cpudai_bt_rx = { |
| 1920 | .name = "msm-dai-q6", |
| 1921 | .id = 0x3000, |
| 1922 | }; |
| 1923 | |
| 1924 | struct platform_device msm_cpudai_bt_tx = { |
| 1925 | .name = "msm-dai-q6", |
| 1926 | .id = 0x3001, |
| 1927 | }; |
| 1928 | |
| 1929 | struct platform_device msm_cpudai_fm_rx = { |
| 1930 | .name = "msm-dai-q6", |
| 1931 | .id = 0x3004, |
| 1932 | }; |
| 1933 | |
| 1934 | struct platform_device msm_cpudai_fm_tx = { |
| 1935 | .name = "msm-dai-q6", |
| 1936 | .id = 0x3005, |
| 1937 | }; |
| 1938 | |
Helen Zeng | 0705a5f | 2011-10-14 15:29:52 -0700 | [diff] [blame] | 1939 | struct platform_device msm_cpudai_incall_music_rx = { |
| 1940 | .name = "msm-dai-q6", |
| 1941 | .id = 0x8005, |
| 1942 | }; |
| 1943 | |
Helen Zeng | e3d716a | 2011-10-14 16:32:16 -0700 | [diff] [blame] | 1944 | struct platform_device msm_cpudai_incall_record_rx = { |
| 1945 | .name = "msm-dai-q6", |
| 1946 | .id = 0x8004, |
| 1947 | }; |
| 1948 | |
| 1949 | struct platform_device msm_cpudai_incall_record_tx = { |
| 1950 | .name = "msm-dai-q6", |
| 1951 | .id = 0x8003, |
| 1952 | }; |
| 1953 | |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1954 | /* |
| 1955 | * Machine specific data for AUX PCM Interface |
| 1956 | * which the driver will be unware of. |
| 1957 | */ |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 1958 | struct msm_dai_auxpcm_pdata auxpcm_pdata = { |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1959 | .clk = "pcm_clk", |
Kuirong Wang | 547a998 | 2012-05-04 18:29:11 -0700 | [diff] [blame] | 1960 | .mode_8k = { |
| 1961 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 1962 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 1963 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 1964 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 1965 | .slot = 0, |
| 1966 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 1967 | .pcm_clk_rate = 2048000, |
| 1968 | }, |
| 1969 | .mode_16k = { |
| 1970 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 1971 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 1972 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 1973 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 1974 | .slot = 0, |
| 1975 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 1976 | .pcm_clk_rate = 4096000, |
| 1977 | } |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1978 | }; |
| 1979 | |
| 1980 | struct platform_device msm_cpudai_auxpcm_rx = { |
| 1981 | .name = "msm-dai-q6", |
| 1982 | .id = 2, |
| 1983 | .dev = { |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 1984 | .platform_data = &auxpcm_pdata, |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1985 | }, |
| 1986 | }; |
| 1987 | |
| 1988 | struct platform_device msm_cpudai_auxpcm_tx = { |
| 1989 | .name = "msm-dai-q6", |
| 1990 | .id = 3, |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 1991 | .dev = { |
| 1992 | .platform_data = &auxpcm_pdata, |
| 1993 | }, |
Bhalchandra Gajare | 0e795c4 | 2011-08-15 18:10:30 -0700 | [diff] [blame] | 1994 | }; |
| 1995 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1996 | struct platform_device msm_cpu_fe = { |
| 1997 | .name = "msm-dai-fe", |
| 1998 | .id = -1, |
| 1999 | }; |
| 2000 | |
| 2001 | struct platform_device msm_stub_codec = { |
| 2002 | .name = "msm-stub-codec", |
| 2003 | .id = 1, |
| 2004 | }; |
| 2005 | |
| 2006 | struct platform_device msm_voice = { |
| 2007 | .name = "msm-pcm-voice", |
| 2008 | .id = -1, |
| 2009 | }; |
| 2010 | |
| 2011 | struct platform_device msm_voip = { |
| 2012 | .name = "msm-voip-dsp", |
| 2013 | .id = -1, |
| 2014 | }; |
| 2015 | |
| 2016 | struct platform_device msm_lpa_pcm = { |
| 2017 | .name = "msm-pcm-lpa", |
| 2018 | .id = -1, |
| 2019 | }; |
| 2020 | |
Asish Bhattacharya | 96bb6f4 | 2011-11-01 20:36:09 +0530 | [diff] [blame] | 2021 | struct platform_device msm_compr_dsp = { |
| 2022 | .name = "msm-compr-dsp", |
| 2023 | .id = -1, |
| 2024 | }; |
| 2025 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2026 | struct platform_device msm_pcm_hostless = { |
| 2027 | .name = "msm-pcm-hostless", |
| 2028 | .id = -1, |
| 2029 | }; |
| 2030 | |
Laxminath Kasam | cee1d60 | 2011-08-01 19:26:57 +0530 | [diff] [blame] | 2031 | struct platform_device msm_cpudai_afe_01_rx = { |
| 2032 | .name = "msm-dai-q6", |
| 2033 | .id = 0xE0, |
| 2034 | }; |
| 2035 | |
| 2036 | struct platform_device msm_cpudai_afe_01_tx = { |
| 2037 | .name = "msm-dai-q6", |
| 2038 | .id = 0xF0, |
| 2039 | }; |
| 2040 | |
| 2041 | struct platform_device msm_cpudai_afe_02_rx = { |
| 2042 | .name = "msm-dai-q6", |
| 2043 | .id = 0xF1, |
| 2044 | }; |
| 2045 | |
| 2046 | struct platform_device msm_cpudai_afe_02_tx = { |
| 2047 | .name = "msm-dai-q6", |
| 2048 | .id = 0xE1, |
| 2049 | }; |
| 2050 | |
| 2051 | struct platform_device msm_pcm_afe = { |
| 2052 | .name = "msm-pcm-afe", |
| 2053 | .id = -1, |
| 2054 | }; |
| 2055 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2056 | static struct fs_driver_data gfx2d0_fs_data = { |
| 2057 | .clks = (struct fs_clk_data[]){ |
| 2058 | { .name = "core_clk" }, |
| 2059 | { .name = "iface_clk" }, |
| 2060 | { 0 } |
| 2061 | }, |
| 2062 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2063 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2064 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2065 | static struct fs_driver_data gfx2d1_fs_data = { |
| 2066 | .clks = (struct fs_clk_data[]){ |
| 2067 | { .name = "core_clk" }, |
| 2068 | { .name = "iface_clk" }, |
| 2069 | { 0 } |
| 2070 | }, |
| 2071 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2072 | }; |
| 2073 | |
| 2074 | static struct fs_driver_data gfx3d_fs_data = { |
| 2075 | .clks = (struct fs_clk_data[]){ |
| 2076 | { .name = "core_clk", .reset_rate = 27000000 }, |
| 2077 | { .name = "iface_clk" }, |
| 2078 | { 0 } |
| 2079 | }, |
| 2080 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2081 | }; |
| 2082 | |
| 2083 | static struct fs_driver_data ijpeg_fs_data = { |
| 2084 | .clks = (struct fs_clk_data[]){ |
| 2085 | { .name = "core_clk" }, |
| 2086 | { .name = "iface_clk" }, |
| 2087 | { .name = "bus_clk" }, |
| 2088 | { 0 } |
| 2089 | }, |
| 2090 | .bus_port0 = MSM_BUS_MASTER_JPEG_ENC, |
| 2091 | }; |
| 2092 | |
| 2093 | static struct fs_driver_data mdp_fs_data = { |
| 2094 | .clks = (struct fs_clk_data[]){ |
| 2095 | { .name = "core_clk" }, |
| 2096 | { .name = "iface_clk" }, |
| 2097 | { .name = "bus_clk" }, |
| 2098 | { .name = "vsync_clk" }, |
| 2099 | { .name = "lut_clk" }, |
| 2100 | { .name = "tv_src_clk" }, |
| 2101 | { .name = "tv_clk" }, |
| 2102 | { 0 } |
| 2103 | }, |
| 2104 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 2105 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 2106 | }; |
| 2107 | |
| 2108 | static struct fs_driver_data rot_fs_data = { |
| 2109 | .clks = (struct fs_clk_data[]){ |
| 2110 | { .name = "core_clk" }, |
| 2111 | { .name = "iface_clk" }, |
| 2112 | { .name = "bus_clk" }, |
| 2113 | { 0 } |
| 2114 | }, |
| 2115 | .bus_port0 = MSM_BUS_MASTER_ROTATOR, |
| 2116 | }; |
| 2117 | |
| 2118 | static struct fs_driver_data ved_fs_data = { |
| 2119 | .clks = (struct fs_clk_data[]){ |
| 2120 | { .name = "core_clk" }, |
| 2121 | { .name = "iface_clk" }, |
| 2122 | { .name = "bus_clk" }, |
| 2123 | { 0 } |
| 2124 | }, |
| 2125 | .bus_port0 = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 2126 | .bus_port1 = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 2127 | }; |
| 2128 | |
| 2129 | static struct fs_driver_data vfe_fs_data = { |
| 2130 | .clks = (struct fs_clk_data[]){ |
| 2131 | { .name = "core_clk" }, |
| 2132 | { .name = "iface_clk" }, |
| 2133 | { .name = "bus_clk" }, |
| 2134 | { 0 } |
| 2135 | }, |
| 2136 | .bus_port0 = MSM_BUS_MASTER_VFE, |
| 2137 | }; |
| 2138 | |
| 2139 | static struct fs_driver_data vpe_fs_data = { |
| 2140 | .clks = (struct fs_clk_data[]){ |
| 2141 | { .name = "core_clk" }, |
| 2142 | { .name = "iface_clk" }, |
| 2143 | { .name = "bus_clk" }, |
| 2144 | { 0 } |
| 2145 | }, |
| 2146 | .bus_port0 = MSM_BUS_MASTER_VPE, |
| 2147 | }; |
| 2148 | |
| 2149 | struct platform_device *msm8960_footswitch[] __initdata = { |
Matt Wagantall | d4aab1e | 2012-05-03 20:26:56 -0700 | [diff] [blame] | 2150 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data), |
Matt Wagantall | 316f2fc | 2012-05-03 20:41:42 -0700 | [diff] [blame] | 2151 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
Matt Wagantall | e4454b8 | 2012-05-03 20:48:01 -0700 | [diff] [blame] | 2152 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
Matt Wagantall | 5c92211 | 2012-05-03 19:25:28 -0700 | [diff] [blame] | 2153 | FS_8X60(FS_VFE, "fs_vfe", NULL, &vfe_fs_data), |
| 2154 | FS_8X60(FS_VPE, "fs_vpe", NULL, &vpe_fs_data), |
Matt Wagantall | d6fbf23 | 2012-05-03 20:09:28 -0700 | [diff] [blame] | 2155 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
| 2156 | FS_8X60(FS_GFX2D0, "vdd", "kgsl-2d0.0", &gfx2d0_fs_data), |
| 2157 | FS_8X60(FS_GFX2D1, "vdd", "kgsl-2d1.1", &gfx2d1_fs_data), |
Matt Wagantall | 5e46aac | 2012-05-03 20:20:18 -0700 | [diff] [blame] | 2158 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2159 | }; |
| 2160 | unsigned msm8960_num_footswitch __initdata = ARRAY_SIZE(msm8960_footswitch); |
Ravishangar Kalyanam | 319a83c | 2012-03-21 18:38:05 -0700 | [diff] [blame] | 2161 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2162 | #ifdef CONFIG_MSM_ROTATOR |
Ravishangar Kalyanam | 319a83c | 2012-03-21 18:38:05 -0700 | [diff] [blame] | 2163 | static struct msm_bus_vectors rotator_init_vectors[] = { |
| 2164 | { |
| 2165 | .src = MSM_BUS_MASTER_ROTATOR, |
| 2166 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2167 | .ab = 0, |
| 2168 | .ib = 0, |
| 2169 | }, |
| 2170 | }; |
| 2171 | |
| 2172 | static struct msm_bus_vectors rotator_ui_vectors[] = { |
| 2173 | { |
| 2174 | .src = MSM_BUS_MASTER_ROTATOR, |
| 2175 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2176 | .ab = (1024 * 600 * 4 * 2 * 60), |
| 2177 | .ib = (1024 * 600 * 4 * 2 * 60 * 1.5), |
| 2178 | }, |
| 2179 | }; |
| 2180 | |
| 2181 | static struct msm_bus_vectors rotator_vga_vectors[] = { |
| 2182 | { |
| 2183 | .src = MSM_BUS_MASTER_ROTATOR, |
| 2184 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2185 | .ab = (640 * 480 * 2 * 2 * 30), |
| 2186 | .ib = (640 * 480 * 2 * 2 * 30 * 1.5), |
| 2187 | }, |
| 2188 | }; |
| 2189 | static struct msm_bus_vectors rotator_720p_vectors[] = { |
| 2190 | { |
| 2191 | .src = MSM_BUS_MASTER_ROTATOR, |
| 2192 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2193 | .ab = (1280 * 736 * 2 * 2 * 30), |
| 2194 | .ib = (1280 * 736 * 2 * 2 * 30 * 1.5), |
| 2195 | }, |
| 2196 | }; |
| 2197 | |
| 2198 | static struct msm_bus_vectors rotator_1080p_vectors[] = { |
| 2199 | { |
| 2200 | .src = MSM_BUS_MASTER_ROTATOR, |
| 2201 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2202 | .ab = (1920 * 1088 * 2 * 2 * 30), |
| 2203 | .ib = (1920 * 1088 * 2 * 2 * 30 * 1.5), |
| 2204 | }, |
| 2205 | }; |
| 2206 | |
| 2207 | static struct msm_bus_paths rotator_bus_scale_usecases[] = { |
| 2208 | { |
| 2209 | ARRAY_SIZE(rotator_init_vectors), |
| 2210 | rotator_init_vectors, |
| 2211 | }, |
| 2212 | { |
| 2213 | ARRAY_SIZE(rotator_ui_vectors), |
| 2214 | rotator_ui_vectors, |
| 2215 | }, |
| 2216 | { |
| 2217 | ARRAY_SIZE(rotator_vga_vectors), |
| 2218 | rotator_vga_vectors, |
| 2219 | }, |
| 2220 | { |
| 2221 | ARRAY_SIZE(rotator_720p_vectors), |
| 2222 | rotator_720p_vectors, |
| 2223 | }, |
| 2224 | { |
| 2225 | ARRAY_SIZE(rotator_1080p_vectors), |
| 2226 | rotator_1080p_vectors, |
| 2227 | }, |
| 2228 | }; |
| 2229 | |
| 2230 | struct msm_bus_scale_pdata rotator_bus_scale_pdata = { |
| 2231 | rotator_bus_scale_usecases, |
| 2232 | ARRAY_SIZE(rotator_bus_scale_usecases), |
| 2233 | .name = "rotator", |
| 2234 | }; |
| 2235 | |
| 2236 | void __init msm_rotator_update_bus_vectors(unsigned int xres, |
| 2237 | unsigned int yres) |
| 2238 | { |
| 2239 | rotator_ui_vectors[0].ab = xres * yres * 4 * 2 * 60; |
| 2240 | rotator_ui_vectors[0].ib = xres * yres * 4 * 2 * 60 * 3 / 2; |
| 2241 | } |
| 2242 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2243 | #define ROTATOR_HW_BASE 0x04E00000 |
| 2244 | static struct resource resources_msm_rotator[] = { |
| 2245 | { |
| 2246 | .start = ROTATOR_HW_BASE, |
| 2247 | .end = ROTATOR_HW_BASE + 0x100000 - 1, |
| 2248 | .flags = IORESOURCE_MEM, |
| 2249 | }, |
| 2250 | { |
| 2251 | .start = ROT_IRQ, |
| 2252 | .end = ROT_IRQ, |
| 2253 | .flags = IORESOURCE_IRQ, |
| 2254 | }, |
| 2255 | }; |
| 2256 | |
| 2257 | static struct msm_rot_clocks rotator_clocks[] = { |
| 2258 | { |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 2259 | .clk_name = "core_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2260 | .clk_type = ROTATOR_CORE_CLK, |
Nagamalleswararao Ganji | 0bb10734 | 2011-10-10 20:55:32 -0700 | [diff] [blame] | 2261 | .clk_rate = 200 * 1000 * 1000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2262 | }, |
| 2263 | { |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 2264 | .clk_name = "iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2265 | .clk_type = ROTATOR_PCLK, |
| 2266 | .clk_rate = 0, |
| 2267 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2268 | }; |
| 2269 | |
| 2270 | static struct msm_rotator_platform_data rotator_pdata = { |
| 2271 | .number_of_clocks = ARRAY_SIZE(rotator_clocks), |
| 2272 | .hardware_version_number = 0x01020309, |
| 2273 | .rotator_clks = rotator_clocks, |
Nagamalleswararao Ganji | 5fabbd6 | 2011-11-06 23:10:43 -0800 | [diff] [blame] | 2274 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2275 | .bus_scale_table = &rotator_bus_scale_pdata, |
| 2276 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2277 | }; |
| 2278 | |
| 2279 | struct platform_device msm_rotator_device = { |
| 2280 | .name = "msm_rotator", |
| 2281 | .id = 0, |
| 2282 | .num_resources = ARRAY_SIZE(resources_msm_rotator), |
| 2283 | .resource = resources_msm_rotator, |
| 2284 | .dev = { |
| 2285 | .platform_data = &rotator_pdata, |
| 2286 | }, |
| 2287 | }; |
| 2288 | #endif |
| 2289 | |
| 2290 | #define MIPI_DSI_HW_BASE 0x04700000 |
| 2291 | #define MDP_HW_BASE 0x05100000 |
| 2292 | |
| 2293 | static struct resource msm_mipi_dsi1_resources[] = { |
| 2294 | { |
| 2295 | .name = "mipi_dsi", |
| 2296 | .start = MIPI_DSI_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 2297 | .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2298 | .flags = IORESOURCE_MEM, |
| 2299 | }, |
| 2300 | { |
| 2301 | .start = DSI1_IRQ, |
| 2302 | .end = DSI1_IRQ, |
| 2303 | .flags = IORESOURCE_IRQ, |
| 2304 | }, |
| 2305 | }; |
| 2306 | |
| 2307 | struct platform_device msm_mipi_dsi1_device = { |
| 2308 | .name = "mipi_dsi", |
| 2309 | .id = 1, |
| 2310 | .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources), |
| 2311 | .resource = msm_mipi_dsi1_resources, |
| 2312 | }; |
| 2313 | |
| 2314 | static struct resource msm_mdp_resources[] = { |
| 2315 | { |
| 2316 | .name = "mdp", |
| 2317 | .start = MDP_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 2318 | .end = MDP_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2319 | .flags = IORESOURCE_MEM, |
| 2320 | }, |
| 2321 | { |
| 2322 | .start = MDP_IRQ, |
| 2323 | .end = MDP_IRQ, |
| 2324 | .flags = IORESOURCE_IRQ, |
| 2325 | }, |
| 2326 | }; |
| 2327 | |
| 2328 | static struct platform_device msm_mdp_device = { |
| 2329 | .name = "mdp", |
| 2330 | .id = 0, |
| 2331 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 2332 | .resource = msm_mdp_resources, |
| 2333 | }; |
| 2334 | |
| 2335 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 2336 | { |
| 2337 | int ret; |
| 2338 | |
| 2339 | pdev->dev.platform_data = data; |
| 2340 | ret = platform_device_register(pdev); |
| 2341 | if (ret) |
| 2342 | dev_err(&pdev->dev, |
| 2343 | "%s: platform_device_register() failed = %d\n", |
| 2344 | __func__, ret); |
| 2345 | } |
| 2346 | |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 2347 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2348 | static struct platform_device msm_dtv_device = { |
| 2349 | .name = "dtv", |
| 2350 | .id = 0, |
| 2351 | }; |
| 2352 | #endif |
| 2353 | |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2354 | struct platform_device msm_lvds_device = { |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2355 | .name = "lvds", |
| 2356 | .id = 0, |
| 2357 | }; |
| 2358 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2359 | void __init msm_fb_register_device(char *name, void *data) |
| 2360 | { |
| 2361 | if (!strncmp(name, "mdp", 3)) |
| 2362 | msm_register_device(&msm_mdp_device, data); |
| 2363 | else if (!strncmp(name, "mipi_dsi", 8)) |
| 2364 | msm_register_device(&msm_mipi_dsi1_device, data); |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2365 | else if (!strncmp(name, "lvds", 4)) |
| 2366 | msm_register_device(&msm_lvds_device, data); |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 2367 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2368 | else if (!strncmp(name, "dtv", 3)) |
| 2369 | msm_register_device(&msm_dtv_device, data); |
| 2370 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2371 | else |
| 2372 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 2373 | } |
| 2374 | |
| 2375 | static struct resource resources_sps[] = { |
| 2376 | { |
| 2377 | .name = "pipe_mem", |
| 2378 | .start = 0x12800000, |
| 2379 | .end = 0x12800000 + 0x4000 - 1, |
| 2380 | .flags = IORESOURCE_MEM, |
| 2381 | }, |
| 2382 | { |
| 2383 | .name = "bamdma_dma", |
| 2384 | .start = 0x12240000, |
| 2385 | .end = 0x12240000 + 0x1000 - 1, |
| 2386 | .flags = IORESOURCE_MEM, |
| 2387 | }, |
| 2388 | { |
| 2389 | .name = "bamdma_bam", |
| 2390 | .start = 0x12244000, |
| 2391 | .end = 0x12244000 + 0x4000 - 1, |
| 2392 | .flags = IORESOURCE_MEM, |
| 2393 | }, |
| 2394 | { |
| 2395 | .name = "bamdma_irq", |
| 2396 | .start = SPS_BAM_DMA_IRQ, |
| 2397 | .end = SPS_BAM_DMA_IRQ, |
| 2398 | .flags = IORESOURCE_IRQ, |
| 2399 | }, |
| 2400 | }; |
| 2401 | |
| 2402 | struct msm_sps_platform_data msm_sps_pdata = { |
| 2403 | .bamdma_restricted_pipes = 0x06, |
| 2404 | }; |
| 2405 | |
| 2406 | struct platform_device msm_device_sps = { |
| 2407 | .name = "msm_sps", |
| 2408 | .id = -1, |
| 2409 | .num_resources = ARRAY_SIZE(resources_sps), |
| 2410 | .resource = resources_sps, |
| 2411 | .dev.platform_data = &msm_sps_pdata, |
| 2412 | }; |
| 2413 | |
| 2414 | #ifdef CONFIG_MSM_MPM |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2415 | 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] | 2416 | [1] = MSM_GPIO_TO_INT(46), |
| 2417 | [2] = MSM_GPIO_TO_INT(150), |
| 2418 | [4] = MSM_GPIO_TO_INT(103), |
| 2419 | [5] = MSM_GPIO_TO_INT(104), |
| 2420 | [6] = MSM_GPIO_TO_INT(105), |
| 2421 | [7] = MSM_GPIO_TO_INT(106), |
| 2422 | [8] = MSM_GPIO_TO_INT(107), |
| 2423 | [9] = MSM_GPIO_TO_INT(7), |
| 2424 | [10] = MSM_GPIO_TO_INT(11), |
| 2425 | [11] = MSM_GPIO_TO_INT(15), |
| 2426 | [12] = MSM_GPIO_TO_INT(19), |
| 2427 | [13] = MSM_GPIO_TO_INT(23), |
| 2428 | [14] = MSM_GPIO_TO_INT(27), |
| 2429 | [15] = MSM_GPIO_TO_INT(31), |
| 2430 | [16] = MSM_GPIO_TO_INT(35), |
| 2431 | [19] = MSM_GPIO_TO_INT(90), |
| 2432 | [20] = MSM_GPIO_TO_INT(92), |
| 2433 | [23] = MSM_GPIO_TO_INT(85), |
| 2434 | [24] = MSM_GPIO_TO_INT(83), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2435 | [25] = USB1_HS_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2436 | [27] = HDMI_IRQ, |
Praveen Chidambaram | b3d857c | 2011-05-31 16:28:07 -0600 | [diff] [blame] | 2437 | [29] = MSM_GPIO_TO_INT(10), |
| 2438 | [30] = MSM_GPIO_TO_INT(102), |
| 2439 | [31] = MSM_GPIO_TO_INT(81), |
| 2440 | [32] = MSM_GPIO_TO_INT(78), |
| 2441 | [33] = MSM_GPIO_TO_INT(94), |
| 2442 | [34] = MSM_GPIO_TO_INT(72), |
| 2443 | [35] = MSM_GPIO_TO_INT(39), |
| 2444 | [36] = MSM_GPIO_TO_INT(43), |
| 2445 | [37] = MSM_GPIO_TO_INT(61), |
| 2446 | [38] = MSM_GPIO_TO_INT(50), |
| 2447 | [39] = MSM_GPIO_TO_INT(42), |
| 2448 | [41] = MSM_GPIO_TO_INT(62), |
| 2449 | [42] = MSM_GPIO_TO_INT(76), |
| 2450 | [43] = MSM_GPIO_TO_INT(75), |
| 2451 | [44] = MSM_GPIO_TO_INT(70), |
| 2452 | [45] = MSM_GPIO_TO_INT(69), |
| 2453 | [46] = MSM_GPIO_TO_INT(67), |
| 2454 | [47] = MSM_GPIO_TO_INT(65), |
| 2455 | [48] = MSM_GPIO_TO_INT(58), |
| 2456 | [49] = MSM_GPIO_TO_INT(54), |
| 2457 | [50] = MSM_GPIO_TO_INT(52), |
| 2458 | [51] = MSM_GPIO_TO_INT(49), |
| 2459 | [52] = MSM_GPIO_TO_INT(40), |
| 2460 | [53] = MSM_GPIO_TO_INT(37), |
| 2461 | [54] = MSM_GPIO_TO_INT(24), |
| 2462 | [55] = MSM_GPIO_TO_INT(14), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2463 | }; |
| 2464 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2465 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2466 | TLMM_MSM_SUMMARY_IRQ, |
| 2467 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 2468 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 2469 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 2470 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 2471 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 2472 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 2473 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 2474 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 2475 | MSS_TO_APPS_IRQ_0, |
| 2476 | MSS_TO_APPS_IRQ_1, |
| 2477 | MSS_TO_APPS_IRQ_2, |
| 2478 | MSS_TO_APPS_IRQ_3, |
| 2479 | MSS_TO_APPS_IRQ_4, |
| 2480 | MSS_TO_APPS_IRQ_5, |
| 2481 | MSS_TO_APPS_IRQ_6, |
| 2482 | MSS_TO_APPS_IRQ_7, |
| 2483 | MSS_TO_APPS_IRQ_8, |
| 2484 | MSS_TO_APPS_IRQ_9, |
| 2485 | LPASS_SCSS_GP_LOW_IRQ, |
| 2486 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 2487 | LPASS_SCSS_GP_HIGH_IRQ, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 2488 | SPS_MTI_30, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2489 | SPS_MTI_31, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 2490 | RIVA_APSS_SPARE_IRQ, |
David Collins | 84ecd0a | 2011-09-27 21:11:11 -0700 | [diff] [blame] | 2491 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 2492 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 2493 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2494 | }; |
| 2495 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2496 | struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2497 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 2498 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 2499 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 2500 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 2501 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 2502 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 2503 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 2504 | .mpm_apps_ipc_val = BIT(1), |
| 2505 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 2506 | |
| 2507 | }; |
| 2508 | #endif |
| 2509 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2510 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 2511 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
Sagar Dharia | cc96945 | 2011-09-19 10:34:30 -0600 | [diff] [blame] | 2512 | #define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2513 | /* Board info for the slimbus slave device */ |
| 2514 | static struct resource slimbus_res[] = { |
| 2515 | { |
| 2516 | .start = LPASS_SLIMBUS_PHYS, |
| 2517 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 2518 | .flags = IORESOURCE_MEM, |
| 2519 | .name = "slimbus_physical", |
| 2520 | }, |
| 2521 | { |
| 2522 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 2523 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 2524 | .flags = IORESOURCE_MEM, |
| 2525 | .name = "slimbus_bam_physical", |
| 2526 | }, |
| 2527 | { |
Sagar Dharia | cc96945 | 2011-09-19 10:34:30 -0600 | [diff] [blame] | 2528 | .start = LPASS_SLIMBUS_SLEW, |
| 2529 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 2530 | .flags = IORESOURCE_MEM, |
| 2531 | .name = "slimbus_slew_reg", |
| 2532 | }, |
| 2533 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2534 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 2535 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 2536 | .flags = IORESOURCE_IRQ, |
| 2537 | .name = "slimbus_irq", |
| 2538 | }, |
| 2539 | { |
| 2540 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 2541 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 2542 | .flags = IORESOURCE_IRQ, |
| 2543 | .name = "slimbus_bam_irq", |
| 2544 | }, |
| 2545 | }; |
| 2546 | |
| 2547 | struct platform_device msm_slim_ctrl = { |
| 2548 | .name = "msm_slim_ctrl", |
| 2549 | .id = 1, |
| 2550 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 2551 | .resource = slimbus_res, |
| 2552 | .dev = { |
| 2553 | .coherent_dma_mask = 0xffffffffULL, |
| 2554 | }, |
| 2555 | }; |
| 2556 | |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2557 | static struct msm_dcvs_freq_entry grp3d_freq[] = { |
| 2558 | {0, 0, 333932}, |
| 2559 | {0, 0, 497532}, |
| 2560 | {0, 0, 707610}, |
| 2561 | {0, 0, 844545}, |
| 2562 | }; |
| 2563 | |
| 2564 | static struct msm_dcvs_freq_entry grp2d_freq[] = { |
| 2565 | {0, 0, 86000}, |
| 2566 | {0, 0, 200000}, |
| 2567 | }; |
| 2568 | |
| 2569 | static struct msm_dcvs_core_info grp3d_core_info = { |
| 2570 | .freq_tbl = &grp3d_freq[0], |
| 2571 | .core_param = { |
| 2572 | .max_time_us = 100000, |
| 2573 | .num_freq = ARRAY_SIZE(grp3d_freq), |
| 2574 | }, |
| 2575 | .algo_param = { |
| 2576 | .slack_time_us = 39000, |
| 2577 | .disable_pc_threshold = 86000, |
| 2578 | .ss_window_size = 1000000, |
| 2579 | .ss_util_pct = 95, |
| 2580 | .em_max_util_pct = 97, |
| 2581 | .ss_iobusy_conv = 100, |
| 2582 | }, |
| 2583 | }; |
| 2584 | |
| 2585 | static struct msm_dcvs_core_info grp2d_core_info = { |
| 2586 | .freq_tbl = &grp2d_freq[0], |
| 2587 | .core_param = { |
| 2588 | .max_time_us = 100000, |
| 2589 | .num_freq = ARRAY_SIZE(grp2d_freq), |
| 2590 | }, |
| 2591 | .algo_param = { |
| 2592 | .slack_time_us = 39000, |
| 2593 | .disable_pc_threshold = 90000, |
| 2594 | .ss_window_size = 1000000, |
| 2595 | .ss_util_pct = 90, |
| 2596 | .em_max_util_pct = 95, |
| 2597 | }, |
| 2598 | }; |
| 2599 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2600 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2601 | static struct msm_bus_vectors grp3d_init_vectors[] = { |
| 2602 | { |
| 2603 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2604 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2605 | .ab = 0, |
| 2606 | .ib = 0, |
| 2607 | }, |
| 2608 | }; |
| 2609 | |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2610 | static struct msm_bus_vectors grp3d_low_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2611 | { |
| 2612 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2613 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2614 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2615 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2616 | }, |
| 2617 | }; |
| 2618 | |
| 2619 | static struct msm_bus_vectors grp3d_nominal_low_vectors[] = { |
| 2620 | { |
| 2621 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2622 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2623 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2624 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2625 | }, |
| 2626 | }; |
| 2627 | |
| 2628 | static struct msm_bus_vectors grp3d_nominal_high_vectors[] = { |
| 2629 | { |
| 2630 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2631 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2632 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2633 | .ib = KGSL_CONVERT_TO_MBPS(2656), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2634 | }, |
| 2635 | }; |
| 2636 | |
| 2637 | static struct msm_bus_vectors grp3d_max_vectors[] = { |
| 2638 | { |
| 2639 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 2640 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2641 | .ab = 0, |
Suman Tatiraju | 0123d18 | 2011-09-30 14:59:06 -0700 | [diff] [blame] | 2642 | .ib = KGSL_CONVERT_TO_MBPS(3968), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2643 | }, |
| 2644 | }; |
| 2645 | |
| 2646 | static struct msm_bus_paths grp3d_bus_scale_usecases[] = { |
| 2647 | { |
| 2648 | ARRAY_SIZE(grp3d_init_vectors), |
| 2649 | grp3d_init_vectors, |
| 2650 | }, |
| 2651 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 2652 | ARRAY_SIZE(grp3d_low_vectors), |
| 2653 | grp3d_low_vectors, |
| 2654 | }, |
| 2655 | { |
| 2656 | ARRAY_SIZE(grp3d_nominal_low_vectors), |
| 2657 | grp3d_nominal_low_vectors, |
| 2658 | }, |
| 2659 | { |
| 2660 | ARRAY_SIZE(grp3d_nominal_high_vectors), |
| 2661 | grp3d_nominal_high_vectors, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2662 | }, |
| 2663 | { |
| 2664 | ARRAY_SIZE(grp3d_max_vectors), |
| 2665 | grp3d_max_vectors, |
| 2666 | }, |
| 2667 | }; |
| 2668 | |
| 2669 | static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = { |
| 2670 | grp3d_bus_scale_usecases, |
| 2671 | ARRAY_SIZE(grp3d_bus_scale_usecases), |
| 2672 | .name = "grp3d", |
| 2673 | }; |
| 2674 | |
| 2675 | static struct msm_bus_vectors grp2d0_init_vectors[] = { |
| 2676 | { |
| 2677 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2678 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2679 | .ab = 0, |
| 2680 | .ib = 0, |
| 2681 | }, |
| 2682 | }; |
| 2683 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2684 | static struct msm_bus_vectors grp2d0_nominal_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2685 | { |
| 2686 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2687 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2688 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2689 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2690 | }, |
| 2691 | }; |
| 2692 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2693 | static struct msm_bus_vectors grp2d0_max_vectors[] = { |
| 2694 | { |
| 2695 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 2696 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2697 | .ab = 0, |
| 2698 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
| 2699 | }, |
| 2700 | }; |
| 2701 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2702 | static struct msm_bus_paths grp2d0_bus_scale_usecases[] = { |
| 2703 | { |
| 2704 | ARRAY_SIZE(grp2d0_init_vectors), |
| 2705 | grp2d0_init_vectors, |
| 2706 | }, |
| 2707 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2708 | ARRAY_SIZE(grp2d0_nominal_vectors), |
| 2709 | grp2d0_nominal_vectors, |
| 2710 | }, |
| 2711 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2712 | ARRAY_SIZE(grp2d0_max_vectors), |
| 2713 | grp2d0_max_vectors, |
| 2714 | }, |
| 2715 | }; |
| 2716 | |
| 2717 | struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = { |
| 2718 | grp2d0_bus_scale_usecases, |
| 2719 | ARRAY_SIZE(grp2d0_bus_scale_usecases), |
| 2720 | .name = "grp2d0", |
| 2721 | }; |
| 2722 | |
| 2723 | static struct msm_bus_vectors grp2d1_init_vectors[] = { |
| 2724 | { |
| 2725 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2726 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2727 | .ab = 0, |
| 2728 | .ib = 0, |
| 2729 | }, |
| 2730 | }; |
| 2731 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2732 | static struct msm_bus_vectors grp2d1_nominal_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2733 | { |
| 2734 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2735 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2736 | .ab = 0, |
Lucille Sylvester | 3efebb5 | 2012-01-17 12:58:38 -0700 | [diff] [blame] | 2737 | .ib = KGSL_CONVERT_TO_MBPS(1000), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2738 | }, |
| 2739 | }; |
| 2740 | |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2741 | static struct msm_bus_vectors grp2d1_max_vectors[] = { |
| 2742 | { |
| 2743 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 2744 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2745 | .ab = 0, |
| 2746 | .ib = KGSL_CONVERT_TO_MBPS(2048), |
| 2747 | }, |
| 2748 | }; |
| 2749 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2750 | static struct msm_bus_paths grp2d1_bus_scale_usecases[] = { |
| 2751 | { |
| 2752 | ARRAY_SIZE(grp2d1_init_vectors), |
| 2753 | grp2d1_init_vectors, |
| 2754 | }, |
| 2755 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2756 | ARRAY_SIZE(grp2d1_nominal_vectors), |
| 2757 | grp2d1_nominal_vectors, |
| 2758 | }, |
| 2759 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2760 | ARRAY_SIZE(grp2d1_max_vectors), |
| 2761 | grp2d1_max_vectors, |
| 2762 | }, |
| 2763 | }; |
| 2764 | |
| 2765 | struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = { |
| 2766 | grp2d1_bus_scale_usecases, |
| 2767 | ARRAY_SIZE(grp2d1_bus_scale_usecases), |
| 2768 | .name = "grp2d1", |
| 2769 | }; |
| 2770 | #endif |
| 2771 | |
| 2772 | static struct resource kgsl_3d0_resources[] = { |
| 2773 | { |
| 2774 | .name = KGSL_3D0_REG_MEMORY, |
| 2775 | .start = 0x04300000, /* GFX3D address */ |
| 2776 | .end = 0x0431ffff, |
| 2777 | .flags = IORESOURCE_MEM, |
| 2778 | }, |
| 2779 | { |
| 2780 | .name = KGSL_3D0_IRQ, |
| 2781 | .start = GFX3D_IRQ, |
| 2782 | .end = GFX3D_IRQ, |
| 2783 | .flags = IORESOURCE_IRQ, |
| 2784 | }, |
| 2785 | }; |
| 2786 | |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2787 | static const struct kgsl_iommu_ctx kgsl_3d0_iommu_ctxs[] = { |
| 2788 | { "gfx3d_user", 0 }, |
| 2789 | { "gfx3d_priv", 1 }, |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2790 | }; |
| 2791 | |
| 2792 | static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = { |
| 2793 | { |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2794 | .iommu_ctxs = kgsl_3d0_iommu_ctxs, |
| 2795 | .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctxs), |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2796 | .physstart = 0x07C00000, |
| 2797 | .physend = 0x07C00000 + SZ_1M - 1, |
| 2798 | }, |
| 2799 | }; |
| 2800 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2801 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2802 | .pwrlevel = { |
| 2803 | { |
| 2804 | .gpu_freq = 400000000, |
| 2805 | .bus_freq = 4, |
| 2806 | .io_fraction = 0, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2807 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2808 | { |
| 2809 | .gpu_freq = 300000000, |
| 2810 | .bus_freq = 3, |
| 2811 | .io_fraction = 33, |
| 2812 | }, |
| 2813 | { |
| 2814 | .gpu_freq = 200000000, |
| 2815 | .bus_freq = 2, |
| 2816 | .io_fraction = 100, |
| 2817 | }, |
| 2818 | { |
| 2819 | .gpu_freq = 128000000, |
| 2820 | .bus_freq = 1, |
| 2821 | .io_fraction = 100, |
| 2822 | }, |
| 2823 | { |
| 2824 | .gpu_freq = 27000000, |
| 2825 | .bus_freq = 0, |
| 2826 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2827 | }, |
Lucille Sylvester | 67b4c53 | 2012-02-08 11:24:31 -0800 | [diff] [blame] | 2828 | .init_level = 1, |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2829 | .num_levels = ARRAY_SIZE(grp3d_freq) + 1, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2830 | .set_grp_async = NULL, |
Lucille Sylvester | 5dc6751 | 2012-03-27 15:07:58 -0600 | [diff] [blame] | 2831 | .idle_timeout = HZ/12, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2832 | .nap_allowed = true, |
| 2833 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2834 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2835 | .bus_scale_table = &grp3d_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2836 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2837 | .iommu_data = kgsl_3d0_iommu_data, |
| 2838 | .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data), |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2839 | .core_info = &grp3d_core_info, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2840 | }; |
| 2841 | |
| 2842 | struct platform_device msm_kgsl_3d0 = { |
| 2843 | .name = "kgsl-3d0", |
| 2844 | .id = 0, |
| 2845 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 2846 | .resource = kgsl_3d0_resources, |
| 2847 | .dev = { |
| 2848 | .platform_data = &kgsl_3d0_pdata, |
| 2849 | }, |
| 2850 | }; |
| 2851 | |
| 2852 | static struct resource kgsl_2d0_resources[] = { |
| 2853 | { |
| 2854 | .name = KGSL_2D0_REG_MEMORY, |
| 2855 | .start = 0x04100000, /* Z180 base address */ |
| 2856 | .end = 0x04100FFF, |
| 2857 | .flags = IORESOURCE_MEM, |
| 2858 | }, |
| 2859 | { |
| 2860 | .name = KGSL_2D0_IRQ, |
| 2861 | .start = GFX2D0_IRQ, |
| 2862 | .end = GFX2D0_IRQ, |
| 2863 | .flags = IORESOURCE_IRQ, |
| 2864 | }, |
| 2865 | }; |
| 2866 | |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2867 | static const struct kgsl_iommu_ctx kgsl_2d0_iommu_ctxs[] = { |
| 2868 | { "gfx2d0_2d0", 0 }, |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2869 | }; |
| 2870 | |
| 2871 | static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = { |
| 2872 | { |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2873 | .iommu_ctxs = kgsl_2d0_iommu_ctxs, |
| 2874 | .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctxs), |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2875 | .physstart = 0x07D00000, |
| 2876 | .physend = 0x07D00000 + SZ_1M - 1, |
| 2877 | }, |
| 2878 | }; |
| 2879 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2880 | static struct kgsl_device_platform_data kgsl_2d0_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2881 | .pwrlevel = { |
| 2882 | { |
| 2883 | .gpu_freq = 200000000, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2884 | .bus_freq = 2, |
| 2885 | }, |
| 2886 | { |
| 2887 | .gpu_freq = 96000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2888 | .bus_freq = 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2889 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2890 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2891 | .gpu_freq = 27000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2892 | .bus_freq = 0, |
| 2893 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2894 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2895 | .init_level = 0, |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2896 | .num_levels = ARRAY_SIZE(grp2d_freq) + 1, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2897 | .set_grp_async = NULL, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2898 | .idle_timeout = HZ/5, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2899 | .nap_allowed = true, |
| 2900 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2901 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2902 | .bus_scale_table = &grp2d0_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2903 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2904 | .iommu_data = kgsl_2d0_iommu_data, |
| 2905 | .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data), |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2906 | .core_info = &grp2d_core_info, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2907 | }; |
| 2908 | |
| 2909 | struct platform_device msm_kgsl_2d0 = { |
| 2910 | .name = "kgsl-2d0", |
| 2911 | .id = 0, |
| 2912 | .num_resources = ARRAY_SIZE(kgsl_2d0_resources), |
| 2913 | .resource = kgsl_2d0_resources, |
| 2914 | .dev = { |
| 2915 | .platform_data = &kgsl_2d0_pdata, |
| 2916 | }, |
| 2917 | }; |
| 2918 | |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2919 | static const struct kgsl_iommu_ctx kgsl_2d1_iommu_ctxs[] = { |
| 2920 | { "gfx2d1_2d1", 0 }, |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2921 | }; |
| 2922 | |
| 2923 | static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = { |
| 2924 | { |
Shubhraprakash Das | eb6df1d | 2012-05-01 00:55:35 -0600 | [diff] [blame] | 2925 | .iommu_ctxs = kgsl_2d1_iommu_ctxs, |
| 2926 | .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctxs), |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2927 | .physstart = 0x07E00000, |
| 2928 | .physend = 0x07E00000 + SZ_1M - 1, |
| 2929 | }, |
| 2930 | }; |
| 2931 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2932 | static struct resource kgsl_2d1_resources[] = { |
| 2933 | { |
| 2934 | .name = KGSL_2D1_REG_MEMORY, |
| 2935 | .start = 0x04200000, /* Z180 device 1 base address */ |
| 2936 | .end = 0x04200FFF, |
| 2937 | .flags = IORESOURCE_MEM, |
| 2938 | }, |
| 2939 | { |
| 2940 | .name = KGSL_2D1_IRQ, |
| 2941 | .start = GFX2D1_IRQ, |
| 2942 | .end = GFX2D1_IRQ, |
| 2943 | .flags = IORESOURCE_IRQ, |
| 2944 | }, |
| 2945 | }; |
| 2946 | |
| 2947 | static struct kgsl_device_platform_data kgsl_2d1_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2948 | .pwrlevel = { |
| 2949 | { |
| 2950 | .gpu_freq = 200000000, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2951 | .bus_freq = 2, |
| 2952 | }, |
| 2953 | { |
| 2954 | .gpu_freq = 96000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2955 | .bus_freq = 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2956 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2957 | { |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2958 | .gpu_freq = 27000000, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2959 | .bus_freq = 0, |
| 2960 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2961 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2962 | .init_level = 0, |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2963 | .num_levels = ARRAY_SIZE(grp2d_freq) + 1, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2964 | .set_grp_async = NULL, |
Lucille Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 2965 | .idle_timeout = HZ/5, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2966 | .nap_allowed = true, |
| 2967 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2968 | #ifdef CONFIG_MSM_BUS_SCALING |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 2969 | .bus_scale_table = &grp2d1_bus_scale_pdata, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2970 | #endif |
Jordan Crouse | 46cf4bb | 2012-02-21 08:54:52 -0700 | [diff] [blame] | 2971 | .iommu_data = kgsl_2d1_iommu_data, |
| 2972 | .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data), |
Lucille Sylvester | 6e36241 | 2011-12-09 16:21:42 -0700 | [diff] [blame] | 2973 | .core_info = &grp2d_core_info, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2974 | }; |
| 2975 | |
| 2976 | struct platform_device msm_kgsl_2d1 = { |
| 2977 | .name = "kgsl-2d1", |
| 2978 | .id = 1, |
| 2979 | .num_resources = ARRAY_SIZE(kgsl_2d1_resources), |
| 2980 | .resource = kgsl_2d1_resources, |
| 2981 | .dev = { |
| 2982 | .platform_data = &kgsl_2d1_pdata, |
| 2983 | }, |
| 2984 | }; |
| 2985 | |
| 2986 | #ifdef CONFIG_MSM_GEMINI |
| 2987 | static struct resource msm_gemini_resources[] = { |
| 2988 | { |
| 2989 | .start = 0x04600000, |
| 2990 | .end = 0x04600000 + SZ_1M - 1, |
| 2991 | .flags = IORESOURCE_MEM, |
| 2992 | }, |
| 2993 | { |
| 2994 | .start = JPEG_IRQ, |
| 2995 | .end = JPEG_IRQ, |
| 2996 | .flags = IORESOURCE_IRQ, |
| 2997 | }, |
| 2998 | }; |
| 2999 | |
| 3000 | struct platform_device msm8960_gemini_device = { |
| 3001 | .name = "msm_gemini", |
| 3002 | .resource = msm_gemini_resources, |
| 3003 | .num_resources = ARRAY_SIZE(msm_gemini_resources), |
| 3004 | }; |
| 3005 | #endif |
| 3006 | |
Kalyani Oruganti | 465d1e1 | 2012-05-15 10:23:05 -0700 | [diff] [blame] | 3007 | #ifdef CONFIG_MSM_MERCURY |
| 3008 | static struct resource msm_mercury_resources[] = { |
| 3009 | { |
| 3010 | .start = 0x05000000, |
| 3011 | .end = 0x05000000 + SZ_1M - 1, |
| 3012 | .name = "mercury_resource_base", |
| 3013 | .flags = IORESOURCE_MEM, |
| 3014 | }, |
| 3015 | { |
| 3016 | .start = JPEGD_IRQ, |
| 3017 | .end = JPEGD_IRQ, |
| 3018 | .flags = IORESOURCE_IRQ, |
| 3019 | }, |
| 3020 | }; |
| 3021 | struct platform_device msm8960_mercury_device = { |
| 3022 | .name = "msm_mercury", |
| 3023 | .resource = msm_mercury_resources, |
| 3024 | .num_resources = ARRAY_SIZE(msm_mercury_resources), |
| 3025 | }; |
| 3026 | #endif |
| 3027 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 3028 | struct msm_rpm_platform_data msm8960_rpm_data __initdata = { |
| 3029 | .reg_base_addrs = { |
| 3030 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 3031 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 3032 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 3033 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 3034 | }, |
| 3035 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 3036 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 3037 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 3038 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 3039 | .ipc_rpm_val = 4, |
| 3040 | .target_id = { |
| 3041 | MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 3042 | MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 3043 | MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8), |
| 3044 | MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 3045 | MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 3046 | MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1), |
| 3047 | MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1), |
| 3048 | MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1), |
| 3049 | MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 3050 | MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 3051 | MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 3052 | MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 3053 | MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1), |
| 3054 | MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1), |
| 3055 | MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1), |
| 3056 | MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1), |
| 3057 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0, |
| 3058 | APPS_FABRIC_CFG_HALT, 2), |
| 3059 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0, |
| 3060 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 3061 | MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL, |
| 3062 | APPS_FABRIC_CFG_IOCTL, 1), |
| 3063 | MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 3064 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0, |
| 3065 | SYS_FABRIC_CFG_HALT, 2), |
| 3066 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0, |
| 3067 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 3068 | MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL, |
| 3069 | SYS_FABRIC_CFG_IOCTL, 1), |
| 3070 | MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0, |
| 3071 | SYSTEM_FABRIC_ARB, 29), |
| 3072 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0, |
| 3073 | MMSS_FABRIC_CFG_HALT, 2), |
| 3074 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0, |
| 3075 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 3076 | MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL, |
| 3077 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 3078 | MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23), |
| 3079 | MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2), |
| 3080 | MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2), |
| 3081 | MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2), |
| 3082 | MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2), |
| 3083 | MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2), |
| 3084 | MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2), |
| 3085 | MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2), |
| 3086 | MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2), |
| 3087 | MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2), |
| 3088 | MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2), |
| 3089 | MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2), |
| 3090 | MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2), |
| 3091 | MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2), |
| 3092 | MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2), |
| 3093 | MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2), |
| 3094 | MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2), |
| 3095 | MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2), |
| 3096 | MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2), |
| 3097 | MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2), |
| 3098 | MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2), |
| 3099 | MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2), |
| 3100 | MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2), |
| 3101 | MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2), |
| 3102 | MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2), |
| 3103 | MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2), |
| 3104 | MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2), |
| 3105 | MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2), |
| 3106 | MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2), |
| 3107 | MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2), |
| 3108 | MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2), |
| 3109 | MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2), |
| 3110 | MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2), |
| 3111 | MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2), |
| 3112 | MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2), |
| 3113 | MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2), |
| 3114 | MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2), |
| 3115 | MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2), |
| 3116 | MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 3117 | MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 3118 | MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1), |
| 3119 | MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1), |
| 3120 | MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1), |
| 3121 | MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1), |
| 3122 | MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1), |
| 3123 | MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1), |
| 3124 | MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1), |
| 3125 | MSM_RPM_MAP(8960, NCP_0, NCP, 2), |
| 3126 | MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 3127 | MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 3128 | MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 3129 | MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2), |
| 3130 | MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1), |
| 3131 | }, |
| 3132 | .target_status = { |
| 3133 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR), |
| 3134 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR), |
| 3135 | MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD), |
| 3136 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0), |
| 3137 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1), |
| 3138 | MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2), |
| 3139 | MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0), |
| 3140 | MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE), |
| 3141 | MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL), |
| 3142 | MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK), |
| 3143 | MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK), |
| 3144 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK), |
| 3145 | MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK), |
| 3146 | MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK), |
| 3147 | MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK), |
| 3148 | MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK), |
| 3149 | MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK), |
| 3150 | MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK), |
| 3151 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK), |
| 3152 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT), |
| 3153 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD), |
| 3154 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL), |
| 3155 | MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB), |
| 3156 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT), |
| 3157 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD), |
| 3158 | MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL), |
| 3159 | MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB), |
| 3160 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT), |
| 3161 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD), |
| 3162 | MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL), |
| 3163 | MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB), |
| 3164 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0), |
| 3165 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1), |
| 3166 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0), |
| 3167 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1), |
| 3168 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0), |
| 3169 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1), |
| 3170 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0), |
| 3171 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1), |
| 3172 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0), |
| 3173 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1), |
| 3174 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0), |
| 3175 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1), |
| 3176 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0), |
| 3177 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1), |
| 3178 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0), |
| 3179 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1), |
| 3180 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0), |
| 3181 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1), |
| 3182 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0), |
| 3183 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1), |
| 3184 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0), |
| 3185 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1), |
| 3186 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0), |
| 3187 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1), |
| 3188 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0), |
| 3189 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1), |
| 3190 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0), |
| 3191 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1), |
| 3192 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0), |
| 3193 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1), |
| 3194 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0), |
| 3195 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1), |
| 3196 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0), |
| 3197 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1), |
| 3198 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0), |
| 3199 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1), |
| 3200 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0), |
| 3201 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1), |
| 3202 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0), |
| 3203 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1), |
| 3204 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0), |
| 3205 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1), |
| 3206 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0), |
| 3207 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1), |
| 3208 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0), |
| 3209 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1), |
| 3210 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0), |
| 3211 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1), |
| 3212 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0), |
| 3213 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1), |
| 3214 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0), |
| 3215 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1), |
| 3216 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0), |
| 3217 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1), |
| 3218 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0), |
| 3219 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1), |
| 3220 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0), |
| 3221 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1), |
| 3222 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0), |
| 3223 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1), |
| 3224 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0), |
| 3225 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1), |
| 3226 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0), |
| 3227 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1), |
| 3228 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0), |
| 3229 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1), |
| 3230 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0), |
| 3231 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1), |
| 3232 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0), |
| 3233 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1), |
| 3234 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0), |
| 3235 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1), |
| 3236 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0), |
| 3237 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1), |
| 3238 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0), |
| 3239 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1), |
| 3240 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0), |
| 3241 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1), |
| 3242 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1), |
| 3243 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2), |
| 3244 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3), |
| 3245 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4), |
| 3246 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5), |
| 3247 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6), |
| 3248 | MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7), |
| 3249 | MSM_RPM_STATUS_ID_MAP(8960, NCP_0), |
| 3250 | MSM_RPM_STATUS_ID_MAP(8960, NCP_1), |
| 3251 | MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS), |
| 3252 | MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH), |
| 3253 | MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH), |
| 3254 | MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0), |
| 3255 | MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1), |
| 3256 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE), |
| 3257 | MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE), |
| 3258 | }, |
| 3259 | .target_ctrl_id = { |
| 3260 | MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR), |
| 3261 | MSM_RPM_CTRL_MAP(8960, VERSION_MINOR), |
| 3262 | MSM_RPM_CTRL_MAP(8960, VERSION_BUILD), |
| 3263 | MSM_RPM_CTRL_MAP(8960, REQ_CTX_0), |
| 3264 | MSM_RPM_CTRL_MAP(8960, REQ_SEL_0), |
| 3265 | MSM_RPM_CTRL_MAP(8960, ACK_CTX_0), |
| 3266 | MSM_RPM_CTRL_MAP(8960, ACK_SEL_0), |
| 3267 | }, |
| 3268 | .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE, |
| 3269 | .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION, |
| 3270 | .sel_last = MSM_RPM_8960_SEL_LAST, |
| 3271 | .ver = {3, 0, 0}, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3272 | }; |
Praveen Chidambaram | 8985b01 | 2011-12-16 13:38:59 -0700 | [diff] [blame] | 3273 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 3274 | struct platform_device msm8960_rpm_device = { |
Maheshkumar Sivasubramanian | 9c8cdc9 | 2011-09-12 14:11:30 -0600 | [diff] [blame] | 3275 | .name = "msm_rpm", |
| 3276 | .id = -1, |
| 3277 | }; |
| 3278 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 3279 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 3280 | .phys_addr_base = 0x0010C000, |
| 3281 | .reg_offsets = { |
| 3282 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 3283 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 3284 | }, |
| 3285 | .phys_size = SZ_8K, |
| 3286 | .log_len = 4096, /* log's buffer length in bytes */ |
| 3287 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 3288 | }; |
| 3289 | |
| 3290 | struct platform_device msm8960_rpm_log_device = { |
| 3291 | .name = "msm_rpm_log", |
| 3292 | .id = -1, |
| 3293 | .dev = { |
| 3294 | .platform_data = &msm_rpm_log_pdata, |
| 3295 | }, |
| 3296 | }; |
| 3297 | |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 3298 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 3299 | .phys_addr_base = 0x0010D204, |
| 3300 | .phys_size = SZ_8K, |
| 3301 | }; |
| 3302 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 3303 | struct platform_device msm8960_rpm_stat_device = { |
Praveen Chidambaram | 7a71223 | 2011-10-28 13:39:45 -0600 | [diff] [blame] | 3304 | .name = "msm_rpm_stat", |
| 3305 | .id = -1, |
| 3306 | .dev = { |
| 3307 | .platform_data = &msm_rpm_stat_pdata, |
| 3308 | }, |
| 3309 | }; |
Maheshkumar Sivasubramanian | 9c8cdc9 | 2011-09-12 14:11:30 -0600 | [diff] [blame] | 3310 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3311 | struct platform_device msm_bus_sys_fabric = { |
| 3312 | .name = "msm_bus_fabric", |
| 3313 | .id = MSM_BUS_FAB_SYSTEM, |
| 3314 | }; |
| 3315 | struct platform_device msm_bus_apps_fabric = { |
| 3316 | .name = "msm_bus_fabric", |
| 3317 | .id = MSM_BUS_FAB_APPSS, |
| 3318 | }; |
| 3319 | struct platform_device msm_bus_mm_fabric = { |
| 3320 | .name = "msm_bus_fabric", |
| 3321 | .id = MSM_BUS_FAB_MMSS, |
| 3322 | }; |
| 3323 | struct platform_device msm_bus_sys_fpb = { |
| 3324 | .name = "msm_bus_fabric", |
| 3325 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 3326 | }; |
| 3327 | struct platform_device msm_bus_cpss_fpb = { |
| 3328 | .name = "msm_bus_fabric", |
| 3329 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 3330 | }; |
| 3331 | |
| 3332 | /* Sensors DSPS platform data */ |
| 3333 | #ifdef CONFIG_MSM_DSPS |
| 3334 | |
karthik karuppasamy | 1a1c6b0 | 2012-05-29 15:16:32 -0700 | [diff] [blame] | 3335 | #define PPSS_DSPS_TCM_CODE_BASE 0x12000000 |
| 3336 | #define PPSS_DSPS_TCM_CODE_SIZE 0x28000 |
| 3337 | #define PPSS_DSPS_TCM_BUF_BASE 0x12040000 |
| 3338 | #define PPSS_DSPS_TCM_BUF_SIZE 0x4000 |
| 3339 | #define PPSS_DSPS_PIPE_BASE 0x12800000 |
| 3340 | #define PPSS_DSPS_PIPE_SIZE 0x4000 |
| 3341 | #define PPSS_DSPS_DDR_BASE 0x8fe00000 |
| 3342 | #define PPSS_DSPS_DDR_SIZE 0x100000 |
| 3343 | #define PPSS_SMEM_BASE 0x80000000 |
| 3344 | #define PPSS_SMEM_SIZE 0x200000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3345 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 3346 | |
| 3347 | static struct dsps_clk_info dsps_clks[] = {}; |
| 3348 | static struct dsps_regulator_info dsps_regs[] = {}; |
| 3349 | |
| 3350 | /* |
| 3351 | * Note: GPIOs field is intialized in run-time at the function |
| 3352 | * msm8960_init_dsps(). |
| 3353 | */ |
| 3354 | |
| 3355 | struct msm_dsps_platform_data msm_dsps_pdata = { |
| 3356 | .clks = dsps_clks, |
| 3357 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 3358 | .gpios = NULL, |
| 3359 | .gpios_num = 0, |
| 3360 | .regs = dsps_regs, |
| 3361 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 3362 | .dsps_pwr_ctl_en = 1, |
karthik karuppasamy | 1a1c6b0 | 2012-05-29 15:16:32 -0700 | [diff] [blame] | 3363 | .tcm_code_start = PPSS_DSPS_TCM_CODE_BASE, |
| 3364 | .tcm_code_size = PPSS_DSPS_TCM_CODE_SIZE, |
| 3365 | .tcm_buf_start = PPSS_DSPS_TCM_BUF_BASE, |
| 3366 | .tcm_buf_size = PPSS_DSPS_TCM_BUF_SIZE, |
| 3367 | .pipe_start = PPSS_DSPS_PIPE_BASE, |
| 3368 | .pipe_size = PPSS_DSPS_PIPE_SIZE, |
| 3369 | .ddr_start = PPSS_DSPS_DDR_BASE, |
| 3370 | .ddr_size = PPSS_DSPS_DDR_SIZE, |
| 3371 | .smem_start = PPSS_SMEM_BASE, |
| 3372 | .smem_size = PPSS_SMEM_SIZE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3373 | .signature = DSPS_SIGNATURE, |
| 3374 | }; |
| 3375 | |
| 3376 | static struct resource msm_dsps_resources[] = { |
| 3377 | { |
| 3378 | .start = PPSS_REG_PHYS_BASE, |
| 3379 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 3380 | .name = "ppss_reg", |
| 3381 | .flags = IORESOURCE_MEM, |
| 3382 | }, |
Wentao Xu | a55500b | 2011-08-16 18:15:04 -0400 | [diff] [blame] | 3383 | { |
| 3384 | .start = PPSS_WDOG_TIMER_IRQ, |
| 3385 | .end = PPSS_WDOG_TIMER_IRQ, |
| 3386 | .name = "ppss_wdog", |
| 3387 | .flags = IORESOURCE_IRQ, |
| 3388 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3389 | }; |
| 3390 | |
| 3391 | struct platform_device msm_dsps_device = { |
| 3392 | .name = "msm_dsps", |
| 3393 | .id = 0, |
| 3394 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 3395 | .resource = msm_dsps_resources, |
| 3396 | .dev.platform_data = &msm_dsps_pdata, |
| 3397 | }; |
| 3398 | |
| 3399 | #endif /* CONFIG_MSM_DSPS */ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3400 | |
| 3401 | #ifdef CONFIG_MSM_QDSS |
| 3402 | |
| 3403 | #define MSM_QDSS_PHYS_BASE 0x01A00000 |
| 3404 | #define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000) |
| 3405 | #define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000) |
| 3406 | #define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000) |
Pratik Patel | 492b301 | 2012-03-06 14:22:30 -0800 | [diff] [blame] | 3407 | #define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3408 | |
Pratik Patel | 1403f2a | 2012-03-21 10:10:00 -0700 | [diff] [blame] | 3409 | #define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, } |
| 3410 | |
| 3411 | static struct qdss_source msm_qdss_sources[] = { |
| 3412 | QDSS_SOURCE("msm_etm", 0x3), |
| 3413 | }; |
| 3414 | |
| 3415 | static struct msm_qdss_platform_data qdss_pdata = { |
| 3416 | .src_table = msm_qdss_sources, |
| 3417 | .size = ARRAY_SIZE(msm_qdss_sources), |
| 3418 | .afamily = 1, |
| 3419 | }; |
| 3420 | |
| 3421 | struct platform_device msm_qdss_device = { |
| 3422 | .name = "msm_qdss", |
| 3423 | .id = -1, |
| 3424 | .dev = { |
| 3425 | .platform_data = &qdss_pdata, |
| 3426 | }, |
| 3427 | }; |
| 3428 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3429 | static struct resource msm_etb_resources[] = { |
| 3430 | { |
| 3431 | .start = MSM_ETB_PHYS_BASE, |
| 3432 | .end = MSM_ETB_PHYS_BASE + SZ_4K - 1, |
| 3433 | .flags = IORESOURCE_MEM, |
| 3434 | }, |
| 3435 | }; |
| 3436 | |
| 3437 | struct platform_device msm_etb_device = { |
| 3438 | .name = "msm_etb", |
| 3439 | .id = 0, |
| 3440 | .num_resources = ARRAY_SIZE(msm_etb_resources), |
| 3441 | .resource = msm_etb_resources, |
| 3442 | }; |
| 3443 | |
| 3444 | static struct resource msm_tpiu_resources[] = { |
| 3445 | { |
| 3446 | .start = MSM_TPIU_PHYS_BASE, |
| 3447 | .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1, |
| 3448 | .flags = IORESOURCE_MEM, |
| 3449 | }, |
| 3450 | }; |
| 3451 | |
| 3452 | struct platform_device msm_tpiu_device = { |
| 3453 | .name = "msm_tpiu", |
| 3454 | .id = 0, |
| 3455 | .num_resources = ARRAY_SIZE(msm_tpiu_resources), |
| 3456 | .resource = msm_tpiu_resources, |
| 3457 | }; |
| 3458 | |
| 3459 | static struct resource msm_funnel_resources[] = { |
| 3460 | { |
| 3461 | .start = MSM_FUNNEL_PHYS_BASE, |
| 3462 | .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1, |
| 3463 | .flags = IORESOURCE_MEM, |
| 3464 | }, |
| 3465 | }; |
| 3466 | |
| 3467 | struct platform_device msm_funnel_device = { |
| 3468 | .name = "msm_funnel", |
| 3469 | .id = 0, |
| 3470 | .num_resources = ARRAY_SIZE(msm_funnel_resources), |
| 3471 | .resource = msm_funnel_resources, |
| 3472 | }; |
| 3473 | |
Pratik Patel | 492b301 | 2012-03-06 14:22:30 -0800 | [diff] [blame] | 3474 | static struct resource msm_etm_resources[] = { |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3475 | { |
Pratik Patel | 492b301 | 2012-03-06 14:22:30 -0800 | [diff] [blame] | 3476 | .start = MSM_ETM_PHYS_BASE, |
| 3477 | .end = MSM_ETM_PHYS_BASE + (SZ_4K * 2) - 1, |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3478 | .flags = IORESOURCE_MEM, |
| 3479 | }, |
| 3480 | }; |
| 3481 | |
Pratik Patel | 492b301 | 2012-03-06 14:22:30 -0800 | [diff] [blame] | 3482 | struct platform_device msm_etm_device = { |
| 3483 | .name = "msm_etm", |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3484 | .id = 0, |
Pratik Patel | 492b301 | 2012-03-06 14:22:30 -0800 | [diff] [blame] | 3485 | .num_resources = ARRAY_SIZE(msm_etm_resources), |
| 3486 | .resource = msm_etm_resources, |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 3487 | }; |
| 3488 | |
| 3489 | #endif |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 3490 | |
Stepan Moskovchenko | c055725 | 2012-06-07 17:39:14 -0700 | [diff] [blame^] | 3491 | static struct resource msm_ebi1_ch0_erp_resources[] = { |
| 3492 | { |
| 3493 | .start = HSDDRX_EBI1CH0_IRQ, |
| 3494 | .flags = IORESOURCE_IRQ, |
| 3495 | }, |
| 3496 | { |
| 3497 | .start = 0x00A40000, |
| 3498 | .end = 0x00A40000 + SZ_4K - 1, |
| 3499 | .flags = IORESOURCE_MEM, |
| 3500 | }, |
| 3501 | }; |
| 3502 | |
| 3503 | struct platform_device msm8960_device_ebi1_ch0_erp = { |
| 3504 | .name = "msm_ebi_erp", |
| 3505 | .id = 0, |
| 3506 | .num_resources = ARRAY_SIZE(msm_ebi1_ch0_erp_resources), |
| 3507 | .resource = msm_ebi1_ch0_erp_resources, |
| 3508 | }; |
| 3509 | |
| 3510 | static struct resource msm_ebi1_ch1_erp_resources[] = { |
| 3511 | { |
| 3512 | .start = HSDDRX_EBI1CH1_IRQ, |
| 3513 | .flags = IORESOURCE_IRQ, |
| 3514 | }, |
| 3515 | { |
| 3516 | .start = 0x00D40000, |
| 3517 | .end = 0x00D40000 + SZ_4K - 1, |
| 3518 | .flags = IORESOURCE_MEM, |
| 3519 | }, |
| 3520 | }; |
| 3521 | |
| 3522 | struct platform_device msm8960_device_ebi1_ch1_erp = { |
| 3523 | .name = "msm_ebi_erp", |
| 3524 | .id = 1, |
| 3525 | .num_resources = ARRAY_SIZE(msm_ebi1_ch1_erp_resources), |
| 3526 | .resource = msm_ebi1_ch1_erp_resources, |
| 3527 | }; |
| 3528 | |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 3529 | static int msm8960_LPM_latency = 1000; /* >100 usec for WFI */ |
| 3530 | |
| 3531 | struct platform_device msm8960_cpu_idle_device = { |
| 3532 | .name = "msm_cpu_idle", |
| 3533 | .id = -1, |
| 3534 | .dev = { |
| 3535 | .platform_data = &msm8960_LPM_latency, |
| 3536 | }, |
| 3537 | }; |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 3538 | |
| 3539 | static struct msm_dcvs_freq_entry msm8960_freq[] = { |
| 3540 | { 384000, 166981, 345600}, |
| 3541 | { 702000, 213049, 632502}, |
| 3542 | {1026000, 285712, 925613}, |
| 3543 | {1242000, 383945, 1176550}, |
| 3544 | {1458000, 419729, 1465478}, |
| 3545 | {1512000, 434116, 1546674}, |
| 3546 | |
| 3547 | }; |
| 3548 | |
| 3549 | static struct msm_dcvs_core_info msm8960_core_info = { |
| 3550 | .freq_tbl = &msm8960_freq[0], |
| 3551 | .core_param = { |
| 3552 | .max_time_us = 100000, |
| 3553 | .num_freq = ARRAY_SIZE(msm8960_freq), |
| 3554 | }, |
| 3555 | .algo_param = { |
| 3556 | .slack_time_us = 58000, |
| 3557 | .scale_slack_time = 0, |
| 3558 | .scale_slack_time_pct = 0, |
| 3559 | .disable_pc_threshold = 1458000, |
| 3560 | .em_window_size = 100000, |
| 3561 | .em_max_util_pct = 97, |
| 3562 | .ss_window_size = 1000000, |
| 3563 | .ss_util_pct = 95, |
| 3564 | .ss_iobusy_conv = 100, |
| 3565 | }, |
| 3566 | }; |
| 3567 | |
| 3568 | struct platform_device msm8960_msm_gov_device = { |
| 3569 | .name = "msm_dcvs_gov", |
| 3570 | .id = -1, |
| 3571 | .dev = { |
| 3572 | .platform_data = &msm8960_core_info, |
| 3573 | }, |
| 3574 | }; |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 3575 | |
| 3576 | static struct resource msm_cache_erp_resources[] = { |
| 3577 | { |
| 3578 | .name = "l1_irq", |
| 3579 | .start = SC_SICCPUXEXTFAULTIRPTREQ, |
| 3580 | .flags = IORESOURCE_IRQ, |
| 3581 | }, |
| 3582 | { |
| 3583 | .name = "l2_irq", |
| 3584 | .start = APCC_QGICL2IRPTREQ, |
| 3585 | .flags = IORESOURCE_IRQ, |
| 3586 | } |
| 3587 | }; |
| 3588 | |
| 3589 | struct platform_device msm8960_device_cache_erp = { |
| 3590 | .name = "msm_cache_erp", |
| 3591 | .id = -1, |
| 3592 | .num_resources = ARRAY_SIZE(msm_cache_erp_resources), |
| 3593 | .resource = msm_cache_erp_resources, |
| 3594 | }; |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3595 | |
| 3596 | struct msm_iommu_domain_name msm8960_iommu_ctx_names[] = { |
| 3597 | /* Camera */ |
| 3598 | { |
| 3599 | .name = "vpe_src", |
| 3600 | .domain = CAMERA_DOMAIN, |
| 3601 | }, |
| 3602 | /* Camera */ |
| 3603 | { |
| 3604 | .name = "vpe_dst", |
| 3605 | .domain = CAMERA_DOMAIN, |
| 3606 | }, |
| 3607 | /* Camera */ |
| 3608 | { |
| 3609 | .name = "vfe_imgwr", |
| 3610 | .domain = CAMERA_DOMAIN, |
| 3611 | }, |
| 3612 | /* Camera */ |
| 3613 | { |
| 3614 | .name = "vfe_misc", |
| 3615 | .domain = CAMERA_DOMAIN, |
| 3616 | }, |
| 3617 | /* Camera */ |
| 3618 | { |
| 3619 | .name = "ijpeg_src", |
| 3620 | .domain = CAMERA_DOMAIN, |
| 3621 | }, |
| 3622 | /* Camera */ |
| 3623 | { |
| 3624 | .name = "ijpeg_dst", |
| 3625 | .domain = CAMERA_DOMAIN, |
| 3626 | }, |
| 3627 | /* Camera */ |
| 3628 | { |
| 3629 | .name = "jpegd_src", |
| 3630 | .domain = CAMERA_DOMAIN, |
| 3631 | }, |
| 3632 | /* Camera */ |
| 3633 | { |
| 3634 | .name = "jpegd_dst", |
| 3635 | .domain = CAMERA_DOMAIN, |
| 3636 | }, |
| 3637 | /* Rotator */ |
| 3638 | { |
| 3639 | .name = "rot_src", |
| 3640 | .domain = ROTATOR_DOMAIN, |
| 3641 | }, |
| 3642 | /* Rotator */ |
| 3643 | { |
| 3644 | .name = "rot_dst", |
| 3645 | .domain = ROTATOR_DOMAIN, |
| 3646 | }, |
| 3647 | /* Video */ |
| 3648 | { |
| 3649 | .name = "vcodec_a_mm1", |
| 3650 | .domain = VIDEO_DOMAIN, |
| 3651 | }, |
| 3652 | /* Video */ |
| 3653 | { |
| 3654 | .name = "vcodec_b_mm2", |
| 3655 | .domain = VIDEO_DOMAIN, |
| 3656 | }, |
| 3657 | /* Video */ |
| 3658 | { |
| 3659 | .name = "vcodec_a_stream", |
| 3660 | .domain = VIDEO_DOMAIN, |
| 3661 | }, |
| 3662 | }; |
| 3663 | |
| 3664 | static struct mem_pool msm8960_video_pools[] = { |
| 3665 | /* |
| 3666 | * Video hardware has the following requirements: |
| 3667 | * 1. All video addresses used by the video hardware must be at a higher |
| 3668 | * address than video firmware address. |
| 3669 | * 2. Video hardware can only access a range of 256MB from the base of |
| 3670 | * the video firmware. |
| 3671 | */ |
| 3672 | [VIDEO_FIRMWARE_POOL] = |
| 3673 | /* Low addresses, intended for video firmware */ |
| 3674 | { |
| 3675 | .paddr = SZ_128K, |
| 3676 | .size = SZ_16M - SZ_128K, |
| 3677 | }, |
| 3678 | [VIDEO_MAIN_POOL] = |
| 3679 | /* Main video pool */ |
| 3680 | { |
| 3681 | .paddr = SZ_16M, |
| 3682 | .size = SZ_256M - SZ_16M, |
| 3683 | }, |
| 3684 | [GEN_POOL] = |
| 3685 | /* Remaining address space up to 2G */ |
| 3686 | { |
| 3687 | .paddr = SZ_256M, |
| 3688 | .size = SZ_2G - SZ_256M, |
| 3689 | }, |
| 3690 | }; |
| 3691 | |
| 3692 | static struct mem_pool msm8960_camera_pools[] = { |
| 3693 | [GEN_POOL] = |
| 3694 | /* One address space for camera */ |
| 3695 | { |
| 3696 | .paddr = SZ_128K, |
| 3697 | .size = SZ_2G - SZ_128K, |
| 3698 | }, |
| 3699 | }; |
| 3700 | |
| 3701 | static struct mem_pool msm8960_display_pools[] = { |
| 3702 | [GEN_POOL] = |
| 3703 | /* One address space for display */ |
| 3704 | { |
| 3705 | .paddr = SZ_128K, |
| 3706 | .size = SZ_2G - SZ_128K, |
| 3707 | }, |
| 3708 | }; |
| 3709 | |
| 3710 | static struct mem_pool msm8960_rotator_pools[] = { |
| 3711 | [GEN_POOL] = |
| 3712 | /* One address space for rotator */ |
| 3713 | { |
| 3714 | .paddr = SZ_128K, |
| 3715 | .size = SZ_2G - SZ_128K, |
| 3716 | }, |
| 3717 | }; |
| 3718 | |
| 3719 | static struct msm_iommu_domain msm8960_iommu_domains[] = { |
| 3720 | [VIDEO_DOMAIN] = { |
| 3721 | .iova_pools = msm8960_video_pools, |
| 3722 | .npools = ARRAY_SIZE(msm8960_video_pools), |
| 3723 | }, |
| 3724 | [CAMERA_DOMAIN] = { |
| 3725 | .iova_pools = msm8960_camera_pools, |
| 3726 | .npools = ARRAY_SIZE(msm8960_camera_pools), |
| 3727 | }, |
| 3728 | [DISPLAY_DOMAIN] = { |
| 3729 | .iova_pools = msm8960_display_pools, |
| 3730 | .npools = ARRAY_SIZE(msm8960_display_pools), |
| 3731 | }, |
| 3732 | [ROTATOR_DOMAIN] = { |
| 3733 | .iova_pools = msm8960_rotator_pools, |
| 3734 | .npools = ARRAY_SIZE(msm8960_rotator_pools), |
| 3735 | }, |
| 3736 | }; |
| 3737 | |
| 3738 | struct iommu_domains_pdata msm8960_iommu_domain_pdata = { |
| 3739 | .domains = msm8960_iommu_domains, |
| 3740 | .ndomains = ARRAY_SIZE(msm8960_iommu_domains), |
| 3741 | .domain_names = msm8960_iommu_ctx_names, |
| 3742 | .nnames = ARRAY_SIZE(msm8960_iommu_ctx_names), |
| 3743 | .domain_alloc_flags = 0, |
| 3744 | }; |
| 3745 | |
| 3746 | struct platform_device msm8960_iommu_domain_device = { |
| 3747 | .name = "iommu_domains", |
| 3748 | .id = -1, |
| 3749 | .dev = { |
| 3750 | .platform_data = &msm8960_iommu_domain_pdata, |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 3751 | } |
| 3752 | }; |
| 3753 | |
| 3754 | struct msm_rtb_platform_data msm8960_rtb_pdata = { |
| 3755 | .size = SZ_1M, |
| 3756 | }; |
| 3757 | |
| 3758 | static int __init msm_rtb_set_buffer_size(char *p) |
| 3759 | { |
| 3760 | int s; |
| 3761 | |
| 3762 | s = memparse(p, NULL); |
| 3763 | msm8960_rtb_pdata.size = ALIGN(s, SZ_4K); |
| 3764 | return 0; |
| 3765 | } |
| 3766 | early_param("msm_rtb_size", msm_rtb_set_buffer_size); |
| 3767 | |
| 3768 | |
| 3769 | struct platform_device msm8960_rtb_device = { |
| 3770 | .name = "msm_rtb", |
| 3771 | .id = -1, |
| 3772 | .dev = { |
| 3773 | .platform_data = &msm8960_rtb_pdata, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3774 | }, |
| 3775 | }; |
Laura Abbott | 2ae8f36 | 2012-04-12 11:03:04 -0700 | [diff] [blame] | 3776 | |
Laura Abbott | 0a103cf | 2012-05-25 09:00:23 -0700 | [diff] [blame] | 3777 | #define MSM_8960_L1_SIZE SZ_1M |
| 3778 | /* |
| 3779 | * The actual L2 size is smaller but we need a larger buffer |
| 3780 | * size to store other dump information |
| 3781 | */ |
| 3782 | #define MSM_8960_L2_SIZE SZ_4M |
| 3783 | |
Laura Abbott | 2ae8f36 | 2012-04-12 11:03:04 -0700 | [diff] [blame] | 3784 | struct msm_cache_dump_platform_data msm8960_cache_dump_pdata = { |
Laura Abbott | 0a103cf | 2012-05-25 09:00:23 -0700 | [diff] [blame] | 3785 | .l2_size = MSM_8960_L2_SIZE, |
| 3786 | .l1_size = MSM_8960_L1_SIZE, |
Laura Abbott | 2ae8f36 | 2012-04-12 11:03:04 -0700 | [diff] [blame] | 3787 | }; |
| 3788 | |
| 3789 | struct platform_device msm8960_cache_dump_device = { |
| 3790 | .name = "msm_cache_dump", |
| 3791 | .id = -1, |
| 3792 | .dev = { |
| 3793 | .platform_data = &msm8960_cache_dump_pdata, |
| 3794 | }, |
| 3795 | }; |
Joel King | 0cbf5d8 | 2012-05-24 15:21:38 -0700 | [diff] [blame] | 3796 | |
| 3797 | #define MDM2AP_ERRFATAL 40 |
| 3798 | #define AP2MDM_ERRFATAL 80 |
| 3799 | #define MDM2AP_STATUS 24 |
| 3800 | #define AP2MDM_STATUS 77 |
| 3801 | #define AP2MDM_PMIC_PWR_EN 22 |
| 3802 | #define AP2MDM_KPDPWR_N 79 |
| 3803 | #define AP2MDM_SOFT_RESET 78 |
| 3804 | |
| 3805 | static struct resource sglte_resources[] = { |
| 3806 | { |
| 3807 | .start = MDM2AP_ERRFATAL, |
| 3808 | .end = MDM2AP_ERRFATAL, |
| 3809 | .name = "MDM2AP_ERRFATAL", |
| 3810 | .flags = IORESOURCE_IO, |
| 3811 | }, |
| 3812 | { |
| 3813 | .start = AP2MDM_ERRFATAL, |
| 3814 | .end = AP2MDM_ERRFATAL, |
| 3815 | .name = "AP2MDM_ERRFATAL", |
| 3816 | .flags = IORESOURCE_IO, |
| 3817 | }, |
| 3818 | { |
| 3819 | .start = MDM2AP_STATUS, |
| 3820 | .end = MDM2AP_STATUS, |
| 3821 | .name = "MDM2AP_STATUS", |
| 3822 | .flags = IORESOURCE_IO, |
| 3823 | }, |
| 3824 | { |
| 3825 | .start = AP2MDM_STATUS, |
| 3826 | .end = AP2MDM_STATUS, |
| 3827 | .name = "AP2MDM_STATUS", |
| 3828 | .flags = IORESOURCE_IO, |
| 3829 | }, |
| 3830 | { |
| 3831 | .start = AP2MDM_PMIC_PWR_EN, |
| 3832 | .end = AP2MDM_PMIC_PWR_EN, |
| 3833 | .name = "AP2MDM_PMIC_PWR_EN", |
| 3834 | .flags = IORESOURCE_IO, |
| 3835 | }, |
| 3836 | { |
| 3837 | .start = AP2MDM_KPDPWR_N, |
| 3838 | .end = AP2MDM_KPDPWR_N, |
| 3839 | .name = "AP2MDM_KPDPWR_N", |
| 3840 | .flags = IORESOURCE_IO, |
| 3841 | }, |
| 3842 | { |
| 3843 | .start = AP2MDM_SOFT_RESET, |
| 3844 | .end = AP2MDM_SOFT_RESET, |
| 3845 | .name = "AP2MDM_SOFT_RESET", |
| 3846 | .flags = IORESOURCE_IO, |
| 3847 | }, |
| 3848 | }; |
| 3849 | |
| 3850 | struct platform_device mdm_sglte_device = { |
| 3851 | .name = "mdm2_modem", |
| 3852 | .id = -1, |
| 3853 | .num_resources = ARRAY_SIZE(sglte_resources), |
| 3854 | .resource = sglte_resources, |
| 3855 | }; |