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