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