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> |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 26 | #include <sound/msm-dai-q6.h> |
| 27 | #include <sound/apr_audio.h> |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 28 | #include <mach/msm_bus_board.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 29 | #include <mach/rpm.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 30 | #include <mach/mdm2.h> |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 31 | #include <linux/ion.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 32 | #include "clock.h" |
| 33 | #include "devices.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 34 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 35 | #include "rpm_stats.h" |
| 36 | #include "rpm_log.h" |
| 37 | #include "mpm.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 38 | |
| 39 | /* Address of GSBI blocks */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 40 | #define MSM_GSBI1_PHYS 0x12440000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 41 | #define MSM_GSBI3_PHYS 0x16200000 |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 42 | #define MSM_GSBI4_PHYS 0x16300000 |
| 43 | #define MSM_GSBI5_PHYS 0x1A200000 |
| 44 | #define MSM_GSBI6_PHYS 0x16500000 |
| 45 | #define MSM_GSBI7_PHYS 0x16600000 |
| 46 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 47 | /* GSBI UART devices */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 48 | #define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 49 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 50 | #define MSM_UART7DM_PHYS (MSM_GSBI7_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 51 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 52 | /* GSBI QUP devices */ |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 53 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x20000) |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 54 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 55 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 56 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 57 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 58 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 59 | #define MSM_QUP_SIZE SZ_4K |
| 60 | |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 61 | /* Address of SSBI CMD */ |
| 62 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 63 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 64 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 65 | |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 66 | /* Address of HS USBOTG1 */ |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 67 | #define MSM_HSUSB1_PHYS 0x12500000 |
| 68 | #define MSM_HSUSB1_SIZE SZ_4K |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 69 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 70 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 71 | .pet_time = 10000, |
| 72 | .bark_time = 11000, |
| 73 | .has_secure = true, |
Joel King | e7ca6f7 | 2012-02-09 20:51:25 -0800 | [diff] [blame] | 74 | .needs_expired_enable = true, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 75 | }; |
| 76 | |
| 77 | struct platform_device msm8064_device_watchdog = { |
| 78 | .name = "msm_watchdog", |
| 79 | .id = -1, |
| 80 | .dev = { |
| 81 | .platform_data = &msm_watchdog_pdata, |
| 82 | }, |
| 83 | }; |
| 84 | |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 85 | static struct resource msm_dmov_resource[] = { |
| 86 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 87 | .start = ADM_0_SCSS_1_IRQ, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 88 | .flags = IORESOURCE_IRQ, |
| 89 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 90 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 91 | .start = 0x18320000, |
| 92 | .end = 0x18320000 + SZ_1M - 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 93 | .flags = IORESOURCE_MEM, |
| 94 | }, |
| 95 | }; |
| 96 | |
| 97 | static struct msm_dmov_pdata msm_dmov_pdata = { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 98 | .sd = 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 99 | .sd_size = 0x800, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 100 | }; |
| 101 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 102 | struct platform_device apq8064_device_dmov = { |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 103 | .name = "msm_dmov", |
| 104 | .id = -1, |
| 105 | .resource = msm_dmov_resource, |
| 106 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 107 | .dev = { |
| 108 | .platform_data = &msm_dmov_pdata, |
| 109 | }, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 110 | }; |
| 111 | |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 112 | static struct resource resources_uart_gsbi1[] = { |
| 113 | { |
| 114 | .start = APQ8064_GSBI1_UARTDM_IRQ, |
| 115 | .end = APQ8064_GSBI1_UARTDM_IRQ, |
| 116 | .flags = IORESOURCE_IRQ, |
| 117 | }, |
| 118 | { |
| 119 | .start = MSM_UART1DM_PHYS, |
| 120 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 121 | .name = "uartdm_resource", |
| 122 | .flags = IORESOURCE_MEM, |
| 123 | }, |
| 124 | { |
| 125 | .start = MSM_GSBI1_PHYS, |
| 126 | .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1, |
| 127 | .name = "gsbi_resource", |
| 128 | .flags = IORESOURCE_MEM, |
| 129 | }, |
| 130 | }; |
| 131 | |
| 132 | struct platform_device apq8064_device_uart_gsbi1 = { |
| 133 | .name = "msm_serial_hsl", |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 134 | .id = 1, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 135 | .num_resources = ARRAY_SIZE(resources_uart_gsbi1), |
| 136 | .resource = resources_uart_gsbi1, |
| 137 | }; |
| 138 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 139 | static struct resource resources_uart_gsbi3[] = { |
| 140 | { |
| 141 | .start = GSBI3_UARTDM_IRQ, |
| 142 | .end = GSBI3_UARTDM_IRQ, |
| 143 | .flags = IORESOURCE_IRQ, |
| 144 | }, |
| 145 | { |
| 146 | .start = MSM_UART3DM_PHYS, |
| 147 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 148 | .name = "uartdm_resource", |
| 149 | .flags = IORESOURCE_MEM, |
| 150 | }, |
| 151 | { |
| 152 | .start = MSM_GSBI3_PHYS, |
| 153 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 154 | .name = "gsbi_resource", |
| 155 | .flags = IORESOURCE_MEM, |
| 156 | }, |
| 157 | }; |
| 158 | |
| 159 | struct platform_device apq8064_device_uart_gsbi3 = { |
| 160 | .name = "msm_serial_hsl", |
| 161 | .id = 0, |
| 162 | .num_resources = ARRAY_SIZE(resources_uart_gsbi3), |
| 163 | .resource = resources_uart_gsbi3, |
| 164 | }; |
| 165 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 166 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 167 | { |
| 168 | .name = "gsbi_qup_i2c_addr", |
| 169 | .start = MSM_GSBI3_PHYS, |
| 170 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 171 | .flags = IORESOURCE_MEM, |
| 172 | }, |
| 173 | { |
| 174 | .name = "qup_phys_addr", |
| 175 | .start = MSM_GSBI3_QUP_PHYS, |
| 176 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 177 | .flags = IORESOURCE_MEM, |
| 178 | }, |
| 179 | { |
| 180 | .name = "qup_err_intr", |
| 181 | .start = GSBI3_QUP_IRQ, |
| 182 | .end = GSBI3_QUP_IRQ, |
| 183 | .flags = IORESOURCE_IRQ, |
| 184 | }, |
| 185 | { |
| 186 | .name = "i2c_clk", |
| 187 | .start = 9, |
| 188 | .end = 9, |
| 189 | .flags = IORESOURCE_IO, |
| 190 | }, |
| 191 | { |
| 192 | .name = "i2c_sda", |
| 193 | .start = 8, |
| 194 | .end = 8, |
| 195 | .flags = IORESOURCE_IO, |
| 196 | }, |
| 197 | }; |
| 198 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 199 | static struct resource resources_qup_i2c_gsbi1[] = { |
| 200 | { |
| 201 | .name = "gsbi_qup_i2c_addr", |
| 202 | .start = MSM_GSBI1_PHYS, |
| 203 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 204 | .flags = IORESOURCE_MEM, |
| 205 | }, |
| 206 | { |
| 207 | .name = "qup_phys_addr", |
| 208 | .start = MSM_GSBI1_QUP_PHYS, |
| 209 | .end = MSM_GSBI1_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 210 | .flags = IORESOURCE_MEM, |
| 211 | }, |
| 212 | { |
| 213 | .name = "qup_err_intr", |
| 214 | .start = APQ8064_GSBI1_QUP_IRQ, |
| 215 | .end = APQ8064_GSBI1_QUP_IRQ, |
| 216 | .flags = IORESOURCE_IRQ, |
| 217 | }, |
| 218 | { |
| 219 | .name = "i2c_clk", |
| 220 | .start = 21, |
| 221 | .end = 21, |
| 222 | .flags = IORESOURCE_IO, |
| 223 | }, |
| 224 | { |
| 225 | .name = "i2c_sda", |
| 226 | .start = 20, |
| 227 | .end = 20, |
| 228 | .flags = IORESOURCE_IO, |
| 229 | }, |
| 230 | }; |
| 231 | |
| 232 | struct platform_device apq8064_device_qup_i2c_gsbi1 = { |
| 233 | .name = "qup_i2c", |
| 234 | .id = 0, |
| 235 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi1), |
| 236 | .resource = resources_qup_i2c_gsbi1, |
| 237 | }; |
| 238 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 239 | struct platform_device apq8064_device_qup_i2c_gsbi3 = { |
| 240 | .name = "qup_i2c", |
| 241 | .id = 3, |
| 242 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 243 | .resource = resources_qup_i2c_gsbi3, |
| 244 | }; |
| 245 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 246 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 247 | { |
| 248 | .name = "gsbi_qup_i2c_addr", |
| 249 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 250 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 251 | .flags = IORESOURCE_MEM, |
| 252 | }, |
| 253 | { |
| 254 | .name = "qup_phys_addr", |
| 255 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 256 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 257 | .flags = IORESOURCE_MEM, |
| 258 | }, |
| 259 | { |
| 260 | .name = "qup_err_intr", |
| 261 | .start = GSBI4_QUP_IRQ, |
| 262 | .end = GSBI4_QUP_IRQ, |
| 263 | .flags = IORESOURCE_IRQ, |
| 264 | }, |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 265 | { |
| 266 | .name = "i2c_clk", |
| 267 | .start = 11, |
| 268 | .end = 11, |
| 269 | .flags = IORESOURCE_IO, |
| 270 | }, |
| 271 | { |
| 272 | .name = "i2c_sda", |
| 273 | .start = 10, |
| 274 | .end = 10, |
| 275 | .flags = IORESOURCE_IO, |
| 276 | }, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 277 | }; |
| 278 | |
| 279 | struct platform_device apq8064_device_qup_i2c_gsbi4 = { |
| 280 | .name = "qup_i2c", |
| 281 | .id = 4, |
| 282 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 283 | .resource = resources_qup_i2c_gsbi4, |
| 284 | }; |
| 285 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 286 | static struct resource resources_qup_spi_gsbi5[] = { |
| 287 | { |
| 288 | .name = "spi_base", |
| 289 | .start = MSM_GSBI5_QUP_PHYS, |
| 290 | .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1, |
| 291 | .flags = IORESOURCE_MEM, |
| 292 | }, |
| 293 | { |
| 294 | .name = "gsbi_base", |
| 295 | .start = MSM_GSBI5_PHYS, |
| 296 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 297 | .flags = IORESOURCE_MEM, |
| 298 | }, |
| 299 | { |
| 300 | .name = "spi_irq_in", |
| 301 | .start = GSBI5_QUP_IRQ, |
| 302 | .end = GSBI5_QUP_IRQ, |
| 303 | .flags = IORESOURCE_IRQ, |
| 304 | }, |
| 305 | }; |
| 306 | |
| 307 | struct platform_device apq8064_device_qup_spi_gsbi5 = { |
| 308 | .name = "spi_qsd", |
| 309 | .id = 0, |
| 310 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5), |
| 311 | .resource = resources_qup_spi_gsbi5, |
| 312 | }; |
| 313 | |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 314 | static struct resource resources_uart_gsbi7[] = { |
| 315 | { |
| 316 | .start = GSBI7_UARTDM_IRQ, |
| 317 | .end = GSBI7_UARTDM_IRQ, |
| 318 | .flags = IORESOURCE_IRQ, |
| 319 | }, |
| 320 | { |
| 321 | .start = MSM_UART7DM_PHYS, |
| 322 | .end = MSM_UART7DM_PHYS + PAGE_SIZE - 1, |
| 323 | .name = "uartdm_resource", |
| 324 | .flags = IORESOURCE_MEM, |
| 325 | }, |
| 326 | { |
| 327 | .start = MSM_GSBI7_PHYS, |
| 328 | .end = MSM_GSBI7_PHYS + PAGE_SIZE - 1, |
| 329 | .name = "gsbi_resource", |
| 330 | .flags = IORESOURCE_MEM, |
| 331 | }, |
| 332 | }; |
| 333 | |
| 334 | struct platform_device apq8064_device_uart_gsbi7 = { |
| 335 | .name = "msm_serial_hsl", |
| 336 | .id = 0, |
| 337 | .num_resources = ARRAY_SIZE(resources_uart_gsbi7), |
| 338 | .resource = resources_uart_gsbi7, |
| 339 | }; |
| 340 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 341 | struct platform_device apq_pcm = { |
| 342 | .name = "msm-pcm-dsp", |
| 343 | .id = -1, |
| 344 | }; |
| 345 | |
| 346 | struct platform_device apq_pcm_routing = { |
| 347 | .name = "msm-pcm-routing", |
| 348 | .id = -1, |
| 349 | }; |
| 350 | |
| 351 | struct platform_device apq_cpudai0 = { |
| 352 | .name = "msm-dai-q6", |
| 353 | .id = 0x4000, |
| 354 | }; |
| 355 | |
| 356 | struct platform_device apq_cpudai1 = { |
| 357 | .name = "msm-dai-q6", |
| 358 | .id = 0x4001, |
| 359 | }; |
| 360 | |
| 361 | struct platform_device apq_cpudai_hdmi_rx = { |
Swaminathan Sathappan | fd9dbad | 2012-02-15 16:56:44 -0800 | [diff] [blame] | 362 | .name = "msm-dai-q6-hdmi", |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 363 | .id = 8, |
| 364 | }; |
| 365 | |
| 366 | struct platform_device apq_cpudai_bt_rx = { |
| 367 | .name = "msm-dai-q6", |
| 368 | .id = 0x3000, |
| 369 | }; |
| 370 | |
| 371 | struct platform_device apq_cpudai_bt_tx = { |
| 372 | .name = "msm-dai-q6", |
| 373 | .id = 0x3001, |
| 374 | }; |
| 375 | |
| 376 | struct platform_device apq_cpudai_fm_rx = { |
| 377 | .name = "msm-dai-q6", |
| 378 | .id = 0x3004, |
| 379 | }; |
| 380 | |
| 381 | struct platform_device apq_cpudai_fm_tx = { |
| 382 | .name = "msm-dai-q6", |
| 383 | .id = 0x3005, |
| 384 | }; |
| 385 | |
| 386 | /* |
| 387 | * Machine specific data for AUX PCM Interface |
| 388 | * which the driver will be unware of. |
| 389 | */ |
| 390 | struct msm_dai_auxpcm_pdata apq_auxpcm_rx_pdata = { |
| 391 | .clk = "pcm_clk", |
| 392 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 393 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 394 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 395 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 396 | .slot = 0, |
| 397 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 398 | .pcm_clk_rate = 2048000, |
| 399 | }; |
| 400 | |
| 401 | struct platform_device apq_cpudai_auxpcm_rx = { |
| 402 | .name = "msm-dai-q6", |
| 403 | .id = 2, |
| 404 | .dev = { |
| 405 | .platform_data = &apq_auxpcm_rx_pdata, |
| 406 | }, |
| 407 | }; |
| 408 | |
| 409 | struct platform_device apq_cpudai_auxpcm_tx = { |
| 410 | .name = "msm-dai-q6", |
| 411 | .id = 3, |
| 412 | }; |
| 413 | |
| 414 | struct platform_device apq_cpu_fe = { |
| 415 | .name = "msm-dai-fe", |
| 416 | .id = -1, |
| 417 | }; |
| 418 | |
| 419 | struct platform_device apq_stub_codec = { |
| 420 | .name = "msm-stub-codec", |
| 421 | .id = 1, |
| 422 | }; |
| 423 | |
| 424 | struct platform_device apq_voice = { |
| 425 | .name = "msm-pcm-voice", |
| 426 | .id = -1, |
| 427 | }; |
| 428 | |
| 429 | struct platform_device apq_voip = { |
| 430 | .name = "msm-voip-dsp", |
| 431 | .id = -1, |
| 432 | }; |
| 433 | |
| 434 | struct platform_device apq_lpa_pcm = { |
| 435 | .name = "msm-pcm-lpa", |
| 436 | .id = -1, |
| 437 | }; |
| 438 | |
| 439 | struct platform_device apq_pcm_hostless = { |
| 440 | .name = "msm-pcm-hostless", |
| 441 | .id = -1, |
| 442 | }; |
| 443 | |
| 444 | struct platform_device apq_cpudai_afe_01_rx = { |
| 445 | .name = "msm-dai-q6", |
| 446 | .id = 0xE0, |
| 447 | }; |
| 448 | |
| 449 | struct platform_device apq_cpudai_afe_01_tx = { |
| 450 | .name = "msm-dai-q6", |
| 451 | .id = 0xF0, |
| 452 | }; |
| 453 | |
| 454 | struct platform_device apq_cpudai_afe_02_rx = { |
| 455 | .name = "msm-dai-q6", |
| 456 | .id = 0xF1, |
| 457 | }; |
| 458 | |
| 459 | struct platform_device apq_cpudai_afe_02_tx = { |
| 460 | .name = "msm-dai-q6", |
| 461 | .id = 0xE1, |
| 462 | }; |
| 463 | |
| 464 | struct platform_device apq_pcm_afe = { |
| 465 | .name = "msm-pcm-afe", |
| 466 | .id = -1, |
| 467 | }; |
| 468 | |
Neema Shetty | 8427c26 | 2012-02-16 11:23:43 -0800 | [diff] [blame] | 469 | struct platform_device apq_cpudai_stub = { |
| 470 | .name = "msm-dai-stub", |
| 471 | .id = -1, |
| 472 | }; |
| 473 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 474 | static struct resource resources_ssbi_pmic1[] = { |
| 475 | { |
| 476 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 477 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 478 | .flags = IORESOURCE_MEM, |
| 479 | }, |
| 480 | }; |
| 481 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 482 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 483 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 484 | #define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C) |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 485 | /* Board info for the slimbus slave device */ |
| 486 | static struct resource slimbus_res[] = { |
| 487 | { |
| 488 | .start = LPASS_SLIMBUS_PHYS, |
| 489 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 490 | .flags = IORESOURCE_MEM, |
| 491 | .name = "slimbus_physical", |
| 492 | }, |
| 493 | { |
| 494 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 495 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 496 | .flags = IORESOURCE_MEM, |
| 497 | .name = "slimbus_bam_physical", |
| 498 | }, |
| 499 | { |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 500 | .start = LPASS_SLIMBUS_SLEW, |
| 501 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 502 | .flags = IORESOURCE_MEM, |
| 503 | .name = "slimbus_slew_reg", |
| 504 | }, |
| 505 | { |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 506 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 507 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 508 | .flags = IORESOURCE_IRQ, |
| 509 | .name = "slimbus_irq", |
| 510 | }, |
| 511 | { |
| 512 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 513 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 514 | .flags = IORESOURCE_IRQ, |
| 515 | .name = "slimbus_bam_irq", |
| 516 | }, |
| 517 | }; |
| 518 | |
| 519 | struct platform_device apq8064_slim_ctrl = { |
| 520 | .name = "msm_slim_ctrl", |
| 521 | .id = 1, |
| 522 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 523 | .resource = slimbus_res, |
| 524 | .dev = { |
| 525 | .coherent_dma_mask = 0xffffffffULL, |
| 526 | }, |
| 527 | }; |
| 528 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 529 | struct platform_device apq8064_device_ssbi_pmic1 = { |
| 530 | .name = "msm_ssbi", |
| 531 | .id = 0, |
| 532 | .resource = resources_ssbi_pmic1, |
| 533 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 534 | }; |
| 535 | |
| 536 | static struct resource resources_ssbi_pmic2[] = { |
| 537 | { |
| 538 | .start = MSM_PMIC2_SSBI_CMD_PHYS, |
| 539 | .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 540 | .flags = IORESOURCE_MEM, |
| 541 | }, |
| 542 | }; |
| 543 | |
| 544 | struct platform_device apq8064_device_ssbi_pmic2 = { |
| 545 | .name = "msm_ssbi", |
| 546 | .id = 1, |
| 547 | .resource = resources_ssbi_pmic2, |
| 548 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2), |
| 549 | }; |
| 550 | |
| 551 | static struct resource resources_otg[] = { |
| 552 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 553 | .start = MSM_HSUSB1_PHYS, |
| 554 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 555 | .flags = IORESOURCE_MEM, |
| 556 | }, |
| 557 | { |
| 558 | .start = USB1_HS_IRQ, |
| 559 | .end = USB1_HS_IRQ, |
| 560 | .flags = IORESOURCE_IRQ, |
| 561 | }, |
| 562 | }; |
| 563 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 564 | struct platform_device apq8064_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 565 | .name = "msm_otg", |
| 566 | .id = -1, |
| 567 | .num_resources = ARRAY_SIZE(resources_otg), |
| 568 | .resource = resources_otg, |
| 569 | .dev = { |
| 570 | .coherent_dma_mask = 0xffffffff, |
| 571 | }, |
| 572 | }; |
| 573 | |
| 574 | static struct resource resources_hsusb[] = { |
| 575 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 576 | .start = MSM_HSUSB1_PHYS, |
| 577 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 578 | .flags = IORESOURCE_MEM, |
| 579 | }, |
| 580 | { |
| 581 | .start = USB1_HS_IRQ, |
| 582 | .end = USB1_HS_IRQ, |
| 583 | .flags = IORESOURCE_IRQ, |
| 584 | }, |
| 585 | }; |
| 586 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 587 | struct platform_device apq8064_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 588 | .name = "msm_hsusb", |
| 589 | .id = -1, |
| 590 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 591 | .resource = resources_hsusb, |
| 592 | .dev = { |
| 593 | .coherent_dma_mask = 0xffffffff, |
| 594 | }, |
| 595 | }; |
| 596 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 597 | static struct resource resources_hsusb_host[] = { |
| 598 | { |
| 599 | .start = MSM_HSUSB1_PHYS, |
| 600 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
| 601 | .flags = IORESOURCE_MEM, |
| 602 | }, |
| 603 | { |
| 604 | .start = USB1_HS_IRQ, |
| 605 | .end = USB1_HS_IRQ, |
| 606 | .flags = IORESOURCE_IRQ, |
| 607 | }, |
| 608 | }; |
| 609 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 610 | static struct resource resources_hsic_host[] = { |
| 611 | { |
| 612 | .start = 0x12510000, |
| 613 | .end = 0x12510000 + SZ_4K - 1, |
| 614 | .flags = IORESOURCE_MEM, |
| 615 | }, |
| 616 | { |
| 617 | .start = USB2_HSIC_IRQ, |
| 618 | .end = USB2_HSIC_IRQ, |
| 619 | .flags = IORESOURCE_IRQ, |
| 620 | }, |
| 621 | { |
| 622 | .start = MSM_GPIO_TO_INT(49), |
| 623 | .end = MSM_GPIO_TO_INT(49), |
| 624 | .name = "peripheral_status_irq", |
| 625 | .flags = IORESOURCE_IRQ, |
| 626 | }, |
| 627 | }; |
| 628 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 629 | static u64 dma_mask = DMA_BIT_MASK(32); |
| 630 | struct platform_device apq8064_device_hsusb_host = { |
| 631 | .name = "msm_hsusb_host", |
| 632 | .id = -1, |
| 633 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 634 | .resource = resources_hsusb_host, |
| 635 | .dev = { |
| 636 | .dma_mask = &dma_mask, |
| 637 | .coherent_dma_mask = 0xffffffff, |
| 638 | }, |
| 639 | }; |
| 640 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 641 | struct platform_device apq8064_device_hsic_host = { |
| 642 | .name = "msm_hsic_host", |
| 643 | .id = -1, |
| 644 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 645 | .resource = resources_hsic_host, |
| 646 | .dev = { |
| 647 | .dma_mask = &dma_mask, |
| 648 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 649 | }, |
| 650 | }; |
| 651 | |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 652 | /* MSM Video core device */ |
| 653 | #ifdef CONFIG_MSM_BUS_SCALING |
| 654 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 655 | { |
| 656 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 657 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 658 | .ab = 0, |
| 659 | .ib = 0, |
| 660 | }, |
| 661 | { |
| 662 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 663 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 664 | .ab = 0, |
| 665 | .ib = 0, |
| 666 | }, |
| 667 | { |
| 668 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 669 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 670 | .ab = 0, |
| 671 | .ib = 0, |
| 672 | }, |
| 673 | { |
| 674 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 675 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 676 | .ab = 0, |
| 677 | .ib = 0, |
| 678 | }, |
| 679 | }; |
| 680 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 681 | { |
| 682 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 683 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 684 | .ab = 54525952, |
| 685 | .ib = 436207616, |
| 686 | }, |
| 687 | { |
| 688 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 689 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 690 | .ab = 72351744, |
| 691 | .ib = 289406976, |
| 692 | }, |
| 693 | { |
| 694 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 695 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 696 | .ab = 500000, |
| 697 | .ib = 1000000, |
| 698 | }, |
| 699 | { |
| 700 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 701 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 702 | .ab = 500000, |
| 703 | .ib = 1000000, |
| 704 | }, |
| 705 | }; |
| 706 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 707 | { |
| 708 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 709 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 710 | .ab = 40894464, |
| 711 | .ib = 327155712, |
| 712 | }, |
| 713 | { |
| 714 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 715 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 716 | .ab = 48234496, |
| 717 | .ib = 192937984, |
| 718 | }, |
| 719 | { |
| 720 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 721 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 722 | .ab = 500000, |
| 723 | .ib = 2000000, |
| 724 | }, |
| 725 | { |
| 726 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 727 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 728 | .ab = 500000, |
| 729 | .ib = 2000000, |
| 730 | }, |
| 731 | }; |
| 732 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 733 | { |
| 734 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 735 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 736 | .ab = 163577856, |
| 737 | .ib = 1308622848, |
| 738 | }, |
| 739 | { |
| 740 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 741 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 742 | .ab = 219152384, |
| 743 | .ib = 876609536, |
| 744 | }, |
| 745 | { |
| 746 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 747 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 748 | .ab = 1750000, |
| 749 | .ib = 3500000, |
| 750 | }, |
| 751 | { |
| 752 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 753 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 754 | .ab = 1750000, |
| 755 | .ib = 3500000, |
| 756 | }, |
| 757 | }; |
| 758 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 759 | { |
| 760 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 761 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 762 | .ab = 121634816, |
| 763 | .ib = 973078528, |
| 764 | }, |
| 765 | { |
| 766 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 767 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 768 | .ab = 155189248, |
| 769 | .ib = 620756992, |
| 770 | }, |
| 771 | { |
| 772 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 773 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 774 | .ab = 1750000, |
| 775 | .ib = 7000000, |
| 776 | }, |
| 777 | { |
| 778 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 779 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 780 | .ab = 1750000, |
| 781 | .ib = 7000000, |
| 782 | }, |
| 783 | }; |
| 784 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 785 | { |
| 786 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 787 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 788 | .ab = 372244480, |
| 789 | .ib = 2560000000U, |
| 790 | }, |
| 791 | { |
| 792 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 793 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 794 | .ab = 501219328, |
| 795 | .ib = 2560000000U, |
| 796 | }, |
| 797 | { |
| 798 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 799 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 800 | .ab = 2500000, |
| 801 | .ib = 5000000, |
| 802 | }, |
| 803 | { |
| 804 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 805 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 806 | .ab = 2500000, |
| 807 | .ib = 5000000, |
| 808 | }, |
| 809 | }; |
| 810 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 811 | { |
| 812 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 813 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 814 | .ab = 222298112, |
| 815 | .ib = 2560000000U, |
| 816 | }, |
| 817 | { |
| 818 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 819 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 820 | .ab = 330301440, |
| 821 | .ib = 2560000000U, |
| 822 | }, |
| 823 | { |
| 824 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 825 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 826 | .ab = 2500000, |
| 827 | .ib = 700000000, |
| 828 | }, |
| 829 | { |
| 830 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 831 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 832 | .ab = 2500000, |
| 833 | .ib = 10000000, |
| 834 | }, |
| 835 | }; |
| 836 | |
| 837 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 838 | { |
| 839 | ARRAY_SIZE(vidc_init_vectors), |
| 840 | vidc_init_vectors, |
| 841 | }, |
| 842 | { |
| 843 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 844 | vidc_venc_vga_vectors, |
| 845 | }, |
| 846 | { |
| 847 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 848 | vidc_vdec_vga_vectors, |
| 849 | }, |
| 850 | { |
| 851 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 852 | vidc_venc_720p_vectors, |
| 853 | }, |
| 854 | { |
| 855 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 856 | vidc_vdec_720p_vectors, |
| 857 | }, |
| 858 | { |
| 859 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 860 | vidc_venc_1080p_vectors, |
| 861 | }, |
| 862 | { |
| 863 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 864 | vidc_vdec_1080p_vectors, |
| 865 | }, |
| 866 | }; |
| 867 | |
| 868 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 869 | vidc_bus_client_config, |
| 870 | ARRAY_SIZE(vidc_bus_client_config), |
| 871 | .name = "vidc", |
| 872 | }; |
| 873 | #endif |
| 874 | |
| 875 | |
| 876 | #define APQ8064_VIDC_BASE_PHYS 0x04400000 |
| 877 | #define APQ8064_VIDC_BASE_SIZE 0x00100000 |
| 878 | |
| 879 | static struct resource apq8064_device_vidc_resources[] = { |
| 880 | { |
| 881 | .start = APQ8064_VIDC_BASE_PHYS, |
| 882 | .end = APQ8064_VIDC_BASE_PHYS + APQ8064_VIDC_BASE_SIZE - 1, |
| 883 | .flags = IORESOURCE_MEM, |
| 884 | }, |
| 885 | { |
| 886 | .start = VCODEC_IRQ, |
| 887 | .end = VCODEC_IRQ, |
| 888 | .flags = IORESOURCE_IRQ, |
| 889 | }, |
| 890 | }; |
| 891 | |
| 892 | struct msm_vidc_platform_data apq8064_vidc_platform_data = { |
| 893 | #ifdef CONFIG_MSM_BUS_SCALING |
| 894 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 895 | #endif |
| 896 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 897 | .memtype = ION_CP_MM_HEAP_ID, |
| 898 | .enable_ion = 1, |
| 899 | #else |
| 900 | .memtype = MEMTYPE_EBI1, |
| 901 | .enable_ion = 0, |
| 902 | #endif |
| 903 | .disable_dmx = 0, |
| 904 | .disable_fullhd = 0, |
| 905 | }; |
| 906 | |
| 907 | struct platform_device apq8064_msm_device_vidc = { |
| 908 | .name = "msm_vidc", |
| 909 | .id = 0, |
| 910 | .num_resources = ARRAY_SIZE(apq8064_device_vidc_resources), |
| 911 | .resource = apq8064_device_vidc_resources, |
| 912 | .dev = { |
| 913 | .platform_data = &apq8064_vidc_platform_data, |
| 914 | }, |
| 915 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 916 | #define MSM_SDC1_BASE 0x12400000 |
| 917 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 918 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 919 | #define MSM_SDC2_BASE 0x12140000 |
| 920 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 921 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 922 | #define MSM_SDC3_BASE 0x12180000 |
| 923 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 924 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 925 | #define MSM_SDC4_BASE 0x121C0000 |
| 926 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 927 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 928 | |
| 929 | static struct resource resources_sdc1[] = { |
| 930 | { |
| 931 | .name = "core_mem", |
| 932 | .flags = IORESOURCE_MEM, |
| 933 | .start = MSM_SDC1_BASE, |
| 934 | .end = MSM_SDC1_DML_BASE - 1, |
| 935 | }, |
| 936 | { |
| 937 | .name = "core_irq", |
| 938 | .flags = IORESOURCE_IRQ, |
| 939 | .start = SDC1_IRQ_0, |
| 940 | .end = SDC1_IRQ_0 |
| 941 | }, |
| 942 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 943 | { |
| 944 | .name = "sdcc_dml_addr", |
| 945 | .start = MSM_SDC1_DML_BASE, |
| 946 | .end = MSM_SDC1_BAM_BASE - 1, |
| 947 | .flags = IORESOURCE_MEM, |
| 948 | }, |
| 949 | { |
| 950 | .name = "sdcc_bam_addr", |
| 951 | .start = MSM_SDC1_BAM_BASE, |
| 952 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 953 | .flags = IORESOURCE_MEM, |
| 954 | }, |
| 955 | { |
| 956 | .name = "sdcc_bam_irq", |
| 957 | .start = SDC1_BAM_IRQ, |
| 958 | .end = SDC1_BAM_IRQ, |
| 959 | .flags = IORESOURCE_IRQ, |
| 960 | }, |
| 961 | #endif |
| 962 | }; |
| 963 | |
| 964 | static struct resource resources_sdc2[] = { |
| 965 | { |
| 966 | .name = "core_mem", |
| 967 | .flags = IORESOURCE_MEM, |
| 968 | .start = MSM_SDC2_BASE, |
| 969 | .end = MSM_SDC2_DML_BASE - 1, |
| 970 | }, |
| 971 | { |
| 972 | .name = "core_irq", |
| 973 | .flags = IORESOURCE_IRQ, |
| 974 | .start = SDC2_IRQ_0, |
| 975 | .end = SDC2_IRQ_0 |
| 976 | }, |
| 977 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 978 | { |
| 979 | .name = "sdcc_dml_addr", |
| 980 | .start = MSM_SDC2_DML_BASE, |
| 981 | .end = MSM_SDC2_BAM_BASE - 1, |
| 982 | .flags = IORESOURCE_MEM, |
| 983 | }, |
| 984 | { |
| 985 | .name = "sdcc_bam_addr", |
| 986 | .start = MSM_SDC2_BAM_BASE, |
| 987 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 988 | .flags = IORESOURCE_MEM, |
| 989 | }, |
| 990 | { |
| 991 | .name = "sdcc_bam_irq", |
| 992 | .start = SDC2_BAM_IRQ, |
| 993 | .end = SDC2_BAM_IRQ, |
| 994 | .flags = IORESOURCE_IRQ, |
| 995 | }, |
| 996 | #endif |
| 997 | }; |
| 998 | |
| 999 | static struct resource resources_sdc3[] = { |
| 1000 | { |
| 1001 | .name = "core_mem", |
| 1002 | .flags = IORESOURCE_MEM, |
| 1003 | .start = MSM_SDC3_BASE, |
| 1004 | .end = MSM_SDC3_DML_BASE - 1, |
| 1005 | }, |
| 1006 | { |
| 1007 | .name = "core_irq", |
| 1008 | .flags = IORESOURCE_IRQ, |
| 1009 | .start = SDC3_IRQ_0, |
| 1010 | .end = SDC3_IRQ_0 |
| 1011 | }, |
| 1012 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1013 | { |
| 1014 | .name = "sdcc_dml_addr", |
| 1015 | .start = MSM_SDC3_DML_BASE, |
| 1016 | .end = MSM_SDC3_BAM_BASE - 1, |
| 1017 | .flags = IORESOURCE_MEM, |
| 1018 | }, |
| 1019 | { |
| 1020 | .name = "sdcc_bam_addr", |
| 1021 | .start = MSM_SDC3_BAM_BASE, |
| 1022 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 1023 | .flags = IORESOURCE_MEM, |
| 1024 | }, |
| 1025 | { |
| 1026 | .name = "sdcc_bam_irq", |
| 1027 | .start = SDC3_BAM_IRQ, |
| 1028 | .end = SDC3_BAM_IRQ, |
| 1029 | .flags = IORESOURCE_IRQ, |
| 1030 | }, |
| 1031 | #endif |
| 1032 | }; |
| 1033 | |
| 1034 | static struct resource resources_sdc4[] = { |
| 1035 | { |
| 1036 | .name = "core_mem", |
| 1037 | .flags = IORESOURCE_MEM, |
| 1038 | .start = MSM_SDC4_BASE, |
| 1039 | .end = MSM_SDC4_DML_BASE - 1, |
| 1040 | }, |
| 1041 | { |
| 1042 | .name = "core_irq", |
| 1043 | .flags = IORESOURCE_IRQ, |
| 1044 | .start = SDC4_IRQ_0, |
| 1045 | .end = SDC4_IRQ_0 |
| 1046 | }, |
| 1047 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1048 | { |
| 1049 | .name = "sdcc_dml_addr", |
| 1050 | .start = MSM_SDC4_DML_BASE, |
| 1051 | .end = MSM_SDC4_BAM_BASE - 1, |
| 1052 | .flags = IORESOURCE_MEM, |
| 1053 | }, |
| 1054 | { |
| 1055 | .name = "sdcc_bam_addr", |
| 1056 | .start = MSM_SDC4_BAM_BASE, |
| 1057 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 1058 | .flags = IORESOURCE_MEM, |
| 1059 | }, |
| 1060 | { |
| 1061 | .name = "sdcc_bam_irq", |
| 1062 | .start = SDC4_BAM_IRQ, |
| 1063 | .end = SDC4_BAM_IRQ, |
| 1064 | .flags = IORESOURCE_IRQ, |
| 1065 | }, |
| 1066 | #endif |
| 1067 | }; |
| 1068 | |
| 1069 | struct platform_device apq8064_device_sdc1 = { |
| 1070 | .name = "msm_sdcc", |
| 1071 | .id = 1, |
| 1072 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 1073 | .resource = resources_sdc1, |
| 1074 | .dev = { |
| 1075 | .coherent_dma_mask = 0xffffffff, |
| 1076 | }, |
| 1077 | }; |
| 1078 | |
| 1079 | struct platform_device apq8064_device_sdc2 = { |
| 1080 | .name = "msm_sdcc", |
| 1081 | .id = 2, |
| 1082 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 1083 | .resource = resources_sdc2, |
| 1084 | .dev = { |
| 1085 | .coherent_dma_mask = 0xffffffff, |
| 1086 | }, |
| 1087 | }; |
| 1088 | |
| 1089 | struct platform_device apq8064_device_sdc3 = { |
| 1090 | .name = "msm_sdcc", |
| 1091 | .id = 3, |
| 1092 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 1093 | .resource = resources_sdc3, |
| 1094 | .dev = { |
| 1095 | .coherent_dma_mask = 0xffffffff, |
| 1096 | }, |
| 1097 | }; |
| 1098 | |
| 1099 | struct platform_device apq8064_device_sdc4 = { |
| 1100 | .name = "msm_sdcc", |
| 1101 | .id = 4, |
| 1102 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 1103 | .resource = resources_sdc4, |
| 1104 | .dev = { |
| 1105 | .coherent_dma_mask = 0xffffffff, |
| 1106 | }, |
| 1107 | }; |
| 1108 | |
| 1109 | static struct platform_device *apq8064_sdcc_devices[] __initdata = { |
| 1110 | &apq8064_device_sdc1, |
| 1111 | &apq8064_device_sdc2, |
| 1112 | &apq8064_device_sdc3, |
| 1113 | &apq8064_device_sdc4, |
| 1114 | }; |
| 1115 | |
| 1116 | int __init apq8064_add_sdcc(unsigned int controller, |
| 1117 | struct mmc_platform_data *plat) |
| 1118 | { |
| 1119 | struct platform_device *pdev; |
| 1120 | |
| 1121 | if (!plat) |
| 1122 | return 0; |
| 1123 | if (controller < 1 || controller > 4) |
| 1124 | return -EINVAL; |
| 1125 | |
| 1126 | pdev = apq8064_sdcc_devices[controller-1]; |
| 1127 | pdev->dev.platform_data = plat; |
| 1128 | return platform_device_register(pdev); |
| 1129 | } |
| 1130 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1131 | static struct resource resources_sps[] = { |
| 1132 | { |
| 1133 | .name = "pipe_mem", |
| 1134 | .start = 0x12800000, |
| 1135 | .end = 0x12800000 + 0x4000 - 1, |
| 1136 | .flags = IORESOURCE_MEM, |
| 1137 | }, |
| 1138 | { |
| 1139 | .name = "bamdma_dma", |
| 1140 | .start = 0x12240000, |
| 1141 | .end = 0x12240000 + 0x1000 - 1, |
| 1142 | .flags = IORESOURCE_MEM, |
| 1143 | }, |
| 1144 | { |
| 1145 | .name = "bamdma_bam", |
| 1146 | .start = 0x12244000, |
| 1147 | .end = 0x12244000 + 0x4000 - 1, |
| 1148 | .flags = IORESOURCE_MEM, |
| 1149 | }, |
| 1150 | { |
| 1151 | .name = "bamdma_irq", |
| 1152 | .start = SPS_BAM_DMA_IRQ, |
| 1153 | .end = SPS_BAM_DMA_IRQ, |
| 1154 | .flags = IORESOURCE_IRQ, |
| 1155 | }, |
| 1156 | }; |
| 1157 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1158 | struct platform_device msm_bus_8064_sys_fabric = { |
| 1159 | .name = "msm_bus_fabric", |
| 1160 | .id = MSM_BUS_FAB_SYSTEM, |
| 1161 | }; |
| 1162 | struct platform_device msm_bus_8064_apps_fabric = { |
| 1163 | .name = "msm_bus_fabric", |
| 1164 | .id = MSM_BUS_FAB_APPSS, |
| 1165 | }; |
| 1166 | struct platform_device msm_bus_8064_mm_fabric = { |
| 1167 | .name = "msm_bus_fabric", |
| 1168 | .id = MSM_BUS_FAB_MMSS, |
| 1169 | }; |
| 1170 | struct platform_device msm_bus_8064_sys_fpb = { |
| 1171 | .name = "msm_bus_fabric", |
| 1172 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 1173 | }; |
| 1174 | struct platform_device msm_bus_8064_cpss_fpb = { |
| 1175 | .name = "msm_bus_fabric", |
| 1176 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 1177 | }; |
| 1178 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1179 | static struct msm_sps_platform_data msm_sps_pdata = { |
| 1180 | .bamdma_restricted_pipes = 0x06, |
| 1181 | }; |
| 1182 | |
| 1183 | struct platform_device msm_device_sps_apq8064 = { |
| 1184 | .name = "msm_sps", |
| 1185 | .id = -1, |
| 1186 | .num_resources = ARRAY_SIZE(resources_sps), |
| 1187 | .resource = resources_sps, |
| 1188 | .dev.platform_data = &msm_sps_pdata, |
| 1189 | }; |
| 1190 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1191 | struct platform_device msm_device_smd_apq8064 = { |
| 1192 | .name = "msm_smd", |
| 1193 | .id = -1, |
| 1194 | }; |
| 1195 | |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1196 | #ifdef CONFIG_HW_RANDOM_MSM |
| 1197 | /* PRNG device */ |
| 1198 | #define MSM_PRNG_PHYS 0x1A500000 |
| 1199 | static struct resource rng_resources = { |
| 1200 | .flags = IORESOURCE_MEM, |
| 1201 | .start = MSM_PRNG_PHYS, |
| 1202 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 1203 | }; |
| 1204 | |
| 1205 | struct platform_device apq8064_device_rng = { |
| 1206 | .name = "msm_rng", |
| 1207 | .id = 0, |
| 1208 | .num_resources = 1, |
| 1209 | .resource = &rng_resources, |
| 1210 | }; |
| 1211 | #endif |
| 1212 | |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1213 | static struct resource msm_gss_resources[] = { |
| 1214 | { |
| 1215 | .start = 0x10000000, |
| 1216 | .end = 0x10000000 + SZ_256 - 1, |
| 1217 | .flags = IORESOURCE_MEM, |
| 1218 | }, |
Matt Wagantall | 19ac4fd | 2012-02-03 20:18:23 -0800 | [diff] [blame] | 1219 | { |
| 1220 | .start = 0x10008000, |
| 1221 | .end = 0x10008000 + SZ_256 - 1, |
| 1222 | .flags = IORESOURCE_MEM, |
| 1223 | }, |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1224 | }; |
| 1225 | |
| 1226 | struct platform_device msm_gss = { |
| 1227 | .name = "pil_gss", |
| 1228 | .id = -1, |
| 1229 | .num_resources = ARRAY_SIZE(msm_gss_resources), |
| 1230 | .resource = msm_gss_resources, |
| 1231 | }; |
| 1232 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1233 | static struct clk_lookup msm_clocks_8064_dummy[] = { |
| 1234 | CLK_DUMMY("pll2", PLL2, NULL, 0), |
| 1235 | CLK_DUMMY("pll8", PLL8, NULL, 0), |
| 1236 | CLK_DUMMY("pll4", PLL4, NULL, 0), |
| 1237 | |
| 1238 | CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0), |
| 1239 | CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0), |
| 1240 | CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0), |
| 1241 | CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0), |
| 1242 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 1243 | CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0), |
| 1244 | CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0), |
| 1245 | CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0), |
| 1246 | CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0), |
| 1247 | CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0), |
| 1248 | CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0), |
| 1249 | CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0), |
| 1250 | CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0), |
| 1251 | CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0), |
| 1252 | CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0), |
| 1253 | CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0), |
| 1254 | |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 1255 | CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF), |
| 1256 | CLK_DUMMY("core_clk", GSBI2_UART_CLK, NULL, OFF), |
| 1257 | CLK_DUMMY("core_clk", GSBI3_UART_CLK, |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1258 | NULL, OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 1259 | CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF), |
| 1260 | CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF), |
| 1261 | CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF), |
| 1262 | CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF), |
| 1263 | CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF), |
| 1264 | CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF), |
| 1265 | CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF), |
| 1266 | CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF), |
| 1267 | CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1268 | CLK_DUMMY("core_clk", GSBI1_QUP_CLK, NULL, OFF), |
| 1269 | CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF), |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1270 | CLK_DUMMY("core_clk", GSBI3_QUP_CLK, "qup_i2c.3", OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 1271 | CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF), |
| 1272 | CLK_DUMMY("core_clk", GSBI5_QUP_CLK, "spi_qsd.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1273 | CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF), |
| 1274 | CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1275 | CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF), |
Matt Wagantall | d86d683 | 2011-08-17 14:06:55 -0700 | [diff] [blame] | 1276 | CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF), |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1277 | CLK_DUMMY("core_clk", PRNG_CLK, "msm_rng.0", OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1278 | CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF), |
| 1279 | CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF), |
| 1280 | CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF), |
| 1281 | CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1282 | CLK_DUMMY("ref_clk", TSIF_REF_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1283 | CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1284 | CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF), |
| 1285 | CLK_DUMMY("alt_core_clk", USB_HS3_XCVR_CLK, NULL, OFF), |
| 1286 | CLK_DUMMY("alt_core_clk", USB_HS4_XCVR_CLK, NULL, OFF), |
| 1287 | CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF), |
| 1288 | CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF), |
| 1289 | CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF), |
| 1290 | CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 1291 | CLK_DUMMY("core_clk", CE2_CLK, NULL, OFF), |
| 1292 | CLK_DUMMY("core_clk", CE1_CORE_CLK, NULL, OFF), |
| 1293 | CLK_DUMMY("core_clk", CE3_CORE_CLK, NULL, OFF), |
| 1294 | CLK_DUMMY("iface_clk", CE3_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 1295 | CLK_DUMMY("pcie_pclk", PCIE_P_CLK, NULL, OFF), |
| 1296 | CLK_DUMMY("pcie_alt_ref_clk", PCIE_ALT_REF_CLK, NULL, OFF), |
| 1297 | CLK_DUMMY("sata_rxoob_clk", SATA_RXOOB_CLK, NULL, OFF), |
| 1298 | CLK_DUMMY("sata_pmalive_clk", SATA_PMALIVE_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1299 | CLK_DUMMY("ref_clk", SATA_PHY_REF_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1300 | CLK_DUMMY("iface_clk", GSBI1_P_CLK, NULL, OFF), |
| 1301 | CLK_DUMMY("iface_clk", GSBI2_P_CLK, NULL, OFF), |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1302 | CLK_DUMMY("iface_clk", GSBI3_P_CLK, "qup_i2c.3", OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 1303 | CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF), |
| 1304 | CLK_DUMMY("iface_clk", GSBI5_P_CLK, "spi_qsd.0", OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 1305 | CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1306 | CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1307 | CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1308 | CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF), |
| 1309 | CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF), |
| 1310 | CLK_DUMMY("iface_clk", USB_HS3_P_CLK, NULL, OFF), |
| 1311 | CLK_DUMMY("iface_clk", USB_HS4_P_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1312 | CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF), |
| 1313 | CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF), |
| 1314 | CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF), |
| 1315 | CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF), |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 1316 | CLK_DUMMY("core_clk", ADM0_CLK, "msm_dmov", OFF), |
| 1317 | CLK_DUMMY("iface_clk", ADM0_P_CLK, "msm_dmov", OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1318 | CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF), |
| 1319 | CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF), |
| 1320 | CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF), |
| 1321 | CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF), |
| 1322 | CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1323 | CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF), |
| 1324 | CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF), |
| 1325 | CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF), |
| 1326 | CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF), |
| 1327 | CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF), |
| 1328 | CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF), |
| 1329 | CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF), |
| 1330 | CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF), |
| 1331 | CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF), |
| 1332 | CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF), |
| 1333 | CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF), |
| 1334 | CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, NULL, OFF), |
| 1335 | CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, NULL, OFF), |
| 1336 | CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, NULL, OFF), |
| 1337 | CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 1338 | CLK_DUMMY("core_clk", VCAP_CLK, NULL, OFF), |
| 1339 | CLK_DUMMY("npl_clk", VCAP_NPL_CLK, NULL, OFF), |
Pu Chen | 86b4be9 | 2011-11-03 17:27:57 -0700 | [diff] [blame] | 1340 | CLK_DUMMY("core_clk", GFX3D_CLK, "kgsl-3d0.0", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1341 | CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 1342 | CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1343 | CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1344 | CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF), |
| 1345 | CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF), |
| 1346 | CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1347 | CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1348 | CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 1349 | CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1350 | CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 1351 | CLK_DUMMY("rgb_tv_clk", RGB_TV_CLK, NULL, OFF), |
| 1352 | CLK_DUMMY("npl_tv_clk", NPL_TV_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1353 | CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF), |
Matt Wagantall | 5a4f1ba | 2011-08-18 18:13:03 -0700 | [diff] [blame] | 1354 | CLK_DUMMY("core_clk", HDMI_APP_CLK, "hdmi_msm.1", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1355 | CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF), |
| 1356 | CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF), |
| 1357 | CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF), |
| 1358 | CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF), |
| 1359 | CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF), |
| 1360 | CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1361 | CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1362 | CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF), |
| 1363 | CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF), |
| 1364 | CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF), |
| 1365 | CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 1366 | CLK_DUMMY("bus_clk", GFX3D_AXI_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 1367 | CLK_DUMMY("vcap_axi_clk", VCAP_AXI_CLK, NULL, OFF), |
| 1368 | CLK_DUMMY("vcap_ahb_clk", VCAP_AHB_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1369 | CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF), |
| 1370 | CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF), |
| 1371 | CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, NULL, OFF), |
| 1372 | CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, NULL, OFF), |
| 1373 | CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, NULL, OFF), |
| 1374 | CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 1375 | CLK_DUMMY("lvds_clk", LVDS_CLK, NULL, OFF), |
| 1376 | CLK_DUMMY("mdp_p2clk", MDP_P2CLK, NULL, OFF), |
| 1377 | CLK_DUMMY("dsi2_pixel_clk", DSI2_PIXEL_CLK, NULL, OFF), |
| 1378 | CLK_DUMMY("lvds_ref_clk", LVDS_REF_CLK, NULL, OFF), |
Pu Chen | 86b4be9 | 2011-11-03 17:27:57 -0700 | [diff] [blame] | 1379 | CLK_DUMMY("iface_clk", GFX3D_P_CLK, "kgsl-3d0.0", OFF), |
Matt Wagantall | 5a4f1ba | 2011-08-18 18:13:03 -0700 | [diff] [blame] | 1380 | CLK_DUMMY("master_iface_clk", HDMI_M_P_CLK, "hdmi_msm.1", OFF), |
| 1381 | CLK_DUMMY("slave_iface_clk", HDMI_S_P_CLK, "hdmi_msm.1", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1382 | CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF), |
| 1383 | CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 1384 | CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1385 | CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF), |
Matt Wagantall | e604d71 | 2011-10-21 15:38:18 -0700 | [diff] [blame] | 1386 | CLK_DUMMY("iface_clk", SMMU_P_CLK, "msm_smmu", OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 1387 | CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1388 | CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF), |
| 1389 | CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF), |
| 1390 | CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF), |
| 1391 | CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF), |
| 1392 | CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF), |
| 1393 | CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF), |
| 1394 | CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF), |
| 1395 | CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF), |
| 1396 | CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF), |
| 1397 | CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 1398 | CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 1399 | CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 1400 | CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 1401 | CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF), |
Tianyi Gou | 142b8db | 2011-09-21 18:01:54 -0700 | [diff] [blame] | 1402 | CLK_DUMMY("audio_slimbus_clk", AUDIO_SLIMBUS_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1403 | |
| 1404 | CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1405 | CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, NULL, 0), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1406 | CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, NULL, 0), |
| 1407 | CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, NULL, 0), |
| 1408 | CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, NULL, 0), |
| 1409 | CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, NULL, 0), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1410 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 1411 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 1412 | CLK_DUMMY("mem_clk", EBI1_ADM_CLK, "msm_dmov", 0), |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1413 | CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qce.0", OFF), |
| 1414 | CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qcrypto.0", OFF), |
| 1415 | CLK_DUMMY("core_clk", CE3_CORE_CLK, "qce.0", OFF), |
| 1416 | CLK_DUMMY("core_clk", CE3_CORE_CLK, "qcrypto.0", OFF), |
| 1417 | CLK_DUMMY("iface_clk", CE3_P_CLK, "qce0.0", OFF), |
| 1418 | CLK_DUMMY("iface_clk", CE3_P_CLK, "qcrypto.0", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1419 | }; |
| 1420 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 1421 | struct clock_init_data apq8064_dummy_clock_init_data __initdata = { |
| 1422 | .table = msm_clocks_8064_dummy, |
| 1423 | .size = ARRAY_SIZE(msm_clocks_8064_dummy), |
| 1424 | }; |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1425 | |
| 1426 | struct msm_rpm_platform_data apq8064_rpm_data __initdata = { |
| 1427 | .reg_base_addrs = { |
| 1428 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 1429 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 1430 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 1431 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 1432 | }, |
| 1433 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1434 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1435 | .ipc_rpm_val = 4, |
| 1436 | .target_id = { |
| 1437 | MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 1438 | MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 1439 | MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8), |
| 1440 | MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 1441 | MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 1442 | MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1), |
| 1443 | MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1), |
| 1444 | MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1), |
| 1445 | MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 1446 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 1447 | MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 1448 | MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 1449 | MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1), |
| 1450 | MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1), |
| 1451 | MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1), |
| 1452 | MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1), |
| 1453 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0, |
| 1454 | APPS_FABRIC_CFG_HALT, 2), |
| 1455 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0, |
| 1456 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 1457 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL, |
| 1458 | APPS_FABRIC_CFG_IOCTL, 1), |
| 1459 | MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 1460 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0, |
| 1461 | SYS_FABRIC_CFG_HALT, 2), |
| 1462 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0, |
| 1463 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 1464 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL, |
| 1465 | SYS_FABRIC_CFG_IOCTL, 1), |
| 1466 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30), |
| 1467 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0, |
| 1468 | MMSS_FABRIC_CFG_HALT, 2), |
| 1469 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0, |
| 1470 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 1471 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL, |
| 1472 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 1473 | MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21), |
| 1474 | MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2), |
| 1475 | MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2), |
| 1476 | MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2), |
| 1477 | MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2), |
| 1478 | MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2), |
| 1479 | MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2), |
| 1480 | MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2), |
| 1481 | MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2), |
| 1482 | MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2), |
| 1483 | MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2), |
| 1484 | MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2), |
| 1485 | MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2), |
| 1486 | MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2), |
| 1487 | MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2), |
| 1488 | MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2), |
| 1489 | MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2), |
| 1490 | MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2), |
| 1491 | MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2), |
| 1492 | MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2), |
| 1493 | MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2), |
| 1494 | MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2), |
| 1495 | MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2), |
| 1496 | MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2), |
| 1497 | MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2), |
| 1498 | MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2), |
| 1499 | MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2), |
| 1500 | MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2), |
| 1501 | MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2), |
| 1502 | MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2), |
| 1503 | MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2), |
| 1504 | MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2), |
| 1505 | MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2), |
| 1506 | MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2), |
| 1507 | MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2), |
| 1508 | MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2), |
| 1509 | MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2), |
| 1510 | MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2), |
| 1511 | MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 1512 | MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 1513 | MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1), |
| 1514 | MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1), |
| 1515 | MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1), |
| 1516 | MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1), |
| 1517 | MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1), |
| 1518 | MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1), |
| 1519 | MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1), |
| 1520 | MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2), |
| 1521 | MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2), |
| 1522 | MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2), |
| 1523 | MSM_RPM_MAP(8064, NCP_0, NCP, 2), |
| 1524 | MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 1525 | MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 1526 | MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 1527 | MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2), |
| 1528 | MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1), |
| 1529 | }, |
| 1530 | .target_status = { |
| 1531 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR), |
| 1532 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR), |
| 1533 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD), |
| 1534 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0), |
| 1535 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1), |
| 1536 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2), |
| 1537 | MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0), |
| 1538 | MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE), |
| 1539 | MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL), |
| 1540 | MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK), |
| 1541 | MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK), |
| 1542 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK), |
| 1543 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK), |
| 1544 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK), |
| 1545 | MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK), |
| 1546 | MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK), |
| 1547 | MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK), |
| 1548 | MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK), |
| 1549 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK), |
| 1550 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT), |
| 1551 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD), |
| 1552 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL), |
| 1553 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB), |
| 1554 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT), |
| 1555 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD), |
| 1556 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL), |
| 1557 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB), |
| 1558 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT), |
| 1559 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD), |
| 1560 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL), |
| 1561 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB), |
| 1562 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0), |
| 1563 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1), |
| 1564 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0), |
| 1565 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1), |
| 1566 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0), |
| 1567 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1), |
| 1568 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0), |
| 1569 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1), |
| 1570 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0), |
| 1571 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1), |
| 1572 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0), |
| 1573 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1), |
| 1574 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0), |
| 1575 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1), |
| 1576 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0), |
| 1577 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1), |
| 1578 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0), |
| 1579 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1), |
| 1580 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0), |
| 1581 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1), |
| 1582 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0), |
| 1583 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1), |
| 1584 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0), |
| 1585 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1), |
| 1586 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0), |
| 1587 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1), |
| 1588 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0), |
| 1589 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1), |
| 1590 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0), |
| 1591 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1), |
| 1592 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0), |
| 1593 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1), |
| 1594 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0), |
| 1595 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1), |
| 1596 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0), |
| 1597 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1), |
| 1598 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0), |
| 1599 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1), |
| 1600 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0), |
| 1601 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1), |
| 1602 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0), |
| 1603 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1), |
| 1604 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0), |
| 1605 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1), |
| 1606 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0), |
| 1607 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1), |
| 1608 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0), |
| 1609 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1), |
| 1610 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0), |
| 1611 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1), |
| 1612 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0), |
| 1613 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1), |
| 1614 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0), |
| 1615 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1), |
| 1616 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0), |
| 1617 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1), |
| 1618 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0), |
| 1619 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1), |
| 1620 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0), |
| 1621 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1), |
| 1622 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0), |
| 1623 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1), |
| 1624 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0), |
| 1625 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1), |
| 1626 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0), |
| 1627 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1), |
| 1628 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0), |
| 1629 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1), |
| 1630 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0), |
| 1631 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1), |
| 1632 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0), |
| 1633 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1), |
| 1634 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0), |
| 1635 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1), |
| 1636 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0), |
| 1637 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1), |
| 1638 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0), |
| 1639 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1), |
| 1640 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1), |
| 1641 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2), |
| 1642 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3), |
| 1643 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4), |
| 1644 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5), |
| 1645 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6), |
| 1646 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7), |
| 1647 | MSM_RPM_STATUS_ID_MAP(8064, NCP_0), |
| 1648 | MSM_RPM_STATUS_ID_MAP(8064, NCP_1), |
| 1649 | MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS), |
| 1650 | MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH), |
| 1651 | MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH), |
| 1652 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0), |
| 1653 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1), |
| 1654 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE), |
| 1655 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE), |
| 1656 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0), |
| 1657 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1), |
| 1658 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0), |
| 1659 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1), |
| 1660 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0), |
| 1661 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1), |
| 1662 | }, |
| 1663 | .target_ctrl_id = { |
| 1664 | MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR), |
| 1665 | MSM_RPM_CTRL_MAP(8064, VERSION_MINOR), |
| 1666 | MSM_RPM_CTRL_MAP(8064, VERSION_BUILD), |
| 1667 | MSM_RPM_CTRL_MAP(8064, REQ_CTX_0), |
| 1668 | MSM_RPM_CTRL_MAP(8064, REQ_SEL_0), |
| 1669 | MSM_RPM_CTRL_MAP(8064, ACK_CTX_0), |
| 1670 | MSM_RPM_CTRL_MAP(8064, ACK_SEL_0), |
| 1671 | }, |
| 1672 | .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE, |
| 1673 | .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION, |
| 1674 | .sel_last = MSM_RPM_8064_SEL_LAST, |
| 1675 | .ver = {3, 0, 0}, |
| 1676 | }; |
| 1677 | |
| 1678 | struct platform_device apq8064_rpm_device = { |
| 1679 | .name = "msm_rpm", |
| 1680 | .id = -1, |
| 1681 | }; |
| 1682 | |
| 1683 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 1684 | .phys_addr_base = 0x0010D204, |
| 1685 | .phys_size = SZ_8K, |
| 1686 | }; |
| 1687 | |
| 1688 | struct platform_device apq8064_rpm_stat_device = { |
| 1689 | .name = "msm_rpm_stat", |
| 1690 | .id = -1, |
| 1691 | .dev = { |
| 1692 | .platform_data = &msm_rpm_stat_pdata, |
| 1693 | }, |
| 1694 | }; |
| 1695 | |
| 1696 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 1697 | .phys_addr_base = 0x0010C000, |
| 1698 | .reg_offsets = { |
| 1699 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 1700 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 1701 | }, |
| 1702 | .phys_size = SZ_8K, |
| 1703 | .log_len = 4096, /* log's buffer length in bytes */ |
| 1704 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 1705 | }; |
| 1706 | |
| 1707 | struct platform_device apq8064_rpm_log_device = { |
| 1708 | .name = "msm_rpm_log", |
| 1709 | .id = -1, |
| 1710 | .dev = { |
| 1711 | .platform_data = &msm_rpm_log_pdata, |
| 1712 | }, |
| 1713 | }; |
| 1714 | |
| 1715 | #ifdef CONFIG_MSM_MPM |
| 1716 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
| 1717 | [1] = MSM_GPIO_TO_INT(26), |
| 1718 | [2] = MSM_GPIO_TO_INT(88), |
| 1719 | [4] = MSM_GPIO_TO_INT(73), |
| 1720 | [5] = MSM_GPIO_TO_INT(74), |
| 1721 | [6] = MSM_GPIO_TO_INT(75), |
| 1722 | [7] = MSM_GPIO_TO_INT(76), |
| 1723 | [8] = MSM_GPIO_TO_INT(77), |
| 1724 | [9] = MSM_GPIO_TO_INT(36), |
| 1725 | [10] = MSM_GPIO_TO_INT(84), |
| 1726 | [11] = MSM_GPIO_TO_INT(7), |
| 1727 | [12] = MSM_GPIO_TO_INT(11), |
| 1728 | [13] = MSM_GPIO_TO_INT(52), |
| 1729 | [14] = MSM_GPIO_TO_INT(15), |
| 1730 | [15] = MSM_GPIO_TO_INT(83), |
| 1731 | [16] = USB3_HS_IRQ, |
| 1732 | [19] = MSM_GPIO_TO_INT(61), |
| 1733 | [20] = MSM_GPIO_TO_INT(58), |
| 1734 | [23] = MSM_GPIO_TO_INT(65), |
| 1735 | [24] = MSM_GPIO_TO_INT(63), |
| 1736 | [25] = USB1_HS_IRQ, |
| 1737 | [27] = HDMI_IRQ, |
| 1738 | [29] = MSM_GPIO_TO_INT(22), |
| 1739 | [30] = MSM_GPIO_TO_INT(72), |
| 1740 | [31] = USB4_HS_IRQ, |
| 1741 | [33] = MSM_GPIO_TO_INT(44), |
| 1742 | [34] = MSM_GPIO_TO_INT(39), |
| 1743 | [35] = MSM_GPIO_TO_INT(19), |
| 1744 | [36] = MSM_GPIO_TO_INT(23), |
| 1745 | [37] = MSM_GPIO_TO_INT(41), |
| 1746 | [38] = MSM_GPIO_TO_INT(30), |
| 1747 | [41] = MSM_GPIO_TO_INT(42), |
| 1748 | [42] = MSM_GPIO_TO_INT(56), |
| 1749 | [43] = MSM_GPIO_TO_INT(55), |
| 1750 | [44] = MSM_GPIO_TO_INT(50), |
| 1751 | [45] = MSM_GPIO_TO_INT(49), |
| 1752 | [46] = MSM_GPIO_TO_INT(47), |
| 1753 | [47] = MSM_GPIO_TO_INT(45), |
| 1754 | [48] = MSM_GPIO_TO_INT(38), |
| 1755 | [49] = MSM_GPIO_TO_INT(34), |
| 1756 | [50] = MSM_GPIO_TO_INT(32), |
| 1757 | [51] = MSM_GPIO_TO_INT(29), |
| 1758 | [52] = MSM_GPIO_TO_INT(18), |
| 1759 | [53] = MSM_GPIO_TO_INT(10), |
| 1760 | [54] = MSM_GPIO_TO_INT(81), |
| 1761 | [55] = MSM_GPIO_TO_INT(6), |
| 1762 | }; |
| 1763 | |
| 1764 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
| 1765 | TLMM_MSM_SUMMARY_IRQ, |
| 1766 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1767 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1768 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1769 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 1770 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 1771 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 1772 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 1773 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 1774 | MSS_TO_APPS_IRQ_0, |
| 1775 | MSS_TO_APPS_IRQ_1, |
| 1776 | MSS_TO_APPS_IRQ_2, |
| 1777 | MSS_TO_APPS_IRQ_3, |
| 1778 | MSS_TO_APPS_IRQ_4, |
| 1779 | MSS_TO_APPS_IRQ_5, |
| 1780 | MSS_TO_APPS_IRQ_6, |
| 1781 | MSS_TO_APPS_IRQ_7, |
| 1782 | MSS_TO_APPS_IRQ_8, |
| 1783 | MSS_TO_APPS_IRQ_9, |
| 1784 | LPASS_SCSS_GP_LOW_IRQ, |
| 1785 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1786 | LPASS_SCSS_GP_HIGH_IRQ, |
| 1787 | SPS_MTI_30, |
| 1788 | SPS_MTI_31, |
| 1789 | RIVA_APSS_SPARE_IRQ, |
| 1790 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 1791 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1792 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 1793 | }; |
| 1794 | |
| 1795 | struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = { |
| 1796 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 1797 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 1798 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 1799 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 1800 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 1801 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 1802 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1803 | .mpm_apps_ipc_val = BIT(1), |
| 1804 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1805 | |
| 1806 | }; |
| 1807 | #endif |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1808 | |
| 1809 | #define MDM2AP_ERRFATAL 19 |
| 1810 | #define AP2MDM_ERRFATAL 18 |
| 1811 | #define MDM2AP_STATUS 49 |
| 1812 | #define AP2MDM_STATUS 48 |
| 1813 | #define AP2MDM_PMIC_RESET_N 27 |
| 1814 | |
| 1815 | static struct resource mdm_resources[] = { |
| 1816 | { |
| 1817 | .start = MDM2AP_ERRFATAL, |
| 1818 | .end = MDM2AP_ERRFATAL, |
| 1819 | .name = "MDM2AP_ERRFATAL", |
| 1820 | .flags = IORESOURCE_IO, |
| 1821 | }, |
| 1822 | { |
| 1823 | .start = AP2MDM_ERRFATAL, |
| 1824 | .end = AP2MDM_ERRFATAL, |
| 1825 | .name = "AP2MDM_ERRFATAL", |
| 1826 | .flags = IORESOURCE_IO, |
| 1827 | }, |
| 1828 | { |
| 1829 | .start = MDM2AP_STATUS, |
| 1830 | .end = MDM2AP_STATUS, |
| 1831 | .name = "MDM2AP_STATUS", |
| 1832 | .flags = IORESOURCE_IO, |
| 1833 | }, |
| 1834 | { |
| 1835 | .start = AP2MDM_STATUS, |
| 1836 | .end = AP2MDM_STATUS, |
| 1837 | .name = "AP2MDM_STATUS", |
| 1838 | .flags = IORESOURCE_IO, |
| 1839 | }, |
| 1840 | { |
| 1841 | .start = AP2MDM_PMIC_RESET_N, |
| 1842 | .end = AP2MDM_PMIC_RESET_N, |
| 1843 | .name = "AP2MDM_PMIC_RESET_N", |
| 1844 | .flags = IORESOURCE_IO, |
| 1845 | }, |
| 1846 | }; |
| 1847 | |
| 1848 | struct platform_device mdm_8064_device = { |
| 1849 | .name = "mdm2_modem", |
| 1850 | .id = -1, |
| 1851 | .num_resources = ARRAY_SIZE(mdm_resources), |
| 1852 | .resource = mdm_resources, |
| 1853 | }; |
| 1854 | |