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