Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/io.h> |
| 16 | #include <linux/irq.h> |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 17 | #include <linux/i2c.h> |
David Keitel | 2f613d9 | 2012-02-15 11:29:16 -0800 | [diff] [blame] | 18 | #include <linux/i2c/smb349.h> |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 19 | #include <linux/i2c/sx150x.h> |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 20 | #include <linux/slimbus/slimbus.h> |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 21 | #include <linux/mfd/wcd9xxx/core.h> |
| 22 | #include <linux/mfd/wcd9xxx/pdata.h> |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 23 | #include <linux/mfd/pm8xxx/misc.h> |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 24 | #include <linux/msm_ssbi.h> |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 25 | #include <linux/spi/spi.h> |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 26 | #include <linux/dma-mapping.h> |
| 27 | #include <linux/platform_data/qcom_crypto_device.h> |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 28 | #include <linux/ion.h> |
Jack Cheung | 46bfffa | 2012-01-19 15:26:24 -0800 | [diff] [blame] | 29 | #include <linux/memory.h> |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 30 | #include <linux/i2c/atmel_mxt_ts.h> |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 31 | #include <linux/cyttsp.h> |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 32 | #include <linux/i2c/isa1200.h> |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 33 | #include <linux/gpio_keys.h> |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 34 | #include <linux/epm_adc.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 35 | #include <asm/mach-types.h> |
| 36 | #include <asm/mach/arch.h> |
| 37 | #include <asm/hardware/gic.h> |
Sahitya Tummala | 3586ed9 | 2011-08-03 09:13:23 +0530 | [diff] [blame] | 38 | #include <asm/mach/mmc.h> |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 39 | #include <linux/platform_data/qcom_wcnss_device.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 40 | |
| 41 | #include <mach/board.h> |
| 42 | #include <mach/msm_iomap.h> |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 43 | #include <mach/ion.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 44 | #include <linux/usb/msm_hsusb.h> |
| 45 | #include <linux/usb/android.h> |
| 46 | #include <mach/socinfo.h> |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 47 | #include <mach/msm_spi.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 48 | #include "timer.h" |
| 49 | #include "devices.h" |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 50 | #include <mach/gpio.h> |
| 51 | #include <mach/gpiomux.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 52 | #include <mach/rpm.h> |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 53 | #ifdef CONFIG_ANDROID_PMEM |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 54 | #include <linux/android_pmem.h> |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 55 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 56 | #include <mach/msm_memtypes.h> |
| 57 | #include <linux/bootmem.h> |
| 58 | #include <asm/setup.h> |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 59 | #include <mach/dma.h> |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 60 | #include <mach/msm_dsps.h> |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 61 | #include <mach/msm_bus_board.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 62 | #include <mach/cpuidle.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 63 | #include <mach/mdm2.h> |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 64 | #include <linux/msm_tsens.h> |
Stephen Boyd | 4d0d258 | 2012-02-10 14:49:40 -0800 | [diff] [blame] | 65 | #include <mach/msm_xo.h> |
Laura Abbott | 350c836 | 2012-02-28 14:46:52 -0800 | [diff] [blame] | 66 | #include <mach/msm_rtb.h> |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 67 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 68 | #include "msm_watchdog.h" |
Stepan Moskovchenko | 5a83dba | 2011-12-05 17:30:17 -0800 | [diff] [blame] | 69 | #include "board-8064.h" |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 70 | #include "acpuclock.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 71 | #include "spm.h" |
| 72 | #include "mpm.h" |
| 73 | #include "rpm_resources.h" |
Matt Wagantall | 7cca464 | 2012-02-01 16:43:24 -0800 | [diff] [blame] | 74 | #include "pm.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 75 | #include "pm-boot.h" |
Rajesh Sastrula | aee8af3 | 2012-01-20 11:46:31 -0800 | [diff] [blame] | 76 | #include "devices-msm8x60.h" |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 77 | |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 78 | #define MSM_PMEM_ADSP_SIZE 0x7800000 |
Bharath Ramachandramurthy | 2fd017a | 2012-03-13 10:21:09 -0700 | [diff] [blame] | 79 | #define MSM_PMEM_AUDIO_SIZE 0x4CF000 |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 80 | #ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY |
| 81 | #define MSM_PMEM_SIZE 0x4000000 /* 64 Mbytes */ |
| 82 | #else |
Chetan Kalyan | 72aac4f | 2012-02-23 14:56:54 -0800 | [diff] [blame] | 83 | #define MSM_PMEM_SIZE 0x4000000 /* 64 Mbytes */ |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 84 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 85 | |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 86 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
Bharath Ramachandramurthy | 2fd017a | 2012-03-13 10:21:09 -0700 | [diff] [blame] | 87 | #define MSM_PMEM_KERNEL_EBI1_SIZE 0x65000 |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 88 | #define MSM_ION_SF_SIZE MSM_PMEM_SIZE |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 89 | #define MSM_ION_MM_FW_SIZE 0x200000 /* (2MB) */ |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 90 | #define MSM_ION_MM_SIZE MSM_PMEM_ADSP_SIZE |
Olav Haugan | 3a9bd23 | 2012-02-15 14:23:27 -0800 | [diff] [blame] | 91 | #define MSM_ION_QSECOM_SIZE 0x300000 /* (3MB) */ |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 92 | #define MSM_ION_MFC_SIZE SZ_8K |
Olav Haugan | 2c43fac | 2012-01-19 11:06:37 -0800 | [diff] [blame] | 93 | #define MSM_ION_AUDIO_SIZE MSM_PMEM_AUDIO_SIZE |
| 94 | #define MSM_ION_HEAP_NUM 8 |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 95 | #else |
| 96 | #define MSM_PMEM_KERNEL_EBI1_SIZE 0x110C000 |
| 97 | #define MSM_ION_HEAP_NUM 1 |
| 98 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 99 | |
Siddartha Mohanadoss | 9c65898 | 2012-02-28 15:11:48 -0800 | [diff] [blame] | 100 | #define GPIO_EXPANDER_IRQ_BASE (PM8821_IRQ_BASE + PM8821_NR_IRQS) |
| 101 | #define GPIO_EXPANDER_GPIO_BASE (PM8821_MPP_BASE + PM8821_NR_MPPS) |
| 102 | #define GPIO_EPM_EXPANDER_BASE GPIO_EXPANDER_GPIO_BASE |
| 103 | |
| 104 | enum { |
| 105 | SX150X_EPM, |
| 106 | }; |
| 107 | |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 108 | #ifdef CONFIG_KERNEL_PMEM_EBI_REGION |
| 109 | static unsigned pmem_kernel_ebi1_size = MSM_PMEM_KERNEL_EBI1_SIZE; |
| 110 | static int __init pmem_kernel_ebi1_size_setup(char *p) |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 111 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 112 | pmem_kernel_ebi1_size = memparse(p, NULL); |
| 113 | return 0; |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 114 | } |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 115 | early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup); |
| 116 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 117 | |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 118 | #ifdef CONFIG_ANDROID_PMEM |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 119 | static unsigned pmem_size = MSM_PMEM_SIZE; |
| 120 | static int __init pmem_size_setup(char *p) |
| 121 | { |
| 122 | pmem_size = memparse(p, NULL); |
| 123 | return 0; |
| 124 | } |
| 125 | early_param("pmem_size", pmem_size_setup); |
| 126 | |
| 127 | static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE; |
| 128 | |
| 129 | static int __init pmem_adsp_size_setup(char *p) |
| 130 | { |
| 131 | pmem_adsp_size = memparse(p, NULL); |
| 132 | return 0; |
| 133 | } |
| 134 | early_param("pmem_adsp_size", pmem_adsp_size_setup); |
| 135 | |
| 136 | static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE; |
| 137 | |
| 138 | static int __init pmem_audio_size_setup(char *p) |
| 139 | { |
| 140 | pmem_audio_size = memparse(p, NULL); |
| 141 | return 0; |
| 142 | } |
| 143 | early_param("pmem_audio_size", pmem_audio_size_setup); |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 144 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 145 | |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 146 | #ifdef CONFIG_ANDROID_PMEM |
| 147 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 148 | static struct android_pmem_platform_data android_pmem_pdata = { |
| 149 | .name = "pmem", |
| 150 | .allocator_type = PMEM_ALLOCATORTYPE_ALLORNOTHING, |
| 151 | .cached = 1, |
| 152 | .memory_type = MEMTYPE_EBI1, |
| 153 | }; |
| 154 | |
| 155 | static struct platform_device android_pmem_device = { |
| 156 | .name = "android_pmem", |
| 157 | .id = 0, |
| 158 | .dev = {.platform_data = &android_pmem_pdata}, |
| 159 | }; |
| 160 | |
| 161 | static struct android_pmem_platform_data android_pmem_adsp_pdata = { |
| 162 | .name = "pmem_adsp", |
| 163 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 164 | .cached = 0, |
| 165 | .memory_type = MEMTYPE_EBI1, |
| 166 | }; |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 167 | static struct platform_device android_pmem_adsp_device = { |
| 168 | .name = "android_pmem", |
| 169 | .id = 2, |
| 170 | .dev = { .platform_data = &android_pmem_adsp_pdata }, |
| 171 | }; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 172 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 173 | |
| 174 | static struct android_pmem_platform_data android_pmem_audio_pdata = { |
| 175 | .name = "pmem_audio", |
| 176 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 177 | .cached = 0, |
| 178 | .memory_type = MEMTYPE_EBI1, |
| 179 | }; |
| 180 | |
| 181 | static struct platform_device android_pmem_audio_device = { |
| 182 | .name = "android_pmem", |
| 183 | .id = 4, |
| 184 | .dev = { .platform_data = &android_pmem_audio_pdata }, |
| 185 | }; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 186 | #endif |
| 187 | |
| 188 | static struct memtype_reserve apq8064_reserve_table[] __initdata = { |
| 189 | [MEMTYPE_SMI] = { |
| 190 | }, |
| 191 | [MEMTYPE_EBI0] = { |
| 192 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 193 | }, |
| 194 | [MEMTYPE_EBI1] = { |
| 195 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 196 | }, |
| 197 | }; |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 198 | |
Laura Abbott | 350c836 | 2012-02-28 14:46:52 -0800 | [diff] [blame] | 199 | #if defined(CONFIG_MSM_RTB) |
| 200 | static struct msm_rtb_platform_data msm_rtb_pdata = { |
| 201 | .size = SZ_1M, |
| 202 | }; |
| 203 | |
| 204 | static int __init msm_rtb_set_buffer_size(char *p) |
| 205 | { |
| 206 | int s; |
| 207 | |
| 208 | s = memparse(p, NULL); |
| 209 | msm_rtb_pdata.size = ALIGN(s, SZ_4K); |
| 210 | return 0; |
| 211 | } |
| 212 | early_param("msm_rtb_size", msm_rtb_set_buffer_size); |
| 213 | |
| 214 | |
| 215 | static struct platform_device msm_rtb_device = { |
| 216 | .name = "msm_rtb", |
| 217 | .id = -1, |
| 218 | .dev = { |
| 219 | .platform_data = &msm_rtb_pdata, |
| 220 | }, |
| 221 | }; |
| 222 | #endif |
| 223 | |
| 224 | static void __init reserve_rtb_memory(void) |
| 225 | { |
| 226 | #if defined(CONFIG_MSM_RTB) |
| 227 | apq8064_reserve_table[MEMTYPE_EBI1].size += msm_rtb_pdata.size; |
| 228 | #endif |
| 229 | } |
| 230 | |
| 231 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 232 | static void __init size_pmem_devices(void) |
| 233 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 234 | #ifdef CONFIG_ANDROID_PMEM |
| 235 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 236 | android_pmem_adsp_pdata.size = pmem_adsp_size; |
| 237 | android_pmem_pdata.size = pmem_size; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 238 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 239 | android_pmem_audio_pdata.size = MSM_PMEM_AUDIO_SIZE; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 240 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | static void __init reserve_memory_for(struct android_pmem_platform_data *p) |
| 244 | { |
| 245 | apq8064_reserve_table[p->memory_type].size += p->size; |
| 246 | } |
| 247 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 248 | static void __init reserve_pmem_memory(void) |
| 249 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 250 | #ifdef CONFIG_ANDROID_PMEM |
| 251 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 252 | reserve_memory_for(&android_pmem_adsp_pdata); |
| 253 | reserve_memory_for(&android_pmem_pdata); |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 254 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 255 | reserve_memory_for(&android_pmem_audio_pdata); |
| 256 | apq8064_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 257 | #endif |
| 258 | } |
| 259 | |
| 260 | static int apq8064_paddr_to_memtype(unsigned int paddr) |
| 261 | { |
| 262 | return MEMTYPE_EBI1; |
| 263 | } |
| 264 | |
| 265 | #ifdef CONFIG_ION_MSM |
| 266 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 267 | static struct ion_cp_heap_pdata cp_mm_ion_pdata = { |
| 268 | .permission_type = IPT_TYPE_MM_CARVEOUT, |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 269 | .align = PAGE_SIZE, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 270 | }; |
| 271 | |
| 272 | static struct ion_cp_heap_pdata cp_mfc_ion_pdata = { |
| 273 | .permission_type = IPT_TYPE_MFC_SHAREDMEM, |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 274 | .align = PAGE_SIZE, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 275 | }; |
| 276 | |
| 277 | static struct ion_co_heap_pdata co_ion_pdata = { |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 278 | .adjacent_mem_id = INVALID_HEAP_ID, |
| 279 | .align = PAGE_SIZE, |
| 280 | }; |
| 281 | |
| 282 | static struct ion_co_heap_pdata fw_co_ion_pdata = { |
| 283 | .adjacent_mem_id = ION_CP_MM_HEAP_ID, |
| 284 | .align = SZ_128K, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 285 | }; |
| 286 | #endif |
Olav Haugan | 9cdfc2f | 2012-02-15 09:52:57 -0800 | [diff] [blame] | 287 | |
| 288 | /** |
| 289 | * These heaps are listed in the order they will be allocated. Due to |
| 290 | * video hardware restrictions and content protection the FW heap has to |
| 291 | * be allocated adjacent (below) the MM heap and the MFC heap has to be |
| 292 | * allocated after the MM heap to ensure MFC heap is not more than 256MB |
| 293 | * away from the base address of the FW heap. |
| 294 | * However, the order of FW heap and MM heap doesn't matter since these |
| 295 | * two heaps are taken care of by separate code to ensure they are adjacent |
| 296 | * to each other. |
| 297 | * Don't swap the order unless you know what you are doing! |
| 298 | */ |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 299 | static struct ion_platform_data ion_pdata = { |
| 300 | .nr = MSM_ION_HEAP_NUM, |
| 301 | .heaps = { |
| 302 | { |
| 303 | .id = ION_SYSTEM_HEAP_ID, |
| 304 | .type = ION_HEAP_TYPE_SYSTEM, |
| 305 | .name = ION_VMALLOC_HEAP_NAME, |
| 306 | }, |
| 307 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 308 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 309 | .id = ION_CP_MM_HEAP_ID, |
| 310 | .type = ION_HEAP_TYPE_CP, |
| 311 | .name = ION_MM_HEAP_NAME, |
| 312 | .size = MSM_ION_MM_SIZE, |
| 313 | .memory_type = ION_EBI_TYPE, |
| 314 | .extra_data = (void *) &cp_mm_ion_pdata, |
| 315 | }, |
| 316 | { |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 317 | .id = ION_MM_FIRMWARE_HEAP_ID, |
| 318 | .type = ION_HEAP_TYPE_CARVEOUT, |
| 319 | .name = ION_MM_FIRMWARE_HEAP_NAME, |
| 320 | .size = MSM_ION_MM_FW_SIZE, |
| 321 | .memory_type = ION_EBI_TYPE, |
| 322 | .extra_data = (void *) &fw_co_ion_pdata, |
| 323 | }, |
| 324 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 325 | .id = ION_CP_MFC_HEAP_ID, |
| 326 | .type = ION_HEAP_TYPE_CP, |
| 327 | .name = ION_MFC_HEAP_NAME, |
| 328 | .size = MSM_ION_MFC_SIZE, |
| 329 | .memory_type = ION_EBI_TYPE, |
| 330 | .extra_data = (void *) &cp_mfc_ion_pdata, |
| 331 | }, |
| 332 | { |
Olav Haugan | 9cdfc2f | 2012-02-15 09:52:57 -0800 | [diff] [blame] | 333 | .id = ION_SF_HEAP_ID, |
| 334 | .type = ION_HEAP_TYPE_CARVEOUT, |
| 335 | .name = ION_SF_HEAP_NAME, |
| 336 | .size = MSM_ION_SF_SIZE, |
| 337 | .memory_type = ION_EBI_TYPE, |
| 338 | .extra_data = (void *) &co_ion_pdata, |
| 339 | }, |
| 340 | { |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 341 | .id = ION_IOMMU_HEAP_ID, |
| 342 | .type = ION_HEAP_TYPE_IOMMU, |
| 343 | .name = ION_IOMMU_HEAP_NAME, |
| 344 | }, |
Olav Haugan | f45e214 | 2012-01-19 11:01:01 -0800 | [diff] [blame] | 345 | { |
| 346 | .id = ION_QSECOM_HEAP_ID, |
| 347 | .type = ION_HEAP_TYPE_CARVEOUT, |
| 348 | .name = ION_QSECOM_HEAP_NAME, |
| 349 | .size = MSM_ION_QSECOM_SIZE, |
| 350 | .memory_type = ION_EBI_TYPE, |
| 351 | .extra_data = (void *) &co_ion_pdata, |
| 352 | }, |
Olav Haugan | 2c43fac | 2012-01-19 11:06:37 -0800 | [diff] [blame] | 353 | { |
| 354 | .id = ION_AUDIO_HEAP_ID, |
| 355 | .type = ION_HEAP_TYPE_CARVEOUT, |
| 356 | .name = ION_AUDIO_HEAP_NAME, |
| 357 | .size = MSM_ION_AUDIO_SIZE, |
| 358 | .memory_type = ION_EBI_TYPE, |
| 359 | .extra_data = (void *) &co_ion_pdata, |
| 360 | }, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 361 | #endif |
| 362 | } |
| 363 | }; |
| 364 | |
| 365 | static struct platform_device ion_dev = { |
| 366 | .name = "ion-msm", |
| 367 | .id = 1, |
| 368 | .dev = { .platform_data = &ion_pdata }, |
| 369 | }; |
| 370 | #endif |
| 371 | |
| 372 | static void reserve_ion_memory(void) |
| 373 | { |
| 374 | #if defined(CONFIG_ION_MSM) && defined(CONFIG_MSM_MULTIMEDIA_USE_ION) |
| 375 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_SIZE; |
Olav Haugan | d3d2968 | 2012-01-19 10:57:07 -0800 | [diff] [blame] | 376 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_FW_SIZE; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 377 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_SF_SIZE; |
| 378 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MFC_SIZE; |
Olav Haugan | f45e214 | 2012-01-19 11:01:01 -0800 | [diff] [blame] | 379 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_QSECOM_SIZE; |
Olav Haugan | 2c43fac | 2012-01-19 11:06:37 -0800 | [diff] [blame] | 380 | apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_AUDIO_SIZE; |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 381 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 382 | } |
| 383 | |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 384 | static void __init reserve_mdp_memory(void) |
| 385 | { |
| 386 | apq8064_mdp_writeback(apq8064_reserve_table); |
| 387 | } |
| 388 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 389 | static void __init apq8064_calculate_reserve_sizes(void) |
| 390 | { |
| 391 | size_pmem_devices(); |
| 392 | reserve_pmem_memory(); |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 393 | reserve_ion_memory(); |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 394 | reserve_mdp_memory(); |
Laura Abbott | 350c836 | 2012-02-28 14:46:52 -0800 | [diff] [blame] | 395 | reserve_rtb_memory(); |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 396 | } |
| 397 | |
| 398 | static struct reserve_info apq8064_reserve_info __initdata = { |
| 399 | .memtype_reserve_table = apq8064_reserve_table, |
| 400 | .calculate_reserve_sizes = apq8064_calculate_reserve_sizes, |
| 401 | .paddr_to_memtype = apq8064_paddr_to_memtype, |
| 402 | }; |
| 403 | |
| 404 | static int apq8064_memory_bank_size(void) |
| 405 | { |
| 406 | return 1<<29; |
| 407 | } |
| 408 | |
| 409 | static void __init locate_unstable_memory(void) |
| 410 | { |
| 411 | struct membank *mb = &meminfo.bank[meminfo.nr_banks - 1]; |
| 412 | unsigned long bank_size; |
| 413 | unsigned long low, high; |
| 414 | |
| 415 | bank_size = apq8064_memory_bank_size(); |
| 416 | low = meminfo.bank[0].start; |
| 417 | high = mb->start + mb->size; |
Olav Haugan | d76e3a8 | 2012-01-16 16:55:07 -0800 | [diff] [blame] | 418 | |
| 419 | /* Check if 32 bit overflow occured */ |
| 420 | if (high < mb->start) |
| 421 | high = ~0UL; |
| 422 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 423 | low &= ~(bank_size - 1); |
| 424 | |
| 425 | if (high - low <= bank_size) |
| 426 | return; |
Jack Cheung | 46bfffa | 2012-01-19 15:26:24 -0800 | [diff] [blame] | 427 | apq8064_reserve_info.low_unstable_address = mb->start - |
| 428 | MIN_MEMORY_BLOCK_SIZE + mb->size; |
| 429 | apq8064_reserve_info.max_unstable_size = MIN_MEMORY_BLOCK_SIZE; |
| 430 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 431 | apq8064_reserve_info.bank_size = bank_size; |
| 432 | pr_info("low unstable address %lx max size %lx bank size %lx\n", |
| 433 | apq8064_reserve_info.low_unstable_address, |
| 434 | apq8064_reserve_info.max_unstable_size, |
| 435 | apq8064_reserve_info.bank_size); |
| 436 | } |
| 437 | |
Aravind Venkateswaran | 8ac7f41 | 2012-03-16 17:57:30 -0700 | [diff] [blame] | 438 | static char prim_panel_name[PANEL_NAME_MAX_LEN]; |
| 439 | static char ext_panel_name[PANEL_NAME_MAX_LEN]; |
| 440 | static int __init prim_display_setup(char *param) |
| 441 | { |
| 442 | if (strnlen(param, PANEL_NAME_MAX_LEN)) |
| 443 | strlcpy(prim_panel_name, param, PANEL_NAME_MAX_LEN); |
| 444 | return 0; |
| 445 | } |
| 446 | early_param("prim_display", prim_display_setup); |
| 447 | |
| 448 | static int __init ext_display_setup(char *param) |
| 449 | { |
| 450 | if (strnlen(param, PANEL_NAME_MAX_LEN)) |
| 451 | strlcpy(ext_panel_name, param, PANEL_NAME_MAX_LEN); |
| 452 | return 0; |
| 453 | } |
| 454 | early_param("ext_display", ext_display_setup); |
| 455 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 456 | static void __init apq8064_reserve(void) |
| 457 | { |
Aravind Venkateswaran | 8ac7f41 | 2012-03-16 17:57:30 -0700 | [diff] [blame] | 458 | apq8064_set_display_params(prim_panel_name, ext_panel_name); |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 459 | msm_reserve(); |
| 460 | } |
| 461 | |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 462 | static void __init place_movable_zone(void) |
| 463 | { |
| 464 | movable_reserved_start = apq8064_reserve_info.low_unstable_address; |
| 465 | movable_reserved_size = apq8064_reserve_info.max_unstable_size; |
| 466 | pr_info("movable zone start %lx size %lx\n", |
| 467 | movable_reserved_start, movable_reserved_size); |
| 468 | } |
| 469 | |
| 470 | static void __init apq8064_early_reserve(void) |
| 471 | { |
| 472 | reserve_info = &apq8064_reserve_info; |
| 473 | locate_unstable_memory(); |
| 474 | place_movable_zone(); |
| 475 | |
| 476 | } |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 477 | #ifdef CONFIG_USB_EHCI_MSM_HSIC |
| 478 | static struct msm_hsic_host_platform_data msm_hsic_pdata = { |
| 479 | .strobe = 88, |
| 480 | .data = 89, |
| 481 | }; |
| 482 | #else |
| 483 | static struct msm_hsic_host_platform_data msm_hsic_pdata; |
| 484 | #endif |
| 485 | |
Hemant Kumar | cb7d8a1 | 2012-01-25 12:25:55 -0800 | [diff] [blame] | 486 | #define PID_MAGIC_ID 0x71432909 |
| 487 | #define SERIAL_NUM_MAGIC_ID 0x61945374 |
| 488 | #define SERIAL_NUMBER_LENGTH 127 |
| 489 | #define DLOAD_USB_BASE_ADD 0x2A03F0C8 |
| 490 | |
| 491 | struct magic_num_struct { |
| 492 | uint32_t pid; |
| 493 | uint32_t serial_num; |
| 494 | }; |
| 495 | |
| 496 | struct dload_struct { |
| 497 | uint32_t reserved1; |
| 498 | uint32_t reserved2; |
| 499 | uint32_t reserved3; |
| 500 | uint16_t reserved4; |
| 501 | uint16_t pid; |
| 502 | char serial_number[SERIAL_NUMBER_LENGTH]; |
| 503 | uint16_t reserved5; |
| 504 | struct magic_num_struct magic_struct; |
| 505 | }; |
| 506 | |
| 507 | static int usb_diag_update_pid_and_serial_num(uint32_t pid, const char *snum) |
| 508 | { |
| 509 | struct dload_struct __iomem *dload = 0; |
| 510 | |
| 511 | dload = ioremap(DLOAD_USB_BASE_ADD, sizeof(*dload)); |
| 512 | if (!dload) { |
| 513 | pr_err("%s: cannot remap I/O memory region: %08x\n", |
| 514 | __func__, DLOAD_USB_BASE_ADD); |
| 515 | return -ENXIO; |
| 516 | } |
| 517 | |
| 518 | pr_debug("%s: dload:%p pid:%x serial_num:%s\n", |
| 519 | __func__, dload, pid, snum); |
| 520 | /* update pid */ |
| 521 | dload->magic_struct.pid = PID_MAGIC_ID; |
| 522 | dload->pid = pid; |
| 523 | |
| 524 | /* update serial number */ |
| 525 | dload->magic_struct.serial_num = 0; |
| 526 | if (!snum) { |
| 527 | memset(dload->serial_number, 0, SERIAL_NUMBER_LENGTH); |
| 528 | goto out; |
| 529 | } |
| 530 | |
| 531 | dload->magic_struct.serial_num = SERIAL_NUM_MAGIC_ID; |
| 532 | strlcpy(dload->serial_number, snum, SERIAL_NUMBER_LENGTH); |
| 533 | out: |
| 534 | iounmap(dload); |
| 535 | return 0; |
| 536 | } |
| 537 | |
| 538 | static struct android_usb_platform_data android_usb_pdata = { |
| 539 | .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num, |
| 540 | }; |
| 541 | |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 542 | static struct platform_device android_usb_device = { |
Hemant Kumar | cb7d8a1 | 2012-01-25 12:25:55 -0800 | [diff] [blame] | 543 | .name = "android_usb", |
| 544 | .id = -1, |
| 545 | .dev = { |
| 546 | .platform_data = &android_usb_pdata, |
| 547 | }, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 548 | }; |
| 549 | |
Hemant Kumar | 7620eed | 2012-02-26 09:08:43 -0800 | [diff] [blame] | 550 | /* Bandwidth requests (zero) if no vote placed */ |
| 551 | static struct msm_bus_vectors usb_init_vectors[] = { |
| 552 | { |
| 553 | .src = MSM_BUS_MASTER_SPS, |
| 554 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 555 | .ab = 0, |
| 556 | .ib = 0, |
| 557 | }, |
| 558 | }; |
| 559 | |
| 560 | /* Bus bandwidth requests in Bytes/sec */ |
| 561 | static struct msm_bus_vectors usb_max_vectors[] = { |
| 562 | { |
| 563 | .src = MSM_BUS_MASTER_SPS, |
| 564 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 565 | .ab = 60000000, /* At least 480Mbps on bus. */ |
| 566 | .ib = 960000000, /* MAX bursts rate */ |
| 567 | }, |
| 568 | }; |
| 569 | |
| 570 | static struct msm_bus_paths usb_bus_scale_usecases[] = { |
| 571 | { |
| 572 | ARRAY_SIZE(usb_init_vectors), |
| 573 | usb_init_vectors, |
| 574 | }, |
| 575 | { |
| 576 | ARRAY_SIZE(usb_max_vectors), |
| 577 | usb_max_vectors, |
| 578 | }, |
| 579 | }; |
| 580 | |
| 581 | static struct msm_bus_scale_pdata usb_bus_scale_pdata = { |
| 582 | usb_bus_scale_usecases, |
| 583 | ARRAY_SIZE(usb_bus_scale_usecases), |
| 584 | .name = "usb", |
| 585 | }; |
| 586 | |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 587 | static struct msm_otg_platform_data msm_otg_pdata = { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 588 | .mode = USB_OTG, |
| 589 | .otg_control = OTG_PMIC_CONTROL, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 590 | .phy_type = SNPS_28NM_INTEGRATED_PHY, |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 591 | .pmic_id_irq = PM8921_USB_ID_IN_IRQ(PM8921_IRQ_BASE), |
| 592 | .power_budget = 750, |
Hemant Kumar | 7620eed | 2012-02-26 09:08:43 -0800 | [diff] [blame] | 593 | .bus_scale_table = &usb_bus_scale_pdata, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 594 | }; |
| 595 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 596 | static struct msm_usb_host_platform_data msm_ehci_host_pdata3 = { |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 597 | .power_budget = 500, |
| 598 | }; |
| 599 | |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 600 | #ifdef CONFIG_USB_EHCI_MSM_HOST4 |
| 601 | static struct msm_usb_host_platform_data msm_ehci_host_pdata4; |
| 602 | #endif |
| 603 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 604 | static void __init apq8064_ehci_host_init(void) |
| 605 | { |
| 606 | if (machine_is_apq8064_liquid()) { |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 607 | msm_ehci_host_pdata3.dock_connect_irq = |
Hemant Kumar | 5692535 | 2012-02-13 16:59:52 -0800 | [diff] [blame] | 608 | PM8921_MPP_IRQ(PM8921_IRQ_BASE, 9); |
| 609 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 610 | apq8064_device_ehci_host3.dev.platform_data = |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 611 | &msm_ehci_host_pdata3; |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 612 | platform_device_register(&apq8064_device_ehci_host3); |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 613 | |
| 614 | #ifdef CONFIG_USB_EHCI_MSM_HOST4 |
| 615 | apq8064_device_ehci_host4.dev.platform_data = |
| 616 | &msm_ehci_host_pdata4; |
| 617 | platform_device_register(&apq8064_device_ehci_host4); |
| 618 | #endif |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 619 | } |
| 620 | } |
| 621 | |
David Keitel | 2f613d9 | 2012-02-15 11:29:16 -0800 | [diff] [blame] | 622 | static struct smb349_platform_data smb349_data __initdata = { |
| 623 | .en_n_gpio = PM8921_GPIO_PM_TO_SYS(37), |
| 624 | .chg_susp_gpio = PM8921_GPIO_PM_TO_SYS(30), |
| 625 | .chg_current_ma = 2200, |
| 626 | }; |
| 627 | |
| 628 | static struct i2c_board_info smb349_charger_i2c_info[] __initdata = { |
| 629 | { |
| 630 | I2C_BOARD_INFO(SMB349_NAME, 0x1B), |
| 631 | .platform_data = &smb349_data, |
| 632 | }, |
| 633 | }; |
| 634 | |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 635 | struct sx150x_platform_data apq8064_sx150x_data[] = { |
| 636 | [SX150X_EPM] = { |
| 637 | .gpio_base = GPIO_EPM_EXPANDER_BASE, |
| 638 | .oscio_is_gpo = false, |
| 639 | .io_pullup_ena = 0x0, |
| 640 | .io_pulldn_ena = 0x0, |
| 641 | .io_open_drain_ena = 0x0, |
| 642 | .io_polarity = 0, |
| 643 | .irq_summary = -1, |
| 644 | }, |
| 645 | }; |
| 646 | |
| 647 | static struct epm_chan_properties ads_adc_channel_data[] = { |
| 648 | {10, 100}, {500, 50}, {1, 1}, {1, 1}, |
| 649 | {20, 50}, {10, 100}, {1, 1}, {1, 1}, |
| 650 | {10, 100}, {10, 100}, {100, 100}, {200, 100}, |
| 651 | {100, 50}, {2000, 50}, {1000, 50}, {200, 50}, |
| 652 | {200, 100}, {1, 1}, {20, 50}, {500, 50}, |
| 653 | {50, 50}, {200, 100}, {500, 100}, {20, 50}, |
| 654 | {200, 50}, {2000, 100}, {1000, 50}, {100, 50}, |
| 655 | {200, 100}, {500, 50}, {1000, 100}, {200, 50}, |
| 656 | {1000, 50}, {50, 50}, {100, 50}, {100, 50}, |
| 657 | {1, 1}, {1, 1}, {20, 100}, {20, 50}, |
| 658 | {500, 100}, {1000, 100}, {100, 50}, {1000, 50}, |
| 659 | {100, 50}, {1000, 100}, {100, 50}, {100, 50}, |
| 660 | }; |
| 661 | |
| 662 | static struct epm_adc_platform_data epm_adc_pdata = { |
| 663 | .channel = ads_adc_channel_data, |
| 664 | .bus_id = 0x0, |
| 665 | .epm_i2c_board_info = { |
| 666 | .type = "sx1509q", |
| 667 | .addr = 0x3e, |
| 668 | .platform_data = &apq8064_sx150x_data[SX150X_EPM], |
| 669 | }, |
| 670 | .gpio_expander_base_addr = GPIO_EPM_EXPANDER_BASE, |
| 671 | }; |
| 672 | |
| 673 | static struct platform_device epm_adc_device = { |
| 674 | .name = "epm_adc", |
| 675 | .id = -1, |
| 676 | .dev = { |
| 677 | .platform_data = &epm_adc_pdata, |
| 678 | }, |
| 679 | }; |
| 680 | |
| 681 | static void __init apq8064_epm_adc_init(void) |
| 682 | { |
| 683 | epm_adc_pdata.num_channels = 32; |
| 684 | epm_adc_pdata.num_adc = 2; |
| 685 | epm_adc_pdata.chan_per_adc = 16; |
| 686 | epm_adc_pdata.chan_per_mux = 8; |
| 687 | }; |
| 688 | |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 689 | /* Micbias setting is based on 8660 CDP/MTP/FLUID requirement |
| 690 | * 4 micbiases are used to power various analog and digital |
| 691 | * microphones operating at 1800 mV. Technically, all micbiases |
| 692 | * can source from single cfilter since all microphones operate |
| 693 | * at the same voltage level. The arrangement below is to make |
| 694 | * sure all cfilters are exercised. LDO_H regulator ouput level |
| 695 | * does not need to be as high as 2.85V. It is choosen for |
| 696 | * microphone sensitivity purpose. |
| 697 | */ |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 698 | static struct wcd9xxx_pdata apq8064_tabla_platform_data = { |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 699 | .slimbus_slave_device = { |
| 700 | .name = "tabla-slave", |
| 701 | .e_addr = {0, 0, 0x10, 0, 0x17, 2}, |
| 702 | }, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 703 | .irq = MSM_GPIO_TO_INT(42), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 704 | .irq_base = TABLA_INTERRUPT_BASE, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 705 | .num_irqs = NR_WCD9XXX_IRQS, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 706 | .reset_gpio = PM8921_GPIO_PM_TO_SYS(34), |
| 707 | .micbias = { |
| 708 | .ldoh_v = TABLA_LDOH_2P85_V, |
| 709 | .cfilt1_mv = 1800, |
| 710 | .cfilt2_mv = 1800, |
| 711 | .cfilt3_mv = 1800, |
| 712 | .bias1_cfilt_sel = TABLA_CFILT1_SEL, |
| 713 | .bias2_cfilt_sel = TABLA_CFILT2_SEL, |
| 714 | .bias3_cfilt_sel = TABLA_CFILT3_SEL, |
| 715 | .bias4_cfilt_sel = TABLA_CFILT3_SEL, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 716 | }, |
| 717 | .regulator = { |
| 718 | { |
| 719 | .name = "CDC_VDD_CP", |
| 720 | .min_uV = 1800000, |
| 721 | .max_uV = 1800000, |
| 722 | .optimum_uA = WCD9XXX_CDC_VDDA_CP_CUR_MAX, |
| 723 | }, |
| 724 | { |
| 725 | .name = "CDC_VDDA_RX", |
| 726 | .min_uV = 1800000, |
| 727 | .max_uV = 1800000, |
| 728 | .optimum_uA = WCD9XXX_CDC_VDDA_RX_CUR_MAX, |
| 729 | }, |
| 730 | { |
| 731 | .name = "CDC_VDDA_TX", |
| 732 | .min_uV = 1800000, |
| 733 | .max_uV = 1800000, |
| 734 | .optimum_uA = WCD9XXX_CDC_VDDA_TX_CUR_MAX, |
| 735 | }, |
| 736 | { |
| 737 | .name = "VDDIO_CDC", |
| 738 | .min_uV = 1800000, |
| 739 | .max_uV = 1800000, |
| 740 | .optimum_uA = WCD9XXX_VDDIO_CDC_CUR_MAX, |
| 741 | }, |
| 742 | { |
| 743 | .name = "VDDD_CDC_D", |
| 744 | .min_uV = 1225000, |
| 745 | .max_uV = 1225000, |
| 746 | .optimum_uA = WCD9XXX_VDDD_CDC_D_CUR_MAX, |
| 747 | }, |
| 748 | { |
| 749 | .name = "CDC_VDDA_A_1P2V", |
| 750 | .min_uV = 1225000, |
| 751 | .max_uV = 1225000, |
| 752 | .optimum_uA = WCD9XXX_VDDD_CDC_A_CUR_MAX, |
| 753 | }, |
| 754 | }, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 755 | }; |
| 756 | |
| 757 | static struct slim_device apq8064_slim_tabla = { |
| 758 | .name = "tabla-slim", |
| 759 | .e_addr = {0, 1, 0x10, 0, 0x17, 2}, |
| 760 | .dev = { |
| 761 | .platform_data = &apq8064_tabla_platform_data, |
| 762 | }, |
| 763 | }; |
| 764 | |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 765 | static struct wcd9xxx_pdata apq8064_tabla20_platform_data = { |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 766 | .slimbus_slave_device = { |
| 767 | .name = "tabla-slave", |
| 768 | .e_addr = {0, 0, 0x60, 0, 0x17, 2}, |
| 769 | }, |
| 770 | .irq = MSM_GPIO_TO_INT(42), |
| 771 | .irq_base = TABLA_INTERRUPT_BASE, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 772 | .num_irqs = NR_WCD9XXX_IRQS, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 773 | .reset_gpio = PM8921_GPIO_PM_TO_SYS(34), |
| 774 | .micbias = { |
| 775 | .ldoh_v = TABLA_LDOH_2P85_V, |
| 776 | .cfilt1_mv = 1800, |
| 777 | .cfilt2_mv = 1800, |
| 778 | .cfilt3_mv = 1800, |
| 779 | .bias1_cfilt_sel = TABLA_CFILT1_SEL, |
| 780 | .bias2_cfilt_sel = TABLA_CFILT2_SEL, |
| 781 | .bias3_cfilt_sel = TABLA_CFILT3_SEL, |
| 782 | .bias4_cfilt_sel = TABLA_CFILT3_SEL, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 783 | }, |
| 784 | .regulator = { |
| 785 | { |
| 786 | .name = "CDC_VDD_CP", |
| 787 | .min_uV = 1800000, |
| 788 | .max_uV = 1800000, |
| 789 | .optimum_uA = WCD9XXX_CDC_VDDA_CP_CUR_MAX, |
| 790 | }, |
| 791 | { |
| 792 | .name = "CDC_VDDA_RX", |
| 793 | .min_uV = 1800000, |
| 794 | .max_uV = 1800000, |
| 795 | .optimum_uA = WCD9XXX_CDC_VDDA_RX_CUR_MAX, |
| 796 | }, |
| 797 | { |
| 798 | .name = "CDC_VDDA_TX", |
| 799 | .min_uV = 1800000, |
| 800 | .max_uV = 1800000, |
| 801 | .optimum_uA = WCD9XXX_CDC_VDDA_TX_CUR_MAX, |
| 802 | }, |
| 803 | { |
| 804 | .name = "VDDIO_CDC", |
| 805 | .min_uV = 1800000, |
| 806 | .max_uV = 1800000, |
| 807 | .optimum_uA = WCD9XXX_VDDIO_CDC_CUR_MAX, |
| 808 | }, |
| 809 | { |
| 810 | .name = "VDDD_CDC_D", |
| 811 | .min_uV = 1225000, |
| 812 | .max_uV = 1225000, |
| 813 | .optimum_uA = WCD9XXX_VDDD_CDC_D_CUR_MAX, |
| 814 | }, |
| 815 | { |
| 816 | .name = "CDC_VDDA_A_1P2V", |
| 817 | .min_uV = 1225000, |
| 818 | .max_uV = 1225000, |
| 819 | .optimum_uA = WCD9XXX_VDDD_CDC_A_CUR_MAX, |
| 820 | }, |
| 821 | }, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 822 | }; |
| 823 | |
| 824 | static struct slim_device apq8064_slim_tabla20 = { |
| 825 | .name = "tabla2x-slim", |
| 826 | .e_addr = {0, 1, 0x60, 0, 0x17, 2}, |
| 827 | .dev = { |
| 828 | .platform_data = &apq8064_tabla20_platform_data, |
| 829 | }, |
| 830 | }; |
| 831 | |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 832 | #define HAP_SHIFT_LVL_OE_GPIO PM8921_MPP_PM_TO_SYS(8) |
| 833 | #define ISA1200_HAP_EN_GPIO PM8921_GPIO_PM_TO_SYS(33) |
| 834 | #define ISA1200_HAP_LEN_GPIO PM8921_GPIO_PM_TO_SYS(20) |
| 835 | #define ISA1200_HAP_CLK PM8921_GPIO_PM_TO_SYS(44) |
| 836 | |
| 837 | static int isa1200_power(int on) |
| 838 | { |
| 839 | gpio_set_value_cansleep(ISA1200_HAP_CLK, !!on); |
| 840 | |
| 841 | return 0; |
| 842 | } |
| 843 | |
| 844 | static int isa1200_dev_setup(bool enable) |
| 845 | { |
| 846 | int rc = 0; |
| 847 | |
| 848 | rc = pm8xxx_aux_clk_control(CLK_MP3_2, XO_DIV_1, enable); |
| 849 | if (rc) { |
| 850 | pr_err("%s: unable to write aux clock register(%d)\n", |
| 851 | __func__, rc); |
| 852 | return rc; |
| 853 | } |
| 854 | |
| 855 | if (!enable) |
| 856 | goto free_gpio; |
| 857 | |
| 858 | rc = gpio_request(ISA1200_HAP_CLK, "haptics_clk"); |
| 859 | if (rc) { |
| 860 | pr_err("%s: unable to request gpio %d config(%d)\n", |
| 861 | __func__, ISA1200_HAP_CLK, rc); |
| 862 | return rc; |
| 863 | } |
| 864 | |
| 865 | rc = gpio_direction_output(ISA1200_HAP_CLK, 0); |
| 866 | if (rc) { |
| 867 | pr_err("%s: unable to set direction\n", __func__); |
| 868 | goto free_gpio; |
| 869 | } |
| 870 | |
| 871 | return 0; |
| 872 | |
| 873 | free_gpio: |
| 874 | gpio_free(ISA1200_HAP_CLK); |
| 875 | return rc; |
| 876 | } |
| 877 | |
| 878 | static struct isa1200_regulator isa1200_reg_data[] = { |
| 879 | { |
| 880 | .name = "vddp", |
| 881 | .min_uV = ISA_I2C_VTG_MIN_UV, |
| 882 | .max_uV = ISA_I2C_VTG_MAX_UV, |
| 883 | .load_uA = ISA_I2C_CURR_UA, |
| 884 | }, |
| 885 | }; |
| 886 | |
| 887 | static struct isa1200_platform_data isa1200_1_pdata = { |
| 888 | .name = "vibrator", |
| 889 | .dev_setup = isa1200_dev_setup, |
| 890 | .power_on = isa1200_power, |
| 891 | .hap_en_gpio = ISA1200_HAP_EN_GPIO, |
| 892 | .hap_len_gpio = ISA1200_HAP_LEN_GPIO, |
| 893 | .max_timeout = 15000, |
| 894 | .mode_ctrl = PWM_GEN_MODE, |
| 895 | .pwm_fd = { |
| 896 | .pwm_div = 256, |
| 897 | }, |
| 898 | .is_erm = false, |
| 899 | .smart_en = true, |
| 900 | .ext_clk_en = true, |
| 901 | .chip_en = 1, |
| 902 | .regulator_info = isa1200_reg_data, |
| 903 | .num_regulators = ARRAY_SIZE(isa1200_reg_data), |
| 904 | }; |
| 905 | |
| 906 | static struct i2c_board_info isa1200_board_info[] __initdata = { |
| 907 | { |
| 908 | I2C_BOARD_INFO("isa1200_1", 0x90>>1), |
| 909 | .platform_data = &isa1200_1_pdata, |
| 910 | }, |
| 911 | }; |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 912 | /* configuration data for mxt1386e using V2.1 firmware */ |
| 913 | static const u8 mxt1386e_config_data_v2_1[] = { |
| 914 | /* T6 Object */ |
| 915 | 0, 0, 0, 0, 0, 0, |
| 916 | /* T38 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 917 | 14, 1, 0, 22, 2, 12, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 918 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 919 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 920 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 921 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 922 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 923 | 0, 0, 0, 0, |
| 924 | /* T7 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 925 | 100, 10, 50, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 926 | /* T8 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 927 | 25, 0, 20, 20, 0, 0, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 928 | /* T9 Object */ |
| 929 | 131, 0, 0, 26, 42, 0, 32, 80, 2, 5, |
| 930 | 0, 5, 5, 0, 10, 30, 10, 10, 255, 2, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 931 | 85, 5, 0, 5, 9, 5, 12, 35, 70, 40, |
| 932 | 20, 5, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 933 | /* T18 Object */ |
| 934 | 0, 0, |
| 935 | /* T24 Object */ |
| 936 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 937 | 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 938 | /* T25 Object */ |
| 939 | 3, 0, 60, 115, 156, 99, |
| 940 | /* T27 Object */ |
| 941 | 0, 0, 0, 0, 0, 0, 0, |
| 942 | /* T40 Object */ |
| 943 | 0, 0, 0, 0, 0, |
| 944 | /* T42 Object */ |
| 945 | 2, 0, 255, 0, 255, 0, 0, 0, 0, 0, |
| 946 | /* T43 Object */ |
| 947 | 0, 0, 0, 0, 0, 0, 0, 64, 0, 8, |
| 948 | 16, |
| 949 | /* T46 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 950 | 68, 0, 16, 16, 0, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 951 | /* T47 Object */ |
| 952 | 0, 0, 0, 0, 0, 0, 3, 64, 66, 0, |
| 953 | /* T48 Object */ |
| 954 | 31, 64, 64, 0, 0, 0, 0, 0, 0, 0, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 955 | 32, 40, 0, 10, 10, 0, 0, 100, 10, 90, |
| 956 | 0, 0, 0, 0, 0, 0, 0, 10, 1, 10, |
| 957 | 52, 10, 12, 0, 33, 0, 1, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 958 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 959 | 0, 0, 0, 0, |
| 960 | /* T56 Object */ |
| 961 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 962 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 963 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 964 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 965 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 966 | 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 967 | }; |
| 968 | |
| 969 | #define MXT_TS_GPIO_IRQ 6 |
| 970 | #define MXT_TS_PWR_EN_GPIO PM8921_GPIO_PM_TO_SYS(23) |
| 971 | #define MXT_TS_RESET_GPIO 33 |
| 972 | |
| 973 | static struct mxt_config_info mxt_config_array[] = { |
| 974 | { |
| 975 | .config = mxt1386e_config_data_v2_1, |
| 976 | .config_length = ARRAY_SIZE(mxt1386e_config_data_v2_1), |
| 977 | .family_id = 0xA0, |
| 978 | .variant_id = 0x7, |
| 979 | .version = 0x21, |
| 980 | .build = 0xAA, |
| 981 | }, |
| 982 | }; |
| 983 | |
| 984 | static struct mxt_platform_data mxt_platform_data = { |
| 985 | .config_array = mxt_config_array, |
| 986 | .config_array_size = ARRAY_SIZE(mxt_config_array), |
Mohan Pallaka | 56a1a5d | 2012-02-23 12:05:13 -0800 | [diff] [blame] | 987 | .panel_minx = 0, |
| 988 | .panel_maxx = 1365, |
| 989 | .panel_miny = 0, |
| 990 | .panel_maxy = 767, |
| 991 | .disp_minx = 0, |
| 992 | .disp_maxx = 1365, |
| 993 | .disp_miny = 0, |
| 994 | .disp_maxy = 767, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 995 | .irqflags = IRQF_TRIGGER_FALLING, |
| 996 | .i2c_pull_up = true, |
| 997 | .reset_gpio = MXT_TS_RESET_GPIO, |
| 998 | .irq_gpio = MXT_TS_GPIO_IRQ, |
| 999 | }; |
| 1000 | |
| 1001 | static struct i2c_board_info mxt_device_info[] __initdata = { |
| 1002 | { |
| 1003 | I2C_BOARD_INFO("atmel_mxt_ts", 0x5b), |
| 1004 | .platform_data = &mxt_platform_data, |
| 1005 | .irq = MSM_GPIO_TO_INT(MXT_TS_GPIO_IRQ), |
| 1006 | }, |
| 1007 | }; |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 1008 | #define CYTTSP_TS_GPIO_IRQ 6 |
| 1009 | #define CYTTSP_TS_GPIO_RESOUT 7 |
| 1010 | #define CYTTSP_TS_GPIO_SLEEP 33 |
| 1011 | |
| 1012 | static ssize_t tma340_vkeys_show(struct kobject *kobj, |
| 1013 | struct kobj_attribute *attr, char *buf) |
| 1014 | { |
| 1015 | return snprintf(buf, 200, |
| 1016 | __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":73:1120:97:97" |
| 1017 | ":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":230:1120:97:97" |
| 1018 | ":" __stringify(EV_KEY) ":" __stringify(KEY_HOME) ":389:1120:97:97" |
| 1019 | ":" __stringify(EV_KEY) ":" __stringify(KEY_SEARCH) ":544:1120:97:97" |
| 1020 | "\n"); |
| 1021 | } |
| 1022 | |
| 1023 | static struct kobj_attribute tma340_vkeys_attr = { |
| 1024 | .attr = { |
| 1025 | .mode = S_IRUGO, |
| 1026 | }, |
| 1027 | .show = &tma340_vkeys_show, |
| 1028 | }; |
| 1029 | |
| 1030 | static struct attribute *tma340_properties_attrs[] = { |
| 1031 | &tma340_vkeys_attr.attr, |
| 1032 | NULL |
| 1033 | }; |
| 1034 | |
| 1035 | static struct attribute_group tma340_properties_attr_group = { |
| 1036 | .attrs = tma340_properties_attrs, |
| 1037 | }; |
| 1038 | |
| 1039 | static int cyttsp_platform_init(struct i2c_client *client) |
| 1040 | { |
| 1041 | int rc = 0; |
| 1042 | static struct kobject *tma340_properties_kobj; |
| 1043 | |
| 1044 | tma340_vkeys_attr.attr.name = "virtualkeys.cyttsp-i2c"; |
| 1045 | tma340_properties_kobj = kobject_create_and_add("board_properties", |
| 1046 | NULL); |
| 1047 | if (tma340_properties_kobj) |
| 1048 | rc = sysfs_create_group(tma340_properties_kobj, |
| 1049 | &tma340_properties_attr_group); |
| 1050 | if (!tma340_properties_kobj || rc) |
| 1051 | pr_err("%s: failed to create board_properties\n", |
| 1052 | __func__); |
| 1053 | |
| 1054 | return 0; |
| 1055 | } |
| 1056 | |
| 1057 | static struct cyttsp_regulator cyttsp_regulator_data[] = { |
| 1058 | { |
| 1059 | .name = "vdd", |
| 1060 | .min_uV = CY_TMA300_VTG_MIN_UV, |
| 1061 | .max_uV = CY_TMA300_VTG_MAX_UV, |
| 1062 | .hpm_load_uA = CY_TMA300_CURR_24HZ_UA, |
| 1063 | .lpm_load_uA = CY_TMA300_CURR_24HZ_UA, |
| 1064 | }, |
| 1065 | { |
| 1066 | .name = "vcc_i2c", |
| 1067 | .min_uV = CY_I2C_VTG_MIN_UV, |
| 1068 | .max_uV = CY_I2C_VTG_MAX_UV, |
| 1069 | .hpm_load_uA = CY_I2C_CURR_UA, |
| 1070 | .lpm_load_uA = CY_I2C_CURR_UA, |
| 1071 | }, |
| 1072 | }; |
| 1073 | |
| 1074 | static struct cyttsp_platform_data cyttsp_pdata = { |
| 1075 | .panel_maxx = 634, |
| 1076 | .panel_maxy = 1166, |
| 1077 | .disp_maxx = 599, |
| 1078 | .disp_maxy = 1023, |
| 1079 | .disp_minx = 0, |
| 1080 | .disp_miny = 0, |
| 1081 | .flags = 0x01, |
| 1082 | .gen = CY_GEN3, |
| 1083 | .use_st = CY_USE_ST, |
| 1084 | .use_mt = CY_USE_MT, |
| 1085 | .use_hndshk = CY_SEND_HNDSHK, |
| 1086 | .use_trk_id = CY_USE_TRACKING_ID, |
| 1087 | .use_sleep = CY_USE_DEEP_SLEEP_SEL, |
| 1088 | .use_gestures = CY_USE_GESTURES, |
| 1089 | .fw_fname = "cyttsp_8064_mtp.hex", |
| 1090 | /* change act_intrvl to customize the Active power state |
| 1091 | * scanning/processing refresh interval for Operating mode |
| 1092 | */ |
| 1093 | .act_intrvl = CY_ACT_INTRVL_DFLT, |
| 1094 | /* change tch_tmout to customize the touch timeout for the |
| 1095 | * Active power state for Operating mode |
| 1096 | */ |
| 1097 | .tch_tmout = CY_TCH_TMOUT_DFLT, |
| 1098 | /* change lp_intrvl to customize the Low Power power state |
| 1099 | * scanning/processing refresh interval for Operating mode |
| 1100 | */ |
| 1101 | .lp_intrvl = CY_LP_INTRVL_DFLT, |
| 1102 | .sleep_gpio = CYTTSP_TS_GPIO_SLEEP, |
| 1103 | .resout_gpio = CYTTSP_TS_GPIO_RESOUT, |
| 1104 | .irq_gpio = CYTTSP_TS_GPIO_IRQ, |
| 1105 | .regulator_info = cyttsp_regulator_data, |
| 1106 | .num_regulators = ARRAY_SIZE(cyttsp_regulator_data), |
| 1107 | .init = cyttsp_platform_init, |
| 1108 | .correct_fw_ver = 17, |
| 1109 | }; |
| 1110 | |
| 1111 | static struct i2c_board_info cyttsp_info[] __initdata = { |
| 1112 | { |
| 1113 | I2C_BOARD_INFO(CY_I2C_NAME, 0x24), |
| 1114 | .platform_data = &cyttsp_pdata, |
| 1115 | .irq = MSM_GPIO_TO_INT(CYTTSP_TS_GPIO_IRQ), |
| 1116 | }, |
| 1117 | }; |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 1118 | |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 1119 | #define MSM_WCNSS_PHYS 0x03000000 |
| 1120 | #define MSM_WCNSS_SIZE 0x280000 |
| 1121 | |
| 1122 | static struct resource resources_wcnss_wlan[] = { |
| 1123 | { |
| 1124 | .start = RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1125 | .end = RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1126 | .name = "wcnss_wlanrx_irq", |
| 1127 | .flags = IORESOURCE_IRQ, |
| 1128 | }, |
| 1129 | { |
| 1130 | .start = RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 1131 | .end = RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 1132 | .name = "wcnss_wlantx_irq", |
| 1133 | .flags = IORESOURCE_IRQ, |
| 1134 | }, |
| 1135 | { |
| 1136 | .start = MSM_WCNSS_PHYS, |
| 1137 | .end = MSM_WCNSS_PHYS + MSM_WCNSS_SIZE - 1, |
| 1138 | .name = "wcnss_mmio", |
| 1139 | .flags = IORESOURCE_MEM, |
| 1140 | }, |
| 1141 | { |
| 1142 | .start = 64, |
| 1143 | .end = 68, |
| 1144 | .name = "wcnss_gpios_5wire", |
| 1145 | .flags = IORESOURCE_IO, |
| 1146 | }, |
| 1147 | }; |
| 1148 | |
| 1149 | static struct qcom_wcnss_opts qcom_wcnss_pdata = { |
| 1150 | .has_48mhz_xo = 1, |
| 1151 | }; |
| 1152 | |
| 1153 | static struct platform_device msm_device_wcnss_wlan = { |
| 1154 | .name = "wcnss_wlan", |
| 1155 | .id = 0, |
| 1156 | .num_resources = ARRAY_SIZE(resources_wcnss_wlan), |
| 1157 | .resource = resources_wcnss_wlan, |
| 1158 | .dev = {.platform_data = &qcom_wcnss_pdata}, |
| 1159 | }; |
| 1160 | |
Ankit Verma | b7c26e6 | 2012-02-28 15:04:15 -0800 | [diff] [blame] | 1161 | static struct platform_device msm_device_iris_fm __devinitdata = { |
| 1162 | .name = "iris_fm", |
| 1163 | .id = -1, |
| 1164 | }; |
| 1165 | |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1166 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1167 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \ |
| 1168 | defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1169 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1170 | |
| 1171 | #define QCE_SIZE 0x10000 |
| 1172 | #define QCE_0_BASE 0x11000000 |
| 1173 | |
| 1174 | #define QCE_HW_KEY_SUPPORT 0 |
| 1175 | #define QCE_SHA_HMAC_SUPPORT 1 |
| 1176 | #define QCE_SHARE_CE_RESOURCE 3 |
| 1177 | #define QCE_CE_SHARED 0 |
| 1178 | |
| 1179 | static struct resource qcrypto_resources[] = { |
| 1180 | [0] = { |
| 1181 | .start = QCE_0_BASE, |
| 1182 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 1183 | .flags = IORESOURCE_MEM, |
| 1184 | }, |
| 1185 | [1] = { |
| 1186 | .name = "crypto_channels", |
| 1187 | .start = DMOV8064_CE_IN_CHAN, |
| 1188 | .end = DMOV8064_CE_OUT_CHAN, |
| 1189 | .flags = IORESOURCE_DMA, |
| 1190 | }, |
| 1191 | [2] = { |
| 1192 | .name = "crypto_crci_in", |
| 1193 | .start = DMOV8064_CE_IN_CRCI, |
| 1194 | .end = DMOV8064_CE_IN_CRCI, |
| 1195 | .flags = IORESOURCE_DMA, |
| 1196 | }, |
| 1197 | [3] = { |
| 1198 | .name = "crypto_crci_out", |
| 1199 | .start = DMOV8064_CE_OUT_CRCI, |
| 1200 | .end = DMOV8064_CE_OUT_CRCI, |
| 1201 | .flags = IORESOURCE_DMA, |
| 1202 | }, |
| 1203 | }; |
| 1204 | |
| 1205 | static struct resource qcedev_resources[] = { |
| 1206 | [0] = { |
| 1207 | .start = QCE_0_BASE, |
| 1208 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 1209 | .flags = IORESOURCE_MEM, |
| 1210 | }, |
| 1211 | [1] = { |
| 1212 | .name = "crypto_channels", |
| 1213 | .start = DMOV8064_CE_IN_CHAN, |
| 1214 | .end = DMOV8064_CE_OUT_CHAN, |
| 1215 | .flags = IORESOURCE_DMA, |
| 1216 | }, |
| 1217 | [2] = { |
| 1218 | .name = "crypto_crci_in", |
| 1219 | .start = DMOV8064_CE_IN_CRCI, |
| 1220 | .end = DMOV8064_CE_IN_CRCI, |
| 1221 | .flags = IORESOURCE_DMA, |
| 1222 | }, |
| 1223 | [3] = { |
| 1224 | .name = "crypto_crci_out", |
| 1225 | .start = DMOV8064_CE_OUT_CRCI, |
| 1226 | .end = DMOV8064_CE_OUT_CRCI, |
| 1227 | .flags = IORESOURCE_DMA, |
| 1228 | }, |
| 1229 | }; |
| 1230 | |
| 1231 | #endif |
| 1232 | |
| 1233 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1234 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 1235 | |
| 1236 | static struct msm_ce_hw_support qcrypto_ce_hw_suppport = { |
| 1237 | .ce_shared = QCE_CE_SHARED, |
| 1238 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 1239 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 1240 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 1241 | .bus_scale_table = NULL, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1242 | }; |
| 1243 | |
| 1244 | static struct platform_device qcrypto_device = { |
| 1245 | .name = "qcrypto", |
| 1246 | .id = 0, |
| 1247 | .num_resources = ARRAY_SIZE(qcrypto_resources), |
| 1248 | .resource = qcrypto_resources, |
| 1249 | .dev = { |
| 1250 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 1251 | .platform_data = &qcrypto_ce_hw_suppport, |
| 1252 | }, |
| 1253 | }; |
| 1254 | #endif |
| 1255 | |
| 1256 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1257 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1258 | |
| 1259 | static struct msm_ce_hw_support qcedev_ce_hw_suppport = { |
| 1260 | .ce_shared = QCE_CE_SHARED, |
| 1261 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 1262 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 1263 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 1264 | .bus_scale_table = NULL, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1265 | }; |
| 1266 | |
| 1267 | static struct platform_device qcedev_device = { |
| 1268 | .name = "qce", |
| 1269 | .id = 0, |
| 1270 | .num_resources = ARRAY_SIZE(qcedev_resources), |
| 1271 | .resource = qcedev_resources, |
| 1272 | .dev = { |
| 1273 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 1274 | .platform_data = &qcedev_ce_hw_suppport, |
| 1275 | }, |
| 1276 | }; |
| 1277 | #endif |
| 1278 | |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1279 | static struct mdm_platform_data mdm_platform_data = { |
| 1280 | .mdm_version = "3.0", |
| 1281 | .ramdump_delay_ms = 2000, |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1282 | .peripheral_platform_device = &apq8064_device_hsic_host, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1283 | }; |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1284 | |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 1285 | static struct tsens_platform_data apq_tsens_pdata = { |
| 1286 | .tsens_factor = 1000, |
| 1287 | .hw_type = APQ_8064, |
| 1288 | .tsens_num_sensor = 11, |
| 1289 | .slope = {1176, 1176, 1154, 1176, 1111, |
| 1290 | 1132, 1132, 1199, 1132, 1199, 1132}, |
| 1291 | }; |
| 1292 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1293 | #define MSM_SHARED_RAM_PHYS 0x80000000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1294 | static void __init apq8064_map_io(void) |
| 1295 | { |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1296 | msm_shared_ram_phys = MSM_SHARED_RAM_PHYS; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1297 | msm_map_apq8064_io(); |
Jeff Ohlstein | 3a77f9f | 2011-09-06 14:50:20 -0700 | [diff] [blame] | 1298 | if (socinfo_init() < 0) |
| 1299 | pr_err("socinfo_init() failed!\n"); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1300 | } |
| 1301 | |
| 1302 | static void __init apq8064_init_irq(void) |
| 1303 | { |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1304 | struct msm_mpm_device_data *data = NULL; |
| 1305 | |
| 1306 | #ifdef CONFIG_MSM_MPM |
| 1307 | data = &apq8064_mpm_dev_data; |
| 1308 | #endif |
| 1309 | |
| 1310 | msm_mpm_irq_extn_init(data); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1311 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
| 1312 | (void *)MSM_QGIC_CPU_BASE); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1313 | } |
| 1314 | |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1315 | static struct platform_device msm8064_device_saw_regulator_core0 = { |
| 1316 | .name = "saw-regulator", |
| 1317 | .id = 0, |
| 1318 | .dev = { |
| 1319 | .platform_data = &msm8064_saw_regulator_pdata_8921_s5, |
| 1320 | }, |
| 1321 | }; |
| 1322 | |
| 1323 | static struct platform_device msm8064_device_saw_regulator_core1 = { |
| 1324 | .name = "saw-regulator", |
| 1325 | .id = 1, |
| 1326 | .dev = { |
| 1327 | .platform_data = &msm8064_saw_regulator_pdata_8921_s6, |
| 1328 | }, |
| 1329 | }; |
| 1330 | |
| 1331 | static struct platform_device msm8064_device_saw_regulator_core2 = { |
| 1332 | .name = "saw-regulator", |
| 1333 | .id = 2, |
| 1334 | .dev = { |
| 1335 | .platform_data = &msm8064_saw_regulator_pdata_8821_s0, |
| 1336 | }, |
| 1337 | }; |
| 1338 | |
| 1339 | static struct platform_device msm8064_device_saw_regulator_core3 = { |
| 1340 | .name = "saw-regulator", |
| 1341 | .id = 3, |
| 1342 | .dev = { |
| 1343 | .platform_data = &msm8064_saw_regulator_pdata_8821_s1, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1344 | |
| 1345 | }, |
| 1346 | }; |
| 1347 | |
Oluwafemi Adeyemi | f5a3142 | 2012-03-08 16:58:45 -0800 | [diff] [blame] | 1348 | static struct msm_rpmrs_level msm_rpmrs_levels[] = { |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1349 | { |
| 1350 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, |
| 1351 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1352 | true, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1353 | 100, 650, 801, 200, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1354 | }, |
| 1355 | |
| 1356 | { |
| 1357 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE, |
| 1358 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1359 | true, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1360 | 2000, 200, 576000, 2000, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1361 | }, |
| 1362 | |
| 1363 | { |
| 1364 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1365 | MSM_RPMRS_LIMITS(ON, GDHS, MAX, ACTIVE), |
| 1366 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1367 | 8500, 51, 1122000, 8500, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1368 | }, |
| 1369 | |
| 1370 | { |
| 1371 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1372 | MSM_RPMRS_LIMITS(ON, HSFS_OPEN, MAX, ACTIVE), |
| 1373 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1374 | 9000, 51, 1130300, 9000, |
| 1375 | }, |
| 1376 | { |
| 1377 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1378 | MSM_RPMRS_LIMITS(ON, HSFS_OPEN, ACTIVE, RET_HIGH), |
| 1379 | false, |
| 1380 | 10000, 51, 1130300, 10000, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1381 | }, |
| 1382 | |
| 1383 | { |
| 1384 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1385 | MSM_RPMRS_LIMITS(OFF, GDHS, MAX, ACTIVE), |
| 1386 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1387 | 12000, 14, 2205900, 12000, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1388 | }, |
| 1389 | |
| 1390 | { |
| 1391 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1392 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, MAX, ACTIVE), |
| 1393 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1394 | 18000, 12, 2364250, 18000, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1395 | }, |
| 1396 | |
| 1397 | { |
| 1398 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1399 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, ACTIVE, RET_HIGH), |
| 1400 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1401 | 23500, 10, 2667000, 23500, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1402 | }, |
| 1403 | |
| 1404 | { |
| 1405 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1406 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, RET_HIGH, RET_LOW), |
| 1407 | false, |
Praveen Chidambaram | e338067 | 2012-02-08 10:32:27 -0700 | [diff] [blame] | 1408 | 29700, 5, 2867000, 30000, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1409 | }, |
| 1410 | }; |
| 1411 | |
Oluwafemi Adeyemi | f5a3142 | 2012-03-08 16:58:45 -0800 | [diff] [blame] | 1412 | uint32_t apq8064_rpm_get_swfi_latency(void) |
| 1413 | { |
| 1414 | int i; |
| 1415 | |
| 1416 | for (i = 0; i < ARRAY_SIZE(msm_rpmrs_levels); i++) { |
| 1417 | if (msm_rpmrs_levels[i].sleep_mode == |
| 1418 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT) |
| 1419 | return msm_rpmrs_levels[i].latency_us; |
| 1420 | } |
| 1421 | |
| 1422 | return 0; |
| 1423 | } |
| 1424 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1425 | static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = { |
| 1426 | .mode = MSM_PM_BOOT_CONFIG_TZ, |
| 1427 | }; |
| 1428 | |
| 1429 | static struct msm_rpmrs_platform_data msm_rpmrs_data __initdata = { |
| 1430 | .levels = &msm_rpmrs_levels[0], |
| 1431 | .num_levels = ARRAY_SIZE(msm_rpmrs_levels), |
| 1432 | .vdd_mem_levels = { |
| 1433 | [MSM_RPMRS_VDD_MEM_RET_LOW] = 750000, |
| 1434 | [MSM_RPMRS_VDD_MEM_RET_HIGH] = 750000, |
| 1435 | [MSM_RPMRS_VDD_MEM_ACTIVE] = 1050000, |
| 1436 | [MSM_RPMRS_VDD_MEM_MAX] = 1150000, |
| 1437 | }, |
| 1438 | .vdd_dig_levels = { |
| 1439 | [MSM_RPMRS_VDD_DIG_RET_LOW] = 500000, |
| 1440 | [MSM_RPMRS_VDD_DIG_RET_HIGH] = 750000, |
| 1441 | [MSM_RPMRS_VDD_DIG_ACTIVE] = 950000, |
| 1442 | [MSM_RPMRS_VDD_DIG_MAX] = 1150000, |
| 1443 | }, |
| 1444 | .vdd_mask = 0x7FFFFF, |
| 1445 | .rpmrs_target_id = { |
| 1446 | [MSM_RPMRS_ID_PXO_CLK] = MSM_RPM_ID_PXO_CLK, |
| 1447 | [MSM_RPMRS_ID_L2_CACHE_CTL] = MSM_RPM_ID_LAST, |
| 1448 | [MSM_RPMRS_ID_VDD_DIG_0] = MSM_RPM_ID_PM8921_S3_0, |
| 1449 | [MSM_RPMRS_ID_VDD_DIG_1] = MSM_RPM_ID_PM8921_S3_1, |
| 1450 | [MSM_RPMRS_ID_VDD_MEM_0] = MSM_RPM_ID_PM8921_L24_0, |
| 1451 | [MSM_RPMRS_ID_VDD_MEM_1] = MSM_RPM_ID_PM8921_L24_1, |
| 1452 | [MSM_RPMRS_ID_RPM_CTL] = MSM_RPM_ID_RPM_CTL, |
| 1453 | }, |
| 1454 | }; |
| 1455 | |
| 1456 | static struct msm_cpuidle_state msm_cstates[] __initdata = { |
| 1457 | {0, 0, "C0", "WFI", |
| 1458 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1459 | |
| 1460 | {0, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1461 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1462 | |
| 1463 | {0, 2, "C2", "POWER_COLLAPSE", |
| 1464 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE}, |
| 1465 | |
| 1466 | {1, 0, "C0", "WFI", |
| 1467 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1468 | |
| 1469 | {1, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1470 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1471 | |
| 1472 | {2, 0, "C0", "WFI", |
| 1473 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1474 | |
| 1475 | {2, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1476 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1477 | |
| 1478 | {3, 0, "C0", "WFI", |
| 1479 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1480 | |
| 1481 | {3, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1482 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1483 | }; |
| 1484 | |
| 1485 | static struct msm_pm_platform_data msm_pm_data[] = { |
| 1486 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1487 | .idle_supported = 1, |
| 1488 | .suspend_supported = 1, |
| 1489 | .idle_enabled = 0, |
| 1490 | .suspend_enabled = 0, |
| 1491 | }, |
| 1492 | |
| 1493 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1494 | .idle_supported = 1, |
| 1495 | .suspend_supported = 1, |
| 1496 | .idle_enabled = 0, |
| 1497 | .suspend_enabled = 0, |
| 1498 | }, |
| 1499 | |
| 1500 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1501 | .idle_supported = 1, |
| 1502 | .suspend_supported = 1, |
| 1503 | .idle_enabled = 1, |
| 1504 | .suspend_enabled = 1, |
| 1505 | }, |
| 1506 | |
| 1507 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1508 | .idle_supported = 0, |
| 1509 | .suspend_supported = 1, |
| 1510 | .idle_enabled = 0, |
| 1511 | .suspend_enabled = 0, |
| 1512 | }, |
| 1513 | |
| 1514 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1515 | .idle_supported = 1, |
| 1516 | .suspend_supported = 1, |
| 1517 | .idle_enabled = 0, |
| 1518 | .suspend_enabled = 0, |
| 1519 | }, |
| 1520 | |
| 1521 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1522 | .idle_supported = 1, |
| 1523 | .suspend_supported = 0, |
| 1524 | .idle_enabled = 1, |
| 1525 | .suspend_enabled = 0, |
| 1526 | }, |
| 1527 | |
| 1528 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1529 | .idle_supported = 0, |
| 1530 | .suspend_supported = 1, |
| 1531 | .idle_enabled = 0, |
| 1532 | .suspend_enabled = 0, |
| 1533 | }, |
| 1534 | |
| 1535 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1536 | .idle_supported = 1, |
| 1537 | .suspend_supported = 1, |
| 1538 | .idle_enabled = 0, |
| 1539 | .suspend_enabled = 0, |
| 1540 | }, |
| 1541 | |
| 1542 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1543 | .idle_supported = 1, |
| 1544 | .suspend_supported = 0, |
| 1545 | .idle_enabled = 1, |
| 1546 | .suspend_enabled = 0, |
| 1547 | }, |
| 1548 | |
| 1549 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1550 | .idle_supported = 0, |
| 1551 | .suspend_supported = 1, |
| 1552 | .idle_enabled = 0, |
| 1553 | .suspend_enabled = 0, |
| 1554 | }, |
| 1555 | |
| 1556 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1557 | .idle_supported = 1, |
| 1558 | .suspend_supported = 1, |
| 1559 | .idle_enabled = 0, |
| 1560 | .suspend_enabled = 0, |
| 1561 | }, |
| 1562 | |
| 1563 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1564 | .idle_supported = 1, |
| 1565 | .suspend_supported = 0, |
| 1566 | .idle_enabled = 1, |
| 1567 | .suspend_enabled = 0, |
| 1568 | }, |
| 1569 | }; |
| 1570 | |
| 1571 | static uint8_t spm_wfi_cmd_sequence[] __initdata = { |
| 1572 | 0x03, 0x0f, |
| 1573 | }; |
| 1574 | |
| 1575 | static uint8_t spm_power_collapse_without_rpm[] __initdata = { |
| 1576 | 0x00, 0x24, 0x54, 0x10, |
| 1577 | 0x09, 0x03, 0x01, |
| 1578 | 0x10, 0x54, 0x30, 0x0C, |
| 1579 | 0x24, 0x30, 0x0f, |
| 1580 | }; |
| 1581 | |
| 1582 | static uint8_t spm_power_collapse_with_rpm[] __initdata = { |
| 1583 | 0x00, 0x24, 0x54, 0x10, |
| 1584 | 0x09, 0x07, 0x01, 0x0B, |
| 1585 | 0x10, 0x54, 0x30, 0x0C, |
| 1586 | 0x24, 0x30, 0x0f, |
| 1587 | }; |
| 1588 | |
| 1589 | static struct msm_spm_seq_entry msm_spm_seq_list[] __initdata = { |
| 1590 | [0] = { |
| 1591 | .mode = MSM_SPM_MODE_CLOCK_GATING, |
| 1592 | .notify_rpm = false, |
| 1593 | .cmd = spm_wfi_cmd_sequence, |
| 1594 | }, |
| 1595 | [1] = { |
| 1596 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1597 | .notify_rpm = false, |
| 1598 | .cmd = spm_power_collapse_without_rpm, |
| 1599 | }, |
| 1600 | [2] = { |
| 1601 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1602 | .notify_rpm = true, |
| 1603 | .cmd = spm_power_collapse_with_rpm, |
| 1604 | }, |
| 1605 | }; |
| 1606 | |
| 1607 | static uint8_t l2_spm_wfi_cmd_sequence[] __initdata = { |
| 1608 | 0x00, 0x20, 0x03, 0x20, |
| 1609 | 0x00, 0x0f, |
| 1610 | }; |
| 1611 | |
| 1612 | static uint8_t l2_spm_gdhs_cmd_sequence[] __initdata = { |
| 1613 | 0x00, 0x20, 0x34, 0x64, |
| 1614 | 0x48, 0x07, 0x48, 0x20, |
| 1615 | 0x50, 0x64, 0x04, 0x34, |
| 1616 | 0x50, 0x0f, |
| 1617 | }; |
| 1618 | static uint8_t l2_spm_power_off_cmd_sequence[] __initdata = { |
| 1619 | 0x00, 0x10, 0x34, 0x64, |
| 1620 | 0x48, 0x07, 0x48, 0x10, |
| 1621 | 0x50, 0x64, 0x04, 0x34, |
| 1622 | 0x50, 0x0F, |
| 1623 | }; |
| 1624 | |
| 1625 | static struct msm_spm_seq_entry msm_spm_l2_seq_list[] __initdata = { |
| 1626 | [0] = { |
| 1627 | .mode = MSM_SPM_L2_MODE_RETENTION, |
| 1628 | .notify_rpm = false, |
| 1629 | .cmd = l2_spm_wfi_cmd_sequence, |
| 1630 | }, |
| 1631 | [1] = { |
| 1632 | .mode = MSM_SPM_L2_MODE_GDHS, |
| 1633 | .notify_rpm = true, |
| 1634 | .cmd = l2_spm_gdhs_cmd_sequence, |
| 1635 | }, |
| 1636 | [2] = { |
| 1637 | .mode = MSM_SPM_L2_MODE_POWER_COLLAPSE, |
| 1638 | .notify_rpm = true, |
| 1639 | .cmd = l2_spm_power_off_cmd_sequence, |
| 1640 | }, |
| 1641 | }; |
| 1642 | |
| 1643 | |
| 1644 | static struct msm_spm_platform_data msm_spm_l2_data[] __initdata = { |
| 1645 | [0] = { |
| 1646 | .reg_base_addr = MSM_SAW_L2_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1647 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x00, |
Praveen Chidambaram | e4b9eb1 | 2012-02-28 19:39:58 -0700 | [diff] [blame] | 1648 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020204, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1649 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x00A000AE, |
| 1650 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x00A00020, |
| 1651 | .modes = msm_spm_l2_seq_list, |
| 1652 | .num_modes = ARRAY_SIZE(msm_spm_l2_seq_list), |
| 1653 | }, |
| 1654 | }; |
| 1655 | |
| 1656 | static struct msm_spm_platform_data msm_spm_data[] __initdata = { |
| 1657 | [0] = { |
| 1658 | .reg_base_addr = MSM_SAW0_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1659 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1660 | #if defined(CONFIG_MSM_AVS_HW) |
| 1661 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1662 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1663 | #endif |
| 1664 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
Praveen Chidambaram | e4b9eb1 | 2012-02-28 19:39:58 -0700 | [diff] [blame] | 1665 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020204, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1666 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1667 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1668 | .vctl_timeout_us = 50, |
| 1669 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1670 | .modes = msm_spm_seq_list, |
| 1671 | }, |
| 1672 | [1] = { |
| 1673 | .reg_base_addr = MSM_SAW1_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1674 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1675 | #if defined(CONFIG_MSM_AVS_HW) |
| 1676 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1677 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1678 | #endif |
| 1679 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
Praveen Chidambaram | e4b9eb1 | 2012-02-28 19:39:58 -0700 | [diff] [blame] | 1680 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020204, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1681 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1682 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1683 | .vctl_timeout_us = 50, |
| 1684 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1685 | .modes = msm_spm_seq_list, |
| 1686 | }, |
| 1687 | [2] = { |
| 1688 | .reg_base_addr = MSM_SAW2_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1689 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1690 | #if defined(CONFIG_MSM_AVS_HW) |
| 1691 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1692 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1693 | #endif |
| 1694 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
Praveen Chidambaram | e4b9eb1 | 2012-02-28 19:39:58 -0700 | [diff] [blame] | 1695 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020204, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1696 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1697 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1698 | .vctl_timeout_us = 50, |
| 1699 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1700 | .modes = msm_spm_seq_list, |
| 1701 | }, |
| 1702 | [3] = { |
| 1703 | .reg_base_addr = MSM_SAW3_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1704 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1705 | #if defined(CONFIG_MSM_AVS_HW) |
| 1706 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1707 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1708 | #endif |
| 1709 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
Praveen Chidambaram | e4b9eb1 | 2012-02-28 19:39:58 -0700 | [diff] [blame] | 1710 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020204, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1711 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1712 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1713 | .vctl_timeout_us = 50, |
| 1714 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1715 | .modes = msm_spm_seq_list, |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1716 | }, |
| 1717 | }; |
| 1718 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1719 | static void __init apq8064_init_buses(void) |
| 1720 | { |
| 1721 | msm_bus_rpm_set_mt_mask(); |
| 1722 | msm_bus_8064_apps_fabric_pdata.rpm_enabled = 1; |
| 1723 | msm_bus_8064_sys_fabric_pdata.rpm_enabled = 1; |
| 1724 | msm_bus_8064_mm_fabric_pdata.rpm_enabled = 1; |
| 1725 | msm_bus_8064_apps_fabric.dev.platform_data = |
| 1726 | &msm_bus_8064_apps_fabric_pdata; |
| 1727 | msm_bus_8064_sys_fabric.dev.platform_data = |
| 1728 | &msm_bus_8064_sys_fabric_pdata; |
| 1729 | msm_bus_8064_mm_fabric.dev.platform_data = |
| 1730 | &msm_bus_8064_mm_fabric_pdata; |
| 1731 | msm_bus_8064_sys_fpb.dev.platform_data = &msm_bus_8064_sys_fpb_pdata; |
| 1732 | msm_bus_8064_cpss_fpb.dev.platform_data = &msm_bus_8064_cpss_fpb_pdata; |
| 1733 | } |
| 1734 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1735 | static struct platform_device apq8064_device_ext_5v_vreg __devinitdata = { |
| 1736 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1737 | .id = PM8921_MPP_PM_TO_SYS(7), |
| 1738 | .dev = { |
| 1739 | .platform_data |
| 1740 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_5V], |
| 1741 | }, |
| 1742 | }; |
| 1743 | |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 1744 | static struct platform_device apq8064_device_ext_mpp8_vreg __devinitdata = { |
| 1745 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1746 | .id = PM8921_MPP_PM_TO_SYS(8), |
| 1747 | .dev = { |
| 1748 | .platform_data |
| 1749 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_MPP8], |
| 1750 | }, |
| 1751 | }; |
| 1752 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1753 | static struct platform_device apq8064_device_ext_3p3v_vreg __devinitdata = { |
| 1754 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1755 | .id = APQ8064_EXT_3P3V_REG_EN_GPIO, |
| 1756 | .dev = { |
| 1757 | .platform_data = |
| 1758 | &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_3P3V], |
| 1759 | }, |
| 1760 | }; |
| 1761 | |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 1762 | static struct platform_device apq8064_device_ext_ts_sw_vreg __devinitdata = { |
| 1763 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1764 | .id = PM8921_GPIO_PM_TO_SYS(23), |
| 1765 | .dev = { |
| 1766 | .platform_data |
| 1767 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_TS_SW], |
| 1768 | }, |
| 1769 | }; |
| 1770 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 1771 | static struct platform_device apq8064_device_rpm_regulator __devinitdata = { |
| 1772 | .name = "rpm-regulator", |
| 1773 | .id = -1, |
| 1774 | .dev = { |
| 1775 | .platform_data = &apq8064_rpm_regulator_pdata, |
| 1776 | }, |
| 1777 | }; |
| 1778 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1779 | static struct platform_device *common_devices[] __initdata = { |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 1780 | &apq8064_device_dmov, |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1781 | &apq8064_device_qup_i2c_gsbi1, |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1782 | &apq8064_device_qup_i2c_gsbi3, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1783 | &apq8064_device_qup_i2c_gsbi4, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1784 | &apq8064_device_qup_spi_gsbi5, |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1785 | &apq8064_device_ext_5v_vreg, |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 1786 | &apq8064_device_ext_mpp8_vreg, |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1787 | &apq8064_device_ext_3p3v_vreg, |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 1788 | &apq8064_device_ext_ts_sw_vreg, |
Jay Chokshi | 9c25f07 | 2011-09-23 18:19:15 -0700 | [diff] [blame] | 1789 | &apq8064_device_ssbi_pmic1, |
| 1790 | &apq8064_device_ssbi_pmic2, |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1791 | &msm_device_smd_apq8064, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 1792 | &apq8064_device_otg, |
| 1793 | &apq8064_device_gadget_peripheral, |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 1794 | &apq8064_device_hsusb_host, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 1795 | &android_usb_device, |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 1796 | &msm_device_wcnss_wlan, |
Ankit Verma | b7c26e6 | 2012-02-28 15:04:15 -0800 | [diff] [blame] | 1797 | &msm_device_iris_fm, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1798 | #ifdef CONFIG_ANDROID_PMEM |
| 1799 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 1800 | &android_pmem_device, |
| 1801 | &android_pmem_adsp_device, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1802 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 1803 | &android_pmem_audio_device, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1804 | #endif |
| 1805 | #ifdef CONFIG_ION_MSM |
| 1806 | &ion_dev, |
| 1807 | #endif |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 1808 | &msm8064_device_watchdog, |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1809 | &msm8064_device_saw_regulator_core0, |
| 1810 | &msm8064_device_saw_regulator_core1, |
| 1811 | &msm8064_device_saw_regulator_core2, |
| 1812 | &msm8064_device_saw_regulator_core3, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1813 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1814 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 1815 | &qcrypto_device, |
| 1816 | #endif |
| 1817 | |
| 1818 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1819 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1820 | &qcedev_device, |
| 1821 | #endif |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1822 | |
| 1823 | #ifdef CONFIG_HW_RANDOM_MSM |
| 1824 | &apq8064_device_rng, |
| 1825 | #endif |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 1826 | &apq_pcm, |
| 1827 | &apq_pcm_routing, |
| 1828 | &apq_cpudai0, |
| 1829 | &apq_cpudai1, |
| 1830 | &apq_cpudai_hdmi_rx, |
| 1831 | &apq_cpudai_bt_rx, |
| 1832 | &apq_cpudai_bt_tx, |
| 1833 | &apq_cpudai_fm_rx, |
| 1834 | &apq_cpudai_fm_tx, |
| 1835 | &apq_cpu_fe, |
| 1836 | &apq_stub_codec, |
| 1837 | &apq_voice, |
| 1838 | &apq_voip, |
| 1839 | &apq_lpa_pcm, |
| 1840 | &apq_pcm_hostless, |
| 1841 | &apq_cpudai_afe_01_rx, |
| 1842 | &apq_cpudai_afe_01_tx, |
| 1843 | &apq_cpudai_afe_02_rx, |
| 1844 | &apq_cpudai_afe_02_tx, |
| 1845 | &apq_pcm_afe, |
| 1846 | &apq_cpudai_auxpcm_rx, |
| 1847 | &apq_cpudai_auxpcm_tx, |
Neema Shetty | 8427c26 | 2012-02-16 11:23:43 -0800 | [diff] [blame] | 1848 | &apq_cpudai_stub, |
Neema Shetty | 3c9d286 | 2012-03-11 01:25:32 -0800 | [diff] [blame] | 1849 | &apq_cpudai_slimbus_1_rx, |
| 1850 | &apq_cpudai_slimbus_1_tx, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1851 | &apq8064_rpm_device, |
| 1852 | &apq8064_rpm_log_device, |
| 1853 | &apq8064_rpm_stat_device, |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1854 | &msm_bus_8064_apps_fabric, |
| 1855 | &msm_bus_8064_sys_fabric, |
| 1856 | &msm_bus_8064_mm_fabric, |
| 1857 | &msm_bus_8064_sys_fpb, |
| 1858 | &msm_bus_8064_cpss_fpb, |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1859 | &apq8064_msm_device_vidc, |
Stephen Boyd | 25c4a0b | 2011-09-20 00:12:36 -0700 | [diff] [blame] | 1860 | &msm_pil_dsps, |
Matt Wagantall | ed83265 | 2012-02-02 19:23:17 -0800 | [diff] [blame] | 1861 | &msm_8960_riva, |
Matt Wagantall | b94b9a5 | 2012-02-02 21:59:54 -0800 | [diff] [blame] | 1862 | &msm_8960_q6_lpass, |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1863 | &msm_gss, |
Laura Abbott | 350c836 | 2012-02-28 14:46:52 -0800 | [diff] [blame] | 1864 | #ifdef CONFIG_MSM_RTB |
| 1865 | &msm_rtb_device, |
| 1866 | #endif |
Praveen Chidambaram | 8ea3dcd | 2011-12-07 14:46:31 -0700 | [diff] [blame] | 1867 | &apq8064_cpu_idle_device, |
Praveen Chidambaram | 5c8adf2 | 2012-02-23 18:44:37 -0700 | [diff] [blame] | 1868 | &apq8064_msm_gov_device, |
Stepan Moskovchenko | 28662c5 | 2012-03-01 12:48:45 -0800 | [diff] [blame] | 1869 | &apq8064_device_cache_erp, |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 1870 | &epm_adc_device, |
Pratik Patel | 212ab36 | 2012-03-16 12:30:07 -0700 | [diff] [blame] | 1871 | &apq8064_qdss_device, |
| 1872 | &msm_etb_device, |
| 1873 | &msm_tpiu_device, |
| 1874 | &msm_funnel_device, |
| 1875 | &apq8064_etm_device, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1876 | }; |
| 1877 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 1878 | static struct platform_device *sim_devices[] __initdata = { |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 1879 | &apq8064_device_uart_gsbi3, |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1880 | &msm_device_sps_apq8064, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 1881 | }; |
| 1882 | |
| 1883 | static struct platform_device *rumi3_devices[] __initdata = { |
| 1884 | &apq8064_device_uart_gsbi1, |
Yan He | 435ed61 | 2011-11-23 17:34:59 -0800 | [diff] [blame] | 1885 | &msm_device_sps_apq8064, |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 1886 | #ifdef CONFIG_MSM_ROTATOR |
| 1887 | &msm_rotator_device, |
| 1888 | #endif |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 1889 | }; |
| 1890 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 1891 | static struct platform_device *cdp_devices[] __initdata = { |
| 1892 | &apq8064_device_uart_gsbi1, |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 1893 | &apq8064_device_uart_gsbi7, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 1894 | &msm_device_sps_apq8064, |
Aravind Venkateswaran | 4ca2753 | 2012-02-16 14:27:05 -0800 | [diff] [blame] | 1895 | #ifdef CONFIG_MSM_ROTATOR |
| 1896 | &msm_rotator_device, |
| 1897 | #endif |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 1898 | }; |
| 1899 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1900 | static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = { |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 1901 | .max_clock_speed = 1100000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1902 | }; |
| 1903 | |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 1904 | #define KS8851_IRQ_GPIO 43 |
| 1905 | |
| 1906 | static struct spi_board_info spi_board_info[] __initdata = { |
| 1907 | { |
| 1908 | .modalias = "ks8851", |
| 1909 | .irq = MSM_GPIO_TO_INT(KS8851_IRQ_GPIO), |
| 1910 | .max_speed_hz = 19200000, |
| 1911 | .bus_num = 0, |
| 1912 | .chip_select = 2, |
| 1913 | .mode = SPI_MODE_0, |
| 1914 | }, |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 1915 | { |
| 1916 | .modalias = "epm_adc", |
| 1917 | .max_speed_hz = 1100000, |
| 1918 | .bus_num = 0, |
| 1919 | .chip_select = 3, |
| 1920 | .mode = SPI_MODE_0, |
| 1921 | }, |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 1922 | }; |
| 1923 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 1924 | static struct slim_boardinfo apq8064_slim_devices[] = { |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 1925 | { |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 1926 | .bus_num = 1, |
| 1927 | .slim_slave = &apq8064_slim_tabla, |
| 1928 | }, |
| 1929 | { |
| 1930 | .bus_num = 1, |
| 1931 | .slim_slave = &apq8064_slim_tabla20, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 1932 | }, |
| 1933 | /* add more slimbus slaves as needed */ |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 1934 | }; |
| 1935 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1936 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi1_pdata = { |
| 1937 | .clk_freq = 100000, |
| 1938 | .src_clk_rate = 24000000, |
| 1939 | }; |
| 1940 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1941 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi3_pdata = { |
| 1942 | .clk_freq = 100000, |
| 1943 | .src_clk_rate = 24000000, |
| 1944 | }; |
| 1945 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1946 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { |
| 1947 | .clk_freq = 100000, |
| 1948 | .src_clk_rate = 24000000, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1949 | }; |
| 1950 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1951 | #define GSBI_DUAL_MODE_CODE 0x60 |
| 1952 | #define MSM_GSBI1_PHYS 0x12440000 |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1953 | static void __init apq8064_i2c_init(void) |
| 1954 | { |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1955 | void __iomem *gsbi_mem; |
| 1956 | |
| 1957 | apq8064_device_qup_i2c_gsbi1.dev.platform_data = |
| 1958 | &apq8064_i2c_qup_gsbi1_pdata; |
| 1959 | gsbi_mem = ioremap_nocache(MSM_GSBI1_PHYS, 4); |
| 1960 | writel_relaxed(GSBI_DUAL_MODE_CODE, gsbi_mem); |
| 1961 | /* Ensure protocol code is written before proceeding */ |
| 1962 | wmb(); |
| 1963 | iounmap(gsbi_mem); |
| 1964 | apq8064_i2c_qup_gsbi1_pdata.use_gsbi_shared_mode = 1; |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1965 | apq8064_device_qup_i2c_gsbi3.dev.platform_data = |
| 1966 | &apq8064_i2c_qup_gsbi3_pdata; |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 1967 | apq8064_device_qup_i2c_gsbi1.dev.platform_data = |
| 1968 | &apq8064_i2c_qup_gsbi1_pdata; |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1969 | apq8064_device_qup_i2c_gsbi4.dev.platform_data = |
| 1970 | &apq8064_i2c_qup_gsbi4_pdata; |
| 1971 | } |
| 1972 | |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 1973 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 1974 | static int ethernet_init(void) |
| 1975 | { |
| 1976 | int ret; |
| 1977 | ret = gpio_request(KS8851_IRQ_GPIO, "ks8851_irq"); |
| 1978 | if (ret) { |
| 1979 | pr_err("ks8851 gpio_request failed: %d\n", ret); |
| 1980 | goto fail; |
| 1981 | } |
| 1982 | |
| 1983 | return 0; |
| 1984 | fail: |
| 1985 | return ret; |
| 1986 | } |
| 1987 | #else |
| 1988 | static int ethernet_init(void) |
| 1989 | { |
| 1990 | return 0; |
| 1991 | } |
| 1992 | #endif |
| 1993 | |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 1994 | #define GPIO_KEY_HOME PM8921_GPIO_PM_TO_SYS(27) |
| 1995 | #define GPIO_KEY_VOLUME_UP PM8921_GPIO_PM_TO_SYS(35) |
| 1996 | #define GPIO_KEY_VOLUME_DOWN PM8921_GPIO_PM_TO_SYS(38) |
| 1997 | #define GPIO_KEY_CAM_FOCUS PM8921_GPIO_PM_TO_SYS(3) |
| 1998 | #define GPIO_KEY_CAM_SNAP PM8921_GPIO_PM_TO_SYS(4) |
Jing Lin | 3f8f842 | 2012-03-05 09:32:11 -0800 | [diff] [blame] | 1999 | #define GPIO_KEY_ROTATION PM8921_GPIO_PM_TO_SYS(42) |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 2000 | |
| 2001 | static struct gpio_keys_button cdp_keys[] = { |
| 2002 | { |
| 2003 | .code = KEY_HOME, |
| 2004 | .gpio = GPIO_KEY_HOME, |
| 2005 | .desc = "home_key", |
| 2006 | .active_low = 1, |
| 2007 | .type = EV_KEY, |
| 2008 | .wakeup = 1, |
| 2009 | .debounce_interval = 15, |
| 2010 | }, |
| 2011 | { |
| 2012 | .code = KEY_VOLUMEUP, |
| 2013 | .gpio = GPIO_KEY_VOLUME_UP, |
| 2014 | .desc = "volume_up_key", |
| 2015 | .active_low = 1, |
| 2016 | .type = EV_KEY, |
| 2017 | .wakeup = 1, |
| 2018 | .debounce_interval = 15, |
| 2019 | }, |
| 2020 | { |
| 2021 | .code = KEY_VOLUMEDOWN, |
| 2022 | .gpio = GPIO_KEY_VOLUME_DOWN, |
| 2023 | .desc = "volume_down_key", |
| 2024 | .active_low = 1, |
| 2025 | .type = EV_KEY, |
| 2026 | .wakeup = 1, |
| 2027 | .debounce_interval = 15, |
| 2028 | }, |
| 2029 | { |
| 2030 | .code = SW_ROTATE_LOCK, |
| 2031 | .gpio = GPIO_KEY_ROTATION, |
| 2032 | .desc = "rotate_key", |
| 2033 | .active_low = 1, |
| 2034 | .type = EV_SW, |
| 2035 | .debounce_interval = 15, |
| 2036 | }, |
| 2037 | }; |
| 2038 | |
| 2039 | static struct gpio_keys_platform_data cdp_keys_data = { |
| 2040 | .buttons = cdp_keys, |
| 2041 | .nbuttons = ARRAY_SIZE(cdp_keys), |
| 2042 | }; |
| 2043 | |
| 2044 | static struct platform_device cdp_kp_pdev = { |
| 2045 | .name = "gpio-keys", |
| 2046 | .id = -1, |
| 2047 | .dev = { |
| 2048 | .platform_data = &cdp_keys_data, |
| 2049 | }, |
| 2050 | }; |
| 2051 | |
| 2052 | static struct gpio_keys_button mtp_keys[] = { |
| 2053 | { |
| 2054 | .code = KEY_CAMERA_FOCUS, |
| 2055 | .gpio = GPIO_KEY_CAM_FOCUS, |
| 2056 | .desc = "cam_focus_key", |
| 2057 | .active_low = 1, |
| 2058 | .type = EV_KEY, |
| 2059 | .wakeup = 1, |
| 2060 | .debounce_interval = 15, |
| 2061 | }, |
| 2062 | { |
| 2063 | .code = KEY_VOLUMEUP, |
| 2064 | .gpio = GPIO_KEY_VOLUME_UP, |
| 2065 | .desc = "volume_up_key", |
| 2066 | .active_low = 1, |
| 2067 | .type = EV_KEY, |
| 2068 | .wakeup = 1, |
| 2069 | .debounce_interval = 15, |
| 2070 | }, |
| 2071 | { |
| 2072 | .code = KEY_VOLUMEDOWN, |
| 2073 | .gpio = GPIO_KEY_VOLUME_DOWN, |
| 2074 | .desc = "volume_down_key", |
| 2075 | .active_low = 1, |
| 2076 | .type = EV_KEY, |
| 2077 | .wakeup = 1, |
| 2078 | .debounce_interval = 15, |
| 2079 | }, |
| 2080 | { |
| 2081 | .code = KEY_CAMERA_SNAPSHOT, |
| 2082 | .gpio = GPIO_KEY_CAM_SNAP, |
| 2083 | .desc = "cam_snap_key", |
| 2084 | .active_low = 1, |
| 2085 | .type = EV_KEY, |
| 2086 | .debounce_interval = 15, |
| 2087 | }, |
| 2088 | }; |
| 2089 | |
| 2090 | static struct gpio_keys_platform_data mtp_keys_data = { |
| 2091 | .buttons = mtp_keys, |
| 2092 | .nbuttons = ARRAY_SIZE(mtp_keys), |
| 2093 | }; |
| 2094 | |
| 2095 | static struct platform_device mtp_kp_pdev = { |
| 2096 | .name = "gpio-keys", |
| 2097 | .id = -1, |
| 2098 | .dev = { |
| 2099 | .platform_data = &mtp_keys_data, |
| 2100 | }, |
| 2101 | }; |
| 2102 | |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2103 | /* Sensors DSPS platform data */ |
| 2104 | #define DSPS_PIL_GENERIC_NAME "dsps" |
| 2105 | static void __init apq8064_init_dsps(void) |
| 2106 | { |
| 2107 | struct msm_dsps_platform_data *pdata = |
| 2108 | msm_dsps_device_8064.dev.platform_data; |
| 2109 | pdata->pil_name = DSPS_PIL_GENERIC_NAME; |
| 2110 | pdata->gpios = NULL; |
| 2111 | pdata->gpios_num = 0; |
| 2112 | |
| 2113 | platform_device_register(&msm_dsps_device_8064); |
| 2114 | } |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 2115 | |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 2116 | static void __init apq8064_clock_init(void) |
| 2117 | { |
Tianyi Gou | acb588d | 2012-01-27 18:24:05 -0800 | [diff] [blame] | 2118 | if (machine_is_apq8064_rumi3()) |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 2119 | msm_clock_init(&apq8064_dummy_clock_init_data); |
Tianyi Gou | acb588d | 2012-01-27 18:24:05 -0800 | [diff] [blame] | 2120 | else |
| 2121 | msm_clock_init(&apq8064_clock_init_data); |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 2122 | } |
| 2123 | |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 2124 | #define I2C_SURF 1 |
| 2125 | #define I2C_FFA (1 << 1) |
| 2126 | #define I2C_RUMI (1 << 2) |
| 2127 | #define I2C_SIM (1 << 3) |
| 2128 | #define I2C_LIQUID (1 << 4) |
| 2129 | |
| 2130 | struct i2c_registry { |
| 2131 | u8 machs; |
| 2132 | int bus; |
| 2133 | struct i2c_board_info *info; |
| 2134 | int len; |
| 2135 | }; |
| 2136 | |
| 2137 | static struct i2c_registry apq8064_i2c_devices[] __initdata = { |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 2138 | { |
David Keitel | 2f613d9 | 2012-02-15 11:29:16 -0800 | [diff] [blame] | 2139 | I2C_LIQUID, |
| 2140 | APQ_8064_GSBI1_QUP_I2C_BUS_ID, |
| 2141 | smb349_charger_i2c_info, |
| 2142 | ARRAY_SIZE(smb349_charger_i2c_info) |
| 2143 | }, |
| 2144 | { |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 2145 | I2C_SURF | I2C_LIQUID, |
| 2146 | APQ_8064_GSBI3_QUP_I2C_BUS_ID, |
| 2147 | mxt_device_info, |
| 2148 | ARRAY_SIZE(mxt_device_info), |
| 2149 | }, |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 2150 | { |
| 2151 | I2C_FFA, |
| 2152 | APQ_8064_GSBI3_QUP_I2C_BUS_ID, |
| 2153 | cyttsp_info, |
| 2154 | ARRAY_SIZE(cyttsp_info), |
| 2155 | }, |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 2156 | { |
| 2157 | I2C_FFA | I2C_LIQUID, |
| 2158 | APQ_8064_GSBI1_QUP_I2C_BUS_ID, |
| 2159 | isa1200_board_info, |
| 2160 | ARRAY_SIZE(isa1200_board_info), |
| 2161 | }, |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 2162 | }; |
| 2163 | |
| 2164 | static void __init register_i2c_devices(void) |
| 2165 | { |
| 2166 | u8 mach_mask = 0; |
| 2167 | int i; |
| 2168 | |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 2169 | #ifdef CONFIG_MSM_CAMERA |
| 2170 | struct i2c_registry apq8064_camera_i2c_devices = { |
| 2171 | I2C_SURF | I2C_FFA | I2C_LIQUID | I2C_RUMI, |
| 2172 | APQ_8064_GSBI4_QUP_I2C_BUS_ID, |
| 2173 | apq8064_camera_board_info.board_info, |
| 2174 | apq8064_camera_board_info.num_i2c_board_info, |
| 2175 | }; |
| 2176 | #endif |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 2177 | /* Build the matching 'supported_machs' bitmask */ |
| 2178 | if (machine_is_apq8064_cdp()) |
| 2179 | mach_mask = I2C_SURF; |
| 2180 | else if (machine_is_apq8064_mtp()) |
| 2181 | mach_mask = I2C_FFA; |
| 2182 | else if (machine_is_apq8064_liquid()) |
| 2183 | mach_mask = I2C_LIQUID; |
| 2184 | else if (machine_is_apq8064_rumi3()) |
| 2185 | mach_mask = I2C_RUMI; |
| 2186 | else if (machine_is_apq8064_sim()) |
| 2187 | mach_mask = I2C_SIM; |
| 2188 | else |
| 2189 | pr_err("unmatched machine ID in register_i2c_devices\n"); |
| 2190 | |
| 2191 | /* Run the array and install devices as appropriate */ |
| 2192 | for (i = 0; i < ARRAY_SIZE(apq8064_i2c_devices); ++i) { |
| 2193 | if (apq8064_i2c_devices[i].machs & mach_mask) |
| 2194 | i2c_register_board_info(apq8064_i2c_devices[i].bus, |
| 2195 | apq8064_i2c_devices[i].info, |
| 2196 | apq8064_i2c_devices[i].len); |
| 2197 | } |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 2198 | #ifdef CONFIG_MSM_CAMERA |
| 2199 | if (apq8064_camera_i2c_devices.machs & mach_mask) |
| 2200 | i2c_register_board_info(apq8064_camera_i2c_devices.bus, |
| 2201 | apq8064_camera_i2c_devices.info, |
| 2202 | apq8064_camera_i2c_devices.len); |
| 2203 | #endif |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 2204 | } |
| 2205 | |
Jay Chokshi | 994ff12 | 2012-03-27 15:43:48 -0700 | [diff] [blame] | 2206 | static void enable_ddr3_regulator(void) |
| 2207 | { |
| 2208 | static struct regulator *ext_ddr3; |
| 2209 | |
| 2210 | /* Use MPP7 output state as a flag for PCDDR3 presence. */ |
| 2211 | if (gpio_get_value_cansleep(PM8921_MPP_PM_TO_SYS(7)) > 0) { |
| 2212 | ext_ddr3 = regulator_get(NULL, "ext_ddr3"); |
| 2213 | if (IS_ERR(ext_ddr3) || ext_ddr3 == NULL) |
| 2214 | pr_err("Could not get MPP7 regulator\n"); |
| 2215 | else |
| 2216 | regulator_enable(ext_ddr3); |
| 2217 | } |
| 2218 | } |
| 2219 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2220 | static void __init apq8064_common_init(void) |
| 2221 | { |
| 2222 | if (socinfo_init() < 0) |
| 2223 | pr_err("socinfo_init() failed!\n"); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2224 | BUG_ON(msm_rpm_init(&apq8064_rpm_data)); |
| 2225 | BUG_ON(msm_rpmrs_levels_init(&msm_rpmrs_data)); |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 2226 | regulator_suppress_info_printing(); |
| 2227 | platform_device_register(&apq8064_device_rpm_regulator); |
Stephen Boyd | 4d0d258 | 2012-02-10 14:49:40 -0800 | [diff] [blame] | 2228 | if (msm_xo_init()) |
| 2229 | pr_err("Failed to initialize XO votes\n"); |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 2230 | apq8064_clock_init(); |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 2231 | apq8064_init_gpiomux(); |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 2232 | apq8064_i2c_init(); |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 2233 | register_i2c_devices(); |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 2234 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 2235 | apq8064_device_qup_spi_gsbi5.dev.platform_data = |
| 2236 | &apq8064_qup_spi_gsbi5_pdata; |
Stepan Moskovchenko | c1074f0 | 2011-12-14 17:51:57 -0800 | [diff] [blame] | 2237 | apq8064_init_pmic(); |
Hemant Kumar | 94e7da2 | 2012-02-03 16:52:29 -0800 | [diff] [blame] | 2238 | if (machine_is_apq8064_liquid()) |
| 2239 | msm_otg_pdata.mhl_enable = true; |
Vamsi Krishna | d9863eb | 2012-03-26 17:34:48 -0700 | [diff] [blame] | 2240 | |
| 2241 | msm_otg_pdata.swfi_latency = |
| 2242 | msm_rpmrs_levels[0].latency_us + 1; |
| 2243 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 2244 | apq8064_device_otg.dev.platform_data = &msm_otg_pdata; |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 2245 | apq8064_ehci_host_init(); |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 2246 | apq8064_init_buses(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2247 | platform_add_devices(common_devices, ARRAY_SIZE(common_devices)); |
Jay Chokshi | 994ff12 | 2012-03-27 15:43:48 -0700 | [diff] [blame] | 2248 | enable_ddr3_regulator(); |
Hemant Kumar | f1ca919 | 2012-02-07 18:59:33 -0800 | [diff] [blame] | 2249 | if (machine_is_apq8064_mtp()) { |
| 2250 | apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata; |
| 2251 | device_initialize(&apq8064_device_hsic_host.dev); |
| 2252 | } |
Jay Chokshi | e874128 | 2012-01-25 15:22:55 -0800 | [diff] [blame] | 2253 | apq8064_pm8xxx_gpio_mpp_init(); |
Sahitya Tummala | 3586ed9 | 2011-08-03 09:13:23 +0530 | [diff] [blame] | 2254 | apq8064_init_mmc(); |
Swaminathan Sathappan | 144b488 | 2012-02-06 17:01:20 -0800 | [diff] [blame] | 2255 | |
| 2256 | if (machine_is_apq8064_mtp()) { |
| 2257 | mdm_8064_device.dev.platform_data = &mdm_platform_data; |
| 2258 | platform_device_register(&mdm_8064_device); |
| 2259 | } |
| 2260 | platform_device_register(&apq8064_slim_ctrl); |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 2261 | slim_register_board_info(apq8064_slim_devices, |
| 2262 | ARRAY_SIZE(apq8064_slim_devices)); |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2263 | apq8064_init_dsps(); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2264 | msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data)); |
Mahesh Sivasubramanian | cbce1ec | 2012-01-24 10:32:44 -0700 | [diff] [blame] | 2265 | acpuclk_init(&acpuclk_8064_soc_data); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2266 | msm_spm_l2_init(msm_spm_l2_data); |
| 2267 | msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data)); |
| 2268 | msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ); |
| 2269 | msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates), |
| 2270 | msm_pm_data); |
| 2271 | BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata)); |
Siddartha Mohanadoss | b9df494 | 2012-02-08 09:58:21 -0800 | [diff] [blame] | 2272 | apq8064_epm_adc_init(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2273 | } |
| 2274 | |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2275 | static void __init apq8064_allocate_memory_regions(void) |
| 2276 | { |
| 2277 | apq8064_allocate_fb_region(); |
| 2278 | } |
| 2279 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2280 | static void __init apq8064_sim_init(void) |
| 2281 | { |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 2282 | struct msm_watchdog_pdata *wdog_pdata = (struct msm_watchdog_pdata *) |
| 2283 | &msm8064_device_watchdog.dev.platform_data; |
| 2284 | |
| 2285 | wdog_pdata->bark_time = 15000; |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2286 | msm_tsens_early_init(&apq_tsens_pdata); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2287 | apq8064_common_init(); |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2288 | platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices)); |
| 2289 | } |
| 2290 | |
| 2291 | static void __init apq8064_rumi3_init(void) |
| 2292 | { |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2293 | msm_tsens_early_init(&apq_tsens_pdata); |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2294 | apq8064_common_init(); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 2295 | ethernet_init(); |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 2296 | platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices)); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 2297 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2298 | apq8064_init_fb(); |
Jordan Crouse | b3115fe | 2012-02-01 22:11:12 -0700 | [diff] [blame] | 2299 | apq8064_init_gpu(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2300 | } |
| 2301 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2302 | static void __init apq8064_cdp_init(void) |
| 2303 | { |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2304 | msm_tsens_early_init(&apq_tsens_pdata); |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2305 | apq8064_common_init(); |
| 2306 | ethernet_init(); |
| 2307 | platform_add_devices(cdp_devices, ARRAY_SIZE(cdp_devices)); |
| 2308 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2309 | apq8064_init_fb(); |
Jordan Crouse | b3115fe | 2012-02-01 22:11:12 -0700 | [diff] [blame] | 2310 | apq8064_init_gpu(); |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 2311 | platform_add_devices(apq8064_fs_devices, apq8064_num_fs_devices); |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 2312 | apq8064_init_cam(); |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 2313 | |
| 2314 | if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid()) |
| 2315 | platform_device_register(&cdp_kp_pdev); |
| 2316 | |
| 2317 | if (machine_is_apq8064_mtp()) |
| 2318 | platform_device_register(&mtp_kp_pdev); |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2319 | } |
| 2320 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2321 | MACHINE_START(APQ8064_SIM, "QCT APQ8064 SIMULATOR") |
| 2322 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 2323 | .reserve = apq8064_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2324 | .init_irq = apq8064_init_irq, |
Marc Zyngier | 89bdafd1 | 2011-12-22 11:39:20 +0530 | [diff] [blame] | 2325 | .handle_irq = gic_handle_irq, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2326 | .timer = &msm_timer, |
| 2327 | .init_machine = apq8064_sim_init, |
| 2328 | MACHINE_END |
| 2329 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2330 | MACHINE_START(APQ8064_RUMI3, "QCT APQ8064 RUMI3") |
| 2331 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 2332 | .reserve = apq8064_reserve, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2333 | .init_irq = apq8064_init_irq, |
Marc Zyngier | 89bdafd1 | 2011-12-22 11:39:20 +0530 | [diff] [blame] | 2334 | .handle_irq = gic_handle_irq, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2335 | .timer = &msm_timer, |
| 2336 | .init_machine = apq8064_rumi3_init, |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2337 | .init_early = apq8064_allocate_memory_regions, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2338 | MACHINE_END |
| 2339 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2340 | MACHINE_START(APQ8064_CDP, "QCT APQ8064 CDP") |
| 2341 | .map_io = apq8064_map_io, |
| 2342 | .reserve = apq8064_reserve, |
| 2343 | .init_irq = apq8064_init_irq, |
| 2344 | .handle_irq = gic_handle_irq, |
| 2345 | .timer = &msm_timer, |
| 2346 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2347 | .init_early = apq8064_allocate_memory_regions, |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 2348 | .init_very_early = apq8064_early_reserve, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2349 | MACHINE_END |
| 2350 | |
| 2351 | MACHINE_START(APQ8064_MTP, "QCT APQ8064 MTP") |
| 2352 | .map_io = apq8064_map_io, |
| 2353 | .reserve = apq8064_reserve, |
| 2354 | .init_irq = apq8064_init_irq, |
| 2355 | .handle_irq = gic_handle_irq, |
| 2356 | .timer = &msm_timer, |
| 2357 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2358 | .init_early = apq8064_allocate_memory_regions, |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 2359 | .init_very_early = apq8064_early_reserve, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2360 | MACHINE_END |
| 2361 | |
| 2362 | MACHINE_START(APQ8064_LIQUID, "QCT APQ8064 LIQUID") |
| 2363 | .map_io = apq8064_map_io, |
| 2364 | .reserve = apq8064_reserve, |
| 2365 | .init_irq = apq8064_init_irq, |
| 2366 | .handle_irq = gic_handle_irq, |
| 2367 | .timer = &msm_timer, |
| 2368 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2369 | .init_early = apq8064_allocate_memory_regions, |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 2370 | .init_very_early = apq8064_early_reserve, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2371 | MACHINE_END |
| 2372 | |
Joel King | 064bbf8 | 2012-04-01 13:23:39 -0700 | [diff] [blame^] | 2373 | MACHINE_START(MPQ8064_CDP, "QCT MPQ8064 CDP") |
| 2374 | .map_io = apq8064_map_io, |
| 2375 | .reserve = apq8064_reserve, |
| 2376 | .init_irq = apq8064_init_irq, |
| 2377 | .handle_irq = gic_handle_irq, |
| 2378 | .timer = &msm_timer, |
| 2379 | .init_machine = apq8064_cdp_init, |
| 2380 | .init_early = apq8064_allocate_memory_regions, |
| 2381 | .init_very_early = apq8064_early_reserve, |
| 2382 | MACHINE_END |
| 2383 | |
Joel King | 11ca820 | 2012-02-13 16:19:03 -0800 | [diff] [blame] | 2384 | MACHINE_START(MPQ8064_HRD, "QCT MPQ8064 HRD") |
| 2385 | .map_io = apq8064_map_io, |
| 2386 | .reserve = apq8064_reserve, |
| 2387 | .init_irq = apq8064_init_irq, |
| 2388 | .handle_irq = gic_handle_irq, |
| 2389 | .timer = &msm_timer, |
| 2390 | .init_machine = apq8064_cdp_init, |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 2391 | .init_very_early = apq8064_early_reserve, |
Joel King | 11ca820 | 2012-02-13 16:19:03 -0800 | [diff] [blame] | 2392 | MACHINE_END |
| 2393 | |
| 2394 | MACHINE_START(MPQ8064_DTV, "QCT MPQ8064 DTV") |
| 2395 | .map_io = apq8064_map_io, |
| 2396 | .reserve = apq8064_reserve, |
| 2397 | .init_irq = apq8064_init_irq, |
| 2398 | .handle_irq = gic_handle_irq, |
| 2399 | .timer = &msm_timer, |
| 2400 | .init_machine = apq8064_cdp_init, |
Laura Abbott | 6988cef | 2012-03-15 14:27:13 -0700 | [diff] [blame] | 2401 | .init_very_early = apq8064_early_reserve, |
Joel King | 11ca820 | 2012-02-13 16:19:03 -0800 | [diff] [blame] | 2402 | MACHINE_END |
| 2403 | |