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