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