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> |
Joel Nider | e5de00e | 2012-07-03 10:58:10 +0300 | [diff] [blame] | 18 | #include <linux/gpio.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | #include <linux/clkdev.h> |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 20 | #include <linux/dma-mapping.h> |
Pratik Patel | 1746b8f | 2012-06-02 21:11:41 -0700 | [diff] [blame] | 21 | #include <linux/coresight.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 22 | #include <mach/irqs-8064.h> |
| 23 | #include <mach/board.h> |
| 24 | #include <mach/msm_iomap.h> |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 25 | #include <mach/usbdiag.h> |
| 26 | #include <mach/msm_sps.h> |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 27 | #include <mach/dma.h> |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 28 | #include <mach/msm_dsps.h> |
Matt Wagantall | 33d01f5 | 2012-02-23 23:27:44 -0800 | [diff] [blame^] | 29 | #include <mach/clk-provider.h> |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 30 | #include <sound/msm-dai-q6.h> |
| 31 | #include <sound/apr_audio.h> |
Joel Nider | e5de00e | 2012-07-03 10:58:10 +0300 | [diff] [blame] | 32 | #include <mach/msm_tsif.h> |
Joel Nider | 50b50fa | 2012-08-05 14:17:29 +0300 | [diff] [blame] | 33 | #include <mach/msm_tspp.h> |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 34 | #include <mach/msm_bus_board.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 35 | #include <mach/rpm.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 36 | #include <mach/mdm2.h> |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 37 | #include <mach/msm_smd.h> |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 38 | #include <mach/msm_dcvs.h> |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 39 | #include <mach/msm_rtb.h> |
Mitchel Humpherys | a67e37f | 2012-09-06 11:35:39 -0700 | [diff] [blame] | 40 | #include <linux/msm_ion.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 41 | #include "clock.h" |
| 42 | #include "devices.h" |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 43 | #include "footswitch.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 44 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 45 | #include "rpm_stats.h" |
| 46 | #include "rpm_log.h" |
Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 47 | #include <mach/mpm.h> |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 48 | #include <mach/iommu_domains.h> |
Laura Abbott | 93a4a35 | 2012-05-25 09:26:35 -0700 | [diff] [blame] | 49 | #include <mach/msm_cache_dump.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 50 | |
| 51 | /* Address of GSBI blocks */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 52 | #define MSM_GSBI1_PHYS 0x12440000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 53 | #define MSM_GSBI3_PHYS 0x16200000 |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 54 | #define MSM_GSBI4_PHYS 0x16300000 |
| 55 | #define MSM_GSBI5_PHYS 0x1A200000 |
| 56 | #define MSM_GSBI6_PHYS 0x16500000 |
| 57 | #define MSM_GSBI7_PHYS 0x16600000 |
| 58 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 59 | /* GSBI UART devices */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 60 | #define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 61 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
Mayank Rana | 262e903 | 2012-05-10 15:14:00 -0700 | [diff] [blame] | 62 | #define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 63 | #define MSM_UART7DM_PHYS (MSM_GSBI7_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 64 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 65 | /* GSBI QUP devices */ |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 66 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x20000) |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 67 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 68 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 69 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 70 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 71 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 72 | #define MSM_QUP_SIZE SZ_4K |
| 73 | |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 74 | /* Address of SSBI CMD */ |
| 75 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 76 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 77 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 78 | |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 79 | /* Address of HS USBOTG1 */ |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 80 | #define MSM_HSUSB1_PHYS 0x12500000 |
| 81 | #define MSM_HSUSB1_SIZE SZ_4K |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 82 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 83 | /* Address of HS USB3 */ |
| 84 | #define MSM_HSUSB3_PHYS 0x12520000 |
| 85 | #define MSM_HSUSB3_SIZE SZ_4K |
| 86 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 87 | /* Address of HS USB4 */ |
| 88 | #define MSM_HSUSB4_PHYS 0x12530000 |
| 89 | #define MSM_HSUSB4_SIZE SZ_4K |
| 90 | |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 91 | /* Address of PCIE20 PARF */ |
| 92 | #define PCIE20_PARF_PHYS 0x1b600000 |
| 93 | #define PCIE20_PARF_SIZE SZ_128 |
| 94 | |
| 95 | /* Address of PCIE20 ELBI */ |
| 96 | #define PCIE20_ELBI_PHYS 0x1b502000 |
| 97 | #define PCIE20_ELBI_SIZE SZ_256 |
| 98 | |
| 99 | /* Address of PCIE20 */ |
| 100 | #define PCIE20_PHYS 0x1b500000 |
| 101 | #define PCIE20_SIZE SZ_4K |
| 102 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 103 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 104 | .pet_time = 10000, |
| 105 | .bark_time = 11000, |
| 106 | .has_secure = true, |
Joel King | e7ca6f7 | 2012-02-09 20:51:25 -0800 | [diff] [blame] | 107 | .needs_expired_enable = true, |
Rohit Vaswani | c77e4a6 | 2012-08-09 18:10:28 -0700 | [diff] [blame] | 108 | .base = MSM_TMR0_BASE + WDT0_OFFSET, |
| 109 | }; |
| 110 | |
| 111 | static struct resource msm_watchdog_resources[] = { |
| 112 | { |
| 113 | .start = WDT0_ACCSCSSNBARK_INT, |
| 114 | .end = WDT0_ACCSCSSNBARK_INT, |
| 115 | .flags = IORESOURCE_IRQ, |
| 116 | }, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 117 | }; |
| 118 | |
| 119 | struct platform_device msm8064_device_watchdog = { |
| 120 | .name = "msm_watchdog", |
| 121 | .id = -1, |
| 122 | .dev = { |
| 123 | .platform_data = &msm_watchdog_pdata, |
| 124 | }, |
Rohit Vaswani | c77e4a6 | 2012-08-09 18:10:28 -0700 | [diff] [blame] | 125 | .num_resources = ARRAY_SIZE(msm_watchdog_resources), |
| 126 | .resource = msm_watchdog_resources, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 127 | }; |
| 128 | |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 129 | static struct resource msm_dmov_resource[] = { |
| 130 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 131 | .start = ADM_0_SCSS_1_IRQ, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 132 | .flags = IORESOURCE_IRQ, |
| 133 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 134 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 135 | .start = 0x18320000, |
| 136 | .end = 0x18320000 + SZ_1M - 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 137 | .flags = IORESOURCE_MEM, |
| 138 | }, |
| 139 | }; |
| 140 | |
| 141 | static struct msm_dmov_pdata msm_dmov_pdata = { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 142 | .sd = 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 143 | .sd_size = 0x800, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 144 | }; |
| 145 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 146 | struct platform_device apq8064_device_dmov = { |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 147 | .name = "msm_dmov", |
| 148 | .id = -1, |
| 149 | .resource = msm_dmov_resource, |
| 150 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 151 | .dev = { |
| 152 | .platform_data = &msm_dmov_pdata, |
| 153 | }, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 154 | }; |
| 155 | |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 156 | static struct resource resources_uart_gsbi1[] = { |
| 157 | { |
| 158 | .start = APQ8064_GSBI1_UARTDM_IRQ, |
| 159 | .end = APQ8064_GSBI1_UARTDM_IRQ, |
| 160 | .flags = IORESOURCE_IRQ, |
| 161 | }, |
| 162 | { |
| 163 | .start = MSM_UART1DM_PHYS, |
| 164 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 165 | .name = "uartdm_resource", |
| 166 | .flags = IORESOURCE_MEM, |
| 167 | }, |
| 168 | { |
| 169 | .start = MSM_GSBI1_PHYS, |
| 170 | .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1, |
| 171 | .name = "gsbi_resource", |
| 172 | .flags = IORESOURCE_MEM, |
| 173 | }, |
| 174 | }; |
| 175 | |
| 176 | struct platform_device apq8064_device_uart_gsbi1 = { |
| 177 | .name = "msm_serial_hsl", |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 178 | .id = 1, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 179 | .num_resources = ARRAY_SIZE(resources_uart_gsbi1), |
| 180 | .resource = resources_uart_gsbi1, |
| 181 | }; |
| 182 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 183 | static struct resource resources_uart_gsbi3[] = { |
| 184 | { |
| 185 | .start = GSBI3_UARTDM_IRQ, |
| 186 | .end = GSBI3_UARTDM_IRQ, |
| 187 | .flags = IORESOURCE_IRQ, |
| 188 | }, |
| 189 | { |
| 190 | .start = MSM_UART3DM_PHYS, |
| 191 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 192 | .name = "uartdm_resource", |
| 193 | .flags = IORESOURCE_MEM, |
| 194 | }, |
| 195 | { |
| 196 | .start = MSM_GSBI3_PHYS, |
| 197 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 198 | .name = "gsbi_resource", |
| 199 | .flags = IORESOURCE_MEM, |
| 200 | }, |
| 201 | }; |
| 202 | |
| 203 | struct platform_device apq8064_device_uart_gsbi3 = { |
| 204 | .name = "msm_serial_hsl", |
| 205 | .id = 0, |
| 206 | .num_resources = ARRAY_SIZE(resources_uart_gsbi3), |
| 207 | .resource = resources_uart_gsbi3, |
| 208 | }; |
| 209 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 210 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 211 | { |
| 212 | .name = "gsbi_qup_i2c_addr", |
| 213 | .start = MSM_GSBI3_PHYS, |
| 214 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 215 | .flags = IORESOURCE_MEM, |
| 216 | }, |
| 217 | { |
| 218 | .name = "qup_phys_addr", |
| 219 | .start = MSM_GSBI3_QUP_PHYS, |
| 220 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 221 | .flags = IORESOURCE_MEM, |
| 222 | }, |
| 223 | { |
| 224 | .name = "qup_err_intr", |
| 225 | .start = GSBI3_QUP_IRQ, |
| 226 | .end = GSBI3_QUP_IRQ, |
| 227 | .flags = IORESOURCE_IRQ, |
| 228 | }, |
| 229 | { |
| 230 | .name = "i2c_clk", |
| 231 | .start = 9, |
| 232 | .end = 9, |
| 233 | .flags = IORESOURCE_IO, |
| 234 | }, |
| 235 | { |
| 236 | .name = "i2c_sda", |
| 237 | .start = 8, |
| 238 | .end = 8, |
| 239 | .flags = IORESOURCE_IO, |
| 240 | }, |
| 241 | }; |
| 242 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 243 | static struct resource resources_qup_i2c_gsbi1[] = { |
| 244 | { |
| 245 | .name = "gsbi_qup_i2c_addr", |
| 246 | .start = MSM_GSBI1_PHYS, |
| 247 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 248 | .flags = IORESOURCE_MEM, |
| 249 | }, |
| 250 | { |
| 251 | .name = "qup_phys_addr", |
| 252 | .start = MSM_GSBI1_QUP_PHYS, |
| 253 | .end = MSM_GSBI1_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 254 | .flags = IORESOURCE_MEM, |
| 255 | }, |
| 256 | { |
| 257 | .name = "qup_err_intr", |
| 258 | .start = APQ8064_GSBI1_QUP_IRQ, |
| 259 | .end = APQ8064_GSBI1_QUP_IRQ, |
| 260 | .flags = IORESOURCE_IRQ, |
| 261 | }, |
| 262 | { |
| 263 | .name = "i2c_clk", |
| 264 | .start = 21, |
| 265 | .end = 21, |
| 266 | .flags = IORESOURCE_IO, |
| 267 | }, |
| 268 | { |
| 269 | .name = "i2c_sda", |
| 270 | .start = 20, |
| 271 | .end = 20, |
| 272 | .flags = IORESOURCE_IO, |
| 273 | }, |
| 274 | }; |
| 275 | |
| 276 | struct platform_device apq8064_device_qup_i2c_gsbi1 = { |
| 277 | .name = "qup_i2c", |
| 278 | .id = 0, |
| 279 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi1), |
| 280 | .resource = resources_qup_i2c_gsbi1, |
| 281 | }; |
| 282 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 283 | struct platform_device apq8064_device_qup_i2c_gsbi3 = { |
| 284 | .name = "qup_i2c", |
| 285 | .id = 3, |
| 286 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 287 | .resource = resources_qup_i2c_gsbi3, |
| 288 | }; |
| 289 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 290 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 291 | { |
| 292 | .name = "gsbi_qup_i2c_addr", |
| 293 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 294 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 295 | .flags = IORESOURCE_MEM, |
| 296 | }, |
| 297 | { |
| 298 | .name = "qup_phys_addr", |
| 299 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 300 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 301 | .flags = IORESOURCE_MEM, |
| 302 | }, |
| 303 | { |
| 304 | .name = "qup_err_intr", |
| 305 | .start = GSBI4_QUP_IRQ, |
| 306 | .end = GSBI4_QUP_IRQ, |
| 307 | .flags = IORESOURCE_IRQ, |
| 308 | }, |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 309 | { |
| 310 | .name = "i2c_clk", |
| 311 | .start = 11, |
| 312 | .end = 11, |
| 313 | .flags = IORESOURCE_IO, |
| 314 | }, |
| 315 | { |
| 316 | .name = "i2c_sda", |
| 317 | .start = 10, |
| 318 | .end = 10, |
| 319 | .flags = IORESOURCE_IO, |
| 320 | }, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 321 | }; |
| 322 | |
| 323 | struct platform_device apq8064_device_qup_i2c_gsbi4 = { |
| 324 | .name = "qup_i2c", |
| 325 | .id = 4, |
| 326 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 327 | .resource = resources_qup_i2c_gsbi4, |
| 328 | }; |
| 329 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 330 | static struct resource resources_qup_spi_gsbi5[] = { |
| 331 | { |
| 332 | .name = "spi_base", |
| 333 | .start = MSM_GSBI5_QUP_PHYS, |
| 334 | .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1, |
| 335 | .flags = IORESOURCE_MEM, |
| 336 | }, |
| 337 | { |
| 338 | .name = "gsbi_base", |
| 339 | .start = MSM_GSBI5_PHYS, |
| 340 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 341 | .flags = IORESOURCE_MEM, |
| 342 | }, |
| 343 | { |
| 344 | .name = "spi_irq_in", |
| 345 | .start = GSBI5_QUP_IRQ, |
| 346 | .end = GSBI5_QUP_IRQ, |
| 347 | .flags = IORESOURCE_IRQ, |
| 348 | }, |
| 349 | }; |
| 350 | |
| 351 | struct platform_device apq8064_device_qup_spi_gsbi5 = { |
| 352 | .name = "spi_qsd", |
| 353 | .id = 0, |
| 354 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5), |
| 355 | .resource = resources_qup_spi_gsbi5, |
| 356 | }; |
| 357 | |
Joel King | 8f839b9 | 2012-04-01 14:37:46 -0700 | [diff] [blame] | 358 | static struct resource resources_qup_i2c_gsbi5[] = { |
| 359 | { |
| 360 | .name = "gsbi_qup_i2c_addr", |
| 361 | .start = MSM_GSBI5_PHYS, |
| 362 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 363 | .flags = IORESOURCE_MEM, |
| 364 | }, |
| 365 | { |
| 366 | .name = "qup_phys_addr", |
| 367 | .start = MSM_GSBI5_QUP_PHYS, |
| 368 | .end = MSM_GSBI5_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 369 | .flags = IORESOURCE_MEM, |
| 370 | }, |
| 371 | { |
| 372 | .name = "qup_err_intr", |
| 373 | .start = GSBI5_QUP_IRQ, |
| 374 | .end = GSBI5_QUP_IRQ, |
| 375 | .flags = IORESOURCE_IRQ, |
| 376 | }, |
| 377 | { |
| 378 | .name = "i2c_clk", |
| 379 | .start = 54, |
| 380 | .end = 54, |
| 381 | .flags = IORESOURCE_IO, |
| 382 | }, |
| 383 | { |
| 384 | .name = "i2c_sda", |
| 385 | .start = 53, |
| 386 | .end = 53, |
| 387 | .flags = IORESOURCE_IO, |
| 388 | }, |
| 389 | }; |
| 390 | |
| 391 | struct platform_device mpq8064_device_qup_i2c_gsbi5 = { |
| 392 | .name = "qup_i2c", |
| 393 | .id = 5, |
| 394 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi5), |
| 395 | .resource = resources_qup_i2c_gsbi5, |
| 396 | }; |
| 397 | |
Mayank Rana | 262e903 | 2012-05-10 15:14:00 -0700 | [diff] [blame] | 398 | /* GSBI 6 used into UARTDM Mode */ |
| 399 | static struct resource msm_uart_dm6_resources[] = { |
| 400 | { |
| 401 | .start = MSM_UART6DM_PHYS, |
| 402 | .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1, |
| 403 | .name = "uartdm_resource", |
| 404 | .flags = IORESOURCE_MEM, |
| 405 | }, |
| 406 | { |
| 407 | .start = GSBI6_UARTDM_IRQ, |
| 408 | .end = GSBI6_UARTDM_IRQ, |
| 409 | .flags = IORESOURCE_IRQ, |
| 410 | }, |
| 411 | { |
| 412 | .start = MSM_GSBI6_PHYS, |
| 413 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 414 | .name = "gsbi_resource", |
| 415 | .flags = IORESOURCE_MEM, |
| 416 | }, |
| 417 | { |
| 418 | .start = DMOV_MPQ8064_HSUART_GSBI6_TX_CHAN, |
| 419 | .end = DMOV_MPQ8064_HSUART_GSBI6_RX_CHAN, |
| 420 | .name = "uartdm_channels", |
| 421 | .flags = IORESOURCE_DMA, |
| 422 | }, |
| 423 | { |
| 424 | .start = DMOV_MPQ8064_HSUART_GSBI6_TX_CRCI, |
| 425 | .end = DMOV_MPQ8064_HSUART_GSBI6_RX_CRCI, |
| 426 | .name = "uartdm_crci", |
| 427 | .flags = IORESOURCE_DMA, |
| 428 | }, |
| 429 | }; |
| 430 | static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32); |
| 431 | struct platform_device mpq8064_device_uartdm_gsbi6 = { |
| 432 | .name = "msm_serial_hs", |
| 433 | .id = 0, |
| 434 | .num_resources = ARRAY_SIZE(msm_uart_dm6_resources), |
| 435 | .resource = msm_uart_dm6_resources, |
| 436 | .dev = { |
| 437 | .dma_mask = &msm_uart_dm6_dma_mask, |
| 438 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 439 | }, |
| 440 | }; |
| 441 | |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 442 | static struct resource resources_uart_gsbi7[] = { |
| 443 | { |
| 444 | .start = GSBI7_UARTDM_IRQ, |
| 445 | .end = GSBI7_UARTDM_IRQ, |
| 446 | .flags = IORESOURCE_IRQ, |
| 447 | }, |
| 448 | { |
| 449 | .start = MSM_UART7DM_PHYS, |
| 450 | .end = MSM_UART7DM_PHYS + PAGE_SIZE - 1, |
| 451 | .name = "uartdm_resource", |
| 452 | .flags = IORESOURCE_MEM, |
| 453 | }, |
| 454 | { |
| 455 | .start = MSM_GSBI7_PHYS, |
| 456 | .end = MSM_GSBI7_PHYS + PAGE_SIZE - 1, |
| 457 | .name = "gsbi_resource", |
| 458 | .flags = IORESOURCE_MEM, |
| 459 | }, |
| 460 | }; |
| 461 | |
| 462 | struct platform_device apq8064_device_uart_gsbi7 = { |
| 463 | .name = "msm_serial_hsl", |
| 464 | .id = 0, |
| 465 | .num_resources = ARRAY_SIZE(resources_uart_gsbi7), |
| 466 | .resource = resources_uart_gsbi7, |
| 467 | }; |
| 468 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 469 | struct platform_device apq_pcm = { |
| 470 | .name = "msm-pcm-dsp", |
| 471 | .id = -1, |
| 472 | }; |
| 473 | |
| 474 | struct platform_device apq_pcm_routing = { |
| 475 | .name = "msm-pcm-routing", |
| 476 | .id = -1, |
| 477 | }; |
| 478 | |
| 479 | struct platform_device apq_cpudai0 = { |
| 480 | .name = "msm-dai-q6", |
| 481 | .id = 0x4000, |
| 482 | }; |
| 483 | |
| 484 | struct platform_device apq_cpudai1 = { |
| 485 | .name = "msm-dai-q6", |
| 486 | .id = 0x4001, |
| 487 | }; |
Santosh Mardi | eff9a74 | 2012-04-09 23:23:39 +0530 | [diff] [blame] | 488 | struct platform_device mpq_cpudai_sec_i2s_rx = { |
| 489 | .name = "msm-dai-q6", |
| 490 | .id = 4, |
| 491 | }; |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 492 | struct platform_device apq_cpudai_hdmi_rx = { |
Swaminathan Sathappan | fd9dbad | 2012-02-15 16:56:44 -0800 | [diff] [blame] | 493 | .name = "msm-dai-q6-hdmi", |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 494 | .id = 8, |
| 495 | }; |
| 496 | |
| 497 | struct platform_device apq_cpudai_bt_rx = { |
| 498 | .name = "msm-dai-q6", |
| 499 | .id = 0x3000, |
| 500 | }; |
| 501 | |
| 502 | struct platform_device apq_cpudai_bt_tx = { |
| 503 | .name = "msm-dai-q6", |
| 504 | .id = 0x3001, |
| 505 | }; |
| 506 | |
| 507 | struct platform_device apq_cpudai_fm_rx = { |
| 508 | .name = "msm-dai-q6", |
| 509 | .id = 0x3004, |
| 510 | }; |
| 511 | |
| 512 | struct platform_device apq_cpudai_fm_tx = { |
| 513 | .name = "msm-dai-q6", |
| 514 | .id = 0x3005, |
| 515 | }; |
| 516 | |
Helen Zeng | 8f92550 | 2012-03-05 16:50:17 -0800 | [diff] [blame] | 517 | struct platform_device apq_cpudai_slim_4_rx = { |
| 518 | .name = "msm-dai-q6", |
| 519 | .id = 0x4008, |
| 520 | }; |
| 521 | |
| 522 | struct platform_device apq_cpudai_slim_4_tx = { |
| 523 | .name = "msm-dai-q6", |
| 524 | .id = 0x4009, |
| 525 | }; |
| 526 | |
Joel Nider | e5de00e | 2012-07-03 10:58:10 +0300 | [diff] [blame] | 527 | #define MSM_TSIF0_PHYS (0x18200000) |
| 528 | #define MSM_TSIF1_PHYS (0x18201000) |
| 529 | #define MSM_TSIF_SIZE (0x200) |
| 530 | |
| 531 | #define TSIF_0_CLK GPIO_CFG(55, 1, GPIO_CFG_INPUT, \ |
| 532 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 533 | #define TSIF_0_EN GPIO_CFG(56, 1, GPIO_CFG_INPUT, \ |
| 534 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 535 | #define TSIF_0_DATA GPIO_CFG(57, 1, GPIO_CFG_INPUT, \ |
| 536 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 537 | #define TSIF_0_SYNC GPIO_CFG(62, 1, GPIO_CFG_INPUT, \ |
| 538 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 539 | #define TSIF_1_CLK GPIO_CFG(59, 1, GPIO_CFG_INPUT, \ |
| 540 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 541 | #define TSIF_1_EN GPIO_CFG(60, 1, GPIO_CFG_INPUT, \ |
| 542 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 543 | #define TSIF_1_DATA GPIO_CFG(61, 1, GPIO_CFG_INPUT, \ |
| 544 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 545 | #define TSIF_1_SYNC GPIO_CFG(58, 1, GPIO_CFG_INPUT, \ |
| 546 | GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA) |
| 547 | |
| 548 | static const struct msm_gpio tsif0_gpios[] = { |
| 549 | { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", }, |
| 550 | { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", }, |
| 551 | { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", }, |
| 552 | { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", }, |
| 553 | }; |
| 554 | |
| 555 | static const struct msm_gpio tsif1_gpios[] = { |
| 556 | { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", }, |
| 557 | { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", }, |
| 558 | { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", }, |
| 559 | { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", }, |
| 560 | }; |
| 561 | |
| 562 | struct msm_tsif_platform_data tsif1_8064_platform_data = { |
| 563 | .num_gpios = ARRAY_SIZE(tsif1_gpios), |
| 564 | .gpios = tsif1_gpios, |
| 565 | .tsif_pclk = "iface_clk", |
| 566 | .tsif_ref_clk = "ref_clk", |
| 567 | }; |
| 568 | |
| 569 | struct resource tsif1_8064_resources[] = { |
| 570 | [0] = { |
| 571 | .flags = IORESOURCE_IRQ, |
| 572 | .start = TSIF2_IRQ, |
| 573 | .end = TSIF2_IRQ, |
| 574 | }, |
| 575 | [1] = { |
| 576 | .flags = IORESOURCE_MEM, |
| 577 | .start = MSM_TSIF1_PHYS, |
| 578 | .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1, |
| 579 | }, |
| 580 | [2] = { |
| 581 | .flags = IORESOURCE_DMA, |
| 582 | .start = DMOV8064_TSIF_CHAN, |
| 583 | .end = DMOV8064_TSIF_CRCI, |
| 584 | }, |
| 585 | }; |
| 586 | |
| 587 | struct msm_tsif_platform_data tsif0_8064_platform_data = { |
| 588 | .num_gpios = ARRAY_SIZE(tsif0_gpios), |
| 589 | .gpios = tsif0_gpios, |
| 590 | .tsif_pclk = "iface_clk", |
| 591 | .tsif_ref_clk = "ref_clk", |
| 592 | }; |
| 593 | |
| 594 | struct resource tsif0_8064_resources[] = { |
| 595 | [0] = { |
| 596 | .flags = IORESOURCE_IRQ, |
| 597 | .start = TSIF1_IRQ, |
| 598 | .end = TSIF1_IRQ, |
| 599 | }, |
| 600 | [1] = { |
| 601 | .flags = IORESOURCE_MEM, |
| 602 | .start = MSM_TSIF0_PHYS, |
| 603 | .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1, |
| 604 | }, |
| 605 | [2] = { |
| 606 | .flags = IORESOURCE_DMA, |
| 607 | .start = DMOV_TSIF_CHAN, |
| 608 | .end = DMOV_TSIF_CRCI, |
| 609 | }, |
| 610 | }; |
| 611 | |
| 612 | struct platform_device msm_8064_device_tsif[2] = { |
| 613 | { |
| 614 | .name = "msm_tsif", |
| 615 | .id = 0, |
| 616 | .num_resources = ARRAY_SIZE(tsif0_8064_resources), |
| 617 | .resource = tsif0_8064_resources, |
| 618 | .dev = { |
| 619 | .platform_data = &tsif0_8064_platform_data |
| 620 | }, |
| 621 | }, |
| 622 | { |
| 623 | .name = "msm_tsif", |
| 624 | .id = 1, |
| 625 | .num_resources = ARRAY_SIZE(tsif1_8064_resources), |
| 626 | .resource = tsif1_8064_resources, |
| 627 | .dev = { |
| 628 | .platform_data = &tsif1_8064_platform_data |
| 629 | }, |
| 630 | } |
| 631 | }; |
| 632 | |
Joel Nider | 50b50fa | 2012-08-05 14:17:29 +0300 | [diff] [blame] | 633 | #define MSM_TSPP_PHYS (0x18202000) |
| 634 | #define MSM_TSPP_SIZE (0x1000) |
| 635 | #define MSM_TSPP_BAM_PHYS (0x18204000) |
| 636 | #define MSM_TSPP_BAM_SIZE (0x2000) |
| 637 | |
| 638 | static const struct msm_gpio tspp_gpios[] = { |
| 639 | { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", }, |
| 640 | { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", }, |
| 641 | { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", }, |
| 642 | { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", }, |
| 643 | { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", }, |
| 644 | { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", }, |
| 645 | { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", }, |
| 646 | { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", }, |
| 647 | }; |
| 648 | |
| 649 | static struct resource tspp_resources[] = { |
| 650 | [0] = { |
| 651 | .flags = IORESOURCE_IRQ, |
| 652 | .start = TSIF_TSPP_IRQ, |
| 653 | .end = TSIF1_IRQ, |
| 654 | }, |
| 655 | [1] = { |
| 656 | .flags = IORESOURCE_MEM, |
| 657 | .start = MSM_TSIF0_PHYS, |
| 658 | .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1, |
| 659 | }, |
| 660 | [2] = { |
| 661 | .flags = IORESOURCE_MEM, |
| 662 | .start = MSM_TSIF1_PHYS, |
| 663 | .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1, |
| 664 | }, |
| 665 | [3] = { |
| 666 | .flags = IORESOURCE_MEM, |
| 667 | .start = MSM_TSPP_PHYS, |
| 668 | .end = MSM_TSPP_PHYS + MSM_TSPP_SIZE - 1, |
| 669 | }, |
| 670 | [4] = { |
| 671 | .flags = IORESOURCE_MEM, |
| 672 | .start = MSM_TSPP_BAM_PHYS, |
| 673 | .end = MSM_TSPP_BAM_PHYS + MSM_TSPP_BAM_SIZE - 1, |
| 674 | }, |
| 675 | }; |
| 676 | |
| 677 | static struct msm_tspp_platform_data tspp_platform_data = { |
| 678 | .num_gpios = ARRAY_SIZE(tspp_gpios), |
| 679 | .gpios = tspp_gpios, |
| 680 | .tsif_pclk = "iface_clk", |
| 681 | .tsif_ref_clk = "ref_clk", |
| 682 | }; |
| 683 | |
| 684 | struct platform_device msm_8064_device_tspp = { |
| 685 | .name = "msm_tspp", |
| 686 | .id = 0, |
| 687 | .num_resources = ARRAY_SIZE(tspp_resources), |
| 688 | .resource = tspp_resources, |
| 689 | .dev = { |
| 690 | .platform_data = &tspp_platform_data |
| 691 | }, |
| 692 | }; |
| 693 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 694 | /* |
| 695 | * Machine specific data for AUX PCM Interface |
| 696 | * which the driver will be unware of. |
| 697 | */ |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 698 | struct msm_dai_auxpcm_pdata apq_auxpcm_pdata = { |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 699 | .clk = "pcm_clk", |
Kuirong Wang | 547a998 | 2012-05-04 18:29:11 -0700 | [diff] [blame] | 700 | .mode_8k = { |
| 701 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 702 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 703 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 704 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 705 | .slot = 0, |
| 706 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 707 | .pcm_clk_rate = 2048000, |
| 708 | }, |
| 709 | .mode_16k = { |
| 710 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 711 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 712 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 713 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 714 | .slot = 0, |
| 715 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 716 | .pcm_clk_rate = 4096000, |
| 717 | } |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 718 | }; |
| 719 | |
| 720 | struct platform_device apq_cpudai_auxpcm_rx = { |
| 721 | .name = "msm-dai-q6", |
| 722 | .id = 2, |
| 723 | .dev = { |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 724 | .platform_data = &apq_auxpcm_pdata, |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 725 | }, |
| 726 | }; |
| 727 | |
| 728 | struct platform_device apq_cpudai_auxpcm_tx = { |
| 729 | .name = "msm-dai-q6", |
| 730 | .id = 3, |
Kiran Kandi | 5f4ab69 | 2012-02-23 11:23:56 -0800 | [diff] [blame] | 731 | .dev = { |
| 732 | .platform_data = &apq_auxpcm_pdata, |
| 733 | }, |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 734 | }; |
| 735 | |
Patrick Lai | 04baee94 | 2012-05-01 14:38:47 -0700 | [diff] [blame] | 736 | struct msm_mi2s_pdata mpq_mi2s_tx_data = { |
| 737 | .rx_sd_lines = 0, |
| 738 | .tx_sd_lines = MSM_MI2S_SD0 | MSM_MI2S_SD1 | MSM_MI2S_SD2 | |
| 739 | MSM_MI2S_SD3, |
Kuirong Wang | f23f8c5 | 2012-03-31 12:34:51 -0700 | [diff] [blame] | 740 | }; |
| 741 | |
| 742 | struct platform_device mpq_cpudai_mi2s_tx = { |
Patrick Lai | 04baee94 | 2012-05-01 14:38:47 -0700 | [diff] [blame] | 743 | .name = "msm-dai-q6-mi2s", |
| 744 | .id = -1, /*MI2S_TX */ |
Kuirong Wang | f23f8c5 | 2012-03-31 12:34:51 -0700 | [diff] [blame] | 745 | .dev = { |
| 746 | .platform_data = &mpq_mi2s_tx_data, |
| 747 | }, |
| 748 | }; |
| 749 | |
Kuirong Wang | f8c5e14 | 2012-06-21 16:17:32 -0700 | [diff] [blame] | 750 | struct msm_mi2s_pdata apq_mi2s_data = { |
| 751 | .rx_sd_lines = MSM_MI2S_SD0, |
| 752 | .tx_sd_lines = MSM_MI2S_SD3, |
| 753 | }; |
| 754 | |
| 755 | struct platform_device apq_cpudai_mi2s = { |
| 756 | .name = "msm-dai-q6-mi2s", |
| 757 | .id = -1, |
| 758 | .dev = { |
| 759 | .platform_data = &apq_mi2s_data, |
| 760 | }, |
| 761 | }; |
| 762 | |
| 763 | struct platform_device apq_cpudai_i2s_rx = { |
| 764 | .name = "msm-dai-q6", |
| 765 | .id = PRIMARY_I2S_RX, |
| 766 | }; |
| 767 | |
| 768 | struct platform_device apq_cpudai_i2s_tx = { |
| 769 | .name = "msm-dai-q6", |
| 770 | .id = PRIMARY_I2S_TX, |
| 771 | }; |
| 772 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 773 | struct platform_device apq_cpu_fe = { |
| 774 | .name = "msm-dai-fe", |
| 775 | .id = -1, |
| 776 | }; |
| 777 | |
| 778 | struct platform_device apq_stub_codec = { |
| 779 | .name = "msm-stub-codec", |
| 780 | .id = 1, |
| 781 | }; |
| 782 | |
| 783 | struct platform_device apq_voice = { |
| 784 | .name = "msm-pcm-voice", |
| 785 | .id = -1, |
| 786 | }; |
| 787 | |
| 788 | struct platform_device apq_voip = { |
| 789 | .name = "msm-voip-dsp", |
| 790 | .id = -1, |
| 791 | }; |
| 792 | |
| 793 | struct platform_device apq_lpa_pcm = { |
| 794 | .name = "msm-pcm-lpa", |
| 795 | .id = -1, |
| 796 | }; |
| 797 | |
Krishnankutty Kolathappilly | 4374e33 | 2012-03-18 22:27:30 -0700 | [diff] [blame] | 798 | struct platform_device apq_compr_dsp = { |
| 799 | .name = "msm-compr-dsp", |
| 800 | .id = -1, |
| 801 | }; |
| 802 | |
| 803 | struct platform_device apq_multi_ch_pcm = { |
| 804 | .name = "msm-multi-ch-pcm-dsp", |
| 805 | .id = -1, |
| 806 | }; |
| 807 | |
Jayasena Sangaraboina | 99bf09c | 2012-07-17 12:03:08 -0700 | [diff] [blame] | 808 | struct platform_device apq_lowlatency_pcm = { |
| 809 | .name = "msm-lowlatency-pcm-dsp", |
| 810 | .id = -1, |
| 811 | }; |
| 812 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 813 | struct platform_device apq_pcm_hostless = { |
| 814 | .name = "msm-pcm-hostless", |
| 815 | .id = -1, |
| 816 | }; |
| 817 | |
| 818 | struct platform_device apq_cpudai_afe_01_rx = { |
| 819 | .name = "msm-dai-q6", |
| 820 | .id = 0xE0, |
| 821 | }; |
| 822 | |
| 823 | struct platform_device apq_cpudai_afe_01_tx = { |
| 824 | .name = "msm-dai-q6", |
| 825 | .id = 0xF0, |
| 826 | }; |
| 827 | |
| 828 | struct platform_device apq_cpudai_afe_02_rx = { |
| 829 | .name = "msm-dai-q6", |
| 830 | .id = 0xF1, |
| 831 | }; |
| 832 | |
| 833 | struct platform_device apq_cpudai_afe_02_tx = { |
| 834 | .name = "msm-dai-q6", |
| 835 | .id = 0xE1, |
| 836 | }; |
| 837 | |
| 838 | struct platform_device apq_pcm_afe = { |
| 839 | .name = "msm-pcm-afe", |
| 840 | .id = -1, |
| 841 | }; |
| 842 | |
Neema Shetty | 8427c26 | 2012-02-16 11:23:43 -0800 | [diff] [blame] | 843 | struct platform_device apq_cpudai_stub = { |
| 844 | .name = "msm-dai-stub", |
| 845 | .id = -1, |
| 846 | }; |
| 847 | |
Neema Shetty | 3c9d286 | 2012-03-11 01:25:32 -0800 | [diff] [blame] | 848 | struct platform_device apq_cpudai_slimbus_1_rx = { |
| 849 | .name = "msm-dai-q6", |
| 850 | .id = 0x4002, |
| 851 | }; |
| 852 | |
| 853 | struct platform_device apq_cpudai_slimbus_1_tx = { |
| 854 | .name = "msm-dai-q6", |
| 855 | .id = 0x4003, |
| 856 | }; |
| 857 | |
Kiran Kandi | 97fe19d | 2012-05-20 22:34:04 -0700 | [diff] [blame] | 858 | struct platform_device apq_cpudai_slimbus_2_rx = { |
| 859 | .name = "msm-dai-q6", |
| 860 | .id = 0x4004, |
| 861 | }; |
| 862 | |
Kiran Kandi | 1e6371d | 2012-03-29 11:48:57 -0700 | [diff] [blame] | 863 | struct platform_device apq_cpudai_slimbus_2_tx = { |
| 864 | .name = "msm-dai-q6", |
| 865 | .id = 0x4005, |
| 866 | }; |
| 867 | |
Neema Shetty | c9d86c3 | 2012-05-09 12:01:39 -0700 | [diff] [blame] | 868 | struct platform_device apq_cpudai_slimbus_3_rx = { |
| 869 | .name = "msm-dai-q6", |
| 870 | .id = 0x4006, |
| 871 | }; |
| 872 | |
Helen Zeng | 38c3c96 | 2012-05-17 14:56:20 -0700 | [diff] [blame] | 873 | struct platform_device apq_cpudai_slimbus_3_tx = { |
| 874 | .name = "msm-dai-q6", |
| 875 | .id = 0x4007, |
| 876 | }; |
| 877 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 878 | static struct resource resources_ssbi_pmic1[] = { |
| 879 | { |
| 880 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 881 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 882 | .flags = IORESOURCE_MEM, |
| 883 | }, |
| 884 | }; |
| 885 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 886 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 887 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 888 | #define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C) |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 889 | /* Board info for the slimbus slave device */ |
| 890 | static struct resource slimbus_res[] = { |
| 891 | { |
| 892 | .start = LPASS_SLIMBUS_PHYS, |
| 893 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 894 | .flags = IORESOURCE_MEM, |
| 895 | .name = "slimbus_physical", |
| 896 | }, |
| 897 | { |
| 898 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 899 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 900 | .flags = IORESOURCE_MEM, |
| 901 | .name = "slimbus_bam_physical", |
| 902 | }, |
| 903 | { |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 904 | .start = LPASS_SLIMBUS_SLEW, |
| 905 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 906 | .flags = IORESOURCE_MEM, |
| 907 | .name = "slimbus_slew_reg", |
| 908 | }, |
| 909 | { |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 910 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 911 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 912 | .flags = IORESOURCE_IRQ, |
| 913 | .name = "slimbus_irq", |
| 914 | }, |
| 915 | { |
| 916 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 917 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 918 | .flags = IORESOURCE_IRQ, |
| 919 | .name = "slimbus_bam_irq", |
| 920 | }, |
| 921 | }; |
| 922 | |
| 923 | struct platform_device apq8064_slim_ctrl = { |
| 924 | .name = "msm_slim_ctrl", |
| 925 | .id = 1, |
| 926 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 927 | .resource = slimbus_res, |
| 928 | .dev = { |
| 929 | .coherent_dma_mask = 0xffffffffULL, |
| 930 | }, |
| 931 | }; |
| 932 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 933 | struct platform_device apq8064_device_ssbi_pmic1 = { |
| 934 | .name = "msm_ssbi", |
| 935 | .id = 0, |
| 936 | .resource = resources_ssbi_pmic1, |
| 937 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 938 | }; |
| 939 | |
| 940 | static struct resource resources_ssbi_pmic2[] = { |
| 941 | { |
| 942 | .start = MSM_PMIC2_SSBI_CMD_PHYS, |
| 943 | .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 944 | .flags = IORESOURCE_MEM, |
| 945 | }, |
| 946 | }; |
| 947 | |
| 948 | struct platform_device apq8064_device_ssbi_pmic2 = { |
| 949 | .name = "msm_ssbi", |
| 950 | .id = 1, |
| 951 | .resource = resources_ssbi_pmic2, |
| 952 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2), |
| 953 | }; |
| 954 | |
| 955 | static struct resource resources_otg[] = { |
| 956 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 957 | .start = MSM_HSUSB1_PHYS, |
| 958 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 959 | .flags = IORESOURCE_MEM, |
| 960 | }, |
| 961 | { |
| 962 | .start = USB1_HS_IRQ, |
| 963 | .end = USB1_HS_IRQ, |
| 964 | .flags = IORESOURCE_IRQ, |
| 965 | }, |
| 966 | }; |
| 967 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 968 | struct platform_device apq8064_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 969 | .name = "msm_otg", |
| 970 | .id = -1, |
| 971 | .num_resources = ARRAY_SIZE(resources_otg), |
| 972 | .resource = resources_otg, |
| 973 | .dev = { |
| 974 | .coherent_dma_mask = 0xffffffff, |
| 975 | }, |
| 976 | }; |
| 977 | |
| 978 | static struct resource resources_hsusb[] = { |
| 979 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 980 | .start = MSM_HSUSB1_PHYS, |
| 981 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 982 | .flags = IORESOURCE_MEM, |
| 983 | }, |
| 984 | { |
| 985 | .start = USB1_HS_IRQ, |
| 986 | .end = USB1_HS_IRQ, |
| 987 | .flags = IORESOURCE_IRQ, |
| 988 | }, |
| 989 | }; |
| 990 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 991 | struct platform_device apq8064_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 992 | .name = "msm_hsusb", |
| 993 | .id = -1, |
| 994 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 995 | .resource = resources_hsusb, |
| 996 | .dev = { |
| 997 | .coherent_dma_mask = 0xffffffff, |
| 998 | }, |
| 999 | }; |
| 1000 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 1001 | static struct resource resources_hsusb_host[] = { |
| 1002 | { |
| 1003 | .start = MSM_HSUSB1_PHYS, |
| 1004 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
| 1005 | .flags = IORESOURCE_MEM, |
| 1006 | }, |
| 1007 | { |
| 1008 | .start = USB1_HS_IRQ, |
| 1009 | .end = USB1_HS_IRQ, |
| 1010 | .flags = IORESOURCE_IRQ, |
| 1011 | }, |
| 1012 | }; |
| 1013 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1014 | static struct resource resources_hsic_host[] = { |
| 1015 | { |
| 1016 | .start = 0x12510000, |
| 1017 | .end = 0x12510000 + SZ_4K - 1, |
| 1018 | .flags = IORESOURCE_MEM, |
| 1019 | }, |
| 1020 | { |
| 1021 | .start = USB2_HSIC_IRQ, |
| 1022 | .end = USB2_HSIC_IRQ, |
| 1023 | .flags = IORESOURCE_IRQ, |
| 1024 | }, |
| 1025 | { |
| 1026 | .start = MSM_GPIO_TO_INT(49), |
| 1027 | .end = MSM_GPIO_TO_INT(49), |
| 1028 | .name = "peripheral_status_irq", |
| 1029 | .flags = IORESOURCE_IRQ, |
| 1030 | }, |
Vamsi Krishna | 6921cbe | 2012-02-21 18:34:43 -0800 | [diff] [blame] | 1031 | { |
Hemant Kumar | 6fd6503 | 2012-05-23 13:02:24 -0700 | [diff] [blame] | 1032 | .start = 47, |
| 1033 | .end = 47, |
| 1034 | .name = "wakeup", |
| 1035 | .flags = IORESOURCE_IO, |
Vamsi Krishna | 6921cbe | 2012-02-21 18:34:43 -0800 | [diff] [blame] | 1036 | }, |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1037 | }; |
| 1038 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 1039 | static u64 dma_mask = DMA_BIT_MASK(32); |
| 1040 | struct platform_device apq8064_device_hsusb_host = { |
| 1041 | .name = "msm_hsusb_host", |
| 1042 | .id = -1, |
| 1043 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 1044 | .resource = resources_hsusb_host, |
| 1045 | .dev = { |
| 1046 | .dma_mask = &dma_mask, |
| 1047 | .coherent_dma_mask = 0xffffffff, |
| 1048 | }, |
| 1049 | }; |
| 1050 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1051 | struct platform_device apq8064_device_hsic_host = { |
| 1052 | .name = "msm_hsic_host", |
| 1053 | .id = -1, |
| 1054 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 1055 | .resource = resources_hsic_host, |
| 1056 | .dev = { |
| 1057 | .dma_mask = &dma_mask, |
| 1058 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 1059 | }, |
| 1060 | }; |
| 1061 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 1062 | static struct resource resources_ehci_host3[] = { |
| 1063 | { |
| 1064 | .start = MSM_HSUSB3_PHYS, |
| 1065 | .end = MSM_HSUSB3_PHYS + MSM_HSUSB3_SIZE - 1, |
| 1066 | .flags = IORESOURCE_MEM, |
| 1067 | }, |
| 1068 | { |
| 1069 | .start = USB3_HS_IRQ, |
| 1070 | .end = USB3_HS_IRQ, |
| 1071 | .flags = IORESOURCE_IRQ, |
| 1072 | }, |
| 1073 | }; |
| 1074 | |
| 1075 | struct platform_device apq8064_device_ehci_host3 = { |
| 1076 | .name = "msm_ehci_host", |
| 1077 | .id = 0, |
| 1078 | .num_resources = ARRAY_SIZE(resources_ehci_host3), |
| 1079 | .resource = resources_ehci_host3, |
| 1080 | .dev = { |
| 1081 | .dma_mask = &dma_mask, |
| 1082 | .coherent_dma_mask = 0xffffffff, |
| 1083 | }, |
| 1084 | }; |
| 1085 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 1086 | static struct resource resources_ehci_host4[] = { |
| 1087 | { |
| 1088 | .start = MSM_HSUSB4_PHYS, |
| 1089 | .end = MSM_HSUSB4_PHYS + MSM_HSUSB4_SIZE - 1, |
| 1090 | .flags = IORESOURCE_MEM, |
| 1091 | }, |
| 1092 | { |
| 1093 | .start = USB4_HS_IRQ, |
| 1094 | .end = USB4_HS_IRQ, |
| 1095 | .flags = IORESOURCE_IRQ, |
| 1096 | }, |
| 1097 | }; |
| 1098 | |
| 1099 | struct platform_device apq8064_device_ehci_host4 = { |
| 1100 | .name = "msm_ehci_host", |
| 1101 | .id = 1, |
| 1102 | .num_resources = ARRAY_SIZE(resources_ehci_host4), |
| 1103 | .resource = resources_ehci_host4, |
| 1104 | .dev = { |
| 1105 | .dma_mask = &dma_mask, |
| 1106 | .coherent_dma_mask = 0xffffffff, |
| 1107 | }, |
| 1108 | }; |
| 1109 | |
Matt Wagantall | f5cc389 | 2012-06-07 19:47:02 -0700 | [diff] [blame] | 1110 | struct platform_device apq8064_device_acpuclk = { |
| 1111 | .name = "acpuclk-8064", |
| 1112 | .id = -1, |
| 1113 | }; |
| 1114 | |
Ramesh Masavarapu | f31ff24 | 2012-05-10 18:55:21 -0700 | [diff] [blame] | 1115 | #define SHARED_IMEM_TZ_BASE 0x2a03f720 |
| 1116 | static struct resource tzlog_resources[] = { |
| 1117 | { |
| 1118 | .start = SHARED_IMEM_TZ_BASE, |
| 1119 | .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1, |
| 1120 | .flags = IORESOURCE_MEM, |
| 1121 | }, |
| 1122 | }; |
| 1123 | |
| 1124 | struct platform_device apq_device_tz_log = { |
| 1125 | .name = "tz_log", |
| 1126 | .id = 0, |
| 1127 | .num_resources = ARRAY_SIZE(tzlog_resources), |
| 1128 | .resource = tzlog_resources, |
| 1129 | }; |
| 1130 | |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1131 | /* MSM Video core device */ |
| 1132 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1133 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 1134 | { |
| 1135 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1136 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1137 | .ab = 0, |
| 1138 | .ib = 0, |
| 1139 | }, |
| 1140 | { |
| 1141 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1142 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1143 | .ab = 0, |
| 1144 | .ib = 0, |
| 1145 | }, |
| 1146 | { |
| 1147 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1148 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1149 | .ab = 0, |
| 1150 | .ib = 0, |
| 1151 | }, |
| 1152 | { |
| 1153 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1154 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1155 | .ab = 0, |
| 1156 | .ib = 0, |
| 1157 | }, |
| 1158 | }; |
| 1159 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 1160 | { |
| 1161 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1162 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1163 | .ab = 54525952, |
| 1164 | .ib = 436207616, |
| 1165 | }, |
| 1166 | { |
| 1167 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1168 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1169 | .ab = 72351744, |
| 1170 | .ib = 289406976, |
| 1171 | }, |
| 1172 | { |
| 1173 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1174 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1175 | .ab = 500000, |
| 1176 | .ib = 1000000, |
| 1177 | }, |
| 1178 | { |
| 1179 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1180 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1181 | .ab = 500000, |
| 1182 | .ib = 1000000, |
| 1183 | }, |
| 1184 | }; |
| 1185 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 1186 | { |
| 1187 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1188 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1189 | .ab = 40894464, |
| 1190 | .ib = 327155712, |
| 1191 | }, |
| 1192 | { |
| 1193 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1194 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1195 | .ab = 48234496, |
| 1196 | .ib = 192937984, |
| 1197 | }, |
| 1198 | { |
| 1199 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1200 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1201 | .ab = 500000, |
| 1202 | .ib = 2000000, |
| 1203 | }, |
| 1204 | { |
| 1205 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1206 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1207 | .ab = 500000, |
| 1208 | .ib = 2000000, |
| 1209 | }, |
| 1210 | }; |
| 1211 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 1212 | { |
| 1213 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1214 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1215 | .ab = 163577856, |
| 1216 | .ib = 1308622848, |
| 1217 | }, |
| 1218 | { |
| 1219 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1220 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1221 | .ab = 219152384, |
| 1222 | .ib = 876609536, |
| 1223 | }, |
| 1224 | { |
| 1225 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1226 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1227 | .ab = 1750000, |
| 1228 | .ib = 3500000, |
| 1229 | }, |
| 1230 | { |
| 1231 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1232 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1233 | .ab = 1750000, |
| 1234 | .ib = 3500000, |
| 1235 | }, |
| 1236 | }; |
| 1237 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 1238 | { |
| 1239 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1240 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1241 | .ab = 121634816, |
| 1242 | .ib = 973078528, |
| 1243 | }, |
| 1244 | { |
| 1245 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1246 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1247 | .ab = 155189248, |
| 1248 | .ib = 620756992, |
| 1249 | }, |
| 1250 | { |
| 1251 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1252 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1253 | .ab = 1750000, |
| 1254 | .ib = 7000000, |
| 1255 | }, |
| 1256 | { |
| 1257 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1258 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1259 | .ab = 1750000, |
| 1260 | .ib = 7000000, |
| 1261 | }, |
| 1262 | }; |
| 1263 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 1264 | { |
| 1265 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1266 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1267 | .ab = 372244480, |
| 1268 | .ib = 2560000000U, |
| 1269 | }, |
| 1270 | { |
| 1271 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1272 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1273 | .ab = 501219328, |
| 1274 | .ib = 2560000000U, |
| 1275 | }, |
| 1276 | { |
| 1277 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1278 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1279 | .ab = 2500000, |
| 1280 | .ib = 5000000, |
| 1281 | }, |
| 1282 | { |
| 1283 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1284 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1285 | .ab = 2500000, |
| 1286 | .ib = 5000000, |
| 1287 | }, |
| 1288 | }; |
| 1289 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 1290 | { |
| 1291 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1292 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1293 | .ab = 222298112, |
| 1294 | .ib = 2560000000U, |
| 1295 | }, |
| 1296 | { |
| 1297 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1298 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1299 | .ab = 330301440, |
| 1300 | .ib = 2560000000U, |
| 1301 | }, |
| 1302 | { |
| 1303 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1304 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1305 | .ab = 2500000, |
| 1306 | .ib = 700000000, |
| 1307 | }, |
| 1308 | { |
| 1309 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1310 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1311 | .ab = 2500000, |
| 1312 | .ib = 10000000, |
| 1313 | }, |
| 1314 | }; |
| 1315 | |
Arun Menon | 152c3c7 | 2012-06-20 11:50:08 -0700 | [diff] [blame] | 1316 | static struct msm_bus_vectors vidc_venc_1080p_turbo_vectors[] = { |
| 1317 | { |
| 1318 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1319 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1320 | .ab = 222298112, |
| 1321 | .ib = 3522000000U, |
| 1322 | }, |
| 1323 | { |
| 1324 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1325 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1326 | .ab = 330301440, |
| 1327 | .ib = 3522000000U, |
| 1328 | }, |
| 1329 | { |
| 1330 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1331 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1332 | .ab = 2500000, |
| 1333 | .ib = 700000000, |
| 1334 | }, |
| 1335 | { |
| 1336 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1337 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1338 | .ab = 2500000, |
| 1339 | .ib = 10000000, |
| 1340 | }, |
| 1341 | }; |
| 1342 | static struct msm_bus_vectors vidc_vdec_1080p_turbo_vectors[] = { |
| 1343 | { |
| 1344 | .src = MSM_BUS_MASTER_VIDEO_ENC, |
| 1345 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1346 | .ab = 222298112, |
| 1347 | .ib = 3522000000U, |
| 1348 | }, |
| 1349 | { |
| 1350 | .src = MSM_BUS_MASTER_VIDEO_DEC, |
| 1351 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1352 | .ab = 330301440, |
| 1353 | .ib = 3522000000U, |
| 1354 | }, |
| 1355 | { |
| 1356 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1357 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1358 | .ab = 2500000, |
| 1359 | .ib = 700000000, |
| 1360 | }, |
| 1361 | { |
| 1362 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1363 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1364 | .ab = 2500000, |
| 1365 | .ib = 10000000, |
| 1366 | }, |
| 1367 | }; |
| 1368 | |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1369 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 1370 | { |
| 1371 | ARRAY_SIZE(vidc_init_vectors), |
| 1372 | vidc_init_vectors, |
| 1373 | }, |
| 1374 | { |
| 1375 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 1376 | vidc_venc_vga_vectors, |
| 1377 | }, |
| 1378 | { |
| 1379 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 1380 | vidc_vdec_vga_vectors, |
| 1381 | }, |
| 1382 | { |
| 1383 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 1384 | vidc_venc_720p_vectors, |
| 1385 | }, |
| 1386 | { |
| 1387 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 1388 | vidc_vdec_720p_vectors, |
| 1389 | }, |
| 1390 | { |
| 1391 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 1392 | vidc_venc_1080p_vectors, |
| 1393 | }, |
| 1394 | { |
| 1395 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 1396 | vidc_vdec_1080p_vectors, |
| 1397 | }, |
Arun Menon | 152c3c7 | 2012-06-20 11:50:08 -0700 | [diff] [blame] | 1398 | { |
| 1399 | ARRAY_SIZE(vidc_venc_1080p_turbo_vectors), |
| 1400 | vidc_venc_1080p_turbo_vectors, |
| 1401 | }, |
| 1402 | { |
| 1403 | ARRAY_SIZE(vidc_vdec_1080p_turbo_vectors), |
| 1404 | vidc_vdec_1080p_turbo_vectors, |
| 1405 | }, |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1406 | }; |
| 1407 | |
| 1408 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 1409 | vidc_bus_client_config, |
| 1410 | ARRAY_SIZE(vidc_bus_client_config), |
| 1411 | .name = "vidc", |
| 1412 | }; |
| 1413 | #endif |
| 1414 | |
| 1415 | |
| 1416 | #define APQ8064_VIDC_BASE_PHYS 0x04400000 |
| 1417 | #define APQ8064_VIDC_BASE_SIZE 0x00100000 |
| 1418 | |
| 1419 | static struct resource apq8064_device_vidc_resources[] = { |
| 1420 | { |
| 1421 | .start = APQ8064_VIDC_BASE_PHYS, |
| 1422 | .end = APQ8064_VIDC_BASE_PHYS + APQ8064_VIDC_BASE_SIZE - 1, |
| 1423 | .flags = IORESOURCE_MEM, |
| 1424 | }, |
| 1425 | { |
| 1426 | .start = VCODEC_IRQ, |
| 1427 | .end = VCODEC_IRQ, |
| 1428 | .flags = IORESOURCE_IRQ, |
| 1429 | }, |
| 1430 | }; |
| 1431 | |
| 1432 | struct msm_vidc_platform_data apq8064_vidc_platform_data = { |
| 1433 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1434 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 1435 | #endif |
| 1436 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 1437 | .memtype = ION_CP_MM_HEAP_ID, |
| 1438 | .enable_ion = 1, |
Deepak kotur | eda295a | 2012-05-10 19:49:46 -0700 | [diff] [blame] | 1439 | .cp_enabled = 1, |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1440 | #else |
| 1441 | .memtype = MEMTYPE_EBI1, |
| 1442 | .enable_ion = 0, |
| 1443 | #endif |
| 1444 | .disable_dmx = 0, |
| 1445 | .disable_fullhd = 0, |
Mohan Kumar Gubbihalli Lachma Naik | ed9dc91 | 2012-03-01 19:11:14 -0800 | [diff] [blame] | 1446 | .cont_mode_dpb_count = 18, |
Riaz Rahaman | 84f8c68 | 2012-05-30 13:32:10 +0530 | [diff] [blame] | 1447 | .fw_addr = 0x9fe00000, |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1448 | }; |
| 1449 | |
| 1450 | struct platform_device apq8064_msm_device_vidc = { |
| 1451 | .name = "msm_vidc", |
| 1452 | .id = 0, |
| 1453 | .num_resources = ARRAY_SIZE(apq8064_device_vidc_resources), |
| 1454 | .resource = apq8064_device_vidc_resources, |
| 1455 | .dev = { |
| 1456 | .platform_data = &apq8064_vidc_platform_data, |
| 1457 | }, |
| 1458 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1459 | #define MSM_SDC1_BASE 0x12400000 |
| 1460 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 1461 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 1462 | #define MSM_SDC2_BASE 0x12140000 |
| 1463 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 1464 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 1465 | #define MSM_SDC3_BASE 0x12180000 |
| 1466 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 1467 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 1468 | #define MSM_SDC4_BASE 0x121C0000 |
| 1469 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 1470 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 1471 | |
| 1472 | static struct resource resources_sdc1[] = { |
| 1473 | { |
| 1474 | .name = "core_mem", |
| 1475 | .flags = IORESOURCE_MEM, |
| 1476 | .start = MSM_SDC1_BASE, |
| 1477 | .end = MSM_SDC1_DML_BASE - 1, |
| 1478 | }, |
| 1479 | { |
| 1480 | .name = "core_irq", |
| 1481 | .flags = IORESOURCE_IRQ, |
| 1482 | .start = SDC1_IRQ_0, |
| 1483 | .end = SDC1_IRQ_0 |
| 1484 | }, |
| 1485 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1486 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1487 | .name = "dml_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1488 | .start = MSM_SDC1_DML_BASE, |
| 1489 | .end = MSM_SDC1_BAM_BASE - 1, |
| 1490 | .flags = IORESOURCE_MEM, |
| 1491 | }, |
| 1492 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1493 | .name = "bam_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1494 | .start = MSM_SDC1_BAM_BASE, |
| 1495 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 1496 | .flags = IORESOURCE_MEM, |
| 1497 | }, |
| 1498 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1499 | .name = "bam_irq", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1500 | .start = SDC1_BAM_IRQ, |
| 1501 | .end = SDC1_BAM_IRQ, |
| 1502 | .flags = IORESOURCE_IRQ, |
| 1503 | }, |
| 1504 | #endif |
| 1505 | }; |
| 1506 | |
| 1507 | static struct resource resources_sdc2[] = { |
| 1508 | { |
| 1509 | .name = "core_mem", |
| 1510 | .flags = IORESOURCE_MEM, |
| 1511 | .start = MSM_SDC2_BASE, |
| 1512 | .end = MSM_SDC2_DML_BASE - 1, |
| 1513 | }, |
| 1514 | { |
| 1515 | .name = "core_irq", |
| 1516 | .flags = IORESOURCE_IRQ, |
| 1517 | .start = SDC2_IRQ_0, |
| 1518 | .end = SDC2_IRQ_0 |
| 1519 | }, |
| 1520 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1521 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1522 | .name = "dml_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1523 | .start = MSM_SDC2_DML_BASE, |
| 1524 | .end = MSM_SDC2_BAM_BASE - 1, |
| 1525 | .flags = IORESOURCE_MEM, |
| 1526 | }, |
| 1527 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1528 | .name = "bam_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1529 | .start = MSM_SDC2_BAM_BASE, |
| 1530 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 1531 | .flags = IORESOURCE_MEM, |
| 1532 | }, |
| 1533 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1534 | .name = "bam_irq", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1535 | .start = SDC2_BAM_IRQ, |
| 1536 | .end = SDC2_BAM_IRQ, |
| 1537 | .flags = IORESOURCE_IRQ, |
| 1538 | }, |
| 1539 | #endif |
| 1540 | }; |
| 1541 | |
| 1542 | static struct resource resources_sdc3[] = { |
| 1543 | { |
| 1544 | .name = "core_mem", |
| 1545 | .flags = IORESOURCE_MEM, |
| 1546 | .start = MSM_SDC3_BASE, |
| 1547 | .end = MSM_SDC3_DML_BASE - 1, |
| 1548 | }, |
| 1549 | { |
| 1550 | .name = "core_irq", |
| 1551 | .flags = IORESOURCE_IRQ, |
| 1552 | .start = SDC3_IRQ_0, |
| 1553 | .end = SDC3_IRQ_0 |
| 1554 | }, |
| 1555 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1556 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1557 | .name = "dml_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1558 | .start = MSM_SDC3_DML_BASE, |
| 1559 | .end = MSM_SDC3_BAM_BASE - 1, |
| 1560 | .flags = IORESOURCE_MEM, |
| 1561 | }, |
| 1562 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1563 | .name = "bam_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1564 | .start = MSM_SDC3_BAM_BASE, |
| 1565 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 1566 | .flags = IORESOURCE_MEM, |
| 1567 | }, |
| 1568 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1569 | .name = "bam_irq", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1570 | .start = SDC3_BAM_IRQ, |
| 1571 | .end = SDC3_BAM_IRQ, |
| 1572 | .flags = IORESOURCE_IRQ, |
| 1573 | }, |
| 1574 | #endif |
| 1575 | }; |
| 1576 | |
| 1577 | static struct resource resources_sdc4[] = { |
| 1578 | { |
| 1579 | .name = "core_mem", |
| 1580 | .flags = IORESOURCE_MEM, |
| 1581 | .start = MSM_SDC4_BASE, |
| 1582 | .end = MSM_SDC4_DML_BASE - 1, |
| 1583 | }, |
| 1584 | { |
| 1585 | .name = "core_irq", |
| 1586 | .flags = IORESOURCE_IRQ, |
| 1587 | .start = SDC4_IRQ_0, |
| 1588 | .end = SDC4_IRQ_0 |
| 1589 | }, |
| 1590 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 1591 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1592 | .name = "dml_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1593 | .start = MSM_SDC4_DML_BASE, |
| 1594 | .end = MSM_SDC4_BAM_BASE - 1, |
| 1595 | .flags = IORESOURCE_MEM, |
| 1596 | }, |
| 1597 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1598 | .name = "bam_mem", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1599 | .start = MSM_SDC4_BAM_BASE, |
| 1600 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 1601 | .flags = IORESOURCE_MEM, |
| 1602 | }, |
| 1603 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 1604 | .name = "bam_irq", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1605 | .start = SDC4_BAM_IRQ, |
| 1606 | .end = SDC4_BAM_IRQ, |
| 1607 | .flags = IORESOURCE_IRQ, |
| 1608 | }, |
| 1609 | #endif |
| 1610 | }; |
| 1611 | |
| 1612 | struct platform_device apq8064_device_sdc1 = { |
| 1613 | .name = "msm_sdcc", |
| 1614 | .id = 1, |
| 1615 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 1616 | .resource = resources_sdc1, |
| 1617 | .dev = { |
| 1618 | .coherent_dma_mask = 0xffffffff, |
| 1619 | }, |
| 1620 | }; |
| 1621 | |
| 1622 | struct platform_device apq8064_device_sdc2 = { |
| 1623 | .name = "msm_sdcc", |
| 1624 | .id = 2, |
| 1625 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 1626 | .resource = resources_sdc2, |
| 1627 | .dev = { |
| 1628 | .coherent_dma_mask = 0xffffffff, |
| 1629 | }, |
| 1630 | }; |
| 1631 | |
| 1632 | struct platform_device apq8064_device_sdc3 = { |
| 1633 | .name = "msm_sdcc", |
| 1634 | .id = 3, |
| 1635 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 1636 | .resource = resources_sdc3, |
| 1637 | .dev = { |
| 1638 | .coherent_dma_mask = 0xffffffff, |
| 1639 | }, |
| 1640 | }; |
| 1641 | |
| 1642 | struct platform_device apq8064_device_sdc4 = { |
| 1643 | .name = "msm_sdcc", |
| 1644 | .id = 4, |
| 1645 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 1646 | .resource = resources_sdc4, |
| 1647 | .dev = { |
| 1648 | .coherent_dma_mask = 0xffffffff, |
| 1649 | }, |
| 1650 | }; |
| 1651 | |
| 1652 | static struct platform_device *apq8064_sdcc_devices[] __initdata = { |
| 1653 | &apq8064_device_sdc1, |
| 1654 | &apq8064_device_sdc2, |
| 1655 | &apq8064_device_sdc3, |
| 1656 | &apq8064_device_sdc4, |
| 1657 | }; |
| 1658 | |
| 1659 | int __init apq8064_add_sdcc(unsigned int controller, |
| 1660 | struct mmc_platform_data *plat) |
| 1661 | { |
| 1662 | struct platform_device *pdev; |
| 1663 | |
| 1664 | if (!plat) |
| 1665 | return 0; |
| 1666 | if (controller < 1 || controller > 4) |
| 1667 | return -EINVAL; |
| 1668 | |
| 1669 | pdev = apq8064_sdcc_devices[controller-1]; |
| 1670 | pdev->dev.platform_data = plat; |
| 1671 | return platform_device_register(pdev); |
| 1672 | } |
| 1673 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1674 | static struct resource resources_sps[] = { |
| 1675 | { |
| 1676 | .name = "pipe_mem", |
| 1677 | .start = 0x12800000, |
| 1678 | .end = 0x12800000 + 0x4000 - 1, |
| 1679 | .flags = IORESOURCE_MEM, |
| 1680 | }, |
| 1681 | { |
| 1682 | .name = "bamdma_dma", |
| 1683 | .start = 0x12240000, |
| 1684 | .end = 0x12240000 + 0x1000 - 1, |
| 1685 | .flags = IORESOURCE_MEM, |
| 1686 | }, |
| 1687 | { |
| 1688 | .name = "bamdma_bam", |
| 1689 | .start = 0x12244000, |
| 1690 | .end = 0x12244000 + 0x4000 - 1, |
| 1691 | .flags = IORESOURCE_MEM, |
| 1692 | }, |
| 1693 | { |
| 1694 | .name = "bamdma_irq", |
| 1695 | .start = SPS_BAM_DMA_IRQ, |
| 1696 | .end = SPS_BAM_DMA_IRQ, |
| 1697 | .flags = IORESOURCE_IRQ, |
| 1698 | }, |
| 1699 | }; |
| 1700 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1701 | struct platform_device msm_bus_8064_sys_fabric = { |
| 1702 | .name = "msm_bus_fabric", |
| 1703 | .id = MSM_BUS_FAB_SYSTEM, |
| 1704 | }; |
| 1705 | struct platform_device msm_bus_8064_apps_fabric = { |
| 1706 | .name = "msm_bus_fabric", |
| 1707 | .id = MSM_BUS_FAB_APPSS, |
| 1708 | }; |
| 1709 | struct platform_device msm_bus_8064_mm_fabric = { |
| 1710 | .name = "msm_bus_fabric", |
| 1711 | .id = MSM_BUS_FAB_MMSS, |
| 1712 | }; |
| 1713 | struct platform_device msm_bus_8064_sys_fpb = { |
| 1714 | .name = "msm_bus_fabric", |
| 1715 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 1716 | }; |
| 1717 | struct platform_device msm_bus_8064_cpss_fpb = { |
| 1718 | .name = "msm_bus_fabric", |
| 1719 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 1720 | }; |
| 1721 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1722 | static struct msm_sps_platform_data msm_sps_pdata = { |
| 1723 | .bamdma_restricted_pipes = 0x06, |
| 1724 | }; |
| 1725 | |
| 1726 | struct platform_device msm_device_sps_apq8064 = { |
| 1727 | .name = "msm_sps", |
| 1728 | .id = -1, |
| 1729 | .num_resources = ARRAY_SIZE(resources_sps), |
| 1730 | .resource = resources_sps, |
| 1731 | .dev.platform_data = &msm_sps_pdata, |
| 1732 | }; |
| 1733 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1734 | static struct resource smd_resource[] = { |
| 1735 | { |
| 1736 | .name = "a9_m2a_0", |
| 1737 | .start = INT_A9_M2A_0, |
| 1738 | .flags = IORESOURCE_IRQ, |
| 1739 | }, |
| 1740 | { |
| 1741 | .name = "a9_m2a_5", |
| 1742 | .start = INT_A9_M2A_5, |
| 1743 | .flags = IORESOURCE_IRQ, |
| 1744 | }, |
| 1745 | { |
| 1746 | .name = "adsp_a11", |
| 1747 | .start = INT_ADSP_A11, |
| 1748 | .flags = IORESOURCE_IRQ, |
| 1749 | }, |
| 1750 | { |
| 1751 | .name = "adsp_a11_smsm", |
| 1752 | .start = INT_ADSP_A11_SMSM, |
| 1753 | .flags = IORESOURCE_IRQ, |
| 1754 | }, |
| 1755 | { |
| 1756 | .name = "dsps_a11", |
| 1757 | .start = INT_DSPS_A11, |
| 1758 | .flags = IORESOURCE_IRQ, |
| 1759 | }, |
| 1760 | { |
| 1761 | .name = "dsps_a11_smsm", |
| 1762 | .start = INT_DSPS_A11_SMSM, |
| 1763 | .flags = IORESOURCE_IRQ, |
| 1764 | }, |
| 1765 | { |
| 1766 | .name = "wcnss_a11", |
| 1767 | .start = INT_WCNSS_A11, |
| 1768 | .flags = IORESOURCE_IRQ, |
| 1769 | }, |
| 1770 | { |
| 1771 | .name = "wcnss_a11_smsm", |
| 1772 | .start = INT_WCNSS_A11_SMSM, |
| 1773 | .flags = IORESOURCE_IRQ, |
| 1774 | }, |
| 1775 | }; |
| 1776 | |
| 1777 | static struct smd_subsystem_config smd_config_list[] = { |
| 1778 | { |
| 1779 | .irq_config_id = SMD_MODEM, |
| 1780 | .subsys_name = "gss", |
| 1781 | .edge = SMD_APPS_MODEM, |
| 1782 | |
| 1783 | .smd_int.irq_name = "a9_m2a_0", |
| 1784 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1785 | .smd_int.irq_id = -1, |
| 1786 | .smd_int.device_name = "smd_dev", |
| 1787 | .smd_int.dev_id = 0, |
| 1788 | .smd_int.out_bit_pos = 1 << 3, |
| 1789 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1790 | .smd_int.out_offset = 0x8, |
| 1791 | |
| 1792 | .smsm_int.irq_name = "a9_m2a_5", |
| 1793 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1794 | .smsm_int.irq_id = -1, |
| 1795 | .smsm_int.device_name = "smd_smsm", |
| 1796 | .smsm_int.dev_id = 0, |
| 1797 | .smsm_int.out_bit_pos = 1 << 4, |
| 1798 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1799 | .smsm_int.out_offset = 0x8, |
| 1800 | }, |
| 1801 | { |
| 1802 | .irq_config_id = SMD_Q6, |
| 1803 | .subsys_name = "q6", |
| 1804 | .edge = SMD_APPS_QDSP, |
| 1805 | |
| 1806 | .smd_int.irq_name = "adsp_a11", |
| 1807 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1808 | .smd_int.irq_id = -1, |
| 1809 | .smd_int.device_name = "smd_dev", |
| 1810 | .smd_int.dev_id = 0, |
| 1811 | .smd_int.out_bit_pos = 1 << 15, |
| 1812 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1813 | .smd_int.out_offset = 0x8, |
| 1814 | |
| 1815 | .smsm_int.irq_name = "adsp_a11_smsm", |
| 1816 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1817 | .smsm_int.irq_id = -1, |
| 1818 | .smsm_int.device_name = "smd_smsm", |
| 1819 | .smsm_int.dev_id = 0, |
| 1820 | .smsm_int.out_bit_pos = 1 << 14, |
| 1821 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1822 | .smsm_int.out_offset = 0x8, |
| 1823 | }, |
| 1824 | { |
| 1825 | .irq_config_id = SMD_DSPS, |
| 1826 | .subsys_name = "dsps", |
| 1827 | .edge = SMD_APPS_DSPS, |
| 1828 | |
| 1829 | .smd_int.irq_name = "dsps_a11", |
| 1830 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1831 | .smd_int.irq_id = -1, |
| 1832 | .smd_int.device_name = "smd_dev", |
| 1833 | .smd_int.dev_id = 0, |
| 1834 | .smd_int.out_bit_pos = 1, |
| 1835 | .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1836 | .smd_int.out_offset = 0x4080, |
| 1837 | |
| 1838 | .smsm_int.irq_name = "dsps_a11_smsm", |
| 1839 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1840 | .smsm_int.irq_id = -1, |
| 1841 | .smsm_int.device_name = "smd_smsm", |
| 1842 | .smsm_int.dev_id = 0, |
| 1843 | .smsm_int.out_bit_pos = 1, |
| 1844 | .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE, |
| 1845 | .smsm_int.out_offset = 0x4094, |
| 1846 | }, |
| 1847 | { |
| 1848 | .irq_config_id = SMD_WCNSS, |
| 1849 | .subsys_name = "wcnss", |
| 1850 | .edge = SMD_APPS_WCNSS, |
| 1851 | |
| 1852 | .smd_int.irq_name = "wcnss_a11", |
| 1853 | .smd_int.flags = IRQF_TRIGGER_RISING, |
| 1854 | .smd_int.irq_id = -1, |
| 1855 | .smd_int.device_name = "smd_dev", |
| 1856 | .smd_int.dev_id = 0, |
| 1857 | .smd_int.out_bit_pos = 1 << 25, |
| 1858 | .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1859 | .smd_int.out_offset = 0x8, |
| 1860 | |
| 1861 | .smsm_int.irq_name = "wcnss_a11_smsm", |
| 1862 | .smsm_int.flags = IRQF_TRIGGER_RISING, |
| 1863 | .smsm_int.irq_id = -1, |
| 1864 | .smsm_int.device_name = "smd_smsm", |
| 1865 | .smsm_int.dev_id = 0, |
| 1866 | .smsm_int.out_bit_pos = 1 << 23, |
| 1867 | .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE, |
| 1868 | .smsm_int.out_offset = 0x8, |
| 1869 | }, |
| 1870 | }; |
| 1871 | |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1872 | static struct smd_subsystem_restart_config smd_ssr_config = { |
| 1873 | .disable_smsm_reset_handshake = 1, |
| 1874 | }; |
| 1875 | |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1876 | static struct smd_platform smd_platform_data = { |
| 1877 | .num_ss_configs = ARRAY_SIZE(smd_config_list), |
| 1878 | .smd_ss_configs = smd_config_list, |
Eric Holmberg | 2bb6ccd | 2012-03-13 13:05:14 -0600 | [diff] [blame] | 1879 | .smd_ssr_config = &smd_ssr_config, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1880 | }; |
| 1881 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1882 | struct platform_device msm_device_smd_apq8064 = { |
| 1883 | .name = "msm_smd", |
| 1884 | .id = -1, |
Eric Holmberg | 023d25c | 2012-03-01 12:27:55 -0700 | [diff] [blame] | 1885 | .resource = smd_resource, |
| 1886 | .num_resources = ARRAY_SIZE(smd_resource), |
| 1887 | .dev = { |
| 1888 | .platform_data = &smd_platform_data, |
| 1889 | }, |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1890 | }; |
| 1891 | |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 1892 | static struct resource resources_msm_pcie[] = { |
| 1893 | { |
Niranjana Vishwanathapura | 68210ff | 2012-06-24 18:03:49 -0600 | [diff] [blame] | 1894 | .name = "pcie_parf", |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 1895 | .start = PCIE20_PARF_PHYS, |
| 1896 | .end = PCIE20_PARF_PHYS + PCIE20_PARF_SIZE - 1, |
| 1897 | .flags = IORESOURCE_MEM, |
| 1898 | }, |
| 1899 | { |
Niranjana Vishwanathapura | 68210ff | 2012-06-24 18:03:49 -0600 | [diff] [blame] | 1900 | .name = "pcie_elbi", |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 1901 | .start = PCIE20_ELBI_PHYS, |
| 1902 | .end = PCIE20_ELBI_PHYS + PCIE20_ELBI_SIZE - 1, |
| 1903 | .flags = IORESOURCE_MEM, |
| 1904 | }, |
| 1905 | { |
| 1906 | .name = "pcie20", |
| 1907 | .start = PCIE20_PHYS, |
| 1908 | .end = PCIE20_PHYS + PCIE20_SIZE - 1, |
| 1909 | .flags = IORESOURCE_MEM, |
| 1910 | }, |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 1911 | }; |
| 1912 | |
| 1913 | struct platform_device msm_device_pcie = { |
| 1914 | .name = "msm_pcie", |
| 1915 | .id = -1, |
| 1916 | .num_resources = ARRAY_SIZE(resources_msm_pcie), |
| 1917 | .resource = resources_msm_pcie, |
| 1918 | }; |
| 1919 | |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1920 | #ifdef CONFIG_HW_RANDOM_MSM |
| 1921 | /* PRNG device */ |
| 1922 | #define MSM_PRNG_PHYS 0x1A500000 |
| 1923 | static struct resource rng_resources = { |
| 1924 | .flags = IORESOURCE_MEM, |
| 1925 | .start = MSM_PRNG_PHYS, |
| 1926 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 1927 | }; |
| 1928 | |
| 1929 | struct platform_device apq8064_device_rng = { |
| 1930 | .name = "msm_rng", |
| 1931 | .id = 0, |
| 1932 | .num_resources = 1, |
| 1933 | .resource = &rng_resources, |
| 1934 | }; |
| 1935 | #endif |
| 1936 | |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1937 | static struct resource msm_gss_resources[] = { |
| 1938 | { |
| 1939 | .start = 0x10000000, |
| 1940 | .end = 0x10000000 + SZ_256 - 1, |
| 1941 | .flags = IORESOURCE_MEM, |
| 1942 | }, |
Matt Wagantall | 19ac4fd | 2012-02-03 20:18:23 -0800 | [diff] [blame] | 1943 | { |
| 1944 | .start = 0x10008000, |
| 1945 | .end = 0x10008000 + SZ_256 - 1, |
| 1946 | .flags = IORESOURCE_MEM, |
| 1947 | }, |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1948 | }; |
| 1949 | |
| 1950 | struct platform_device msm_gss = { |
| 1951 | .name = "pil_gss", |
| 1952 | .id = -1, |
| 1953 | .num_resources = ARRAY_SIZE(msm_gss_resources), |
| 1954 | .resource = msm_gss_resources, |
| 1955 | }; |
| 1956 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 1957 | static struct fs_driver_data gfx3d_fs_data = { |
| 1958 | .clks = (struct fs_clk_data[]){ |
| 1959 | { .name = "core_clk", .reset_rate = 27000000 }, |
| 1960 | { .name = "iface_clk" }, |
| 1961 | { .name = "bus_clk" }, |
| 1962 | { 0 } |
| 1963 | }, |
| 1964 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1965 | .bus_port1 = MSM_BUS_MASTER_GRAPHICS_3D_PORT1, |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 1966 | }; |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 1967 | |
| 1968 | static struct fs_driver_data ijpeg_fs_data = { |
| 1969 | .clks = (struct fs_clk_data[]){ |
| 1970 | { .name = "core_clk" }, |
| 1971 | { .name = "iface_clk" }, |
| 1972 | { .name = "bus_clk" }, |
| 1973 | { 0 } |
| 1974 | }, |
| 1975 | .bus_port0 = MSM_BUS_MASTER_JPEG_ENC, |
| 1976 | }; |
| 1977 | |
Nagamalleswararao Ganji | 6db8c51 | 2012-05-24 20:26:23 -0700 | [diff] [blame] | 1978 | static struct fs_driver_data mdp_fs_data = { |
| 1979 | .clks = (struct fs_clk_data[]){ |
| 1980 | { .name = "core_clk" }, |
| 1981 | { .name = "iface_clk" }, |
| 1982 | { .name = "bus_clk" }, |
| 1983 | { .name = "vsync_clk" }, |
| 1984 | { .name = "lut_clk" }, |
| 1985 | { .name = "tv_src_clk" }, |
| 1986 | { .name = "tv_clk" }, |
Matt Wagantall | c33c1ed | 2012-07-23 17:19:08 -0700 | [diff] [blame] | 1987 | { .name = "reset1_clk" }, |
| 1988 | { .name = "reset2_clk" }, |
Nagamalleswararao Ganji | 6db8c51 | 2012-05-24 20:26:23 -0700 | [diff] [blame] | 1989 | { 0 } |
| 1990 | }, |
| 1991 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 1992 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 1993 | }; |
| 1994 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 1995 | static struct fs_driver_data rot_fs_data = { |
| 1996 | .clks = (struct fs_clk_data[]){ |
| 1997 | { .name = "core_clk" }, |
| 1998 | { .name = "iface_clk" }, |
| 1999 | { .name = "bus_clk" }, |
| 2000 | { 0 } |
| 2001 | }, |
| 2002 | .bus_port0 = MSM_BUS_MASTER_ROTATOR, |
| 2003 | }; |
| 2004 | |
| 2005 | static struct fs_driver_data ved_fs_data = { |
| 2006 | .clks = (struct fs_clk_data[]){ |
| 2007 | { .name = "core_clk" }, |
| 2008 | { .name = "iface_clk" }, |
| 2009 | { .name = "bus_clk" }, |
| 2010 | { 0 } |
| 2011 | }, |
| 2012 | .bus_port0 = MSM_BUS_MASTER_VIDEO_ENC, |
| 2013 | .bus_port1 = MSM_BUS_MASTER_VIDEO_DEC, |
| 2014 | }; |
| 2015 | |
| 2016 | static struct fs_driver_data vfe_fs_data = { |
| 2017 | .clks = (struct fs_clk_data[]){ |
| 2018 | { .name = "core_clk" }, |
| 2019 | { .name = "iface_clk" }, |
| 2020 | { .name = "bus_clk" }, |
| 2021 | { 0 } |
| 2022 | }, |
| 2023 | .bus_port0 = MSM_BUS_MASTER_VFE, |
| 2024 | }; |
| 2025 | |
| 2026 | static struct fs_driver_data vpe_fs_data = { |
| 2027 | .clks = (struct fs_clk_data[]){ |
| 2028 | { .name = "core_clk" }, |
| 2029 | { .name = "iface_clk" }, |
| 2030 | { .name = "bus_clk" }, |
| 2031 | { 0 } |
| 2032 | }, |
| 2033 | .bus_port0 = MSM_BUS_MASTER_VPE, |
| 2034 | }; |
| 2035 | |
| 2036 | static struct fs_driver_data vcap_fs_data = { |
| 2037 | .clks = (struct fs_clk_data[]){ |
| 2038 | { .name = "core_clk" }, |
| 2039 | { .name = "iface_clk" }, |
| 2040 | { .name = "bus_clk" }, |
| 2041 | { 0 }, |
| 2042 | }, |
| 2043 | .bus_port0 = MSM_BUS_MASTER_VIDEO_CAP, |
| 2044 | }; |
| 2045 | |
| 2046 | struct platform_device *apq8064_footswitch[] __initdata = { |
Nagamalleswararao Ganji | 6db8c51 | 2012-05-24 20:26:23 -0700 | [diff] [blame] | 2047 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data), |
Matt Wagantall | 316f2fc | 2012-05-03 20:41:42 -0700 | [diff] [blame] | 2048 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
Matt Wagantall | e4454b8 | 2012-05-03 20:48:01 -0700 | [diff] [blame] | 2049 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
Kiran Kumar H N | fa18a03 | 2012-06-25 14:34:18 -0700 | [diff] [blame] | 2050 | FS_8X60(FS_VFE, "vdd", "msm_vfe.0", &vfe_fs_data), |
| 2051 | FS_8X60(FS_VPE, "vdd", "msm_vpe.0", &vpe_fs_data), |
Matt Wagantall | d6fbf23 | 2012-05-03 20:09:28 -0700 | [diff] [blame] | 2052 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
Matt Wagantall | 5e46aac | 2012-05-03 20:20:18 -0700 | [diff] [blame] | 2053 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
Matt Wagantall | 3cd5b3d | 2012-05-03 20:35:20 -0700 | [diff] [blame] | 2054 | FS_8X60(FS_VCAP, "vdd", "msm_vcap.0", &vcap_fs_data), |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 2055 | }; |
| 2056 | unsigned apq8064_num_footswitch __initdata = ARRAY_SIZE(apq8064_footswitch); |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 2057 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2058 | struct msm_rpm_platform_data apq8064_rpm_data __initdata = { |
| 2059 | .reg_base_addrs = { |
| 2060 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 2061 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 2062 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 2063 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 2064 | }, |
| 2065 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 2066 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 2067 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2068 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 2069 | .ipc_rpm_val = 4, |
| 2070 | .target_id = { |
| 2071 | MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 2072 | MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 2073 | MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8), |
| 2074 | MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 2075 | MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 2076 | MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1), |
| 2077 | MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1), |
| 2078 | MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1), |
| 2079 | MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 2080 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 2081 | MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 2082 | MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 2083 | MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1), |
| 2084 | MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1), |
| 2085 | MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1), |
| 2086 | MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1), |
| 2087 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0, |
| 2088 | APPS_FABRIC_CFG_HALT, 2), |
| 2089 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0, |
| 2090 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 2091 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL, |
| 2092 | APPS_FABRIC_CFG_IOCTL, 1), |
| 2093 | MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 2094 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0, |
| 2095 | SYS_FABRIC_CFG_HALT, 2), |
| 2096 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0, |
| 2097 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 2098 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL, |
| 2099 | SYS_FABRIC_CFG_IOCTL, 1), |
| 2100 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30), |
| 2101 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0, |
| 2102 | MMSS_FABRIC_CFG_HALT, 2), |
| 2103 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0, |
| 2104 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 2105 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL, |
| 2106 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 2107 | MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21), |
| 2108 | MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2), |
| 2109 | MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2), |
| 2110 | MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2), |
| 2111 | MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2), |
| 2112 | MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2), |
| 2113 | MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2), |
| 2114 | MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2), |
| 2115 | MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2), |
| 2116 | MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2), |
| 2117 | MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2), |
| 2118 | MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2), |
| 2119 | MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2), |
| 2120 | MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2), |
| 2121 | MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2), |
| 2122 | MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2), |
| 2123 | MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2), |
| 2124 | MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2), |
| 2125 | MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2), |
| 2126 | MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2), |
| 2127 | MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2), |
| 2128 | MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2), |
| 2129 | MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2), |
| 2130 | MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2), |
| 2131 | MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2), |
| 2132 | MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2), |
| 2133 | MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2), |
| 2134 | MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2), |
| 2135 | MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2), |
| 2136 | MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2), |
| 2137 | MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2), |
| 2138 | MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2), |
| 2139 | MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2), |
| 2140 | MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2), |
| 2141 | MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2), |
| 2142 | MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2), |
| 2143 | MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2), |
| 2144 | MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2), |
| 2145 | MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 2146 | MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 2147 | MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1), |
| 2148 | MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1), |
| 2149 | MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1), |
| 2150 | MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1), |
| 2151 | MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1), |
| 2152 | MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1), |
| 2153 | MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1), |
| 2154 | MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2), |
| 2155 | MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2), |
| 2156 | MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2), |
| 2157 | MSM_RPM_MAP(8064, NCP_0, NCP, 2), |
| 2158 | MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 2159 | MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 2160 | MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 2161 | MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2), |
| 2162 | MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1), |
Joel King | ef39084 | 2012-05-23 16:42:48 -0700 | [diff] [blame] | 2163 | MSM_RPM_MAP(8064, VDDMIN_GPIO, VDDMIN_GPIO, 1), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2164 | }, |
| 2165 | .target_status = { |
| 2166 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR), |
| 2167 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR), |
| 2168 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD), |
| 2169 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0), |
| 2170 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1), |
| 2171 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2), |
| 2172 | MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0), |
| 2173 | MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE), |
| 2174 | MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL), |
| 2175 | MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK), |
| 2176 | MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK), |
| 2177 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK), |
| 2178 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK), |
| 2179 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK), |
| 2180 | MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK), |
| 2181 | MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK), |
| 2182 | MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK), |
| 2183 | MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK), |
| 2184 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK), |
| 2185 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT), |
| 2186 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD), |
| 2187 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL), |
| 2188 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB), |
| 2189 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT), |
| 2190 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD), |
| 2191 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL), |
| 2192 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB), |
| 2193 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT), |
| 2194 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD), |
| 2195 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL), |
| 2196 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB), |
| 2197 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0), |
| 2198 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1), |
| 2199 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0), |
| 2200 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1), |
| 2201 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0), |
| 2202 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1), |
| 2203 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0), |
| 2204 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1), |
| 2205 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0), |
| 2206 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1), |
| 2207 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0), |
| 2208 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1), |
| 2209 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0), |
| 2210 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1), |
| 2211 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0), |
| 2212 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1), |
| 2213 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0), |
| 2214 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1), |
| 2215 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0), |
| 2216 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1), |
| 2217 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0), |
| 2218 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1), |
| 2219 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0), |
| 2220 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1), |
| 2221 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0), |
| 2222 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1), |
| 2223 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0), |
| 2224 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1), |
| 2225 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0), |
| 2226 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1), |
| 2227 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0), |
| 2228 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1), |
| 2229 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0), |
| 2230 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1), |
| 2231 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0), |
| 2232 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1), |
| 2233 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0), |
| 2234 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1), |
| 2235 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0), |
| 2236 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1), |
| 2237 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0), |
| 2238 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1), |
| 2239 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0), |
| 2240 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1), |
| 2241 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0), |
| 2242 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1), |
| 2243 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0), |
| 2244 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1), |
| 2245 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0), |
| 2246 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1), |
| 2247 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0), |
| 2248 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1), |
| 2249 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0), |
| 2250 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1), |
| 2251 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0), |
| 2252 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1), |
| 2253 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0), |
| 2254 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1), |
| 2255 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0), |
| 2256 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1), |
| 2257 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0), |
| 2258 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1), |
| 2259 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0), |
| 2260 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1), |
| 2261 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0), |
| 2262 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1), |
| 2263 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0), |
| 2264 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1), |
| 2265 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0), |
| 2266 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1), |
| 2267 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0), |
| 2268 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1), |
| 2269 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0), |
| 2270 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1), |
| 2271 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0), |
| 2272 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1), |
| 2273 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0), |
| 2274 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1), |
| 2275 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1), |
| 2276 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2), |
| 2277 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3), |
| 2278 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4), |
| 2279 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5), |
| 2280 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6), |
| 2281 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7), |
| 2282 | MSM_RPM_STATUS_ID_MAP(8064, NCP_0), |
| 2283 | MSM_RPM_STATUS_ID_MAP(8064, NCP_1), |
| 2284 | MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS), |
| 2285 | MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH), |
| 2286 | MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH), |
| 2287 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0), |
| 2288 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1), |
| 2289 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE), |
| 2290 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE), |
| 2291 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0), |
| 2292 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1), |
| 2293 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0), |
| 2294 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1), |
| 2295 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0), |
| 2296 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1), |
Joel King | ef39084 | 2012-05-23 16:42:48 -0700 | [diff] [blame] | 2297 | MSM_RPM_STATUS_ID_MAP(8064, VDDMIN_GPIO), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2298 | }, |
| 2299 | .target_ctrl_id = { |
| 2300 | MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR), |
| 2301 | MSM_RPM_CTRL_MAP(8064, VERSION_MINOR), |
| 2302 | MSM_RPM_CTRL_MAP(8064, VERSION_BUILD), |
| 2303 | MSM_RPM_CTRL_MAP(8064, REQ_CTX_0), |
| 2304 | MSM_RPM_CTRL_MAP(8064, REQ_SEL_0), |
| 2305 | MSM_RPM_CTRL_MAP(8064, ACK_CTX_0), |
| 2306 | MSM_RPM_CTRL_MAP(8064, ACK_SEL_0), |
| 2307 | }, |
| 2308 | .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE, |
| 2309 | .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION, |
| 2310 | .sel_last = MSM_RPM_8064_SEL_LAST, |
| 2311 | .ver = {3, 0, 0}, |
| 2312 | }; |
| 2313 | |
| 2314 | struct platform_device apq8064_rpm_device = { |
| 2315 | .name = "msm_rpm", |
| 2316 | .id = -1, |
| 2317 | }; |
| 2318 | |
| 2319 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
Anji Jonnala | 660b4e4 | 2012-09-18 19:20:21 +0530 | [diff] [blame] | 2320 | .phys_addr_base = 0x0010DD04, |
| 2321 | .phys_size = SZ_256, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2322 | }; |
| 2323 | |
| 2324 | struct platform_device apq8064_rpm_stat_device = { |
| 2325 | .name = "msm_rpm_stat", |
| 2326 | .id = -1, |
| 2327 | .dev = { |
| 2328 | .platform_data = &msm_rpm_stat_pdata, |
| 2329 | }, |
| 2330 | }; |
| 2331 | |
| 2332 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 2333 | .phys_addr_base = 0x0010C000, |
| 2334 | .reg_offsets = { |
| 2335 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 2336 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 2337 | }, |
| 2338 | .phys_size = SZ_8K, |
| 2339 | .log_len = 4096, /* log's buffer length in bytes */ |
| 2340 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 2341 | }; |
| 2342 | |
| 2343 | struct platform_device apq8064_rpm_log_device = { |
| 2344 | .name = "msm_rpm_log", |
| 2345 | .id = -1, |
| 2346 | .dev = { |
| 2347 | .platform_data = &msm_rpm_log_pdata, |
| 2348 | }, |
| 2349 | }; |
| 2350 | |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2351 | /* Sensors DSPS platform data */ |
| 2352 | |
karthik karuppasamy | 1a1c6b0 | 2012-05-29 15:16:32 -0700 | [diff] [blame] | 2353 | #define PPSS_DSPS_TCM_CODE_BASE 0x12000000 |
| 2354 | #define PPSS_DSPS_TCM_CODE_SIZE 0x28000 |
| 2355 | #define PPSS_DSPS_TCM_BUF_BASE 0x12040000 |
| 2356 | #define PPSS_DSPS_TCM_BUF_SIZE 0x4000 |
| 2357 | #define PPSS_DSPS_PIPE_BASE 0x12800000 |
| 2358 | #define PPSS_DSPS_PIPE_SIZE 0x4000 |
| 2359 | #define PPSS_DSPS_DDR_BASE 0x8fe00000 |
| 2360 | #define PPSS_DSPS_DDR_SIZE 0x100000 |
| 2361 | #define PPSS_SMEM_BASE 0x80000000 |
| 2362 | #define PPSS_SMEM_SIZE 0x200000 |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2363 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 2364 | |
| 2365 | static struct dsps_clk_info dsps_clks[] = {}; |
| 2366 | static struct dsps_regulator_info dsps_regs[] = {}; |
| 2367 | |
| 2368 | /* |
| 2369 | * Note: GPIOs field is intialized in run-time at the function |
| 2370 | * apq8064_init_dsps(). |
| 2371 | */ |
| 2372 | |
| 2373 | struct msm_dsps_platform_data msm_dsps_pdata_8064 = { |
| 2374 | .clks = dsps_clks, |
| 2375 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 2376 | .gpios = NULL, |
| 2377 | .gpios_num = 0, |
| 2378 | .regs = dsps_regs, |
| 2379 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 2380 | .dsps_pwr_ctl_en = 1, |
karthik karuppasamy | 1a1c6b0 | 2012-05-29 15:16:32 -0700 | [diff] [blame] | 2381 | .tcm_code_start = PPSS_DSPS_TCM_CODE_BASE, |
| 2382 | .tcm_code_size = PPSS_DSPS_TCM_CODE_SIZE, |
| 2383 | .tcm_buf_start = PPSS_DSPS_TCM_BUF_BASE, |
| 2384 | .tcm_buf_size = PPSS_DSPS_TCM_BUF_SIZE, |
| 2385 | .pipe_start = PPSS_DSPS_PIPE_BASE, |
| 2386 | .pipe_size = PPSS_DSPS_PIPE_SIZE, |
| 2387 | .ddr_start = PPSS_DSPS_DDR_BASE, |
| 2388 | .ddr_size = PPSS_DSPS_DDR_SIZE, |
| 2389 | .smem_start = PPSS_SMEM_BASE, |
| 2390 | .smem_size = PPSS_SMEM_SIZE, |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2391 | .signature = DSPS_SIGNATURE, |
| 2392 | }; |
| 2393 | |
| 2394 | static struct resource msm_dsps_resources[] = { |
| 2395 | { |
| 2396 | .start = PPSS_REG_PHYS_BASE, |
| 2397 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 2398 | .name = "ppss_reg", |
| 2399 | .flags = IORESOURCE_MEM, |
| 2400 | }, |
| 2401 | |
| 2402 | { |
| 2403 | .start = PPSS_WDOG_TIMER_IRQ, |
| 2404 | .end = PPSS_WDOG_TIMER_IRQ, |
| 2405 | .name = "ppss_wdog", |
| 2406 | .flags = IORESOURCE_IRQ, |
| 2407 | }, |
| 2408 | }; |
| 2409 | |
| 2410 | struct platform_device msm_dsps_device_8064 = { |
| 2411 | .name = "msm_dsps", |
| 2412 | .id = 0, |
| 2413 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 2414 | .resource = msm_dsps_resources, |
| 2415 | .dev.platform_data = &msm_dsps_pdata_8064, |
| 2416 | }; |
| 2417 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2418 | #ifdef CONFIG_MSM_MPM |
| 2419 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
| 2420 | [1] = MSM_GPIO_TO_INT(26), |
| 2421 | [2] = MSM_GPIO_TO_INT(88), |
| 2422 | [4] = MSM_GPIO_TO_INT(73), |
| 2423 | [5] = MSM_GPIO_TO_INT(74), |
| 2424 | [6] = MSM_GPIO_TO_INT(75), |
| 2425 | [7] = MSM_GPIO_TO_INT(76), |
| 2426 | [8] = MSM_GPIO_TO_INT(77), |
| 2427 | [9] = MSM_GPIO_TO_INT(36), |
| 2428 | [10] = MSM_GPIO_TO_INT(84), |
| 2429 | [11] = MSM_GPIO_TO_INT(7), |
| 2430 | [12] = MSM_GPIO_TO_INT(11), |
| 2431 | [13] = MSM_GPIO_TO_INT(52), |
| 2432 | [14] = MSM_GPIO_TO_INT(15), |
| 2433 | [15] = MSM_GPIO_TO_INT(83), |
| 2434 | [16] = USB3_HS_IRQ, |
| 2435 | [19] = MSM_GPIO_TO_INT(61), |
| 2436 | [20] = MSM_GPIO_TO_INT(58), |
| 2437 | [23] = MSM_GPIO_TO_INT(65), |
| 2438 | [24] = MSM_GPIO_TO_INT(63), |
| 2439 | [25] = USB1_HS_IRQ, |
| 2440 | [27] = HDMI_IRQ, |
| 2441 | [29] = MSM_GPIO_TO_INT(22), |
| 2442 | [30] = MSM_GPIO_TO_INT(72), |
| 2443 | [31] = USB4_HS_IRQ, |
| 2444 | [33] = MSM_GPIO_TO_INT(44), |
| 2445 | [34] = MSM_GPIO_TO_INT(39), |
| 2446 | [35] = MSM_GPIO_TO_INT(19), |
| 2447 | [36] = MSM_GPIO_TO_INT(23), |
| 2448 | [37] = MSM_GPIO_TO_INT(41), |
| 2449 | [38] = MSM_GPIO_TO_INT(30), |
| 2450 | [41] = MSM_GPIO_TO_INT(42), |
| 2451 | [42] = MSM_GPIO_TO_INT(56), |
| 2452 | [43] = MSM_GPIO_TO_INT(55), |
| 2453 | [44] = MSM_GPIO_TO_INT(50), |
| 2454 | [45] = MSM_GPIO_TO_INT(49), |
| 2455 | [46] = MSM_GPIO_TO_INT(47), |
| 2456 | [47] = MSM_GPIO_TO_INT(45), |
| 2457 | [48] = MSM_GPIO_TO_INT(38), |
| 2458 | [49] = MSM_GPIO_TO_INT(34), |
| 2459 | [50] = MSM_GPIO_TO_INT(32), |
| 2460 | [51] = MSM_GPIO_TO_INT(29), |
| 2461 | [52] = MSM_GPIO_TO_INT(18), |
| 2462 | [53] = MSM_GPIO_TO_INT(10), |
| 2463 | [54] = MSM_GPIO_TO_INT(81), |
| 2464 | [55] = MSM_GPIO_TO_INT(6), |
| 2465 | }; |
| 2466 | |
| 2467 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
| 2468 | TLMM_MSM_SUMMARY_IRQ, |
| 2469 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 2470 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 2471 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 2472 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 2473 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 2474 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 2475 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 2476 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 2477 | MSS_TO_APPS_IRQ_0, |
| 2478 | MSS_TO_APPS_IRQ_1, |
| 2479 | MSS_TO_APPS_IRQ_2, |
| 2480 | MSS_TO_APPS_IRQ_3, |
| 2481 | MSS_TO_APPS_IRQ_4, |
| 2482 | MSS_TO_APPS_IRQ_5, |
| 2483 | MSS_TO_APPS_IRQ_6, |
| 2484 | MSS_TO_APPS_IRQ_7, |
| 2485 | MSS_TO_APPS_IRQ_8, |
| 2486 | MSS_TO_APPS_IRQ_9, |
| 2487 | LPASS_SCSS_GP_LOW_IRQ, |
| 2488 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 2489 | LPASS_SCSS_GP_HIGH_IRQ, |
| 2490 | SPS_MTI_30, |
| 2491 | SPS_MTI_31, |
| 2492 | RIVA_APSS_SPARE_IRQ, |
| 2493 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 2494 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 2495 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
Chandra Ramachandran | 5985172 | 2012-07-23 11:19:48 -0700 | [diff] [blame] | 2496 | PM8821_SEC_IRQ_N, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2497 | }; |
| 2498 | |
| 2499 | struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = { |
| 2500 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 2501 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 2502 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 2503 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 2504 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 2505 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 2506 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 2507 | .mpm_apps_ipc_val = BIT(1), |
| 2508 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 2509 | |
| 2510 | }; |
| 2511 | #endif |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2512 | |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 2513 | /* AP2MDM_SOFT_RESET is implemented by the PON_RESET_N gpio */ |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2514 | #define MDM2AP_ERRFATAL 19 |
| 2515 | #define AP2MDM_ERRFATAL 18 |
| 2516 | #define MDM2AP_STATUS 49 |
| 2517 | #define AP2MDM_STATUS 48 |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 2518 | #define AP2MDM_SOFT_RESET 27 |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 2519 | #define I2S_AP2MDM_SOFT_RESET 0 |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 2520 | #define AP2MDM_WAKEUP 35 |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 2521 | #define I2S_AP2MDM_WAKEUP 44 |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 2522 | #define MDM2AP_PBLRDY 46 |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 2523 | #define I2S_MDM2AP_PBLRDY 81 |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2524 | |
| 2525 | static struct resource mdm_resources[] = { |
| 2526 | { |
| 2527 | .start = MDM2AP_ERRFATAL, |
| 2528 | .end = MDM2AP_ERRFATAL, |
| 2529 | .name = "MDM2AP_ERRFATAL", |
| 2530 | .flags = IORESOURCE_IO, |
| 2531 | }, |
| 2532 | { |
| 2533 | .start = AP2MDM_ERRFATAL, |
| 2534 | .end = AP2MDM_ERRFATAL, |
| 2535 | .name = "AP2MDM_ERRFATAL", |
| 2536 | .flags = IORESOURCE_IO, |
| 2537 | }, |
| 2538 | { |
| 2539 | .start = MDM2AP_STATUS, |
| 2540 | .end = MDM2AP_STATUS, |
| 2541 | .name = "MDM2AP_STATUS", |
| 2542 | .flags = IORESOURCE_IO, |
| 2543 | }, |
| 2544 | { |
| 2545 | .start = AP2MDM_STATUS, |
| 2546 | .end = AP2MDM_STATUS, |
| 2547 | .name = "AP2MDM_STATUS", |
| 2548 | .flags = IORESOURCE_IO, |
| 2549 | }, |
| 2550 | { |
Joel King | 14fe7fa | 2012-05-27 14:26:11 -0700 | [diff] [blame] | 2551 | .start = AP2MDM_SOFT_RESET, |
| 2552 | .end = AP2MDM_SOFT_RESET, |
| 2553 | .name = "AP2MDM_SOFT_RESET", |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2554 | .flags = IORESOURCE_IO, |
| 2555 | }, |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 2556 | { |
| 2557 | .start = AP2MDM_WAKEUP, |
| 2558 | .end = AP2MDM_WAKEUP, |
| 2559 | .name = "AP2MDM_WAKEUP", |
| 2560 | .flags = IORESOURCE_IO, |
| 2561 | }, |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 2562 | { |
| 2563 | .start = MDM2AP_PBLRDY, |
| 2564 | .end = MDM2AP_PBLRDY, |
| 2565 | .name = "MDM2AP_PBLRDY", |
| 2566 | .flags = IORESOURCE_IO, |
| 2567 | }, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2568 | }; |
| 2569 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 2570 | static struct resource i2s_mdm_resources[] = { |
| 2571 | { |
| 2572 | .start = MDM2AP_ERRFATAL, |
| 2573 | .end = MDM2AP_ERRFATAL, |
| 2574 | .name = "MDM2AP_ERRFATAL", |
| 2575 | .flags = IORESOURCE_IO, |
| 2576 | }, |
| 2577 | { |
| 2578 | .start = AP2MDM_ERRFATAL, |
| 2579 | .end = AP2MDM_ERRFATAL, |
| 2580 | .name = "AP2MDM_ERRFATAL", |
| 2581 | .flags = IORESOURCE_IO, |
| 2582 | }, |
| 2583 | { |
| 2584 | .start = MDM2AP_STATUS, |
| 2585 | .end = MDM2AP_STATUS, |
| 2586 | .name = "MDM2AP_STATUS", |
| 2587 | .flags = IORESOURCE_IO, |
| 2588 | }, |
| 2589 | { |
| 2590 | .start = AP2MDM_STATUS, |
| 2591 | .end = AP2MDM_STATUS, |
| 2592 | .name = "AP2MDM_STATUS", |
| 2593 | .flags = IORESOURCE_IO, |
| 2594 | }, |
| 2595 | { |
| 2596 | .start = I2S_AP2MDM_SOFT_RESET, |
| 2597 | .end = I2S_AP2MDM_SOFT_RESET, |
| 2598 | .name = "AP2MDM_SOFT_RESET", |
| 2599 | .flags = IORESOURCE_IO, |
| 2600 | }, |
| 2601 | { |
| 2602 | .start = I2S_AP2MDM_WAKEUP, |
| 2603 | .end = I2S_AP2MDM_WAKEUP, |
| 2604 | .name = "AP2MDM_WAKEUP", |
| 2605 | .flags = IORESOURCE_IO, |
| 2606 | }, |
| 2607 | { |
| 2608 | .start = I2S_MDM2AP_PBLRDY, |
| 2609 | .end = I2S_MDM2AP_PBLRDY, |
| 2610 | .name = "MDM2AP_PBLRDY", |
| 2611 | .flags = IORESOURCE_IO, |
| 2612 | }, |
| 2613 | }; |
| 2614 | |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 2615 | struct platform_device mdm_8064_device = { |
| 2616 | .name = "mdm2_modem", |
| 2617 | .id = -1, |
| 2618 | .num_resources = ARRAY_SIZE(mdm_resources), |
| 2619 | .resource = mdm_resources, |
| 2620 | }; |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 2621 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 2622 | struct platform_device i2s_mdm_8064_device = { |
| 2623 | .name = "mdm2_modem", |
| 2624 | .id = -1, |
| 2625 | .num_resources = ARRAY_SIZE(i2s_mdm_resources), |
| 2626 | .resource = i2s_mdm_resources, |
| 2627 | }; |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 2628 | static int apq8064_LPM_latency = 1000; /* >100 usec for WFI */ |
| 2629 | |
| 2630 | struct platform_device apq8064_cpu_idle_device = { |
| 2631 | .name = "msm_cpu_idle", |
| 2632 | .id = -1, |
| 2633 | .dev = { |
| 2634 | .platform_data = &apq8064_LPM_latency, |
| 2635 | }, |
| 2636 | }; |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 2637 | |
| 2638 | static struct msm_dcvs_freq_entry apq8064_freq[] = { |
| 2639 | { 384000, 166981, 345600}, |
| 2640 | { 702000, 213049, 632502}, |
| 2641 | {1026000, 285712, 925613}, |
| 2642 | {1242000, 383945, 1176550}, |
| 2643 | {1458000, 419729, 1465478}, |
| 2644 | {1512000, 434116, 1546674}, |
| 2645 | |
| 2646 | }; |
| 2647 | |
| 2648 | static struct msm_dcvs_core_info apq8064_core_info = { |
| 2649 | .freq_tbl = &apq8064_freq[0], |
| 2650 | .core_param = { |
| 2651 | .max_time_us = 100000, |
| 2652 | .num_freq = ARRAY_SIZE(apq8064_freq), |
| 2653 | }, |
| 2654 | .algo_param = { |
| 2655 | .slack_time_us = 58000, |
| 2656 | .scale_slack_time = 0, |
| 2657 | .scale_slack_time_pct = 0, |
| 2658 | .disable_pc_threshold = 1458000, |
| 2659 | .em_window_size = 100000, |
| 2660 | .em_max_util_pct = 97, |
| 2661 | .ss_window_size = 1000000, |
| 2662 | .ss_util_pct = 95, |
| 2663 | .ss_iobusy_conv = 100, |
| 2664 | }, |
| 2665 | }; |
| 2666 | |
| 2667 | struct platform_device apq8064_msm_gov_device = { |
| 2668 | .name = "msm_dcvs_gov", |
| 2669 | .id = -1, |
| 2670 | .dev = { |
| 2671 | .platform_data = &apq8064_core_info, |
| 2672 | }, |
| 2673 | }; |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 2674 | |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2675 | #ifdef CONFIG_MSM_VCAP |
| 2676 | #define VCAP_HW_BASE 0x05900000 |
| 2677 | |
| 2678 | static struct msm_bus_vectors vcap_init_vectors[] = { |
| 2679 | { |
| 2680 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2681 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2682 | .ab = 0, |
| 2683 | .ib = 0, |
| 2684 | }, |
| 2685 | }; |
| 2686 | |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2687 | static struct msm_bus_vectors vcap_480_vectors[] = { |
| 2688 | { |
| 2689 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2690 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
Terence Hampson | 779dc76 | 2012-06-07 15:59:27 -0400 | [diff] [blame] | 2691 | .ab = 480 * 720 * 3 * 60, |
| 2692 | .ib = 480 * 720 * 3 * 60 * 1.5, |
| 2693 | }, |
| 2694 | }; |
| 2695 | |
| 2696 | static struct msm_bus_vectors vcap_576_vectors[] = { |
| 2697 | { |
| 2698 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2699 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 2700 | .ab = 576 * 720 * 3 * 60, |
| 2701 | .ib = 576 * 720 * 3 * 60 * 1.5, |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2702 | }, |
| 2703 | }; |
| 2704 | |
| 2705 | static struct msm_bus_vectors vcap_720_vectors[] = { |
| 2706 | { |
| 2707 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2708 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
Terence Hampson | 35a1ff0 | 2012-04-25 17:07:18 -0400 | [diff] [blame] | 2709 | .ab = 1280 * 720 * 3 * 60, |
| 2710 | .ib = 1280 * 720 * 3 * 60 * 1.5, |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2711 | }, |
| 2712 | }; |
| 2713 | |
| 2714 | static struct msm_bus_vectors vcap_1080_vectors[] = { |
| 2715 | { |
| 2716 | .src = MSM_BUS_MASTER_VIDEO_CAP, |
| 2717 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
Terence Hampson | 35a1ff0 | 2012-04-25 17:07:18 -0400 | [diff] [blame] | 2718 | .ab = 1920 * 1080 * 3 * 60, |
| 2719 | .ib = 1920 * 1080 * 3 * 60 * 1.5, |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2720 | }, |
| 2721 | }; |
| 2722 | |
| 2723 | static struct msm_bus_paths vcap_bus_usecases[] = { |
| 2724 | { |
| 2725 | ARRAY_SIZE(vcap_init_vectors), |
| 2726 | vcap_init_vectors, |
| 2727 | }, |
| 2728 | { |
| 2729 | ARRAY_SIZE(vcap_480_vectors), |
| 2730 | vcap_480_vectors, |
| 2731 | }, |
| 2732 | { |
Terence Hampson | 779dc76 | 2012-06-07 15:59:27 -0400 | [diff] [blame] | 2733 | ARRAY_SIZE(vcap_576_vectors), |
| 2734 | vcap_576_vectors, |
| 2735 | }, |
| 2736 | { |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2737 | ARRAY_SIZE(vcap_720_vectors), |
| 2738 | vcap_720_vectors, |
| 2739 | }, |
| 2740 | { |
| 2741 | ARRAY_SIZE(vcap_1080_vectors), |
| 2742 | vcap_1080_vectors, |
| 2743 | }, |
| 2744 | }; |
| 2745 | |
| 2746 | static struct msm_bus_scale_pdata vcap_axi_client_pdata = { |
| 2747 | vcap_bus_usecases, |
| 2748 | ARRAY_SIZE(vcap_bus_usecases), |
| 2749 | }; |
| 2750 | |
| 2751 | static struct resource msm_vcap_resources[] = { |
| 2752 | { |
| 2753 | .name = "vcap", |
| 2754 | .start = VCAP_HW_BASE, |
| 2755 | .end = VCAP_HW_BASE + SZ_1M - 1, |
| 2756 | .flags = IORESOURCE_MEM, |
| 2757 | }, |
| 2758 | { |
Terence Hampson | aeb793e | 2012-05-11 11:41:16 -0400 | [diff] [blame] | 2759 | .name = "vc_irq", |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2760 | .start = VCAP_VC, |
| 2761 | .end = VCAP_VC, |
| 2762 | .flags = IORESOURCE_IRQ, |
| 2763 | }, |
Terence Hampson | aeb793e | 2012-05-11 11:41:16 -0400 | [diff] [blame] | 2764 | { |
| 2765 | .name = "vp_irq", |
| 2766 | .start = VCAP_VP, |
| 2767 | .end = VCAP_VP, |
| 2768 | .flags = IORESOURCE_IRQ, |
| 2769 | }, |
Terence Hampson | 2e1705f | 2012-04-11 19:55:29 -0400 | [diff] [blame] | 2770 | }; |
| 2771 | |
| 2772 | static unsigned vcap_gpios[] = { |
| 2773 | 2, 3, 4, 5, 6, 7, 8, 9, 10, |
| 2774 | 11, 12, 13, 18, 19, 20, 21, |
| 2775 | 22, 23, 24, 25, 26, 80, 82, |
| 2776 | 83, 84, 85, 86, 87, |
| 2777 | }; |
| 2778 | |
| 2779 | static struct vcap_platform_data vcap_pdata = { |
| 2780 | .gpios = vcap_gpios, |
| 2781 | .num_gpios = ARRAY_SIZE(vcap_gpios), |
| 2782 | .bus_client_pdata = &vcap_axi_client_pdata |
| 2783 | }; |
| 2784 | |
| 2785 | struct platform_device msm8064_device_vcap = { |
| 2786 | .name = "msm_vcap", |
| 2787 | .id = 0, |
| 2788 | .resource = msm_vcap_resources, |
| 2789 | .num_resources = ARRAY_SIZE(msm_vcap_resources), |
| 2790 | .dev = { |
| 2791 | .platform_data = &vcap_pdata, |
| 2792 | }, |
| 2793 | }; |
| 2794 | #endif |
| 2795 | |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 2796 | static struct resource msm_cache_erp_resources[] = { |
| 2797 | { |
| 2798 | .name = "l1_irq", |
| 2799 | .start = SC_SICCPUXEXTFAULTIRPTREQ, |
| 2800 | .flags = IORESOURCE_IRQ, |
| 2801 | }, |
| 2802 | { |
| 2803 | .name = "l2_irq", |
| 2804 | .start = APCC_QGICL2IRPTREQ, |
| 2805 | .flags = IORESOURCE_IRQ, |
| 2806 | } |
| 2807 | }; |
| 2808 | |
| 2809 | struct platform_device apq8064_device_cache_erp = { |
| 2810 | .name = "msm_cache_erp", |
| 2811 | .id = -1, |
| 2812 | .num_resources = ARRAY_SIZE(msm_cache_erp_resources), |
| 2813 | .resource = msm_cache_erp_resources, |
| 2814 | }; |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2815 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2816 | #define CORESIGHT_PHYS_BASE 0x01A00000 |
| 2817 | #define CORESIGHT_FUNNEL_PHYS_BASE (CORESIGHT_PHYS_BASE + 0x4000) |
| 2818 | #define CORESIGHT_ETM2_PHYS_BASE (CORESIGHT_PHYS_BASE + 0x1E000) |
| 2819 | #define CORESIGHT_ETM3_PHYS_BASE (CORESIGHT_PHYS_BASE + 0x1F000) |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2820 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2821 | static struct resource coresight_funnel_resources[] = { |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2822 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2823 | .start = CORESIGHT_FUNNEL_PHYS_BASE, |
| 2824 | .end = CORESIGHT_FUNNEL_PHYS_BASE + SZ_4K - 1, |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2825 | .flags = IORESOURCE_MEM, |
| 2826 | }, |
| 2827 | }; |
| 2828 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2829 | static const int coresight_funnel_outports[] = { 0, 1 }; |
| 2830 | static const int coresight_funnel_child_ids[] = { 0, 1 }; |
| 2831 | static const int coresight_funnel_child_ports[] = { 0, 0 }; |
| 2832 | |
| 2833 | static struct coresight_platform_data coresight_funnel_pdata = { |
| 2834 | .id = 2, |
| 2835 | .name = "coresight-funnel", |
Pratik Patel | 0480dc6 | 2012-09-06 09:41:49 -0700 | [diff] [blame] | 2836 | .nr_inports = 8, |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2837 | .outports = coresight_funnel_outports, |
| 2838 | .child_ids = coresight_funnel_child_ids, |
| 2839 | .child_ports = coresight_funnel_child_ports, |
| 2840 | .nr_outports = ARRAY_SIZE(coresight_funnel_outports), |
| 2841 | }; |
| 2842 | |
| 2843 | struct platform_device apq8064_coresight_funnel_device = { |
| 2844 | .name = "coresight-funnel", |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2845 | .id = 0, |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2846 | .num_resources = ARRAY_SIZE(coresight_funnel_resources), |
| 2847 | .resource = coresight_funnel_resources, |
| 2848 | .dev = { |
| 2849 | .platform_data = &coresight_funnel_pdata, |
| 2850 | }, |
| 2851 | }; |
| 2852 | |
| 2853 | static struct resource coresight_etm2_resources[] = { |
| 2854 | { |
| 2855 | .start = CORESIGHT_ETM2_PHYS_BASE, |
| 2856 | .end = CORESIGHT_ETM2_PHYS_BASE + SZ_4K - 1, |
| 2857 | .flags = IORESOURCE_MEM, |
| 2858 | }, |
| 2859 | }; |
| 2860 | |
| 2861 | static const int coresight_etm2_outports[] = { 0 }; |
| 2862 | static const int coresight_etm2_child_ids[] = { 2 }; |
| 2863 | static const int coresight_etm2_child_ports[] = { 4 }; |
| 2864 | |
| 2865 | static struct coresight_platform_data coresight_etm2_pdata = { |
| 2866 | .id = 6, |
| 2867 | .name = "coresight-etm2", |
Pratik Patel | 0480dc6 | 2012-09-06 09:41:49 -0700 | [diff] [blame] | 2868 | .nr_inports = 0, |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2869 | .outports = coresight_etm2_outports, |
| 2870 | .child_ids = coresight_etm2_child_ids, |
| 2871 | .child_ports = coresight_etm2_child_ports, |
| 2872 | .nr_outports = ARRAY_SIZE(coresight_etm2_outports), |
| 2873 | }; |
| 2874 | |
| 2875 | struct platform_device coresight_etm2_device = { |
| 2876 | .name = "coresight-etm", |
| 2877 | .id = 2, |
| 2878 | .num_resources = ARRAY_SIZE(coresight_etm2_resources), |
| 2879 | .resource = coresight_etm2_resources, |
| 2880 | .dev = { |
| 2881 | .platform_data = &coresight_etm2_pdata, |
| 2882 | }, |
| 2883 | }; |
| 2884 | |
| 2885 | static struct resource coresight_etm3_resources[] = { |
| 2886 | { |
| 2887 | .start = CORESIGHT_ETM3_PHYS_BASE, |
| 2888 | .end = CORESIGHT_ETM3_PHYS_BASE + SZ_4K - 1, |
| 2889 | .flags = IORESOURCE_MEM, |
| 2890 | }, |
| 2891 | }; |
| 2892 | |
| 2893 | static const int coresight_etm3_outports[] = { 0 }; |
| 2894 | static const int coresight_etm3_child_ids[] = { 2 }; |
| 2895 | static const int coresight_etm3_child_ports[] = { 5 }; |
| 2896 | |
| 2897 | static struct coresight_platform_data coresight_etm3_pdata = { |
| 2898 | .id = 7, |
| 2899 | .name = "coresight-etm3", |
Pratik Patel | 0480dc6 | 2012-09-06 09:41:49 -0700 | [diff] [blame] | 2900 | .nr_inports = 0, |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 2901 | .outports = coresight_etm3_outports, |
| 2902 | .child_ids = coresight_etm3_child_ids, |
| 2903 | .child_ports = coresight_etm3_child_ports, |
| 2904 | .nr_outports = ARRAY_SIZE(coresight_etm3_outports), |
| 2905 | }; |
| 2906 | |
| 2907 | struct platform_device coresight_etm3_device = { |
| 2908 | .name = "coresight-etm", |
| 2909 | .id = 3, |
| 2910 | .num_resources = ARRAY_SIZE(coresight_etm3_resources), |
| 2911 | .resource = coresight_etm3_resources, |
| 2912 | .dev = { |
| 2913 | .platform_data = &coresight_etm3_pdata, |
| 2914 | }, |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 2915 | }; |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2916 | |
| 2917 | struct msm_iommu_domain_name apq8064_iommu_ctx_names[] = { |
| 2918 | /* Camera */ |
| 2919 | { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2920 | .name = "ijpeg_src", |
| 2921 | .domain = CAMERA_DOMAIN, |
| 2922 | }, |
| 2923 | /* Camera */ |
| 2924 | { |
| 2925 | .name = "ijpeg_dst", |
| 2926 | .domain = CAMERA_DOMAIN, |
| 2927 | }, |
| 2928 | /* Camera */ |
| 2929 | { |
| 2930 | .name = "jpegd_src", |
| 2931 | .domain = CAMERA_DOMAIN, |
| 2932 | }, |
| 2933 | /* Camera */ |
| 2934 | { |
| 2935 | .name = "jpegd_dst", |
| 2936 | .domain = CAMERA_DOMAIN, |
| 2937 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 2938 | /* Rotator src*/ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2939 | { |
| 2940 | .name = "rot_src", |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 2941 | .domain = ROTATOR_SRC_DOMAIN, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2942 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 2943 | /* Rotator dst */ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2944 | { |
| 2945 | .name = "rot_dst", |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 2946 | .domain = ROTATOR_DST_DOMAIN, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 2947 | }, |
| 2948 | /* Video */ |
| 2949 | { |
| 2950 | .name = "vcodec_a_mm1", |
| 2951 | .domain = VIDEO_DOMAIN, |
| 2952 | }, |
| 2953 | /* Video */ |
| 2954 | { |
| 2955 | .name = "vcodec_b_mm2", |
| 2956 | .domain = VIDEO_DOMAIN, |
| 2957 | }, |
| 2958 | /* Video */ |
| 2959 | { |
| 2960 | .name = "vcodec_a_stream", |
| 2961 | .domain = VIDEO_DOMAIN, |
| 2962 | }, |
| 2963 | }; |
| 2964 | |
| 2965 | static struct mem_pool apq8064_video_pools[] = { |
| 2966 | /* |
| 2967 | * Video hardware has the following requirements: |
| 2968 | * 1. All video addresses used by the video hardware must be at a higher |
| 2969 | * address than video firmware address. |
| 2970 | * 2. Video hardware can only access a range of 256MB from the base of |
| 2971 | * the video firmware. |
| 2972 | */ |
| 2973 | [VIDEO_FIRMWARE_POOL] = |
| 2974 | /* Low addresses, intended for video firmware */ |
| 2975 | { |
| 2976 | .paddr = SZ_128K, |
| 2977 | .size = SZ_16M - SZ_128K, |
| 2978 | }, |
| 2979 | [VIDEO_MAIN_POOL] = |
| 2980 | /* Main video pool */ |
| 2981 | { |
| 2982 | .paddr = SZ_16M, |
| 2983 | .size = SZ_256M - SZ_16M, |
| 2984 | }, |
| 2985 | [GEN_POOL] = |
| 2986 | /* Remaining address space up to 2G */ |
| 2987 | { |
| 2988 | .paddr = SZ_256M, |
| 2989 | .size = SZ_2G - SZ_256M, |
| 2990 | }, |
| 2991 | }; |
| 2992 | |
| 2993 | static struct mem_pool apq8064_camera_pools[] = { |
| 2994 | [GEN_POOL] = |
| 2995 | /* One address space for camera */ |
| 2996 | { |
| 2997 | .paddr = SZ_128K, |
| 2998 | .size = SZ_2G - SZ_128K, |
| 2999 | }, |
| 3000 | }; |
| 3001 | |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3002 | static struct mem_pool apq8064_display_read_pools[] = { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3003 | [GEN_POOL] = |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3004 | /* One address space for display reads */ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3005 | { |
| 3006 | .paddr = SZ_128K, |
| 3007 | .size = SZ_2G - SZ_128K, |
| 3008 | }, |
| 3009 | }; |
| 3010 | |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3011 | static struct mem_pool apq8064_display_write_pools[] = { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3012 | [GEN_POOL] = |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3013 | /* One address space for display writes */ |
| 3014 | { |
| 3015 | .paddr = SZ_128K, |
| 3016 | .size = SZ_2G - SZ_128K, |
| 3017 | }, |
| 3018 | }; |
| 3019 | |
| 3020 | static struct mem_pool apq8064_rotator_src_pools[] = { |
| 3021 | [GEN_POOL] = |
| 3022 | /* One address space for rotator src */ |
| 3023 | { |
| 3024 | .paddr = SZ_128K, |
| 3025 | .size = SZ_2G - SZ_128K, |
| 3026 | }, |
| 3027 | }; |
| 3028 | |
| 3029 | static struct mem_pool apq8064_rotator_dst_pools[] = { |
| 3030 | [GEN_POOL] = |
| 3031 | /* One address space for rotator dst */ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3032 | { |
| 3033 | .paddr = SZ_128K, |
| 3034 | .size = SZ_2G - SZ_128K, |
| 3035 | }, |
| 3036 | }; |
| 3037 | |
| 3038 | static struct msm_iommu_domain apq8064_iommu_domains[] = { |
| 3039 | [VIDEO_DOMAIN] = { |
| 3040 | .iova_pools = apq8064_video_pools, |
| 3041 | .npools = ARRAY_SIZE(apq8064_video_pools), |
| 3042 | }, |
| 3043 | [CAMERA_DOMAIN] = { |
| 3044 | .iova_pools = apq8064_camera_pools, |
| 3045 | .npools = ARRAY_SIZE(apq8064_camera_pools), |
| 3046 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3047 | [DISPLAY_READ_DOMAIN] = { |
| 3048 | .iova_pools = apq8064_display_read_pools, |
| 3049 | .npools = ARRAY_SIZE(apq8064_display_read_pools), |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3050 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 3051 | [DISPLAY_WRITE_DOMAIN] = { |
| 3052 | .iova_pools = apq8064_display_write_pools, |
| 3053 | .npools = ARRAY_SIZE(apq8064_display_write_pools), |
| 3054 | }, |
| 3055 | [ROTATOR_SRC_DOMAIN] = { |
| 3056 | .iova_pools = apq8064_rotator_src_pools, |
| 3057 | .npools = ARRAY_SIZE(apq8064_rotator_src_pools), |
| 3058 | }, |
| 3059 | [ROTATOR_DST_DOMAIN] = { |
| 3060 | .iova_pools = apq8064_rotator_dst_pools, |
| 3061 | .npools = ARRAY_SIZE(apq8064_rotator_dst_pools), |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3062 | }, |
| 3063 | }; |
| 3064 | |
| 3065 | struct iommu_domains_pdata apq8064_iommu_domain_pdata = { |
| 3066 | .domains = apq8064_iommu_domains, |
| 3067 | .ndomains = ARRAY_SIZE(apq8064_iommu_domains), |
| 3068 | .domain_names = apq8064_iommu_ctx_names, |
| 3069 | .nnames = ARRAY_SIZE(apq8064_iommu_ctx_names), |
| 3070 | .domain_alloc_flags = 0, |
| 3071 | }; |
| 3072 | |
| 3073 | struct platform_device apq8064_iommu_domain_device = { |
| 3074 | .name = "iommu_domains", |
| 3075 | .id = -1, |
| 3076 | .dev = { |
| 3077 | .platform_data = &apq8064_iommu_domain_pdata, |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 3078 | } |
| 3079 | }; |
| 3080 | |
| 3081 | struct msm_rtb_platform_data apq8064_rtb_pdata = { |
| 3082 | .size = SZ_1M, |
| 3083 | }; |
| 3084 | |
| 3085 | static int __init msm_rtb_set_buffer_size(char *p) |
| 3086 | { |
| 3087 | int s; |
| 3088 | |
| 3089 | s = memparse(p, NULL); |
| 3090 | apq8064_rtb_pdata.size = ALIGN(s, SZ_4K); |
| 3091 | return 0; |
| 3092 | } |
| 3093 | early_param("msm_rtb_size", msm_rtb_set_buffer_size); |
| 3094 | |
| 3095 | struct platform_device apq8064_rtb_device = { |
| 3096 | .name = "msm_rtb", |
| 3097 | .id = -1, |
| 3098 | .dev = { |
| 3099 | .platform_data = &apq8064_rtb_pdata, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 3100 | }, |
| 3101 | }; |
Laura Abbott | 93a4a35 | 2012-05-25 09:26:35 -0700 | [diff] [blame] | 3102 | |
| 3103 | #define APQ8064_L1_SIZE SZ_1M |
| 3104 | /* |
| 3105 | * The actual L2 size is smaller but we need a larger buffer |
| 3106 | * size to store other dump information |
| 3107 | */ |
| 3108 | #define APQ8064_L2_SIZE SZ_8M |
| 3109 | |
| 3110 | struct msm_cache_dump_platform_data apq8064_cache_dump_pdata = { |
| 3111 | .l2_size = APQ8064_L2_SIZE, |
| 3112 | .l1_size = APQ8064_L1_SIZE, |
| 3113 | }; |
| 3114 | |
| 3115 | struct platform_device apq8064_cache_dump_device = { |
| 3116 | .name = "msm_cache_dump", |
| 3117 | .id = -1, |
| 3118 | .dev = { |
| 3119 | .platform_data = &apq8064_cache_dump_pdata, |
| 3120 | }, |
| 3121 | }; |