Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/list.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/msm_rotator.h> |
| 18 | #include <linux/clkdev.h> |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 19 | #include <linux/dma-mapping.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | #include <mach/irqs-8064.h> |
| 21 | #include <mach/board.h> |
| 22 | #include <mach/msm_iomap.h> |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 23 | #include <mach/usbdiag.h> |
| 24 | #include <mach/msm_sps.h> |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 25 | #include <mach/dma.h> |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 26 | #include <mach/msm_dsps.h> |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 27 | #include <sound/msm-dai-q6.h> |
| 28 | #include <sound/apr_audio.h> |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 29 | #include <mach/msm_bus_board.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 30 | #include <mach/rpm.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 31 | #include <mach/mdm2.h> |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 32 | #include <mach/msm_smd.h> |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 33 | #include <mach/msm_dcvs.h> |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 34 | #include <mach/qdss.h> |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 35 | #include <linux/ion.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | #include "clock.h" |
| 37 | #include "devices.h" |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 38 | #include "footswitch.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 39 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 40 | #include "rpm_stats.h" |
| 41 | #include "rpm_log.h" |
Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 42 | #include <mach/mpm.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 43 | |
| 44 | /* Address of GSBI blocks */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 45 | #define MSM_GSBI1_PHYS 0x12440000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 46 | #define MSM_GSBI3_PHYS 0x16200000 |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 47 | #define MSM_GSBI4_PHYS 0x16300000 |
| 48 | #define MSM_GSBI5_PHYS 0x1A200000 |
| 49 | #define MSM_GSBI6_PHYS 0x16500000 |
| 50 | #define MSM_GSBI7_PHYS 0x16600000 |
| 51 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 52 | /* GSBI UART devices */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 53 | #define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 54 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 55 | #define MSM_UART7DM_PHYS (MSM_GSBI7_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 56 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 57 | /* GSBI QUP devices */ |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 58 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x20000) |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 59 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 60 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 61 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 62 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 63 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 64 | #define MSM_QUP_SIZE SZ_4K |
| 65 | |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 66 | /* Address of SSBI CMD */ |
| 67 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 68 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 69 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 70 | |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 71 | /* Address of HS USBOTG1 */ |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 72 | #define MSM_HSUSB1_PHYS 0x12500000 |
| 73 | #define MSM_HSUSB1_SIZE SZ_4K |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 74 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 75 | /* Address of HS USB3 */ |
| 76 | #define MSM_HSUSB3_PHYS 0x12520000 |
| 77 | #define MSM_HSUSB3_SIZE SZ_4K |
| 78 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 79 | /* Address of HS USB4 */ |
| 80 | #define MSM_HSUSB4_PHYS 0x12530000 |
| 81 | #define MSM_HSUSB4_SIZE SZ_4K |
| 82 | |
| 83 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 84 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 85 | .pet_time = 10000, |
| 86 | .bark_time = 11000, |
| 87 | .has_secure = true, |
Joel King | e7ca6f7 | 2012-02-09 20:51:25 -0800 | [diff] [blame] | 88 | .needs_expired_enable = true, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 89 | }; |
| 90 | |
| 91 | struct platform_device msm8064_device_watchdog = { |
| 92 | .name = "msm_watchdog", |
| 93 | .id = -1, |
| 94 | .dev = { |
| 95 | .platform_data = &msm_watchdog_pdata, |
| 96 | }, |
| 97 | }; |
| 98 | |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 99 | static struct resource msm_dmov_resource[] = { |
| 100 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 101 | .start = ADM_0_SCSS_1_IRQ, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 102 | .flags = IORESOURCE_IRQ, |
| 103 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 104 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 105 | .start = 0x18320000, |
| 106 | .end = 0x18320000 + SZ_1M - 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 107 | .flags = IORESOURCE_MEM, |
| 108 | }, |
| 109 | }; |
| 110 | |
| 111 | static struct msm_dmov_pdata msm_dmov_pdata = { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 112 | .sd = 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 113 | .sd_size = 0x800, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 114 | }; |
| 115 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 116 | struct platform_device apq8064_device_dmov = { |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 117 | .name = "msm_dmov", |
| 118 | .id = -1, |
| 119 | .resource = msm_dmov_resource, |
| 120 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 121 | .dev = { |
| 122 | .platform_data = &msm_dmov_pdata, |
| 123 | }, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 124 | }; |
| 125 | |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 126 | static struct resource resources_uart_gsbi1[] = { |
| 127 | { |
| 128 | .start = APQ8064_GSBI1_UARTDM_IRQ, |
| 129 | .end = APQ8064_GSBI1_UARTDM_IRQ, |
| 130 | .flags = IORESOURCE_IRQ, |
| 131 | }, |
| 132 | { |
| 133 | .start = MSM_UART1DM_PHYS, |
| 134 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 135 | .name = "uartdm_resource", |
| 136 | .flags = IORESOURCE_MEM, |
| 137 | }, |
| 138 | { |
| 139 | .start = MSM_GSBI1_PHYS, |
| 140 | .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1, |
| 141 | .name = "gsbi_resource", |
| 142 | .flags = IORESOURCE_MEM, |
| 143 | }, |
| 144 | }; |
| 145 | |
| 146 | struct platform_device apq8064_device_uart_gsbi1 = { |
| 147 | .name = "msm_serial_hsl", |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 148 | .id = 1, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 149 | .num_resources = ARRAY_SIZE(resources_uart_gsbi1), |
| 150 | .resource = resources_uart_gsbi1, |
| 151 | }; |
| 152 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 153 | static struct resource resources_uart_gsbi3[] = { |
| 154 | { |
| 155 | .start = GSBI3_UARTDM_IRQ, |
| 156 | .end = GSBI3_UARTDM_IRQ, |
| 157 | .flags = IORESOURCE_IRQ, |
| 158 | }, |
| 159 | { |
| 160 | .start = MSM_UART3DM_PHYS, |
| 161 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 162 | .name = "uartdm_resource", |
| 163 | .flags = IORESOURCE_MEM, |
| 164 | }, |
| 165 | { |
| 166 | .start = MSM_GSBI3_PHYS, |
| 167 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 168 | .name = "gsbi_resource", |
| 169 | .flags = IORESOURCE_MEM, |
| 170 | }, |
| 171 | }; |
| 172 | |
| 173 | struct platform_device apq8064_device_uart_gsbi3 = { |
| 174 | .name = "msm_serial_hsl", |
| 175 | .id = 0, |
| 176 | .num_resources = ARRAY_SIZE(resources_uart_gsbi3), |
| 177 | .resource = resources_uart_gsbi3, |
| 178 | }; |
| 179 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 180 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 181 | { |
| 182 | .name = "gsbi_qup_i2c_addr", |
| 183 | .start = MSM_GSBI3_PHYS, |
| 184 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 185 | .flags = IORESOURCE_MEM, |
| 186 | }, |
| 187 | { |
| 188 | .name = "qup_phys_addr", |
| 189 | .start = MSM_GSBI3_QUP_PHYS, |
| 190 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 191 | .flags = IORESOURCE_MEM, |
| 192 | }, |
| 193 | { |
| 194 | .name = "qup_err_intr", |
| 195 | .start = GSBI3_QUP_IRQ, |
| 196 | .end = GSBI3_QUP_IRQ, |
| 197 | .flags = IORESOURCE_IRQ, |
| 198 | }, |
| 199 | { |
| 200 | .name = "i2c_clk", |
| 201 | .start = 9, |
| 202 | .end = 9, |
| 203 | .flags = IORESOURCE_IO, |
| 204 | }, |
| 205 | { |
| 206 | .name = "i2c_sda", |
| 207 | .start = 8, |
| 208 | .end = 8, |
| 209 | .flags = IORESOURCE_IO, |
| 210 | }, |
| 211 | }; |
| 212 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 213 | static struct resource resources_qup_i2c_gsbi1[] = { |
| 214 | { |
| 215 | .name = "gsbi_qup_i2c_addr", |
| 216 | .start = MSM_GSBI1_PHYS, |
| 217 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 218 | .flags = IORESOURCE_MEM, |
| 219 | }, |
| 220 | { |
| 221 | .name = "qup_phys_addr", |
| 222 | .start = MSM_GSBI1_QUP_PHYS, |
| 223 | .end = MSM_GSBI1_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 224 | .flags = IORESOURCE_MEM, |
| 225 | }, |
| 226 | { |
| 227 | .name = "qup_err_intr", |
| 228 | .start = APQ8064_GSBI1_QUP_IRQ, |
| 229 | .end = APQ8064_GSBI1_QUP_IRQ, |
| 230 | .flags = IORESOURCE_IRQ, |
| 231 | }, |
| 232 | { |
| 233 | .name = "i2c_clk", |
| 234 | .start = 21, |
| 235 | .end = 21, |
| 236 | .flags = IORESOURCE_IO, |
| 237 | }, |
| 238 | { |
| 239 | .name = "i2c_sda", |
| 240 | .start = 20, |
| 241 | .end = 20, |
| 242 | .flags = IORESOURCE_IO, |
| 243 | }, |
| 244 | }; |
| 245 | |
| 246 | struct platform_device apq8064_device_qup_i2c_gsbi1 = { |
| 247 | .name = "qup_i2c", |
| 248 | .id = 0, |
| 249 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi1), |
| 250 | .resource = resources_qup_i2c_gsbi1, |
| 251 | }; |
| 252 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 253 | struct platform_device apq8064_device_qup_i2c_gsbi3 = { |
| 254 | .name = "qup_i2c", |
| 255 | .id = 3, |
| 256 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 257 | .resource = resources_qup_i2c_gsbi3, |
| 258 | }; |
| 259 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 260 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 261 | { |
| 262 | .name = "gsbi_qup_i2c_addr", |
| 263 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 264 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 265 | .flags = IORESOURCE_MEM, |
| 266 | }, |
| 267 | { |
| 268 | .name = "qup_phys_addr", |
| 269 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 270 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 271 | .flags = IORESOURCE_MEM, |
| 272 | }, |
| 273 | { |
| 274 | .name = "qup_err_intr", |
| 275 | .start = GSBI4_QUP_IRQ, |
| 276 | .end = GSBI4_QUP_IRQ, |
| 277 | .flags = IORESOURCE_IRQ, |
| 278 | }, |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 279 | { |
| 280 | .name = "i2c_clk", |
| 281 | .start = 11, |
| 282 | .end = 11, |
| 283 | .flags = IORESOURCE_IO, |
| 284 | }, |
| 285 | { |
| 286 | .name = "i2c_sda", |
| 287 | .start = 10, |
| 288 | .end = 10, |
| 289 | .flags = IORESOURCE_IO, |
| 290 | }, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | struct platform_device apq8064_device_qup_i2c_gsbi4 = { |
| 294 | .name = "qup_i2c", |
| 295 | .id = 4, |
| 296 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 297 | .resource = resources_qup_i2c_gsbi4, |
| 298 | }; |
| 299 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 300 | static struct resource resources_qup_spi_gsbi5[] = { |
| 301 | { |
| 302 | .name = "spi_base", |
| 303 | .start = MSM_GSBI5_QUP_PHYS, |
| 304 | .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1, |
| 305 | .flags = IORESOURCE_MEM, |
| 306 | }, |
| 307 | { |
| 308 | .name = "gsbi_base", |
| 309 | .start = MSM_GSBI5_PHYS, |
| 310 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 311 | .flags = IORESOURCE_MEM, |
| 312 | }, |
| 313 | { |
| 314 | .name = "spi_irq_in", |
| 315 | .start = GSBI5_QUP_IRQ, |
| 316 | .end = GSBI5_QUP_IRQ, |
| 317 | .flags = IORESOURCE_IRQ, |
| 318 | }, |
| 319 | }; |
| 320 | |
| 321 | struct platform_device apq8064_device_qup_spi_gsbi5 = { |
| 322 | .name = "spi_qsd", |
| 323 | .id = 0, |
| 324 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5), |
| 325 | .resource = resources_qup_spi_gsbi5, |
| 326 | }; |
| 327 | |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 328 | static struct resource resources_qup_i2c_gsbi5[] = { |
| 329 | { |
| 330 | .name = "gsbi_qup_i2c_addr", |
| 331 | .start = MSM_GSBI5_PHYS, |
| 332 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 333 | .flags = IORESOURCE_MEM, |
| 334 | }, |
| 335 | { |
| 336 | .name = "qup_phys_addr", |
| 337 | .start = MSM_GSBI5_QUP_PHYS, |
| 338 | .end = MSM_GSBI5_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 339 | .flags = IORESOURCE_MEM, |
| 340 | }, |
| 341 | { |
| 342 | .name = "qup_err_intr", |
| 343 | .start = GSBI5_QUP_IRQ, |
| 344 | .end = GSBI5_QUP_IRQ, |
| 345 | .flags = IORESOURCE_IRQ, |
| 346 | }, |
| 347 | { |
| 348 | .name = "i2c_clk", |
| 349 | .start = 54, |
| 350 | .end = 54, |
| 351 | .flags = IORESOURCE_IO, |
| 352 | }, |
| 353 | { |
| 354 | .name = "i2c_sda", |
| 355 | .start = 53, |
| 356 | .end = 53, |
| 357 | .flags = IORESOURCE_IO, |
| 358 | }, |
| 359 | }; |
| 360 | |
| 361 | struct platform_device mpq8064_device_qup_i2c_gsbi5 = { |
| 362 | .name = "qup_i2c", |
| 363 | .id = 5, |
| 364 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi5), |
| 365 | .resource = resources_qup_i2c_gsbi5, |
| 366 | }; |
| 367 | |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 368 | static struct resource resources_uart_gsbi7[] = { |
| 369 | { |
| 370 | .start = GSBI7_UARTDM_IRQ, |
| 371 | .end = GSBI7_UARTDM_IRQ, |
| 372 | .flags = IORESOURCE_IRQ, |
| 373 | }, |
| 374 | { |
| 375 | .start = MSM_UART7DM_PHYS, |
| 376 | .end = MSM_UART7DM_PHYS + PAGE_SIZE - 1, |
| 377 | .name = "uartdm_resource", |
| 378 | .flags = IORESOURCE_MEM, |
| 379 | }, |
| 380 | { |
| 381 | .start = MSM_GSBI7_PHYS, |
| 382 | .end = MSM_GSBI7_PHYS + PAGE_SIZE - 1, |
| 383 | .name = "gsbi_resource", |
| 384 | .flags = IORESOURCE_MEM, |
| 385 | }, |
| 386 | }; |
| 387 | |
| 388 | struct platform_device apq8064_device_uart_gsbi7 = { |
| 389 | .name = "msm_serial_hsl", |
| 390 | .id = 0, |
| 391 | .num_resources = ARRAY_SIZE(resources_uart_gsbi7), |
| 392 | .resource = resources_uart_gsbi7, |
| 393 | }; |
| 394 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 395 | struct platform_device apq_pcm = { |
| 396 | .name = "msm-pcm-dsp", |
| 397 | .id = -1, |
| 398 | }; |
| 399 | |
| 400 | struct platform_device apq_pcm_routing = { |
| 401 | .name = "msm-pcm-routing", |
| 402 | .id = -1, |
| 403 | }; |
| 404 | |
| 405 | struct platform_device apq_cpudai0 = { |
| 406 | .name = "msm-dai-q6", |
| 407 | .id = 0x4000, |
| 408 | }; |
| 409 | |
| 410 | struct platform_device apq_cpudai1 = { |
| 411 | .name = "msm-dai-q6", |
| 412 | .id = 0x4001, |
| 413 | }; |
Santosh Mardi | eff9a74 | 2012-04-09 23:23:39 +0530 | [diff] [blame] | 414 | struct platform_device mpq_cpudai_sec_i2s_rx = { |
| 415 | .name = "msm-dai-q6", |
| 416 | .id = 4, |
| 417 | }; |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 418 | struct platform_device apq_cpudai_hdmi_rx = { |
Swaminathan Sathappan | fd9dbad | 2012-02-15 16:56:44 -0800 | [diff] [blame] | 419 | .name = "msm-dai-q6-hdmi", |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 420 | .id = 8, |
| 421 | }; |
| 422 | |
| 423 | struct platform_device apq_cpudai_bt_rx = { |
| 424 | .name = "msm-dai-q6", |
| 425 | .id = 0x3000, |
| 426 | }; |
| 427 | |
| 428 | struct platform_device apq_cpudai_bt_tx = { |
| 429 | .name = "msm-dai-q6", |
| 430 | .id = 0x3001, |
| 431 | }; |
| 432 | |
| 433 | struct platform_device apq_cpudai_fm_rx = { |
| 434 | .name = "msm-dai-q6", |
| 435 | .id = 0x3004, |
| 436 | }; |
| 437 | |
| 438 | struct platform_device apq_cpudai_fm_tx = { |
| 439 | .name = "msm-dai-q6", |
| 440 | .id = 0x3005, |
| 441 | }; |
| 442 | |
Helen Zeng | 8f92550 | 2012-03-05 16:50:17 -0800 | [diff] [blame^] | 443 | struct platform_device apq_cpudai_slim_4_rx = { |
| 444 | .name = "msm-dai-q6", |
| 445 | .id = 0x4008, |
| 446 | }; |
| 447 | |
| 448 | struct platform_device apq_cpudai_slim_4_tx = { |
| 449 | .name = "msm-dai-q6", |
| 450 | .id = 0x4009, |
| 451 | }; |
| 452 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 453 | /* |
| 454 | * Machine specific data for AUX PCM Interface |
| 455 | * which the driver will be unware of. |
| 456 | */ |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 457 | struct msm_dai_auxpcm_pdata apq_auxpcm_pdata = { |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 458 | .clk = "pcm_clk", |
| 459 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 460 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 461 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 462 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 463 | .slot = 0, |
| 464 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 465 | .pcm_clk_rate = 2048000, |
| 466 | }; |
| 467 | |
| 468 | struct platform_device apq_cpudai_auxpcm_rx = { |
| 469 | .name = "msm-dai-q6", |
| 470 | .id = 2, |
| 471 | .dev = { |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 472 | .platform_data = &apq_auxpcm_pdata, |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 473 | }, |
| 474 | }; |
| 475 | |
| 476 | struct platform_device apq_cpudai_auxpcm_tx = { |
| 477 | .name = "msm-dai-q6", |
| 478 | .id = 3, |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 479 | .dev = { |
| 480 | .platform_data = &apq_auxpcm_pdata, |
| 481 | }, |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 482 | }; |
| 483 | |
| 484 | struct platform_device apq_cpu_fe = { |
| 485 | .name = "msm-dai-fe", |
| 486 | .id = -1, |
| 487 | }; |
| 488 | |
| 489 | struct platform_device apq_stub_codec = { |
| 490 | .name = "msm-stub-codec", |
| 491 | .id = 1, |
| 492 | }; |
| 493 | |
| 494 | struct platform_device apq_voice = { |
| 495 | .name = "msm-pcm-voice", |
| 496 | .id = -1, |
| 497 | }; |
| 498 | |
| 499 | struct platform_device apq_voip = { |
| 500 | .name = "msm-voip-dsp", |
| 501 | .id = -1, |
| 502 | }; |
| 503 | |
| 504 | struct platform_device apq_lpa_pcm = { |
| 505 | .name = "msm-pcm-lpa", |
| 506 | .id = -1, |
| 507 | }; |
| 508 | |
Krishnankutty Kolathappilly | 4374e33 | 2012-03-18 22:27:30 -0700 | [diff] [blame] | 509 | struct platform_device apq_compr_dsp = { |
| 510 | .name = "msm-compr-dsp", |
| 511 | .id = -1, |
| 512 | }; |
| 513 | |
| 514 | struct platform_device apq_multi_ch_pcm = { |
| 515 | .name = "msm-multi-ch-pcm-dsp", |
| 516 | .id = -1, |
| 517 | }; |
| 518 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 519 | struct platform_device apq_pcm_hostless = { |
| 520 | .name = "msm-pcm-hostless", |
| 521 | .id = -1, |
| 522 | }; |
| 523 | |
| 524 | struct platform_device apq_cpudai_afe_01_rx = { |
| 525 | .name = "msm-dai-q6", |
| 526 | .id = 0xE0, |
| 527 | }; |
| 528 | |
| 529 | struct platform_device apq_cpudai_afe_01_tx = { |
| 530 | .name = "msm-dai-q6", |
| 531 | .id = 0xF0, |
| 532 | }; |
| 533 | |
| 534 | struct platform_device apq_cpudai_afe_02_rx = { |
| 535 | .name = "msm-dai-q6", |
| 536 | .id = 0xF1, |
| 537 | }; |
| 538 | |
| 539 | struct platform_device apq_cpudai_afe_02_tx = { |
| 540 | .name = "msm-dai-q6", |
| 541 | .id = 0xE1, |
| 542 | }; |
| 543 | |
| 544 | struct platform_device apq_pcm_afe = { |
| 545 | .name = "msm-pcm-afe", |
| 546 | .id = -1, |
| 547 | }; |
| 548 | |
Neema Shetty | 8427c26 | 2012-02-16 11:23:43 -0800 | [diff] [blame] | 549 | struct platform_device apq_cpudai_stub = { |
| 550 | .name = "msm-dai-stub", |
| 551 | .id = -1, |
| 552 | }; |
| 553 | |
Neema Shetty | 3c9d286 | 2012-03-11 01:25:32 -0800 | [diff] [blame] | 554 | struct platform_device apq_cpudai_slimbus_1_rx = { |
| 555 | .name = "msm-dai-q6", |
| 556 | .id = 0x4002, |
| 557 | }; |
| 558 | |
| 559 | struct platform_device apq_cpudai_slimbus_1_tx = { |
| 560 | .name = "msm-dai-q6", |
| 561 | .id = 0x4003, |
| 562 | }; |
| 563 | |
Kiran Kandi | 1e6371d | 2012-03-29 11:48:57 -0700 | [diff] [blame] | 564 | struct platform_device apq_cpudai_slimbus_2_tx = { |
| 565 | .name = "msm-dai-q6", |
| 566 | .id = 0x4005, |
| 567 | }; |
| 568 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 569 | static struct resource resources_ssbi_pmic1[] = { |
| 570 | { |
| 571 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 572 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 573 | .flags = IORESOURCE_MEM, |
| 574 | }, |
| 575 | }; |
| 576 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 577 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 578 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 579 | #define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C) |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 580 | /* Board info for the slimbus slave device */ |
| 581 | static struct resource slimbus_res[] = { |
| 582 | { |
| 583 | .start = LPASS_SLIMBUS_PHYS, |
| 584 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 585 | .flags = IORESOURCE_MEM, |
| 586 | .name = "slimbus_physical", |
| 587 | }, |
| 588 | { |
| 589 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 590 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 591 | .flags = IORESOURCE_MEM, |
| 592 | .name = "slimbus_bam_physical", |
| 593 | }, |
| 594 | { |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 595 | .start = LPASS_SLIMBUS_SLEW, |
| 596 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 597 | .flags = IORESOURCE_MEM, |
| 598 | .name = "slimbus_slew_reg", |
| 599 | }, |
| 600 | { |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 601 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 602 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 603 | .flags = IORESOURCE_IRQ, |
| 604 | .name = "slimbus_irq", |
| 605 | }, |
| 606 | { |
| 607 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 608 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 609 | .flags = IORESOURCE_IRQ, |
| 610 | .name = "slimbus_bam_irq", |
| 611 | }, |
| 612 | }; |
| 613 | |
| 614 | struct platform_device apq8064_slim_ctrl = { |
| 615 | .name = "msm_slim_ctrl", |
| 616 | .id = 1, |
| 617 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 618 | .resource = slimbus_res, |
| 619 | .dev = { |
| 620 | .coherent_dma_mask = 0xffffffffULL, |
| 621 | }, |
| 622 | }; |
| 623 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 624 | struct platform_device apq8064_device_ssbi_pmic1 = { |
| 625 | .name = "msm_ssbi", |
| 626 | .id = 0, |
| 627 | .resource = resources_ssbi_pmic1, |
| 628 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 629 | }; |
| 630 | |
| 631 | static struct resource resources_ssbi_pmic2[] = { |
| 632 | { |
| 633 | .start = MSM_PMIC2_SSBI_CMD_PHYS, |
| 634 | .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 635 | .flags = IORESOURCE_MEM, |
| 636 | }, |
| 637 | }; |
| 638 | |
| 639 | struct platform_device apq8064_device_ssbi_pmic2 = { |
| 640 | .name = "msm_ssbi", |
| 641 | .id = 1, |
| 642 | .resource = resources_ssbi_pmic2, |
| 643 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2), |
| 644 | }; |
| 645 | |
| 646 | static struct resource resources_otg[] = { |
| 647 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 648 | .start = MSM_HSUSB1_PHYS, |
| 649 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 650 | .flags = IORESOURCE_MEM, |
| 651 | }, |
| 652 | { |
| 653 | .start = USB1_HS_IRQ, |
| 654 | .end = USB1_HS_IRQ, |
| 655 | .flags = IORESOURCE_IRQ, |
| 656 | }, |
| 657 | }; |
| 658 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 659 | struct platform_device apq8064_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 660 | .name = "msm_otg", |
| 661 | .id = -1, |
| 662 | .num_resources = ARRAY_SIZE(resources_otg), |
| 663 | .resource = resources_otg, |
| 664 | .dev = { |
| 665 | .coherent_dma_mask = 0xffffffff, |
| 666 | }, |
| 667 | }; |
| 668 | |
| 669 | static struct resource resources_hsusb[] = { |
| 670 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 671 | .start = MSM_HSUSB1_PHYS, |
| 672 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 673 | .flags = IORESOURCE_MEM, |
| 674 | }, |
| 675 | { |
| 676 | .start = USB1_HS_IRQ, |
| 677 | .end = USB1_HS_IRQ, |
| 678 | .flags = IORESOURCE_IRQ, |
| 679 | }, |
| 680 | }; |
| 681 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 682 | struct platform_device apq8064_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 683 | .name = "msm_hsusb", |
| 684 | .id = -1, |
| 685 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 686 | .resource = resources_hsusb, |
| 687 | .dev = { |
| 688 | .coherent_dma_mask = 0xffffffff, |
| 689 | }, |
| 690 | }; |
| 691 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 692 | static struct resource resources_hsusb_host[] = { |
| 693 | { |
| 694 | .start = MSM_HSUSB1_PHYS, |
| 695 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
| 696 | .flags = IORESOURCE_MEM, |
| 697 | }, |
| 698 | { |
| 699 | .start = USB1_HS_IRQ, |
| 700 | .end = USB1_HS_IRQ, |
| 701 | .flags = IORESOURCE_IRQ, |
| 702 | }, |
| 703 | }; |
| 704 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 705 | static struct resource resources_hsic_host[] = { |
| 706 | { |
| 707 | .start = 0x12510000, |
| 708 | .end = 0x12510000 + SZ_4K - 1, |
| 709 | .flags = IORESOURCE_MEM, |
| 710 | }, |
| 711 | { |
| 712 | .start = USB2_HSIC_IRQ, |
| 713 | .end = USB2_HSIC_IRQ, |
| 714 | .flags = IORESOURCE_IRQ, |
| 715 | }, |
| 716 | { |
| 717 | .start = MSM_GPIO_TO_INT(49), |
| 718 | .end = MSM_GPIO_TO_INT(49), |
| 719 | .name = "peripheral_status_irq", |
| 720 | .flags = IORESOURCE_IRQ, |
| 721 | }, |
Vamsi Krishna | 6921cbe | 2012-02-21 18:34:43 -0800 | [diff] [blame] | 722 | { |
| 723 | .start = MSM_GPIO_TO_INT(88), |
| 724 | .end = MSM_GPIO_TO_INT(88), |
| 725 | .name = "wakeup_irq", |
| 726 | .flags = IORESOURCE_IRQ, |
| 727 | }, |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 728 | }; |
| 729 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 730 | static u64 dma_mask = DMA_BIT_MASK(32); |
| 731 | struct platform_device apq8064_device_hsusb_host = { |
| 732 | .name = "msm_hsusb_host", |
| 733 | .id = -1, |
| 734 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 735 | .resource = resources_hsusb_host, |
| 736 | .dev = { |
| 737 | .dma_mask = &dma_mask, |
| 738 | .coherent_dma_mask = 0xffffffff, |
| 739 | }, |
| 740 | }; |
| 741 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 742 | struct platform_device apq8064_device_hsic_host = { |
| 743 | .name = "msm_hsic_host", |
| 744 | .id = -1, |
| 745 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 746 | .resource = resources_hsic_host, |
| 747 | .dev = { |
| 748 | .dma_mask = &dma_mask, |
| 749 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 750 | }, |
| 751 | }; |
| 752 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 753 | static struct resource resources_ehci_host3[] = { |
| 754 | { |
| 755 | .start = MSM_HSUSB3_PHYS, |
| 756 | .end = MSM_HSUSB3_PHYS + MSM_HSUSB3_SIZE - 1, |
| 757 | .flags = IORESOURCE_MEM, |
| 758 | }, |
| 759 | { |
| 760 | .start = USB3_HS_IRQ, |
| 761 | .end = USB3_HS_IRQ, |
| 762 | .flags = IORESOURCE_IRQ, |
| 763 | }, |
| 764 | }; |
| 765 | |
| 766 | struct platform_device apq8064_device_ehci_host3 = { |
| 767 | .name = "msm_ehci_host", |
| 768 | .id = 0, |
| 769 | .num_resources = ARRAY_SIZE(resources_ehci_host3), |
| 770 | .resource = resources_ehci_host3, |
| 771 | .dev = { |
| 772 | .dma_mask = &dma_mask, |
| 773 | .coherent_dma_mask = 0xffffffff, |
| 774 | }, |
| 775 | }; |
| 776 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 777 | static struct resource resources_ehci_host4[] = { |
| 778 | { |
| 779 | .start = MSM_HSUSB4_PHYS, |
| 780 | .end = MSM_HSUSB4_PHYS + MSM_HSUSB4_SIZE - 1, |
| 781 | .flags = IORESOURCE_MEM, |
| 782 | }, |
| 783 | { |
| 784 | .start = USB4_HS_IRQ, |
| 785 | .end = USB4_HS_IRQ, |
| 786 | .flags = IORESOURCE_IRQ, |
| 787 | }, |
| 788 | }; |
| 789 | |
| 790 | struct platform_device apq8064_device_ehci_host4 = { |
| 791 | .name = "msm_ehci_host", |
| 792 | .id = 1, |
| 793 | .num_resources = ARRAY_SIZE(resources_ehci_host4), |
| 794 | .resource = resources_ehci_host4, |
| 795 | .dev = { |
| 796 | .dma_mask = &dma_mask, |
| 797 | .coherent_dma_mask = 0xffffffff, |
| 798 | }, |
| 799 | }; |
| 800 | |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 801 | /* MSM Video core device */ |
| 802 | #ifdef CONFIG_MSM_BUS_SCALING |
| 803 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 804 | { |
| 805 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 806 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 807 | .ab = 0, |
| 808 | .ib = 0, |
| 809 | }, |
| 810 | { |
| 811 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 812 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 813 | .ab = 0, |
| 814 | .ib = 0, |
| 815 | }, |
| 816 | { |
| 817 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 818 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 819 | .ab = 0, |
| 820 | .ib = 0, |
| 821 | }, |
| 822 | { |
| 823 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 824 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 825 | .ab = 0, |
| 826 | .ib = 0, |
| 827 | }, |
| 828 | }; |
| 829 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 830 | { |
| 831 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 832 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 833 | .ab = 54525952, |
| 834 | .ib = 436207616, |
| 835 | }, |
| 836 | { |
| 837 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 838 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 839 | .ab = 72351744, |
| 840 | .ib = 289406976, |
| 841 | }, |
| 842 | { |
| 843 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 844 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 845 | .ab = 500000, |
| 846 | .ib = 1000000, |
| 847 | }, |
| 848 | { |
| 849 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 850 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 851 | .ab = 500000, |
| 852 | .ib = 1000000, |
| 853 | }, |
| 854 | }; |
| 855 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 856 | { |
| 857 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 858 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 859 | .ab = 40894464, |
| 860 | .ib = 327155712, |
| 861 | }, |
| 862 | { |
| 863 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 864 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 865 | .ab = 48234496, |
| 866 | .ib = 192937984, |
| 867 | }, |
| 868 | { |
| 869 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 870 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 871 | .ab = 500000, |
| 872 | .ib = 2000000, |
| 873 | }, |
| 874 | { |
| 875 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 876 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 877 | .ab = 500000, |
| 878 | .ib = 2000000, |
| 879 | }, |
| 880 | }; |
| 881 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 882 | { |
| 883 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 884 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 885 | .ab = 163577856, |
| 886 | .ib = 1308622848, |
| 887 | }, |
| 888 | { |
| 889 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 890 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 891 | .ab = 219152384, |
| 892 | .ib = 876609536, |
| 893 | }, |
| 894 | { |
| 895 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 896 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 897 | .ab = 1750000, |
| 898 | .ib = 3500000, |
| 899 | }, |
| 900 | { |
| 901 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 902 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 903 | .ab = 1750000, |
| 904 | .ib = 3500000, |
| 905 | }, |
| 906 | }; |
| 907 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 908 | { |
| 909 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 910 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 911 | .ab = 121634816, |
| 912 | .ib = 973078528, |
| 913 | }, |
| 914 | { |
| 915 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 916 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 917 | .ab = 155189248, |
| 918 | .ib = 620756992, |
| 919 | }, |
| 920 | { |
| 921 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 922 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 923 | .ab = 1750000, |
| 924 | .ib = 7000000, |
| 925 | }, |
| 926 | { |
| 927 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 928 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 929 | .ab = 1750000, |
| 930 | .ib = 7000000, |
| 931 | }, |
| 932 | }; |
| 933 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 934 | { |
| 935 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 936 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 937 | .ab = 372244480, |
| 938 | .ib = 2560000000U, |
| 939 | }, |
| 940 | { |
| 941 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 942 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 943 | .ab = 501219328, |
| 944 | .ib = 2560000000U, |
| 945 | }, |
| 946 | { |
| 947 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 948 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 949 | .ab = 2500000, |
| 950 | .ib = 5000000, |
| 951 | }, |
| 952 | { |
| 953 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 954 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 955 | .ab = 2500000, |
| 956 | .ib = 5000000, |
| 957 | }, |
| 958 | }; |
| 959 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 960 | { |
| 961 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 962 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 963 | .ab = 222298112, |
| 964 | .ib = 2560000000U, |
| 965 | }, |
| 966 | { |
| 967 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 968 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 969 | .ab = 330301440, |
| 970 | .ib = 2560000000U, |
| 971 | }, |
| 972 | { |
| 973 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 974 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 975 | .ab = 2500000, |
| 976 | .ib = 700000000, |
| 977 | }, |
| 978 | { |
| 979 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 980 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 981 | .ab = 2500000, |
| 982 | .ib = 10000000, |
| 983 | }, |
| 984 | }; |
| 985 | |
| 986 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 987 | { |
| 988 | ARRAY_SIZE(vidc_init_vectors), |
| 989 | vidc_init_vectors, |
| 990 | }, |
| 991 | { |
| 992 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 993 | vidc_venc_vga_vectors, |
| 994 | }, |
| 995 | { |
| 996 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 997 | vidc_vdec_vga_vectors, |
| 998 | }, |
| 999 | { |
| 1000 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 1001 | vidc_venc_720p_vectors, |
| 1002 | }, |
| 1003 | { |
| 1004 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 1005 | vidc_vdec_720p_vectors, |
| 1006 | }, |
| 1007 | { |
| 1008 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 1009 | vidc_venc_1080p_vectors, |
| 1010 | }, |
| 1011 | { |
| 1012 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 1013 | vidc_vdec_1080p_vectors, |
| 1014 | }, |
| 1015 | }; |
| 1016 | |
| 1017 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 1018 | vidc_bus_client_config, |
| 1019 | ARRAY_SIZE(vidc_bus_client_config), |
| 1020 | .name = "vidc", |
| 1021 | }; |
| 1022 | #endif |
| 1023 | |
| 1024 | |
| 1025 | #define APQ8064_VIDC_BASE_PHYS 0x04400000 |
| 1026 | #define APQ8064_VIDC_BASE_SIZE 0x00100000 |
| 1027 | |
| 1028 | static struct resource apq8064_device_vidc_resources[] = { |
| 1029 | { |
| 1030 | .start = APQ8064_VIDC_BASE_PHYS, |
| 1031 | .end = APQ8064_VIDC_BASE_PHYS + APQ8064_VIDC_BASE_SIZE - 1, |
| 1032 | .flags = IORESOURCE_MEM, |
| 1033 | }, |
| 1034 | { |
| 1035 | .start = VCODEC_IRQ, |
| 1036 | .end = VCODEC_IRQ, |
| 1037 | .flags = IORESOURCE_IRQ, |
| 1038 | }, |
| 1039 | }; |
| 1040 | |
| 1041 | struct msm_vidc_platform_data apq8064_vidc_platform_data = { |
| 1042 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1043 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 1044 | #endif |
| 1045 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 1046 | .memtype = ION_CP_MM_HEAP_ID, |
| 1047 | .enable_ion = 1, |
| 1048 | #else |
| 1049 | .memtype = MEMTYPE_EBI1, |
| 1050 | .enable_ion = 0, |
| 1051 | #endif |
| 1052 | .disable_dmx = 0, |
| 1053 | .disable_fullhd = 0, |
| 1054 | }; |
| 1055 | |
| 1056 | struct platform_device apq8064_msm_device_vidc = { |
| 1057 | .name = "msm_vidc", |
| 1058 | .id = 0, |
| 1059 | .num_resources = ARRAY_SIZE(apq8064_device_vidc_resources), |
| 1060 | .resource = apq8064_device_vidc_resources, |
| 1061 | .dev = { |
| 1062 | .platform_data = &apq8064_vidc_platform_data, |
| 1063 | }, |
| 1064 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1065 | #define MSM_SDC1_BASE 0x12400000 |
| 1066 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 1067 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 1068 | #define MSM_SDC2_BASE 0x12140000 |
| 1069 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 1070 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 1071 | #define MSM_SDC3_BASE 0x12180000 |
| 1072 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 1073 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 1074 | #define MSM_SDC4_BASE 0x121C0000 |
| 1075 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 1076 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 1077 | |
| 1078 | static struct resource resources_sdc1[] = { |
| 1079 | { |
| 1080 | .name = "core_mem", |
| 1081 | .flags = IORESOURCE_MEM, |
| 1082 | .start = MSM_SDC1_BASE, |
| 1083 | .end = MSM_SDC1_DML_BASE - 1, |
| 1084 | }, |
| 1085 | { |
| 1086 | .name = "core_irq", |
| 1087 | .flags = IORESOURCE_IRQ, |
| 1088 | .start = SDC1_IRQ_0, |
| 1089 | .end = SDC1_IRQ_0 |
| 1090 | }, |
| 1091 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1092 | { |
| 1093 | .name = "sdcc_dml_addr", |
| 1094 | .start = MSM_SDC1_DML_BASE, |
| 1095 | .end = MSM_SDC1_BAM_BASE - 1, |
| 1096 | .flags = IORESOURCE_MEM, |
| 1097 | }, |
| 1098 | { |
| 1099 | .name = "sdcc_bam_addr", |
| 1100 | .start = MSM_SDC1_BAM_BASE, |
| 1101 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 1102 | .flags = IORESOURCE_MEM, |
| 1103 | }, |
| 1104 | { |
| 1105 | .name = "sdcc_bam_irq", |
| 1106 | .start = SDC1_BAM_IRQ, |
| 1107 | .end = SDC1_BAM_IRQ, |
| 1108 | .flags = IORESOURCE_IRQ, |
| 1109 | }, |
| 1110 | #endif |
| 1111 | }; |
| 1112 | |
| 1113 | static struct resource resources_sdc2[] = { |
| 1114 | { |
| 1115 | .name = "core_mem", |
| 1116 | .flags = IORESOURCE_MEM, |
| 1117 | .start = MSM_SDC2_BASE, |
| 1118 | .end = MSM_SDC2_DML_BASE - 1, |
| 1119 | }, |
| 1120 | { |
| 1121 | .name = "core_irq", |
| 1122 | .flags = IORESOURCE_IRQ, |
| 1123 | .start = SDC2_IRQ_0, |
| 1124 | .end = SDC2_IRQ_0 |
| 1125 | }, |
| 1126 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1127 | { |
| 1128 | .name = "sdcc_dml_addr", |
| 1129 | .start = MSM_SDC2_DML_BASE, |
| 1130 | .end = MSM_SDC2_BAM_BASE - 1, |
| 1131 | .flags = IORESOURCE_MEM, |
| 1132 | }, |
| 1133 | { |
| 1134 | .name = "sdcc_bam_addr", |
| 1135 | .start = MSM_SDC2_BAM_BASE, |
| 1136 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 1137 | .flags = IORESOURCE_MEM, |
| 1138 | }, |
| 1139 | { |
| 1140 | .name = "sdcc_bam_irq", |
| 1141 | .start = SDC2_BAM_IRQ, |
| 1142 | .end = SDC2_BAM_IRQ, |
| 1143 | .flags = IORESOURCE_IRQ, |
| 1144 | }, |
| 1145 | #endif |
| 1146 | }; |
| 1147 | |
| 1148 | static struct resource resources_sdc3[] = { |
| 1149 | { |
| 1150 | .name = "core_mem", |
| 1151 | .flags = IORESOURCE_MEM, |
| 1152 | .start = MSM_SDC3_BASE, |
| 1153 | .end = MSM_SDC3_DML_BASE - 1, |
| 1154 | }, |
| 1155 | { |
| 1156 | .name = "core_irq", |
| 1157 | .flags = IORESOURCE_IRQ, |
| 1158 | .start = SDC3_IRQ_0, |
| 1159 | .end = SDC3_IRQ_0 |
| 1160 | }, |
| 1161 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1162 | { |
| 1163 | .name = "sdcc_dml_addr", |
| 1164 | .start = MSM_SDC3_DML_BASE, |
| 1165 | .end = MSM_SDC3_BAM_BASE - 1, |
| 1166 | .flags = IORESOURCE_MEM, |
| 1167 | }, |
| 1168 | { |
| 1169 | .name = "sdcc_bam_addr", |
| 1170 | .start = MSM_SDC3_BAM_BASE, |
| 1171 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 1172 | .flags = IORESOURCE_MEM, |
| 1173 | }, |
| 1174 | { |
| 1175 | .name = "sdcc_bam_irq", |
| 1176 | .start = SDC3_BAM_IRQ, |
| 1177 | .end = SDC3_BAM_IRQ, |
| 1178 | .flags = IORESOURCE_IRQ, |
| 1179 | }, |
| 1180 | #endif |
| 1181 | }; |
| 1182 | |
| 1183 | static struct resource resources_sdc4[] = { |
| 1184 | { |
| 1185 | .name = "core_mem", |
| 1186 | .flags = IORESOURCE_MEM, |
| 1187 | .start = MSM_SDC4_BASE, |
| 1188 | .end = MSM_SDC4_DML_BASE - 1, |
| 1189 | }, |
| 1190 | { |
| 1191 | .name = "core_irq", |
| 1192 | .flags = IORESOURCE_IRQ, |
| 1193 | .start = SDC4_IRQ_0, |
| 1194 | .end = SDC4_IRQ_0 |
| 1195 | }, |
| 1196 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1197 | { |
| 1198 | .name = "sdcc_dml_addr", |
| 1199 | .start = MSM_SDC4_DML_BASE, |
| 1200 | .end = MSM_SDC4_BAM_BASE - 1, |
| 1201 | .flags = IORESOURCE_MEM, |
| 1202 | }, |
| 1203 | { |
| 1204 | .name = "sdcc_bam_addr", |
| 1205 | .start = MSM_SDC4_BAM_BASE, |
| 1206 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 1207 | .flags = IORESOURCE_MEM, |
| 1208 | }, |
| 1209 | { |
| 1210 | .name = "sdcc_bam_irq", |
| 1211 | .start = SDC4_BAM_IRQ, |
| 1212 | .end = SDC4_BAM_IRQ, |
| 1213 | .flags = IORESOURCE_IRQ, |
| 1214 | }, |
| 1215 | #endif |
| 1216 | }; |
| 1217 | |
| 1218 | struct platform_device apq8064_device_sdc1 = { |
| 1219 | .name = "msm_sdcc", |
| 1220 | .id = 1, |
| 1221 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 1222 | .resource = resources_sdc1, |
| 1223 | .dev = { |
| 1224 | .coherent_dma_mask = 0xffffffff, |
| 1225 | }, |
| 1226 | }; |
| 1227 | |
| 1228 | struct platform_device apq8064_device_sdc2 = { |
| 1229 | .name = "msm_sdcc", |
| 1230 | .id = 2, |
| 1231 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 1232 | .resource = resources_sdc2, |
| 1233 | .dev = { |
| 1234 | .coherent_dma_mask = 0xffffffff, |
| 1235 | }, |
| 1236 | }; |
| 1237 | |
| 1238 | struct platform_device apq8064_device_sdc3 = { |
| 1239 | .name = "msm_sdcc", |
| 1240 | .id = 3, |
| 1241 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 1242 | .resource = resources_sdc3, |
| 1243 | .dev = { |
| 1244 | .coherent_dma_mask = 0xffffffff, |
| 1245 | }, |
| 1246 | }; |
| 1247 | |
| 1248 | struct platform_device apq8064_device_sdc4 = { |
| 1249 | .name = "msm_sdcc", |
| 1250 | .id = 4, |
| 1251 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 1252 | .resource = resources_sdc4, |
| 1253 | .dev = { |
| 1254 | .coherent_dma_mask = 0xffffffff, |
| 1255 | }, |
| 1256 | }; |
| 1257 | |
| 1258 | static struct platform_device *apq8064_sdcc_devices[] __initdata = { |
| 1259 | &apq8064_device_sdc1, |
| 1260 | &apq8064_device_sdc2, |
| 1261 | &apq8064_device_sdc3, |
| 1262 | &apq8064_device_sdc4, |
| 1263 | }; |
| 1264 | |
| 1265 | int __init apq8064_add_sdcc(unsigned int controller, |
| 1266 | struct mmc_platform_data *plat) |
| 1267 | { |
| 1268 | struct platform_device *pdev; |
| 1269 | |
| 1270 | if (!plat) |
| 1271 | return 0; |
| 1272 | if (controller < 1 || controller > 4) |
| 1273 | return -EINVAL; |
| 1274 | |
| 1275 | pdev = apq8064_sdcc_devices[controller-1]; |
| 1276 | pdev->dev.platform_data = plat; |
| 1277 | return platform_device_register(pdev); |
| 1278 | } |
| 1279 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1280 | static struct resource resources_sps[] = { |
| 1281 | { |
| 1282 | .name = "pipe_mem", |
| 1283 | .start = 0x12800000, |
| 1284 | .end = 0x12800000 + 0x4000 - 1, |
| 1285 | .flags = IORESOURCE_MEM, |
| 1286 | }, |
| 1287 | { |
| 1288 | .name = "bamdma_dma", |
| 1289 | .start = 0x12240000, |
| 1290 | .end = 0x12240000 + 0x1000 - 1, |
| 1291 | .flags = IORESOURCE_MEM, |
| 1292 | }, |
| 1293 | { |
| 1294 | .name = "bamdma_bam", |
| 1295 | .start = 0x12244000, |
| 1296 | .end = 0x12244000 + 0x4000 - 1, |
| 1297 | .flags = IORESOURCE_MEM, |
| 1298 | }, |
| 1299 | { |
| 1300 | .name = "bamdma_irq", |
| 1301 | .start = SPS_BAM_DMA_IRQ, |
| 1302 | .end = SPS_BAM_DMA_IRQ, |
| 1303 | .flags = IORESOURCE_IRQ, |
| 1304 | }, |
| 1305 | }; |
| 1306 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1307 | struct platform_device msm_bus_8064_sys_fabric = { |
| 1308 | .name = "msm_bus_fabric", |
| 1309 | .id = MSM_BUS_FAB_SYSTEM, |
| 1310 | }; |
| 1311 | struct platform_device msm_bus_8064_apps_fabric = { |
| 1312 | .name = "msm_bus_fabric", |
| 1313 | .id = MSM_BUS_FAB_APPSS, |
| 1314 | }; |
| 1315 | struct platform_device msm_bus_8064_mm_fabric = { |
| 1316 | .name = "msm_bus_fabric", |
| 1317 | .id = MSM_BUS_FAB_MMSS, |
| 1318 | }; |
| 1319 | struct platform_device msm_bus_8064_sys_fpb = { |
| 1320 | .name = "msm_bus_fabric", |
| 1321 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 1322 | }; |
| 1323 | struct platform_device msm_bus_8064_cpss_fpb = { |
| 1324 | .name = "msm_bus_fabric", |
| 1325 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 1326 | }; |
| 1327 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1328 | static struct msm_sps_platform_data msm_sps_pdata = { |
| 1329 | .bamdma_restricted_pipes = 0x06, |
| 1330 | }; |
| 1331 | |
| 1332 | struct platform_device msm_device_sps_apq8064 = { |
| 1333 | .name = "msm_sps", |
| 1334 | .id = -1, |
| 1335 | .num_resources = ARRAY_SIZE(resources_sps), |
| 1336 | .resource = resources_sps, |
| 1337 | .dev.platform_data = &msm_sps_pdata, |
| 1338 | }; |
| 1339 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1340 | static struct resource smd_resource[] = { |
| 1341 | { |
| 1342 | .name = "a9_m2a_0", |
| 1343 | .start = INT_A9_M2A_0, |
| 1344 | .flags = IORESOURCE_IRQ, |
| 1345 | }, |
| 1346 | { |
| 1347 | .name = "a9_m2a_5", |
| 1348 | .start = INT_A9_M2A_5, |
| 1349 | .flags = IORESOURCE_IRQ, |
| 1350 | }, |
| 1351 | { |
| 1352 | .name = "adsp_a11", |
| 1353 | .start = INT_ADSP_A11, |
| 1354 | .flags = IORESOURCE_IRQ, |
| 1355 | }, |
| 1356 | { |
| 1357 | .name = "adsp_a11_smsm", |
| 1358 | .start = INT_ADSP_A11_SMSM, |
| 1359 | .flags = IORESOURCE_IRQ, |
| 1360 | }, |
| 1361 | { |
| 1362 | .name = "dsps_a11", |
| 1363 | .start = INT_DSPS_A11, |
| 1364 | .flags = IORESOURCE_IRQ, |
| 1365 | }, |
| 1366 | { |
| 1367 | .name = "dsps_a11_smsm", |
| 1368 | .start = INT_DSPS_A11_SMSM, |
| 1369 | .flags = IORESOURCE_IRQ, |
| 1370 | }, |
| 1371 | { |
| 1372 | .name = "wcnss_a11", |
| 1373 | .start = INT_WCNSS_A11, |
| 1374 | .flags = IORESOURCE_IRQ, |
| 1375 | }, |
| 1376 | { |
| 1377 | .name = "wcnss_a11_smsm", |
| 1378 | .start = INT_WCNSS_A11_SMSM, |
| 1379 | .flags = IORESOURCE_IRQ, |
| 1380 | }, |
| 1381 | }; |
| 1382 | |
| 1383 | static struct smd_subsystem_config smd_config_list[] = { |
| 1384 | { |
| 1385 | .irq_config_id = SMD_MODEM, |
| 1386 | .subsys_name = "gss", |
| 1387 | .edge = SMD_APPS_MODEM, |
| 1388 | |
| 1389 | .smd_int.irq_name = "a9_m2a_0", |
| 1390 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1391 | .smd_int.irq_id = -1, |
| 1392 | .smd_int.device_name = "smd_dev", |
| 1393 | .smd_int.dev_id = 0, |
| 1394 | .smd_int.out_bit_pos = 1 << 3, |
| 1395 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1396 | .smd_int.out_offset = 0x8, |
| 1397 | |
| 1398 | .smsm_int.irq_name = "a9_m2a_5", |
| 1399 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1400 | .smsm_int.irq_id = -1, |
| 1401 | .smsm_int.device_name = "smd_smsm", |
| 1402 | .smsm_int.dev_id = 0, |
| 1403 | .smsm_int.out_bit_pos = 1 << 4, |
| 1404 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1405 | .smsm_int.out_offset = 0x8, |
| 1406 | }, |
| 1407 | { |
| 1408 | .irq_config_id = SMD_Q6, |
| 1409 | .subsys_name = "q6", |
| 1410 | .edge = SMD_APPS_QDSP, |
| 1411 | |
| 1412 | .smd_int.irq_name = "adsp_a11", |
| 1413 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1414 | .smd_int.irq_id = -1, |
| 1415 | .smd_int.device_name = "smd_dev", |
| 1416 | .smd_int.dev_id = 0, |
| 1417 | .smd_int.out_bit_pos = 1 << 15, |
| 1418 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1419 | .smd_int.out_offset = 0x8, |
| 1420 | |
| 1421 | .smsm_int.irq_name = "adsp_a11_smsm", |
| 1422 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1423 | .smsm_int.irq_id = -1, |
| 1424 | .smsm_int.device_name = "smd_smsm", |
| 1425 | .smsm_int.dev_id = 0, |
| 1426 | .smsm_int.out_bit_pos = 1 << 14, |
| 1427 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1428 | .smsm_int.out_offset = 0x8, |
| 1429 | }, |
| 1430 | { |
| 1431 | .irq_config_id = SMD_DSPS, |
| 1432 | .subsys_name = "dsps", |
| 1433 | .edge = SMD_APPS_DSPS, |
| 1434 | |
| 1435 | .smd_int.irq_name = "dsps_a11", |
| 1436 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1437 | .smd_int.irq_id = -1, |
| 1438 | .smd_int.device_name = "smd_dev", |
| 1439 | .smd_int.dev_id = 0, |
| 1440 | .smd_int.out_bit_pos = 1, |
| 1441 | .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1442 | .smd_int.out_offset = 0x4080, |
| 1443 | |
| 1444 | .smsm_int.irq_name = "dsps_a11_smsm", |
| 1445 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1446 | .smsm_int.irq_id = -1, |
| 1447 | .smsm_int.device_name = "smd_smsm", |
| 1448 | .smsm_int.dev_id = 0, |
| 1449 | .smsm_int.out_bit_pos = 1, |
| 1450 | .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1451 | .smsm_int.out_offset = 0x4094, |
| 1452 | }, |
| 1453 | { |
| 1454 | .irq_config_id = SMD_WCNSS, |
| 1455 | .subsys_name = "wcnss", |
| 1456 | .edge = SMD_APPS_WCNSS, |
| 1457 | |
| 1458 | .smd_int.irq_name = "wcnss_a11", |
| 1459 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1460 | .smd_int.irq_id = -1, |
| 1461 | .smd_int.device_name = "smd_dev", |
| 1462 | .smd_int.dev_id = 0, |
| 1463 | .smd_int.out_bit_pos = 1 << 25, |
| 1464 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1465 | .smd_int.out_offset = 0x8, |
| 1466 | |
| 1467 | .smsm_int.irq_name = "wcnss_a11_smsm", |
| 1468 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1469 | .smsm_int.irq_id = -1, |
| 1470 | .smsm_int.device_name = "smd_smsm", |
| 1471 | .smsm_int.dev_id = 0, |
| 1472 | .smsm_int.out_bit_pos = 1 << 23, |
| 1473 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1474 | .smsm_int.out_offset = 0x8, |
| 1475 | }, |
| 1476 | }; |
| 1477 | |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1478 | static struct smd_subsystem_restart_config smd_ssr_config = { |
| 1479 | .disable_smsm_reset_handshake = 1, |
| 1480 | }; |
| 1481 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1482 | static struct smd_platform smd_platform_data = { |
| 1483 | .num_ss_configs = ARRAY_SIZE(smd_config_list), |
| 1484 | .smd_ss_configs = smd_config_list, |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1485 | .smd_ssr_config = &smd_ssr_config, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1486 | }; |
| 1487 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1488 | struct platform_device msm_device_smd_apq8064 = { |
| 1489 | .name = "msm_smd", |
| 1490 | .id = -1, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1491 | .resource = smd_resource, |
| 1492 | .num_resources = ARRAY_SIZE(smd_resource), |
| 1493 | .dev = { |
| 1494 | .platform_data = &smd_platform_data, |
| 1495 | }, |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1496 | }; |
| 1497 | |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1498 | #ifdef CONFIG_HW_RANDOM_MSM |
| 1499 | /* PRNG device */ |
| 1500 | #define MSM_PRNG_PHYS 0x1A500000 |
| 1501 | static struct resource rng_resources = { |
| 1502 | .flags = IORESOURCE_MEM, |
| 1503 | .start = MSM_PRNG_PHYS, |
| 1504 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 1505 | }; |
| 1506 | |
| 1507 | struct platform_device apq8064_device_rng = { |
| 1508 | .name = "msm_rng", |
| 1509 | .id = 0, |
| 1510 | .num_resources = 1, |
| 1511 | .resource = &rng_resources, |
| 1512 | }; |
| 1513 | #endif |
| 1514 | |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1515 | static struct resource msm_gss_resources[] = { |
| 1516 | { |
| 1517 | .start = 0x10000000, |
| 1518 | .end = 0x10000000 + SZ_256 - 1, |
| 1519 | .flags = IORESOURCE_MEM, |
| 1520 | }, |
Matt Wagantall | 19ac4fd | 2012-02-03 20:18:23 -0800 | [diff] [blame] | 1521 | { |
| 1522 | .start = 0x10008000, |
| 1523 | .end = 0x10008000 + SZ_256 - 1, |
| 1524 | .flags = IORESOURCE_MEM, |
| 1525 | }, |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1526 | }; |
| 1527 | |
| 1528 | struct platform_device msm_gss = { |
| 1529 | .name = "pil_gss", |
| 1530 | .id = -1, |
| 1531 | .num_resources = ARRAY_SIZE(msm_gss_resources), |
| 1532 | .resource = msm_gss_resources, |
| 1533 | }; |
| 1534 | |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 1535 | struct platform_device *apq8064_fs_devices[] = { |
| 1536 | FS_8X60(FS_ROT, "fs_rot"), |
| 1537 | FS_8X60(FS_IJPEG, "fs_ijpeg"), |
| 1538 | FS_8X60(FS_VFE, "fs_vfe"), |
| 1539 | FS_8X60(FS_VPE, "fs_vpe"), |
| 1540 | FS_8X60(FS_GFX3D, "fs_gfx3d"), |
| 1541 | FS_8X60(FS_VED, "fs_ved"), |
| 1542 | FS_8X60(FS_VCAP, "fs_vcap"), |
| 1543 | }; |
| 1544 | unsigned apq8064_num_fs_devices = ARRAY_SIZE(apq8064_fs_devices); |
| 1545 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1546 | struct msm_rpm_platform_data apq8064_rpm_data __initdata = { |
| 1547 | .reg_base_addrs = { |
| 1548 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 1549 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 1550 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 1551 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 1552 | }, |
| 1553 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 1554 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 1555 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1556 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1557 | .ipc_rpm_val = 4, |
| 1558 | .target_id = { |
| 1559 | MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 1560 | MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 1561 | MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8), |
| 1562 | MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 1563 | MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 1564 | MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1), |
| 1565 | MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1), |
| 1566 | MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1), |
| 1567 | MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 1568 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 1569 | MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 1570 | MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 1571 | MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1), |
| 1572 | MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1), |
| 1573 | MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1), |
| 1574 | MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1), |
| 1575 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0, |
| 1576 | APPS_FABRIC_CFG_HALT, 2), |
| 1577 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0, |
| 1578 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 1579 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL, |
| 1580 | APPS_FABRIC_CFG_IOCTL, 1), |
| 1581 | MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 1582 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0, |
| 1583 | SYS_FABRIC_CFG_HALT, 2), |
| 1584 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0, |
| 1585 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 1586 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL, |
| 1587 | SYS_FABRIC_CFG_IOCTL, 1), |
| 1588 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30), |
| 1589 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0, |
| 1590 | MMSS_FABRIC_CFG_HALT, 2), |
| 1591 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0, |
| 1592 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 1593 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL, |
| 1594 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 1595 | MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21), |
| 1596 | MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2), |
| 1597 | MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2), |
| 1598 | MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2), |
| 1599 | MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2), |
| 1600 | MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2), |
| 1601 | MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2), |
| 1602 | MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2), |
| 1603 | MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2), |
| 1604 | MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2), |
| 1605 | MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2), |
| 1606 | MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2), |
| 1607 | MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2), |
| 1608 | MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2), |
| 1609 | MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2), |
| 1610 | MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2), |
| 1611 | MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2), |
| 1612 | MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2), |
| 1613 | MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2), |
| 1614 | MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2), |
| 1615 | MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2), |
| 1616 | MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2), |
| 1617 | MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2), |
| 1618 | MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2), |
| 1619 | MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2), |
| 1620 | MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2), |
| 1621 | MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2), |
| 1622 | MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2), |
| 1623 | MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2), |
| 1624 | MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2), |
| 1625 | MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2), |
| 1626 | MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2), |
| 1627 | MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2), |
| 1628 | MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2), |
| 1629 | MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2), |
| 1630 | MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2), |
| 1631 | MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2), |
| 1632 | MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2), |
| 1633 | MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 1634 | MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 1635 | MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1), |
| 1636 | MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1), |
| 1637 | MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1), |
| 1638 | MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1), |
| 1639 | MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1), |
| 1640 | MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1), |
| 1641 | MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1), |
| 1642 | MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2), |
| 1643 | MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2), |
| 1644 | MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2), |
| 1645 | MSM_RPM_MAP(8064, NCP_0, NCP, 2), |
| 1646 | MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 1647 | MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 1648 | MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 1649 | MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2), |
| 1650 | MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1), |
| 1651 | }, |
| 1652 | .target_status = { |
| 1653 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR), |
| 1654 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR), |
| 1655 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD), |
| 1656 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0), |
| 1657 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1), |
| 1658 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2), |
| 1659 | MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0), |
| 1660 | MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE), |
| 1661 | MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL), |
| 1662 | MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK), |
| 1663 | MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK), |
| 1664 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK), |
| 1665 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK), |
| 1666 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK), |
| 1667 | MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK), |
| 1668 | MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK), |
| 1669 | MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK), |
| 1670 | MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK), |
| 1671 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK), |
| 1672 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT), |
| 1673 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD), |
| 1674 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL), |
| 1675 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB), |
| 1676 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT), |
| 1677 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD), |
| 1678 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL), |
| 1679 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB), |
| 1680 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT), |
| 1681 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD), |
| 1682 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL), |
| 1683 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB), |
| 1684 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0), |
| 1685 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1), |
| 1686 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0), |
| 1687 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1), |
| 1688 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0), |
| 1689 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1), |
| 1690 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0), |
| 1691 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1), |
| 1692 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0), |
| 1693 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1), |
| 1694 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0), |
| 1695 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1), |
| 1696 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0), |
| 1697 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1), |
| 1698 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0), |
| 1699 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1), |
| 1700 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0), |
| 1701 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1), |
| 1702 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0), |
| 1703 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1), |
| 1704 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0), |
| 1705 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1), |
| 1706 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0), |
| 1707 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1), |
| 1708 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0), |
| 1709 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1), |
| 1710 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0), |
| 1711 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1), |
| 1712 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0), |
| 1713 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1), |
| 1714 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0), |
| 1715 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1), |
| 1716 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0), |
| 1717 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1), |
| 1718 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0), |
| 1719 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1), |
| 1720 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0), |
| 1721 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1), |
| 1722 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0), |
| 1723 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1), |
| 1724 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0), |
| 1725 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1), |
| 1726 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0), |
| 1727 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1), |
| 1728 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0), |
| 1729 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1), |
| 1730 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0), |
| 1731 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1), |
| 1732 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0), |
| 1733 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1), |
| 1734 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0), |
| 1735 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1), |
| 1736 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0), |
| 1737 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1), |
| 1738 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0), |
| 1739 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1), |
| 1740 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0), |
| 1741 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1), |
| 1742 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0), |
| 1743 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1), |
| 1744 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0), |
| 1745 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1), |
| 1746 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0), |
| 1747 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1), |
| 1748 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0), |
| 1749 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1), |
| 1750 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0), |
| 1751 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1), |
| 1752 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0), |
| 1753 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1), |
| 1754 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0), |
| 1755 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1), |
| 1756 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0), |
| 1757 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1), |
| 1758 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0), |
| 1759 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1), |
| 1760 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0), |
| 1761 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1), |
| 1762 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1), |
| 1763 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2), |
| 1764 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3), |
| 1765 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4), |
| 1766 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5), |
| 1767 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6), |
| 1768 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7), |
| 1769 | MSM_RPM_STATUS_ID_MAP(8064, NCP_0), |
| 1770 | MSM_RPM_STATUS_ID_MAP(8064, NCP_1), |
| 1771 | MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS), |
| 1772 | MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH), |
| 1773 | MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH), |
| 1774 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0), |
| 1775 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1), |
| 1776 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE), |
| 1777 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE), |
| 1778 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0), |
| 1779 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1), |
| 1780 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0), |
| 1781 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1), |
| 1782 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0), |
| 1783 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1), |
| 1784 | }, |
| 1785 | .target_ctrl_id = { |
| 1786 | MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR), |
| 1787 | MSM_RPM_CTRL_MAP(8064, VERSION_MINOR), |
| 1788 | MSM_RPM_CTRL_MAP(8064, VERSION_BUILD), |
| 1789 | MSM_RPM_CTRL_MAP(8064, REQ_CTX_0), |
| 1790 | MSM_RPM_CTRL_MAP(8064, REQ_SEL_0), |
| 1791 | MSM_RPM_CTRL_MAP(8064, ACK_CTX_0), |
| 1792 | MSM_RPM_CTRL_MAP(8064, ACK_SEL_0), |
| 1793 | }, |
| 1794 | .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE, |
| 1795 | .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION, |
| 1796 | .sel_last = MSM_RPM_8064_SEL_LAST, |
| 1797 | .ver = {3, 0, 0}, |
| 1798 | }; |
| 1799 | |
| 1800 | struct platform_device apq8064_rpm_device = { |
| 1801 | .name = "msm_rpm", |
| 1802 | .id = -1, |
| 1803 | }; |
| 1804 | |
| 1805 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 1806 | .phys_addr_base = 0x0010D204, |
| 1807 | .phys_size = SZ_8K, |
| 1808 | }; |
| 1809 | |
| 1810 | struct platform_device apq8064_rpm_stat_device = { |
| 1811 | .name = "msm_rpm_stat", |
| 1812 | .id = -1, |
| 1813 | .dev = { |
| 1814 | .platform_data = &msm_rpm_stat_pdata, |
| 1815 | }, |
| 1816 | }; |
| 1817 | |
| 1818 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 1819 | .phys_addr_base = 0x0010C000, |
| 1820 | .reg_offsets = { |
| 1821 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 1822 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 1823 | }, |
| 1824 | .phys_size = SZ_8K, |
| 1825 | .log_len = 4096, /* log's buffer length in bytes */ |
| 1826 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 1827 | }; |
| 1828 | |
| 1829 | struct platform_device apq8064_rpm_log_device = { |
| 1830 | .name = "msm_rpm_log", |
| 1831 | .id = -1, |
| 1832 | .dev = { |
| 1833 | .platform_data = &msm_rpm_log_pdata, |
| 1834 | }, |
| 1835 | }; |
| 1836 | |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 1837 | /* Sensors DSPS platform data */ |
| 1838 | |
| 1839 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 1840 | |
| 1841 | static struct dsps_clk_info dsps_clks[] = {}; |
| 1842 | static struct dsps_regulator_info dsps_regs[] = {}; |
| 1843 | |
| 1844 | /* |
| 1845 | * Note: GPIOs field is intialized in run-time at the function |
| 1846 | * apq8064_init_dsps(). |
| 1847 | */ |
| 1848 | |
| 1849 | struct msm_dsps_platform_data msm_dsps_pdata_8064 = { |
| 1850 | .clks = dsps_clks, |
| 1851 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 1852 | .gpios = NULL, |
| 1853 | .gpios_num = 0, |
| 1854 | .regs = dsps_regs, |
| 1855 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 1856 | .dsps_pwr_ctl_en = 1, |
| 1857 | .signature = DSPS_SIGNATURE, |
| 1858 | }; |
| 1859 | |
| 1860 | static struct resource msm_dsps_resources[] = { |
| 1861 | { |
| 1862 | .start = PPSS_REG_PHYS_BASE, |
| 1863 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 1864 | .name = "ppss_reg", |
| 1865 | .flags = IORESOURCE_MEM, |
| 1866 | }, |
| 1867 | |
| 1868 | { |
| 1869 | .start = PPSS_WDOG_TIMER_IRQ, |
| 1870 | .end = PPSS_WDOG_TIMER_IRQ, |
| 1871 | .name = "ppss_wdog", |
| 1872 | .flags = IORESOURCE_IRQ, |
| 1873 | }, |
| 1874 | }; |
| 1875 | |
| 1876 | struct platform_device msm_dsps_device_8064 = { |
| 1877 | .name = "msm_dsps", |
| 1878 | .id = 0, |
| 1879 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 1880 | .resource = msm_dsps_resources, |
| 1881 | .dev.platform_data = &msm_dsps_pdata_8064, |
| 1882 | }; |
| 1883 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1884 | #ifdef CONFIG_MSM_MPM |
| 1885 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
| 1886 | [1] = MSM_GPIO_TO_INT(26), |
| 1887 | [2] = MSM_GPIO_TO_INT(88), |
| 1888 | [4] = MSM_GPIO_TO_INT(73), |
| 1889 | [5] = MSM_GPIO_TO_INT(74), |
| 1890 | [6] = MSM_GPIO_TO_INT(75), |
| 1891 | [7] = MSM_GPIO_TO_INT(76), |
| 1892 | [8] = MSM_GPIO_TO_INT(77), |
| 1893 | [9] = MSM_GPIO_TO_INT(36), |
| 1894 | [10] = MSM_GPIO_TO_INT(84), |
| 1895 | [11] = MSM_GPIO_TO_INT(7), |
| 1896 | [12] = MSM_GPIO_TO_INT(11), |
| 1897 | [13] = MSM_GPIO_TO_INT(52), |
| 1898 | [14] = MSM_GPIO_TO_INT(15), |
| 1899 | [15] = MSM_GPIO_TO_INT(83), |
| 1900 | [16] = USB3_HS_IRQ, |
| 1901 | [19] = MSM_GPIO_TO_INT(61), |
| 1902 | [20] = MSM_GPIO_TO_INT(58), |
| 1903 | [23] = MSM_GPIO_TO_INT(65), |
| 1904 | [24] = MSM_GPIO_TO_INT(63), |
| 1905 | [25] = USB1_HS_IRQ, |
| 1906 | [27] = HDMI_IRQ, |
| 1907 | [29] = MSM_GPIO_TO_INT(22), |
| 1908 | [30] = MSM_GPIO_TO_INT(72), |
| 1909 | [31] = USB4_HS_IRQ, |
| 1910 | [33] = MSM_GPIO_TO_INT(44), |
| 1911 | [34] = MSM_GPIO_TO_INT(39), |
| 1912 | [35] = MSM_GPIO_TO_INT(19), |
| 1913 | [36] = MSM_GPIO_TO_INT(23), |
| 1914 | [37] = MSM_GPIO_TO_INT(41), |
| 1915 | [38] = MSM_GPIO_TO_INT(30), |
| 1916 | [41] = MSM_GPIO_TO_INT(42), |
| 1917 | [42] = MSM_GPIO_TO_INT(56), |
| 1918 | [43] = MSM_GPIO_TO_INT(55), |
| 1919 | [44] = MSM_GPIO_TO_INT(50), |
| 1920 | [45] = MSM_GPIO_TO_INT(49), |
| 1921 | [46] = MSM_GPIO_TO_INT(47), |
| 1922 | [47] = MSM_GPIO_TO_INT(45), |
| 1923 | [48] = MSM_GPIO_TO_INT(38), |
| 1924 | [49] = MSM_GPIO_TO_INT(34), |
| 1925 | [50] = MSM_GPIO_TO_INT(32), |
| 1926 | [51] = MSM_GPIO_TO_INT(29), |
| 1927 | [52] = MSM_GPIO_TO_INT(18), |
| 1928 | [53] = MSM_GPIO_TO_INT(10), |
| 1929 | [54] = MSM_GPIO_TO_INT(81), |
| 1930 | [55] = MSM_GPIO_TO_INT(6), |
| 1931 | }; |
| 1932 | |
| 1933 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
| 1934 | TLMM_MSM_SUMMARY_IRQ, |
| 1935 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1936 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1937 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1938 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 1939 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 1940 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 1941 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 1942 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 1943 | MSS_TO_APPS_IRQ_0, |
| 1944 | MSS_TO_APPS_IRQ_1, |
| 1945 | MSS_TO_APPS_IRQ_2, |
| 1946 | MSS_TO_APPS_IRQ_3, |
| 1947 | MSS_TO_APPS_IRQ_4, |
| 1948 | MSS_TO_APPS_IRQ_5, |
| 1949 | MSS_TO_APPS_IRQ_6, |
| 1950 | MSS_TO_APPS_IRQ_7, |
| 1951 | MSS_TO_APPS_IRQ_8, |
| 1952 | MSS_TO_APPS_IRQ_9, |
| 1953 | LPASS_SCSS_GP_LOW_IRQ, |
| 1954 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1955 | LPASS_SCSS_GP_HIGH_IRQ, |
| 1956 | SPS_MTI_30, |
| 1957 | SPS_MTI_31, |
| 1958 | RIVA_APSS_SPARE_IRQ, |
| 1959 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 1960 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1961 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 1962 | }; |
| 1963 | |
| 1964 | struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = { |
| 1965 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 1966 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 1967 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 1968 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 1969 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 1970 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 1971 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1972 | .mpm_apps_ipc_val = BIT(1), |
| 1973 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1974 | |
| 1975 | }; |
| 1976 | #endif |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1977 | |
| 1978 | #define MDM2AP_ERRFATAL 19 |
| 1979 | #define AP2MDM_ERRFATAL 18 |
| 1980 | #define MDM2AP_STATUS 49 |
| 1981 | #define AP2MDM_STATUS 48 |
| 1982 | #define AP2MDM_PMIC_RESET_N 27 |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 1983 | #define AP2MDM_WAKEUP 35 |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1984 | |
| 1985 | static struct resource mdm_resources[] = { |
| 1986 | { |
| 1987 | .start = MDM2AP_ERRFATAL, |
| 1988 | .end = MDM2AP_ERRFATAL, |
| 1989 | .name = "MDM2AP_ERRFATAL", |
| 1990 | .flags = IORESOURCE_IO, |
| 1991 | }, |
| 1992 | { |
| 1993 | .start = AP2MDM_ERRFATAL, |
| 1994 | .end = AP2MDM_ERRFATAL, |
| 1995 | .name = "AP2MDM_ERRFATAL", |
| 1996 | .flags = IORESOURCE_IO, |
| 1997 | }, |
| 1998 | { |
| 1999 | .start = MDM2AP_STATUS, |
| 2000 | .end = MDM2AP_STATUS, |
| 2001 | .name = "MDM2AP_STATUS", |
| 2002 | .flags = IORESOURCE_IO, |
| 2003 | }, |
| 2004 | { |
| 2005 | .start = AP2MDM_STATUS, |
| 2006 | .end = AP2MDM_STATUS, |
| 2007 | .name = "AP2MDM_STATUS", |
| 2008 | .flags = IORESOURCE_IO, |
| 2009 | }, |
| 2010 | { |
| 2011 | .start = AP2MDM_PMIC_RESET_N, |
| 2012 | .end = AP2MDM_PMIC_RESET_N, |
| 2013 | .name = "AP2MDM_PMIC_RESET_N", |
| 2014 | .flags = IORESOURCE_IO, |
| 2015 | }, |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 2016 | { |
| 2017 | .start = AP2MDM_WAKEUP, |
| 2018 | .end = AP2MDM_WAKEUP, |
| 2019 | .name = "AP2MDM_WAKEUP", |
| 2020 | .flags = IORESOURCE_IO, |
| 2021 | }, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2022 | }; |
| 2023 | |
| 2024 | struct platform_device mdm_8064_device = { |
| 2025 | .name = "mdm2_modem", |
| 2026 | .id = -1, |
| 2027 | .num_resources = ARRAY_SIZE(mdm_resources), |
| 2028 | .resource = mdm_resources, |
| 2029 | }; |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 2030 | |
| 2031 | static int apq8064_LPM_latency = 1000; /* >100 usec for WFI */ |
| 2032 | |
| 2033 | struct platform_device apq8064_cpu_idle_device = { |
| 2034 | .name = "msm_cpu_idle", |
| 2035 | .id = -1, |
| 2036 | .dev = { |
| 2037 | .platform_data = &apq8064_LPM_latency, |
| 2038 | }, |
| 2039 | }; |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 2040 | |
| 2041 | static struct msm_dcvs_freq_entry apq8064_freq[] = { |
| 2042 | { 384000, 166981, 345600}, |
| 2043 | { 702000, 213049, 632502}, |
| 2044 | {1026000, 285712, 925613}, |
| 2045 | {1242000, 383945, 1176550}, |
| 2046 | {1458000, 419729, 1465478}, |
| 2047 | {1512000, 434116, 1546674}, |
| 2048 | |
| 2049 | }; |
| 2050 | |
| 2051 | static struct msm_dcvs_core_info apq8064_core_info = { |
| 2052 | .freq_tbl = &apq8064_freq[0], |
| 2053 | .core_param = { |
| 2054 | .max_time_us = 100000, |
| 2055 | .num_freq = ARRAY_SIZE(apq8064_freq), |
| 2056 | }, |
| 2057 | .algo_param = { |
| 2058 | .slack_time_us = 58000, |
| 2059 | .scale_slack_time = 0, |
| 2060 | .scale_slack_time_pct = 0, |
| 2061 | .disable_pc_threshold = 1458000, |
| 2062 | .em_window_size = 100000, |
| 2063 | .em_max_util_pct = 97, |
| 2064 | .ss_window_size = 1000000, |
| 2065 | .ss_util_pct = 95, |
| 2066 | .ss_iobusy_conv = 100, |
| 2067 | }, |
| 2068 | }; |
| 2069 | |
| 2070 | struct platform_device apq8064_msm_gov_device = { |
| 2071 | .name = "msm_dcvs_gov", |
| 2072 | .id = -1, |
| 2073 | .dev = { |
| 2074 | .platform_data = &apq8064_core_info, |
| 2075 | }, |
| 2076 | }; |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 2077 | |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2078 | #ifdef CONFIG_MSM_VCAP |
| 2079 | #define VCAP_HW_BASE 0x05900000 |
| 2080 | |
| 2081 | static struct msm_bus_vectors vcap_init_vectors[] = { |
| 2082 | { |
| 2083 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2084 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2085 | .ab = 0, |
| 2086 | .ib = 0, |
| 2087 | }, |
| 2088 | }; |
| 2089 | |
| 2090 | |
| 2091 | static struct msm_bus_vectors vcap_480_vectors[] = { |
| 2092 | { |
| 2093 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2094 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2095 | .ab = 1280 * 720 * 3 * 60 / 16, |
| 2096 | .ib = 1280 * 720 * 3 * 60 / 16 * 1.5, |
| 2097 | }, |
| 2098 | }; |
| 2099 | |
| 2100 | static struct msm_bus_vectors vcap_720_vectors[] = { |
| 2101 | { |
| 2102 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2103 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2104 | .ab = 1280 * 720 * 3 * 60 / 16, |
| 2105 | .ib = 1280 * 720 * 3 * 60 / 16 * 1.5, |
| 2106 | }, |
| 2107 | }; |
| 2108 | |
| 2109 | static struct msm_bus_vectors vcap_1080_vectors[] = { |
| 2110 | { |
| 2111 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2112 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2113 | .ab = 1920 * 1080 * 3 * 60 / 16, |
| 2114 | .ib = 1920 * 1080 * 3 * 60 / 16 * 1.5, |
| 2115 | }, |
| 2116 | }; |
| 2117 | |
| 2118 | static struct msm_bus_paths vcap_bus_usecases[] = { |
| 2119 | { |
| 2120 | ARRAY_SIZE(vcap_init_vectors), |
| 2121 | vcap_init_vectors, |
| 2122 | }, |
| 2123 | { |
| 2124 | ARRAY_SIZE(vcap_480_vectors), |
| 2125 | vcap_480_vectors, |
| 2126 | }, |
| 2127 | { |
| 2128 | ARRAY_SIZE(vcap_720_vectors), |
| 2129 | vcap_720_vectors, |
| 2130 | }, |
| 2131 | { |
| 2132 | ARRAY_SIZE(vcap_1080_vectors), |
| 2133 | vcap_1080_vectors, |
| 2134 | }, |
| 2135 | }; |
| 2136 | |
| 2137 | static struct msm_bus_scale_pdata vcap_axi_client_pdata = { |
| 2138 | vcap_bus_usecases, |
| 2139 | ARRAY_SIZE(vcap_bus_usecases), |
| 2140 | }; |
| 2141 | |
| 2142 | static struct resource msm_vcap_resources[] = { |
| 2143 | { |
| 2144 | .name = "vcap", |
| 2145 | .start = VCAP_HW_BASE, |
| 2146 | .end = VCAP_HW_BASE + SZ_1M - 1, |
| 2147 | .flags = IORESOURCE_MEM, |
| 2148 | }, |
| 2149 | { |
| 2150 | .name = "vcap", |
| 2151 | .start = VCAP_VC, |
| 2152 | .end = VCAP_VC, |
| 2153 | .flags = IORESOURCE_IRQ, |
| 2154 | }, |
| 2155 | }; |
| 2156 | |
| 2157 | static unsigned vcap_gpios[] = { |
| 2158 | 2, 3, 4, 5, 6, 7, 8, 9, 10, |
| 2159 | 11, 12, 13, 18, 19, 20, 21, |
| 2160 | 22, 23, 24, 25, 26, 80, 82, |
| 2161 | 83, 84, 85, 86, 87, |
| 2162 | }; |
| 2163 | |
| 2164 | static struct vcap_platform_data vcap_pdata = { |
| 2165 | .gpios = vcap_gpios, |
| 2166 | .num_gpios = ARRAY_SIZE(vcap_gpios), |
| 2167 | .bus_client_pdata = &vcap_axi_client_pdata |
| 2168 | }; |
| 2169 | |
| 2170 | struct platform_device msm8064_device_vcap = { |
| 2171 | .name = "msm_vcap", |
| 2172 | .id = 0, |
| 2173 | .resource = msm_vcap_resources, |
| 2174 | .num_resources = ARRAY_SIZE(msm_vcap_resources), |
| 2175 | .dev = { |
| 2176 | .platform_data = &vcap_pdata, |
| 2177 | }, |
| 2178 | }; |
| 2179 | #endif |
| 2180 | |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 2181 | static struct resource msm_cache_erp_resources[] = { |
| 2182 | { |
| 2183 | .name = "l1_irq", |
| 2184 | .start = SC_SICCPUXEXTFAULTIRPTREQ, |
| 2185 | .flags = IORESOURCE_IRQ, |
| 2186 | }, |
| 2187 | { |
| 2188 | .name = "l2_irq", |
| 2189 | .start = APCC_QGICL2IRPTREQ, |
| 2190 | .flags = IORESOURCE_IRQ, |
| 2191 | } |
| 2192 | }; |
| 2193 | |
| 2194 | struct platform_device apq8064_device_cache_erp = { |
| 2195 | .name = "msm_cache_erp", |
| 2196 | .id = -1, |
| 2197 | .num_resources = ARRAY_SIZE(msm_cache_erp_resources), |
| 2198 | .resource = msm_cache_erp_resources, |
| 2199 | }; |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2200 | |
| 2201 | #define MSM_QDSS_PHYS_BASE 0x01A00000 |
| 2202 | #define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000) |
| 2203 | |
| 2204 | #define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, } |
| 2205 | |
| 2206 | static struct qdss_source msm_qdss_sources[] = { |
| 2207 | QDSS_SOURCE("msm_etm", 0x33), |
| 2208 | QDSS_SOURCE("msm_oxili", 0x80), |
| 2209 | }; |
| 2210 | |
| 2211 | static struct msm_qdss_platform_data qdss_pdata = { |
| 2212 | .src_table = msm_qdss_sources, |
| 2213 | .size = ARRAY_SIZE(msm_qdss_sources), |
| 2214 | .afamily = 1, |
| 2215 | }; |
| 2216 | |
| 2217 | struct platform_device apq8064_qdss_device = { |
| 2218 | .name = "msm_qdss", |
| 2219 | .id = -1, |
| 2220 | .dev = { |
| 2221 | .platform_data = &qdss_pdata, |
| 2222 | }, |
| 2223 | }; |
| 2224 | |
| 2225 | static struct resource msm_etm_resources[] = { |
| 2226 | { |
| 2227 | .start = MSM_ETM_PHYS_BASE, |
| 2228 | .end = MSM_ETM_PHYS_BASE + (SZ_4K * 4) - 1, |
| 2229 | .flags = IORESOURCE_MEM, |
| 2230 | }, |
| 2231 | }; |
| 2232 | |
| 2233 | struct platform_device apq8064_etm_device = { |
| 2234 | .name = "msm_etm", |
| 2235 | .id = 0, |
| 2236 | .num_resources = ARRAY_SIZE(msm_etm_resources), |
| 2237 | .resource = msm_etm_resources, |
| 2238 | }; |