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 | |
Hemant Kumar | 7620eed | 2012-02-26 09:08:43 -0800 | [diff] [blame^] | 472 | /* Bandwidth requests (zero) if no vote placed */ |
| 473 | static struct msm_bus_vectors usb_init_vectors[] = { |
| 474 | { |
| 475 | .src = MSM_BUS_MASTER_SPS, |
| 476 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 477 | .ab = 0, |
| 478 | .ib = 0, |
| 479 | }, |
| 480 | }; |
| 481 | |
| 482 | /* Bus bandwidth requests in Bytes/sec */ |
| 483 | static struct msm_bus_vectors usb_max_vectors[] = { |
| 484 | { |
| 485 | .src = MSM_BUS_MASTER_SPS, |
| 486 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 487 | .ab = 60000000, /* At least 480Mbps on bus. */ |
| 488 | .ib = 960000000, /* MAX bursts rate */ |
| 489 | }, |
| 490 | }; |
| 491 | |
| 492 | static struct msm_bus_paths usb_bus_scale_usecases[] = { |
| 493 | { |
| 494 | ARRAY_SIZE(usb_init_vectors), |
| 495 | usb_init_vectors, |
| 496 | }, |
| 497 | { |
| 498 | ARRAY_SIZE(usb_max_vectors), |
| 499 | usb_max_vectors, |
| 500 | }, |
| 501 | }; |
| 502 | |
| 503 | static struct msm_bus_scale_pdata usb_bus_scale_pdata = { |
| 504 | usb_bus_scale_usecases, |
| 505 | ARRAY_SIZE(usb_bus_scale_usecases), |
| 506 | .name = "usb", |
| 507 | }; |
| 508 | |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 509 | static struct msm_otg_platform_data msm_otg_pdata = { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 510 | .mode = USB_OTG, |
| 511 | .otg_control = OTG_PMIC_CONTROL, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 512 | .phy_type = SNPS_28NM_INTEGRATED_PHY, |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 513 | .pmic_id_irq = PM8921_USB_ID_IN_IRQ(PM8921_IRQ_BASE), |
| 514 | .power_budget = 750, |
Hemant Kumar | 7620eed | 2012-02-26 09:08:43 -0800 | [diff] [blame^] | 515 | .bus_scale_table = &usb_bus_scale_pdata, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 516 | }; |
| 517 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 518 | static struct msm_usb_host_platform_data msm_ehci_host_pdata = { |
| 519 | .power_budget = 500, |
| 520 | }; |
| 521 | |
| 522 | static void __init apq8064_ehci_host_init(void) |
| 523 | { |
| 524 | if (machine_is_apq8064_liquid()) { |
| 525 | apq8064_device_ehci_host3.dev.platform_data = |
| 526 | &msm_ehci_host_pdata; |
| 527 | platform_device_register(&apq8064_device_ehci_host3); |
| 528 | } |
| 529 | } |
| 530 | |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 531 | #define TABLA_INTERRUPT_BASE (NR_MSM_IRQS + NR_GPIO_IRQS + NR_PM8921_IRQS) |
| 532 | |
| 533 | /* Micbias setting is based on 8660 CDP/MTP/FLUID requirement |
| 534 | * 4 micbiases are used to power various analog and digital |
| 535 | * microphones operating at 1800 mV. Technically, all micbiases |
| 536 | * can source from single cfilter since all microphones operate |
| 537 | * at the same voltage level. The arrangement below is to make |
| 538 | * sure all cfilters are exercised. LDO_H regulator ouput level |
| 539 | * does not need to be as high as 2.85V. It is choosen for |
| 540 | * microphone sensitivity purpose. |
| 541 | */ |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 542 | static struct wcd9xxx_pdata apq8064_tabla_platform_data = { |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 543 | .slimbus_slave_device = { |
| 544 | .name = "tabla-slave", |
| 545 | .e_addr = {0, 0, 0x10, 0, 0x17, 2}, |
| 546 | }, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 547 | .irq = MSM_GPIO_TO_INT(42), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 548 | .irq_base = TABLA_INTERRUPT_BASE, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 549 | .num_irqs = NR_WCD9XXX_IRQS, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 550 | .reset_gpio = PM8921_GPIO_PM_TO_SYS(34), |
| 551 | .micbias = { |
| 552 | .ldoh_v = TABLA_LDOH_2P85_V, |
| 553 | .cfilt1_mv = 1800, |
| 554 | .cfilt2_mv = 1800, |
| 555 | .cfilt3_mv = 1800, |
| 556 | .bias1_cfilt_sel = TABLA_CFILT1_SEL, |
| 557 | .bias2_cfilt_sel = TABLA_CFILT2_SEL, |
| 558 | .bias3_cfilt_sel = TABLA_CFILT3_SEL, |
| 559 | .bias4_cfilt_sel = TABLA_CFILT3_SEL, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 560 | }, |
| 561 | .regulator = { |
| 562 | { |
| 563 | .name = "CDC_VDD_CP", |
| 564 | .min_uV = 1800000, |
| 565 | .max_uV = 1800000, |
| 566 | .optimum_uA = WCD9XXX_CDC_VDDA_CP_CUR_MAX, |
| 567 | }, |
| 568 | { |
| 569 | .name = "CDC_VDDA_RX", |
| 570 | .min_uV = 1800000, |
| 571 | .max_uV = 1800000, |
| 572 | .optimum_uA = WCD9XXX_CDC_VDDA_RX_CUR_MAX, |
| 573 | }, |
| 574 | { |
| 575 | .name = "CDC_VDDA_TX", |
| 576 | .min_uV = 1800000, |
| 577 | .max_uV = 1800000, |
| 578 | .optimum_uA = WCD9XXX_CDC_VDDA_TX_CUR_MAX, |
| 579 | }, |
| 580 | { |
| 581 | .name = "VDDIO_CDC", |
| 582 | .min_uV = 1800000, |
| 583 | .max_uV = 1800000, |
| 584 | .optimum_uA = WCD9XXX_VDDIO_CDC_CUR_MAX, |
| 585 | }, |
| 586 | { |
| 587 | .name = "VDDD_CDC_D", |
| 588 | .min_uV = 1225000, |
| 589 | .max_uV = 1225000, |
| 590 | .optimum_uA = WCD9XXX_VDDD_CDC_D_CUR_MAX, |
| 591 | }, |
| 592 | { |
| 593 | .name = "CDC_VDDA_A_1P2V", |
| 594 | .min_uV = 1225000, |
| 595 | .max_uV = 1225000, |
| 596 | .optimum_uA = WCD9XXX_VDDD_CDC_A_CUR_MAX, |
| 597 | }, |
| 598 | }, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 599 | }; |
| 600 | |
| 601 | static struct slim_device apq8064_slim_tabla = { |
| 602 | .name = "tabla-slim", |
| 603 | .e_addr = {0, 1, 0x10, 0, 0x17, 2}, |
| 604 | .dev = { |
| 605 | .platform_data = &apq8064_tabla_platform_data, |
| 606 | }, |
| 607 | }; |
| 608 | |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 609 | static struct wcd9xxx_pdata apq8064_tabla20_platform_data = { |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 610 | .slimbus_slave_device = { |
| 611 | .name = "tabla-slave", |
| 612 | .e_addr = {0, 0, 0x60, 0, 0x17, 2}, |
| 613 | }, |
| 614 | .irq = MSM_GPIO_TO_INT(42), |
| 615 | .irq_base = TABLA_INTERRUPT_BASE, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 616 | .num_irqs = NR_WCD9XXX_IRQS, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 617 | .reset_gpio = PM8921_GPIO_PM_TO_SYS(34), |
| 618 | .micbias = { |
| 619 | .ldoh_v = TABLA_LDOH_2P85_V, |
| 620 | .cfilt1_mv = 1800, |
| 621 | .cfilt2_mv = 1800, |
| 622 | .cfilt3_mv = 1800, |
| 623 | .bias1_cfilt_sel = TABLA_CFILT1_SEL, |
| 624 | .bias2_cfilt_sel = TABLA_CFILT2_SEL, |
| 625 | .bias3_cfilt_sel = TABLA_CFILT3_SEL, |
| 626 | .bias4_cfilt_sel = TABLA_CFILT3_SEL, |
Asish Bhattacharya | b1aeae2 | 2012-02-15 08:29:28 +0530 | [diff] [blame] | 627 | }, |
| 628 | .regulator = { |
| 629 | { |
| 630 | .name = "CDC_VDD_CP", |
| 631 | .min_uV = 1800000, |
| 632 | .max_uV = 1800000, |
| 633 | .optimum_uA = WCD9XXX_CDC_VDDA_CP_CUR_MAX, |
| 634 | }, |
| 635 | { |
| 636 | .name = "CDC_VDDA_RX", |
| 637 | .min_uV = 1800000, |
| 638 | .max_uV = 1800000, |
| 639 | .optimum_uA = WCD9XXX_CDC_VDDA_RX_CUR_MAX, |
| 640 | }, |
| 641 | { |
| 642 | .name = "CDC_VDDA_TX", |
| 643 | .min_uV = 1800000, |
| 644 | .max_uV = 1800000, |
| 645 | .optimum_uA = WCD9XXX_CDC_VDDA_TX_CUR_MAX, |
| 646 | }, |
| 647 | { |
| 648 | .name = "VDDIO_CDC", |
| 649 | .min_uV = 1800000, |
| 650 | .max_uV = 1800000, |
| 651 | .optimum_uA = WCD9XXX_VDDIO_CDC_CUR_MAX, |
| 652 | }, |
| 653 | { |
| 654 | .name = "VDDD_CDC_D", |
| 655 | .min_uV = 1225000, |
| 656 | .max_uV = 1225000, |
| 657 | .optimum_uA = WCD9XXX_VDDD_CDC_D_CUR_MAX, |
| 658 | }, |
| 659 | { |
| 660 | .name = "CDC_VDDA_A_1P2V", |
| 661 | .min_uV = 1225000, |
| 662 | .max_uV = 1225000, |
| 663 | .optimum_uA = WCD9XXX_VDDD_CDC_A_CUR_MAX, |
| 664 | }, |
| 665 | }, |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 666 | }; |
| 667 | |
| 668 | static struct slim_device apq8064_slim_tabla20 = { |
| 669 | .name = "tabla2x-slim", |
| 670 | .e_addr = {0, 1, 0x60, 0, 0x17, 2}, |
| 671 | .dev = { |
| 672 | .platform_data = &apq8064_tabla20_platform_data, |
| 673 | }, |
| 674 | }; |
| 675 | |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 676 | #define HAP_SHIFT_LVL_OE_GPIO PM8921_MPP_PM_TO_SYS(8) |
| 677 | #define ISA1200_HAP_EN_GPIO PM8921_GPIO_PM_TO_SYS(33) |
| 678 | #define ISA1200_HAP_LEN_GPIO PM8921_GPIO_PM_TO_SYS(20) |
| 679 | #define ISA1200_HAP_CLK PM8921_GPIO_PM_TO_SYS(44) |
| 680 | |
| 681 | static int isa1200_power(int on) |
| 682 | { |
| 683 | gpio_set_value_cansleep(ISA1200_HAP_CLK, !!on); |
| 684 | |
| 685 | return 0; |
| 686 | } |
| 687 | |
| 688 | static int isa1200_dev_setup(bool enable) |
| 689 | { |
| 690 | int rc = 0; |
| 691 | |
| 692 | rc = pm8xxx_aux_clk_control(CLK_MP3_2, XO_DIV_1, enable); |
| 693 | if (rc) { |
| 694 | pr_err("%s: unable to write aux clock register(%d)\n", |
| 695 | __func__, rc); |
| 696 | return rc; |
| 697 | } |
| 698 | |
| 699 | if (!enable) |
| 700 | goto free_gpio; |
| 701 | |
| 702 | rc = gpio_request(ISA1200_HAP_CLK, "haptics_clk"); |
| 703 | if (rc) { |
| 704 | pr_err("%s: unable to request gpio %d config(%d)\n", |
| 705 | __func__, ISA1200_HAP_CLK, rc); |
| 706 | return rc; |
| 707 | } |
| 708 | |
| 709 | rc = gpio_direction_output(ISA1200_HAP_CLK, 0); |
| 710 | if (rc) { |
| 711 | pr_err("%s: unable to set direction\n", __func__); |
| 712 | goto free_gpio; |
| 713 | } |
| 714 | |
| 715 | return 0; |
| 716 | |
| 717 | free_gpio: |
| 718 | gpio_free(ISA1200_HAP_CLK); |
| 719 | return rc; |
| 720 | } |
| 721 | |
| 722 | static struct isa1200_regulator isa1200_reg_data[] = { |
| 723 | { |
| 724 | .name = "vddp", |
| 725 | .min_uV = ISA_I2C_VTG_MIN_UV, |
| 726 | .max_uV = ISA_I2C_VTG_MAX_UV, |
| 727 | .load_uA = ISA_I2C_CURR_UA, |
| 728 | }, |
| 729 | }; |
| 730 | |
| 731 | static struct isa1200_platform_data isa1200_1_pdata = { |
| 732 | .name = "vibrator", |
| 733 | .dev_setup = isa1200_dev_setup, |
| 734 | .power_on = isa1200_power, |
| 735 | .hap_en_gpio = ISA1200_HAP_EN_GPIO, |
| 736 | .hap_len_gpio = ISA1200_HAP_LEN_GPIO, |
| 737 | .max_timeout = 15000, |
| 738 | .mode_ctrl = PWM_GEN_MODE, |
| 739 | .pwm_fd = { |
| 740 | .pwm_div = 256, |
| 741 | }, |
| 742 | .is_erm = false, |
| 743 | .smart_en = true, |
| 744 | .ext_clk_en = true, |
| 745 | .chip_en = 1, |
| 746 | .regulator_info = isa1200_reg_data, |
| 747 | .num_regulators = ARRAY_SIZE(isa1200_reg_data), |
| 748 | }; |
| 749 | |
| 750 | static struct i2c_board_info isa1200_board_info[] __initdata = { |
| 751 | { |
| 752 | I2C_BOARD_INFO("isa1200_1", 0x90>>1), |
| 753 | .platform_data = &isa1200_1_pdata, |
| 754 | }, |
| 755 | }; |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 756 | /* configuration data for mxt1386e using V2.1 firmware */ |
| 757 | static const u8 mxt1386e_config_data_v2_1[] = { |
| 758 | /* T6 Object */ |
| 759 | 0, 0, 0, 0, 0, 0, |
| 760 | /* T38 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 761 | 14, 1, 0, 22, 2, 12, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 762 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 763 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 764 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 765 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 766 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 767 | 0, 0, 0, 0, |
| 768 | /* T7 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 769 | 100, 10, 50, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 770 | /* T8 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 771 | 25, 0, 20, 20, 0, 0, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 772 | /* T9 Object */ |
| 773 | 131, 0, 0, 26, 42, 0, 32, 80, 2, 5, |
| 774 | 0, 5, 5, 0, 10, 30, 10, 10, 255, 2, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 775 | 85, 5, 0, 5, 9, 5, 12, 35, 70, 40, |
| 776 | 20, 5, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 777 | /* T18 Object */ |
| 778 | 0, 0, |
| 779 | /* T24 Object */ |
| 780 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 781 | 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 782 | /* T25 Object */ |
| 783 | 3, 0, 60, 115, 156, 99, |
| 784 | /* T27 Object */ |
| 785 | 0, 0, 0, 0, 0, 0, 0, |
| 786 | /* T40 Object */ |
| 787 | 0, 0, 0, 0, 0, |
| 788 | /* T42 Object */ |
| 789 | 2, 0, 255, 0, 255, 0, 0, 0, 0, 0, |
| 790 | /* T43 Object */ |
| 791 | 0, 0, 0, 0, 0, 0, 0, 64, 0, 8, |
| 792 | 16, |
| 793 | /* T46 Object */ |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 794 | 68, 0, 16, 16, 0, 0, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 795 | /* T47 Object */ |
| 796 | 0, 0, 0, 0, 0, 0, 3, 64, 66, 0, |
| 797 | /* T48 Object */ |
| 798 | 31, 64, 64, 0, 0, 0, 0, 0, 0, 0, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 799 | 32, 40, 0, 10, 10, 0, 0, 100, 10, 90, |
| 800 | 0, 0, 0, 0, 0, 0, 0, 10, 1, 10, |
| 801 | 52, 10, 12, 0, 33, 0, 1, 0, 0, 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 802 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 803 | 0, 0, 0, 0, |
| 804 | /* T56 Object */ |
| 805 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 806 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 807 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 808 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Jing Lin | f1208fd | 2012-02-23 11:15:42 -0800 | [diff] [blame] | 809 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 810 | 0, |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 811 | }; |
| 812 | |
| 813 | #define MXT_TS_GPIO_IRQ 6 |
| 814 | #define MXT_TS_PWR_EN_GPIO PM8921_GPIO_PM_TO_SYS(23) |
| 815 | #define MXT_TS_RESET_GPIO 33 |
| 816 | |
| 817 | static struct mxt_config_info mxt_config_array[] = { |
| 818 | { |
| 819 | .config = mxt1386e_config_data_v2_1, |
| 820 | .config_length = ARRAY_SIZE(mxt1386e_config_data_v2_1), |
| 821 | .family_id = 0xA0, |
| 822 | .variant_id = 0x7, |
| 823 | .version = 0x21, |
| 824 | .build = 0xAA, |
| 825 | }, |
| 826 | }; |
| 827 | |
| 828 | static struct mxt_platform_data mxt_platform_data = { |
| 829 | .config_array = mxt_config_array, |
| 830 | .config_array_size = ARRAY_SIZE(mxt_config_array), |
| 831 | .x_size = 1365, |
| 832 | .y_size = 767, |
| 833 | .irqflags = IRQF_TRIGGER_FALLING, |
| 834 | .i2c_pull_up = true, |
| 835 | .reset_gpio = MXT_TS_RESET_GPIO, |
| 836 | .irq_gpio = MXT_TS_GPIO_IRQ, |
| 837 | }; |
| 838 | |
| 839 | static struct i2c_board_info mxt_device_info[] __initdata = { |
| 840 | { |
| 841 | I2C_BOARD_INFO("atmel_mxt_ts", 0x5b), |
| 842 | .platform_data = &mxt_platform_data, |
| 843 | .irq = MSM_GPIO_TO_INT(MXT_TS_GPIO_IRQ), |
| 844 | }, |
| 845 | }; |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 846 | #define CYTTSP_TS_GPIO_IRQ 6 |
| 847 | #define CYTTSP_TS_GPIO_RESOUT 7 |
| 848 | #define CYTTSP_TS_GPIO_SLEEP 33 |
| 849 | |
| 850 | static ssize_t tma340_vkeys_show(struct kobject *kobj, |
| 851 | struct kobj_attribute *attr, char *buf) |
| 852 | { |
| 853 | return snprintf(buf, 200, |
| 854 | __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":73:1120:97:97" |
| 855 | ":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":230:1120:97:97" |
| 856 | ":" __stringify(EV_KEY) ":" __stringify(KEY_HOME) ":389:1120:97:97" |
| 857 | ":" __stringify(EV_KEY) ":" __stringify(KEY_SEARCH) ":544:1120:97:97" |
| 858 | "\n"); |
| 859 | } |
| 860 | |
| 861 | static struct kobj_attribute tma340_vkeys_attr = { |
| 862 | .attr = { |
| 863 | .mode = S_IRUGO, |
| 864 | }, |
| 865 | .show = &tma340_vkeys_show, |
| 866 | }; |
| 867 | |
| 868 | static struct attribute *tma340_properties_attrs[] = { |
| 869 | &tma340_vkeys_attr.attr, |
| 870 | NULL |
| 871 | }; |
| 872 | |
| 873 | static struct attribute_group tma340_properties_attr_group = { |
| 874 | .attrs = tma340_properties_attrs, |
| 875 | }; |
| 876 | |
| 877 | static int cyttsp_platform_init(struct i2c_client *client) |
| 878 | { |
| 879 | int rc = 0; |
| 880 | static struct kobject *tma340_properties_kobj; |
| 881 | |
| 882 | tma340_vkeys_attr.attr.name = "virtualkeys.cyttsp-i2c"; |
| 883 | tma340_properties_kobj = kobject_create_and_add("board_properties", |
| 884 | NULL); |
| 885 | if (tma340_properties_kobj) |
| 886 | rc = sysfs_create_group(tma340_properties_kobj, |
| 887 | &tma340_properties_attr_group); |
| 888 | if (!tma340_properties_kobj || rc) |
| 889 | pr_err("%s: failed to create board_properties\n", |
| 890 | __func__); |
| 891 | |
| 892 | return 0; |
| 893 | } |
| 894 | |
| 895 | static struct cyttsp_regulator cyttsp_regulator_data[] = { |
| 896 | { |
| 897 | .name = "vdd", |
| 898 | .min_uV = CY_TMA300_VTG_MIN_UV, |
| 899 | .max_uV = CY_TMA300_VTG_MAX_UV, |
| 900 | .hpm_load_uA = CY_TMA300_CURR_24HZ_UA, |
| 901 | .lpm_load_uA = CY_TMA300_CURR_24HZ_UA, |
| 902 | }, |
| 903 | { |
| 904 | .name = "vcc_i2c", |
| 905 | .min_uV = CY_I2C_VTG_MIN_UV, |
| 906 | .max_uV = CY_I2C_VTG_MAX_UV, |
| 907 | .hpm_load_uA = CY_I2C_CURR_UA, |
| 908 | .lpm_load_uA = CY_I2C_CURR_UA, |
| 909 | }, |
| 910 | }; |
| 911 | |
| 912 | static struct cyttsp_platform_data cyttsp_pdata = { |
| 913 | .panel_maxx = 634, |
| 914 | .panel_maxy = 1166, |
| 915 | .disp_maxx = 599, |
| 916 | .disp_maxy = 1023, |
| 917 | .disp_minx = 0, |
| 918 | .disp_miny = 0, |
| 919 | .flags = 0x01, |
| 920 | .gen = CY_GEN3, |
| 921 | .use_st = CY_USE_ST, |
| 922 | .use_mt = CY_USE_MT, |
| 923 | .use_hndshk = CY_SEND_HNDSHK, |
| 924 | .use_trk_id = CY_USE_TRACKING_ID, |
| 925 | .use_sleep = CY_USE_DEEP_SLEEP_SEL, |
| 926 | .use_gestures = CY_USE_GESTURES, |
| 927 | .fw_fname = "cyttsp_8064_mtp.hex", |
| 928 | /* change act_intrvl to customize the Active power state |
| 929 | * scanning/processing refresh interval for Operating mode |
| 930 | */ |
| 931 | .act_intrvl = CY_ACT_INTRVL_DFLT, |
| 932 | /* change tch_tmout to customize the touch timeout for the |
| 933 | * Active power state for Operating mode |
| 934 | */ |
| 935 | .tch_tmout = CY_TCH_TMOUT_DFLT, |
| 936 | /* change lp_intrvl to customize the Low Power power state |
| 937 | * scanning/processing refresh interval for Operating mode |
| 938 | */ |
| 939 | .lp_intrvl = CY_LP_INTRVL_DFLT, |
| 940 | .sleep_gpio = CYTTSP_TS_GPIO_SLEEP, |
| 941 | .resout_gpio = CYTTSP_TS_GPIO_RESOUT, |
| 942 | .irq_gpio = CYTTSP_TS_GPIO_IRQ, |
| 943 | .regulator_info = cyttsp_regulator_data, |
| 944 | .num_regulators = ARRAY_SIZE(cyttsp_regulator_data), |
| 945 | .init = cyttsp_platform_init, |
| 946 | .correct_fw_ver = 17, |
| 947 | }; |
| 948 | |
| 949 | static struct i2c_board_info cyttsp_info[] __initdata = { |
| 950 | { |
| 951 | I2C_BOARD_INFO(CY_I2C_NAME, 0x24), |
| 952 | .platform_data = &cyttsp_pdata, |
| 953 | .irq = MSM_GPIO_TO_INT(CYTTSP_TS_GPIO_IRQ), |
| 954 | }, |
| 955 | }; |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 956 | |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 957 | #define MSM_WCNSS_PHYS 0x03000000 |
| 958 | #define MSM_WCNSS_SIZE 0x280000 |
| 959 | |
| 960 | static struct resource resources_wcnss_wlan[] = { |
| 961 | { |
| 962 | .start = RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 963 | .end = RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 964 | .name = "wcnss_wlanrx_irq", |
| 965 | .flags = IORESOURCE_IRQ, |
| 966 | }, |
| 967 | { |
| 968 | .start = RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 969 | .end = RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 970 | .name = "wcnss_wlantx_irq", |
| 971 | .flags = IORESOURCE_IRQ, |
| 972 | }, |
| 973 | { |
| 974 | .start = MSM_WCNSS_PHYS, |
| 975 | .end = MSM_WCNSS_PHYS + MSM_WCNSS_SIZE - 1, |
| 976 | .name = "wcnss_mmio", |
| 977 | .flags = IORESOURCE_MEM, |
| 978 | }, |
| 979 | { |
| 980 | .start = 64, |
| 981 | .end = 68, |
| 982 | .name = "wcnss_gpios_5wire", |
| 983 | .flags = IORESOURCE_IO, |
| 984 | }, |
| 985 | }; |
| 986 | |
| 987 | static struct qcom_wcnss_opts qcom_wcnss_pdata = { |
| 988 | .has_48mhz_xo = 1, |
| 989 | }; |
| 990 | |
| 991 | static struct platform_device msm_device_wcnss_wlan = { |
| 992 | .name = "wcnss_wlan", |
| 993 | .id = 0, |
| 994 | .num_resources = ARRAY_SIZE(resources_wcnss_wlan), |
| 995 | .resource = resources_wcnss_wlan, |
| 996 | .dev = {.platform_data = &qcom_wcnss_pdata}, |
| 997 | }; |
| 998 | |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 999 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1000 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \ |
| 1001 | defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1002 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1003 | |
| 1004 | #define QCE_SIZE 0x10000 |
| 1005 | #define QCE_0_BASE 0x11000000 |
| 1006 | |
| 1007 | #define QCE_HW_KEY_SUPPORT 0 |
| 1008 | #define QCE_SHA_HMAC_SUPPORT 1 |
| 1009 | #define QCE_SHARE_CE_RESOURCE 3 |
| 1010 | #define QCE_CE_SHARED 0 |
| 1011 | |
| 1012 | static struct resource qcrypto_resources[] = { |
| 1013 | [0] = { |
| 1014 | .start = QCE_0_BASE, |
| 1015 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 1016 | .flags = IORESOURCE_MEM, |
| 1017 | }, |
| 1018 | [1] = { |
| 1019 | .name = "crypto_channels", |
| 1020 | .start = DMOV8064_CE_IN_CHAN, |
| 1021 | .end = DMOV8064_CE_OUT_CHAN, |
| 1022 | .flags = IORESOURCE_DMA, |
| 1023 | }, |
| 1024 | [2] = { |
| 1025 | .name = "crypto_crci_in", |
| 1026 | .start = DMOV8064_CE_IN_CRCI, |
| 1027 | .end = DMOV8064_CE_IN_CRCI, |
| 1028 | .flags = IORESOURCE_DMA, |
| 1029 | }, |
| 1030 | [3] = { |
| 1031 | .name = "crypto_crci_out", |
| 1032 | .start = DMOV8064_CE_OUT_CRCI, |
| 1033 | .end = DMOV8064_CE_OUT_CRCI, |
| 1034 | .flags = IORESOURCE_DMA, |
| 1035 | }, |
| 1036 | }; |
| 1037 | |
| 1038 | static struct resource qcedev_resources[] = { |
| 1039 | [0] = { |
| 1040 | .start = QCE_0_BASE, |
| 1041 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 1042 | .flags = IORESOURCE_MEM, |
| 1043 | }, |
| 1044 | [1] = { |
| 1045 | .name = "crypto_channels", |
| 1046 | .start = DMOV8064_CE_IN_CHAN, |
| 1047 | .end = DMOV8064_CE_OUT_CHAN, |
| 1048 | .flags = IORESOURCE_DMA, |
| 1049 | }, |
| 1050 | [2] = { |
| 1051 | .name = "crypto_crci_in", |
| 1052 | .start = DMOV8064_CE_IN_CRCI, |
| 1053 | .end = DMOV8064_CE_IN_CRCI, |
| 1054 | .flags = IORESOURCE_DMA, |
| 1055 | }, |
| 1056 | [3] = { |
| 1057 | .name = "crypto_crci_out", |
| 1058 | .start = DMOV8064_CE_OUT_CRCI, |
| 1059 | .end = DMOV8064_CE_OUT_CRCI, |
| 1060 | .flags = IORESOURCE_DMA, |
| 1061 | }, |
| 1062 | }; |
| 1063 | |
| 1064 | #endif |
| 1065 | |
| 1066 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1067 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 1068 | |
| 1069 | static struct msm_ce_hw_support qcrypto_ce_hw_suppport = { |
| 1070 | .ce_shared = QCE_CE_SHARED, |
| 1071 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 1072 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 1073 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 1074 | .bus_scale_table = NULL, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1075 | }; |
| 1076 | |
| 1077 | static struct platform_device qcrypto_device = { |
| 1078 | .name = "qcrypto", |
| 1079 | .id = 0, |
| 1080 | .num_resources = ARRAY_SIZE(qcrypto_resources), |
| 1081 | .resource = qcrypto_resources, |
| 1082 | .dev = { |
| 1083 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 1084 | .platform_data = &qcrypto_ce_hw_suppport, |
| 1085 | }, |
| 1086 | }; |
| 1087 | #endif |
| 1088 | |
| 1089 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1090 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1091 | |
| 1092 | static struct msm_ce_hw_support qcedev_ce_hw_suppport = { |
| 1093 | .ce_shared = QCE_CE_SHARED, |
| 1094 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 1095 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 1096 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 1097 | .bus_scale_table = NULL, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1098 | }; |
| 1099 | |
| 1100 | static struct platform_device qcedev_device = { |
| 1101 | .name = "qce", |
| 1102 | .id = 0, |
| 1103 | .num_resources = ARRAY_SIZE(qcedev_resources), |
| 1104 | .resource = qcedev_resources, |
| 1105 | .dev = { |
| 1106 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 1107 | .platform_data = &qcedev_ce_hw_suppport, |
| 1108 | }, |
| 1109 | }; |
| 1110 | #endif |
| 1111 | |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1112 | static struct mdm_platform_data mdm_platform_data = { |
| 1113 | .mdm_version = "3.0", |
| 1114 | .ramdump_delay_ms = 2000, |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 1115 | .peripheral_platform_device = &apq8064_device_hsic_host, |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1116 | }; |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1117 | |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 1118 | static struct tsens_platform_data apq_tsens_pdata = { |
| 1119 | .tsens_factor = 1000, |
| 1120 | .hw_type = APQ_8064, |
| 1121 | .tsens_num_sensor = 11, |
| 1122 | .slope = {1176, 1176, 1154, 1176, 1111, |
| 1123 | 1132, 1132, 1199, 1132, 1199, 1132}, |
| 1124 | }; |
| 1125 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1126 | #define MSM_SHARED_RAM_PHYS 0x80000000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1127 | static void __init apq8064_map_io(void) |
| 1128 | { |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1129 | msm_shared_ram_phys = MSM_SHARED_RAM_PHYS; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1130 | msm_map_apq8064_io(); |
Jeff Ohlstein | 3a77f9f | 2011-09-06 14:50:20 -0700 | [diff] [blame] | 1131 | if (socinfo_init() < 0) |
| 1132 | pr_err("socinfo_init() failed!\n"); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1133 | } |
| 1134 | |
| 1135 | static void __init apq8064_init_irq(void) |
| 1136 | { |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1137 | struct msm_mpm_device_data *data = NULL; |
| 1138 | |
| 1139 | #ifdef CONFIG_MSM_MPM |
| 1140 | data = &apq8064_mpm_dev_data; |
| 1141 | #endif |
| 1142 | |
| 1143 | msm_mpm_irq_extn_init(data); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1144 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
| 1145 | (void *)MSM_QGIC_CPU_BASE); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1146 | } |
| 1147 | |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1148 | static struct platform_device msm8064_device_saw_regulator_core0 = { |
| 1149 | .name = "saw-regulator", |
| 1150 | .id = 0, |
| 1151 | .dev = { |
| 1152 | .platform_data = &msm8064_saw_regulator_pdata_8921_s5, |
| 1153 | }, |
| 1154 | }; |
| 1155 | |
| 1156 | static struct platform_device msm8064_device_saw_regulator_core1 = { |
| 1157 | .name = "saw-regulator", |
| 1158 | .id = 1, |
| 1159 | .dev = { |
| 1160 | .platform_data = &msm8064_saw_regulator_pdata_8921_s6, |
| 1161 | }, |
| 1162 | }; |
| 1163 | |
| 1164 | static struct platform_device msm8064_device_saw_regulator_core2 = { |
| 1165 | .name = "saw-regulator", |
| 1166 | .id = 2, |
| 1167 | .dev = { |
| 1168 | .platform_data = &msm8064_saw_regulator_pdata_8821_s0, |
| 1169 | }, |
| 1170 | }; |
| 1171 | |
| 1172 | static struct platform_device msm8064_device_saw_regulator_core3 = { |
| 1173 | .name = "saw-regulator", |
| 1174 | .id = 3, |
| 1175 | .dev = { |
| 1176 | .platform_data = &msm8064_saw_regulator_pdata_8821_s1, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1177 | |
| 1178 | }, |
| 1179 | }; |
| 1180 | |
| 1181 | static struct msm_rpmrs_level msm_rpmrs_levels[] __initdata = { |
| 1182 | { |
| 1183 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, |
| 1184 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1185 | true, |
| 1186 | 100, 8000, 100000, 1, |
| 1187 | }, |
| 1188 | |
| 1189 | { |
| 1190 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE, |
| 1191 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1192 | true, |
| 1193 | 2000, 6000, 60100000, 3000, |
| 1194 | }, |
| 1195 | |
| 1196 | { |
| 1197 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1198 | MSM_RPMRS_LIMITS(ON, GDHS, MAX, ACTIVE), |
| 1199 | false, |
| 1200 | 4200, 5000, 60350000, 3500, |
| 1201 | }, |
| 1202 | |
| 1203 | { |
| 1204 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1205 | MSM_RPMRS_LIMITS(ON, HSFS_OPEN, MAX, ACTIVE), |
| 1206 | false, |
| 1207 | 6300, 4500, 65350000, 4800, |
| 1208 | }, |
| 1209 | |
| 1210 | { |
| 1211 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1212 | MSM_RPMRS_LIMITS(OFF, GDHS, MAX, ACTIVE), |
| 1213 | false, |
| 1214 | 11700, 2500, 67850000, 5500, |
| 1215 | }, |
| 1216 | |
| 1217 | { |
| 1218 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1219 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, MAX, ACTIVE), |
| 1220 | false, |
| 1221 | 13800, 2000, 71850000, 6800, |
| 1222 | }, |
| 1223 | |
| 1224 | { |
| 1225 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1226 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, ACTIVE, RET_HIGH), |
| 1227 | false, |
| 1228 | 29700, 500, 75850000, 8800, |
| 1229 | }, |
| 1230 | |
| 1231 | { |
| 1232 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1233 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, RET_HIGH, RET_LOW), |
| 1234 | false, |
| 1235 | 29700, 0, 76350000, 9800, |
| 1236 | }, |
| 1237 | }; |
| 1238 | |
| 1239 | static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = { |
| 1240 | .mode = MSM_PM_BOOT_CONFIG_TZ, |
| 1241 | }; |
| 1242 | |
| 1243 | static struct msm_rpmrs_platform_data msm_rpmrs_data __initdata = { |
| 1244 | .levels = &msm_rpmrs_levels[0], |
| 1245 | .num_levels = ARRAY_SIZE(msm_rpmrs_levels), |
| 1246 | .vdd_mem_levels = { |
| 1247 | [MSM_RPMRS_VDD_MEM_RET_LOW] = 750000, |
| 1248 | [MSM_RPMRS_VDD_MEM_RET_HIGH] = 750000, |
| 1249 | [MSM_RPMRS_VDD_MEM_ACTIVE] = 1050000, |
| 1250 | [MSM_RPMRS_VDD_MEM_MAX] = 1150000, |
| 1251 | }, |
| 1252 | .vdd_dig_levels = { |
| 1253 | [MSM_RPMRS_VDD_DIG_RET_LOW] = 500000, |
| 1254 | [MSM_RPMRS_VDD_DIG_RET_HIGH] = 750000, |
| 1255 | [MSM_RPMRS_VDD_DIG_ACTIVE] = 950000, |
| 1256 | [MSM_RPMRS_VDD_DIG_MAX] = 1150000, |
| 1257 | }, |
| 1258 | .vdd_mask = 0x7FFFFF, |
| 1259 | .rpmrs_target_id = { |
| 1260 | [MSM_RPMRS_ID_PXO_CLK] = MSM_RPM_ID_PXO_CLK, |
| 1261 | [MSM_RPMRS_ID_L2_CACHE_CTL] = MSM_RPM_ID_LAST, |
| 1262 | [MSM_RPMRS_ID_VDD_DIG_0] = MSM_RPM_ID_PM8921_S3_0, |
| 1263 | [MSM_RPMRS_ID_VDD_DIG_1] = MSM_RPM_ID_PM8921_S3_1, |
| 1264 | [MSM_RPMRS_ID_VDD_MEM_0] = MSM_RPM_ID_PM8921_L24_0, |
| 1265 | [MSM_RPMRS_ID_VDD_MEM_1] = MSM_RPM_ID_PM8921_L24_1, |
| 1266 | [MSM_RPMRS_ID_RPM_CTL] = MSM_RPM_ID_RPM_CTL, |
| 1267 | }, |
| 1268 | }; |
| 1269 | |
| 1270 | static struct msm_cpuidle_state msm_cstates[] __initdata = { |
| 1271 | {0, 0, "C0", "WFI", |
| 1272 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1273 | |
| 1274 | {0, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1275 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1276 | |
| 1277 | {0, 2, "C2", "POWER_COLLAPSE", |
| 1278 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE}, |
| 1279 | |
| 1280 | {1, 0, "C0", "WFI", |
| 1281 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1282 | |
| 1283 | {1, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1284 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1285 | |
| 1286 | {2, 0, "C0", "WFI", |
| 1287 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1288 | |
| 1289 | {2, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1290 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1291 | |
| 1292 | {3, 0, "C0", "WFI", |
| 1293 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT}, |
| 1294 | |
| 1295 | {3, 1, "C1", "STANDALONE_POWER_COLLAPSE", |
| 1296 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE}, |
| 1297 | }; |
| 1298 | |
| 1299 | static struct msm_pm_platform_data msm_pm_data[] = { |
| 1300 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1301 | .idle_supported = 1, |
| 1302 | .suspend_supported = 1, |
| 1303 | .idle_enabled = 0, |
| 1304 | .suspend_enabled = 0, |
| 1305 | }, |
| 1306 | |
| 1307 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1308 | .idle_supported = 1, |
| 1309 | .suspend_supported = 1, |
| 1310 | .idle_enabled = 0, |
| 1311 | .suspend_enabled = 0, |
| 1312 | }, |
| 1313 | |
| 1314 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1315 | .idle_supported = 1, |
| 1316 | .suspend_supported = 1, |
| 1317 | .idle_enabled = 1, |
| 1318 | .suspend_enabled = 1, |
| 1319 | }, |
| 1320 | |
| 1321 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1322 | .idle_supported = 0, |
| 1323 | .suspend_supported = 1, |
| 1324 | .idle_enabled = 0, |
| 1325 | .suspend_enabled = 0, |
| 1326 | }, |
| 1327 | |
| 1328 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1329 | .idle_supported = 1, |
| 1330 | .suspend_supported = 1, |
| 1331 | .idle_enabled = 0, |
| 1332 | .suspend_enabled = 0, |
| 1333 | }, |
| 1334 | |
| 1335 | [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1336 | .idle_supported = 1, |
| 1337 | .suspend_supported = 0, |
| 1338 | .idle_enabled = 1, |
| 1339 | .suspend_enabled = 0, |
| 1340 | }, |
| 1341 | |
| 1342 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1343 | .idle_supported = 0, |
| 1344 | .suspend_supported = 1, |
| 1345 | .idle_enabled = 0, |
| 1346 | .suspend_enabled = 0, |
| 1347 | }, |
| 1348 | |
| 1349 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1350 | .idle_supported = 1, |
| 1351 | .suspend_supported = 1, |
| 1352 | .idle_enabled = 0, |
| 1353 | .suspend_enabled = 0, |
| 1354 | }, |
| 1355 | |
| 1356 | [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1357 | .idle_supported = 1, |
| 1358 | .suspend_supported = 0, |
| 1359 | .idle_enabled = 1, |
| 1360 | .suspend_enabled = 0, |
| 1361 | }, |
| 1362 | |
| 1363 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
| 1364 | .idle_supported = 0, |
| 1365 | .suspend_supported = 1, |
| 1366 | .idle_enabled = 0, |
| 1367 | .suspend_enabled = 0, |
| 1368 | }, |
| 1369 | |
| 1370 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = { |
| 1371 | .idle_supported = 1, |
| 1372 | .suspend_supported = 1, |
| 1373 | .idle_enabled = 0, |
| 1374 | .suspend_enabled = 0, |
| 1375 | }, |
| 1376 | |
| 1377 | [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
| 1378 | .idle_supported = 1, |
| 1379 | .suspend_supported = 0, |
| 1380 | .idle_enabled = 1, |
| 1381 | .suspend_enabled = 0, |
| 1382 | }, |
| 1383 | }; |
| 1384 | |
| 1385 | static uint8_t spm_wfi_cmd_sequence[] __initdata = { |
| 1386 | 0x03, 0x0f, |
| 1387 | }; |
| 1388 | |
| 1389 | static uint8_t spm_power_collapse_without_rpm[] __initdata = { |
| 1390 | 0x00, 0x24, 0x54, 0x10, |
| 1391 | 0x09, 0x03, 0x01, |
| 1392 | 0x10, 0x54, 0x30, 0x0C, |
| 1393 | 0x24, 0x30, 0x0f, |
| 1394 | }; |
| 1395 | |
| 1396 | static uint8_t spm_power_collapse_with_rpm[] __initdata = { |
| 1397 | 0x00, 0x24, 0x54, 0x10, |
| 1398 | 0x09, 0x07, 0x01, 0x0B, |
| 1399 | 0x10, 0x54, 0x30, 0x0C, |
| 1400 | 0x24, 0x30, 0x0f, |
| 1401 | }; |
| 1402 | |
| 1403 | static struct msm_spm_seq_entry msm_spm_seq_list[] __initdata = { |
| 1404 | [0] = { |
| 1405 | .mode = MSM_SPM_MODE_CLOCK_GATING, |
| 1406 | .notify_rpm = false, |
| 1407 | .cmd = spm_wfi_cmd_sequence, |
| 1408 | }, |
| 1409 | [1] = { |
| 1410 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1411 | .notify_rpm = false, |
| 1412 | .cmd = spm_power_collapse_without_rpm, |
| 1413 | }, |
| 1414 | [2] = { |
| 1415 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1416 | .notify_rpm = true, |
| 1417 | .cmd = spm_power_collapse_with_rpm, |
| 1418 | }, |
| 1419 | }; |
| 1420 | |
| 1421 | static uint8_t l2_spm_wfi_cmd_sequence[] __initdata = { |
| 1422 | 0x00, 0x20, 0x03, 0x20, |
| 1423 | 0x00, 0x0f, |
| 1424 | }; |
| 1425 | |
| 1426 | static uint8_t l2_spm_gdhs_cmd_sequence[] __initdata = { |
| 1427 | 0x00, 0x20, 0x34, 0x64, |
| 1428 | 0x48, 0x07, 0x48, 0x20, |
| 1429 | 0x50, 0x64, 0x04, 0x34, |
| 1430 | 0x50, 0x0f, |
| 1431 | }; |
| 1432 | static uint8_t l2_spm_power_off_cmd_sequence[] __initdata = { |
| 1433 | 0x00, 0x10, 0x34, 0x64, |
| 1434 | 0x48, 0x07, 0x48, 0x10, |
| 1435 | 0x50, 0x64, 0x04, 0x34, |
| 1436 | 0x50, 0x0F, |
| 1437 | }; |
| 1438 | |
| 1439 | static struct msm_spm_seq_entry msm_spm_l2_seq_list[] __initdata = { |
| 1440 | [0] = { |
| 1441 | .mode = MSM_SPM_L2_MODE_RETENTION, |
| 1442 | .notify_rpm = false, |
| 1443 | .cmd = l2_spm_wfi_cmd_sequence, |
| 1444 | }, |
| 1445 | [1] = { |
| 1446 | .mode = MSM_SPM_L2_MODE_GDHS, |
| 1447 | .notify_rpm = true, |
| 1448 | .cmd = l2_spm_gdhs_cmd_sequence, |
| 1449 | }, |
| 1450 | [2] = { |
| 1451 | .mode = MSM_SPM_L2_MODE_POWER_COLLAPSE, |
| 1452 | .notify_rpm = true, |
| 1453 | .cmd = l2_spm_power_off_cmd_sequence, |
| 1454 | }, |
| 1455 | }; |
| 1456 | |
| 1457 | |
| 1458 | static struct msm_spm_platform_data msm_spm_l2_data[] __initdata = { |
| 1459 | [0] = { |
| 1460 | .reg_base_addr = MSM_SAW_L2_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1461 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x00, |
| 1462 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202, |
| 1463 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x00A000AE, |
| 1464 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x00A00020, |
| 1465 | .modes = msm_spm_l2_seq_list, |
| 1466 | .num_modes = ARRAY_SIZE(msm_spm_l2_seq_list), |
| 1467 | }, |
| 1468 | }; |
| 1469 | |
| 1470 | static struct msm_spm_platform_data msm_spm_data[] __initdata = { |
| 1471 | [0] = { |
| 1472 | .reg_base_addr = MSM_SAW0_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1473 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1474 | #if defined(CONFIG_MSM_AVS_HW) |
| 1475 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1476 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1477 | #endif |
| 1478 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
| 1479 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202, |
| 1480 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1481 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1482 | .vctl_timeout_us = 50, |
| 1483 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1484 | .modes = msm_spm_seq_list, |
| 1485 | }, |
| 1486 | [1] = { |
| 1487 | .reg_base_addr = MSM_SAW1_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1488 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1489 | #if defined(CONFIG_MSM_AVS_HW) |
| 1490 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1491 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1492 | #endif |
| 1493 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
| 1494 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202, |
| 1495 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1496 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1497 | .vctl_timeout_us = 50, |
| 1498 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1499 | .modes = msm_spm_seq_list, |
| 1500 | }, |
| 1501 | [2] = { |
| 1502 | .reg_base_addr = MSM_SAW2_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1503 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1504 | #if defined(CONFIG_MSM_AVS_HW) |
| 1505 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1506 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1507 | #endif |
| 1508 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
| 1509 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202, |
| 1510 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1511 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1512 | .vctl_timeout_us = 50, |
| 1513 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1514 | .modes = msm_spm_seq_list, |
| 1515 | }, |
| 1516 | [3] = { |
| 1517 | .reg_base_addr = MSM_SAW3_BASE, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1518 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1519 | #if defined(CONFIG_MSM_AVS_HW) |
| 1520 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00, |
| 1521 | .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00, |
| 1522 | #endif |
| 1523 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
| 1524 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202, |
| 1525 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C, |
| 1526 | .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C, |
| 1527 | .vctl_timeout_us = 50, |
| 1528 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1529 | .modes = msm_spm_seq_list, |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1530 | }, |
| 1531 | }; |
| 1532 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1533 | static void __init apq8064_init_buses(void) |
| 1534 | { |
| 1535 | msm_bus_rpm_set_mt_mask(); |
| 1536 | msm_bus_8064_apps_fabric_pdata.rpm_enabled = 1; |
| 1537 | msm_bus_8064_sys_fabric_pdata.rpm_enabled = 1; |
| 1538 | msm_bus_8064_mm_fabric_pdata.rpm_enabled = 1; |
| 1539 | msm_bus_8064_apps_fabric.dev.platform_data = |
| 1540 | &msm_bus_8064_apps_fabric_pdata; |
| 1541 | msm_bus_8064_sys_fabric.dev.platform_data = |
| 1542 | &msm_bus_8064_sys_fabric_pdata; |
| 1543 | msm_bus_8064_mm_fabric.dev.platform_data = |
| 1544 | &msm_bus_8064_mm_fabric_pdata; |
| 1545 | msm_bus_8064_sys_fpb.dev.platform_data = &msm_bus_8064_sys_fpb_pdata; |
| 1546 | msm_bus_8064_cpss_fpb.dev.platform_data = &msm_bus_8064_cpss_fpb_pdata; |
| 1547 | } |
| 1548 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1549 | static struct platform_device apq8064_device_ext_5v_vreg __devinitdata = { |
| 1550 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1551 | .id = PM8921_MPP_PM_TO_SYS(7), |
| 1552 | .dev = { |
| 1553 | .platform_data |
| 1554 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_5V], |
| 1555 | }, |
| 1556 | }; |
| 1557 | |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 1558 | static struct platform_device apq8064_device_ext_mpp8_vreg __devinitdata = { |
| 1559 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1560 | .id = PM8921_MPP_PM_TO_SYS(8), |
| 1561 | .dev = { |
| 1562 | .platform_data |
| 1563 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_MPP8], |
| 1564 | }, |
| 1565 | }; |
| 1566 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1567 | static struct platform_device apq8064_device_ext_3p3v_vreg __devinitdata = { |
| 1568 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1569 | .id = APQ8064_EXT_3P3V_REG_EN_GPIO, |
| 1570 | .dev = { |
| 1571 | .platform_data = |
| 1572 | &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_3P3V], |
| 1573 | }, |
| 1574 | }; |
| 1575 | |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 1576 | static struct platform_device apq8064_device_ext_ts_sw_vreg __devinitdata = { |
| 1577 | .name = GPIO_REGULATOR_DEV_NAME, |
| 1578 | .id = PM8921_GPIO_PM_TO_SYS(23), |
| 1579 | .dev = { |
| 1580 | .platform_data |
| 1581 | = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_TS_SW], |
| 1582 | }, |
| 1583 | }; |
| 1584 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 1585 | static struct platform_device apq8064_device_rpm_regulator __devinitdata = { |
| 1586 | .name = "rpm-regulator", |
| 1587 | .id = -1, |
| 1588 | .dev = { |
| 1589 | .platform_data = &apq8064_rpm_regulator_pdata, |
| 1590 | }, |
| 1591 | }; |
| 1592 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1593 | static struct platform_device *common_devices[] __initdata = { |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 1594 | &apq8064_device_dmov, |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1595 | &apq8064_device_qup_i2c_gsbi1, |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1596 | &apq8064_device_qup_i2c_gsbi3, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1597 | &apq8064_device_qup_i2c_gsbi4, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1598 | &apq8064_device_qup_spi_gsbi5, |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1599 | &apq8064_device_ext_5v_vreg, |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 1600 | &apq8064_device_ext_mpp8_vreg, |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 1601 | &apq8064_device_ext_3p3v_vreg, |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 1602 | &apq8064_device_ext_ts_sw_vreg, |
Jay Chokshi | 9c25f07 | 2011-09-23 18:19:15 -0700 | [diff] [blame] | 1603 | &apq8064_device_ssbi_pmic1, |
| 1604 | &apq8064_device_ssbi_pmic2, |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 1605 | &msm_device_smd_apq8064, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 1606 | &apq8064_device_otg, |
| 1607 | &apq8064_device_gadget_peripheral, |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 1608 | &apq8064_device_hsusb_host, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 1609 | &android_usb_device, |
Ankit Verma | 6b7e2ba | 2012-01-26 15:48:54 -0800 | [diff] [blame] | 1610 | &msm_device_wcnss_wlan, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1611 | #ifdef CONFIG_ANDROID_PMEM |
| 1612 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 1613 | &android_pmem_device, |
| 1614 | &android_pmem_adsp_device, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1615 | #endif |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 1616 | &android_pmem_audio_device, |
Olav Haugan | 7c6aa74 | 2012-01-16 16:47:37 -0800 | [diff] [blame] | 1617 | #endif |
| 1618 | #ifdef CONFIG_ION_MSM |
| 1619 | &ion_dev, |
| 1620 | #endif |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 1621 | &msm8064_device_watchdog, |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 1622 | &msm8064_device_saw_regulator_core0, |
| 1623 | &msm8064_device_saw_regulator_core1, |
| 1624 | &msm8064_device_saw_regulator_core2, |
| 1625 | &msm8064_device_saw_regulator_core3, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1626 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 1627 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 1628 | &qcrypto_device, |
| 1629 | #endif |
| 1630 | |
| 1631 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 1632 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 1633 | &qcedev_device, |
| 1634 | #endif |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 1635 | |
| 1636 | #ifdef CONFIG_HW_RANDOM_MSM |
| 1637 | &apq8064_device_rng, |
| 1638 | #endif |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 1639 | &apq_pcm, |
| 1640 | &apq_pcm_routing, |
| 1641 | &apq_cpudai0, |
| 1642 | &apq_cpudai1, |
| 1643 | &apq_cpudai_hdmi_rx, |
| 1644 | &apq_cpudai_bt_rx, |
| 1645 | &apq_cpudai_bt_tx, |
| 1646 | &apq_cpudai_fm_rx, |
| 1647 | &apq_cpudai_fm_tx, |
| 1648 | &apq_cpu_fe, |
| 1649 | &apq_stub_codec, |
| 1650 | &apq_voice, |
| 1651 | &apq_voip, |
| 1652 | &apq_lpa_pcm, |
| 1653 | &apq_pcm_hostless, |
| 1654 | &apq_cpudai_afe_01_rx, |
| 1655 | &apq_cpudai_afe_01_tx, |
| 1656 | &apq_cpudai_afe_02_rx, |
| 1657 | &apq_cpudai_afe_02_tx, |
| 1658 | &apq_pcm_afe, |
| 1659 | &apq_cpudai_auxpcm_rx, |
| 1660 | &apq_cpudai_auxpcm_tx, |
Neema Shetty | 8427c26 | 2012-02-16 11:23:43 -0800 | [diff] [blame] | 1661 | &apq_cpudai_stub, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1662 | &apq8064_rpm_device, |
| 1663 | &apq8064_rpm_log_device, |
| 1664 | &apq8064_rpm_stat_device, |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 1665 | &msm_bus_8064_apps_fabric, |
| 1666 | &msm_bus_8064_sys_fabric, |
| 1667 | &msm_bus_8064_mm_fabric, |
| 1668 | &msm_bus_8064_sys_fpb, |
| 1669 | &msm_bus_8064_cpss_fpb, |
Mohan Kumar Gubbihalli Lachma Naik | 7f72edd | 2012-02-06 17:26:47 -0800 | [diff] [blame] | 1670 | &apq8064_msm_device_vidc, |
Matt Wagantall | ed83265 | 2012-02-02 19:23:17 -0800 | [diff] [blame] | 1671 | &msm_8960_riva, |
Matt Wagantall | b94b9a5 | 2012-02-02 21:59:54 -0800 | [diff] [blame] | 1672 | &msm_8960_q6_lpass, |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame] | 1673 | &msm_gss, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1674 | }; |
| 1675 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 1676 | static struct platform_device *sim_devices[] __initdata = { |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 1677 | &apq8064_device_uart_gsbi3, |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 1678 | &msm_device_sps_apq8064, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 1679 | }; |
| 1680 | |
| 1681 | static struct platform_device *rumi3_devices[] __initdata = { |
| 1682 | &apq8064_device_uart_gsbi1, |
Yan He | 435ed61 | 2011-11-23 17:34:59 -0800 | [diff] [blame] | 1683 | &msm_device_sps_apq8064, |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 1684 | #ifdef CONFIG_MSM_ROTATOR |
| 1685 | &msm_rotator_device, |
| 1686 | #endif |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 1687 | }; |
| 1688 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 1689 | static struct platform_device *cdp_devices[] __initdata = { |
| 1690 | &apq8064_device_uart_gsbi1, |
Jin Hong | 4bbbfba | 2012-02-02 21:48:07 -0800 | [diff] [blame] | 1691 | &apq8064_device_uart_gsbi7, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 1692 | &msm_device_sps_apq8064, |
| 1693 | }; |
| 1694 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 1695 | static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = { |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 1696 | .max_clock_speed = 1100000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1697 | }; |
| 1698 | |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 1699 | #define KS8851_IRQ_GPIO 43 |
| 1700 | |
| 1701 | static struct spi_board_info spi_board_info[] __initdata = { |
| 1702 | { |
| 1703 | .modalias = "ks8851", |
| 1704 | .irq = MSM_GPIO_TO_INT(KS8851_IRQ_GPIO), |
| 1705 | .max_speed_hz = 19200000, |
| 1706 | .bus_num = 0, |
| 1707 | .chip_select = 2, |
| 1708 | .mode = SPI_MODE_0, |
| 1709 | }, |
| 1710 | }; |
| 1711 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 1712 | static struct slim_boardinfo apq8064_slim_devices[] = { |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 1713 | { |
Swaminathan Sathappan | cef966d | 2011-12-15 17:27:04 -0800 | [diff] [blame] | 1714 | .bus_num = 1, |
| 1715 | .slim_slave = &apq8064_slim_tabla, |
| 1716 | }, |
| 1717 | { |
| 1718 | .bus_num = 1, |
| 1719 | .slim_slave = &apq8064_slim_tabla20, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 1720 | }, |
| 1721 | /* add more slimbus slaves as needed */ |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 1722 | }; |
| 1723 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1724 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi1_pdata = { |
| 1725 | .clk_freq = 100000, |
| 1726 | .src_clk_rate = 24000000, |
| 1727 | }; |
| 1728 | |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1729 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi3_pdata = { |
| 1730 | .clk_freq = 100000, |
| 1731 | .src_clk_rate = 24000000, |
| 1732 | }; |
| 1733 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1734 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { |
| 1735 | .clk_freq = 100000, |
| 1736 | .src_clk_rate = 24000000, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1737 | }; |
| 1738 | |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1739 | #define GSBI_DUAL_MODE_CODE 0x60 |
| 1740 | #define MSM_GSBI1_PHYS 0x12440000 |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1741 | static void __init apq8064_i2c_init(void) |
| 1742 | { |
David Keitel | 3c40fc5 | 2012-02-09 17:53:52 -0800 | [diff] [blame] | 1743 | void __iomem *gsbi_mem; |
| 1744 | |
| 1745 | apq8064_device_qup_i2c_gsbi1.dev.platform_data = |
| 1746 | &apq8064_i2c_qup_gsbi1_pdata; |
| 1747 | gsbi_mem = ioremap_nocache(MSM_GSBI1_PHYS, 4); |
| 1748 | writel_relaxed(GSBI_DUAL_MODE_CODE, gsbi_mem); |
| 1749 | /* Ensure protocol code is written before proceeding */ |
| 1750 | wmb(); |
| 1751 | iounmap(gsbi_mem); |
| 1752 | apq8064_i2c_qup_gsbi1_pdata.use_gsbi_shared_mode = 1; |
Jing Lin | 04601f9 | 2012-02-05 15:36:07 -0800 | [diff] [blame] | 1753 | apq8064_device_qup_i2c_gsbi3.dev.platform_data = |
| 1754 | &apq8064_i2c_qup_gsbi3_pdata; |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1755 | apq8064_device_qup_i2c_gsbi4.dev.platform_data = |
| 1756 | &apq8064_i2c_qup_gsbi4_pdata; |
| 1757 | } |
| 1758 | |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 1759 | #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 1760 | static int ethernet_init(void) |
| 1761 | { |
| 1762 | int ret; |
| 1763 | ret = gpio_request(KS8851_IRQ_GPIO, "ks8851_irq"); |
| 1764 | if (ret) { |
| 1765 | pr_err("ks8851 gpio_request failed: %d\n", ret); |
| 1766 | goto fail; |
| 1767 | } |
| 1768 | |
| 1769 | return 0; |
| 1770 | fail: |
| 1771 | return ret; |
| 1772 | } |
| 1773 | #else |
| 1774 | static int ethernet_init(void) |
| 1775 | { |
| 1776 | return 0; |
| 1777 | } |
| 1778 | #endif |
| 1779 | |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 1780 | #define GPIO_KEY_HOME PM8921_GPIO_PM_TO_SYS(27) |
| 1781 | #define GPIO_KEY_VOLUME_UP PM8921_GPIO_PM_TO_SYS(35) |
| 1782 | #define GPIO_KEY_VOLUME_DOWN PM8921_GPIO_PM_TO_SYS(38) |
| 1783 | #define GPIO_KEY_CAM_FOCUS PM8921_GPIO_PM_TO_SYS(3) |
| 1784 | #define GPIO_KEY_CAM_SNAP PM8921_GPIO_PM_TO_SYS(4) |
| 1785 | #define GPIO_KEY_ROTATION 46 |
| 1786 | |
| 1787 | static struct gpio_keys_button cdp_keys[] = { |
| 1788 | { |
| 1789 | .code = KEY_HOME, |
| 1790 | .gpio = GPIO_KEY_HOME, |
| 1791 | .desc = "home_key", |
| 1792 | .active_low = 1, |
| 1793 | .type = EV_KEY, |
| 1794 | .wakeup = 1, |
| 1795 | .debounce_interval = 15, |
| 1796 | }, |
| 1797 | { |
| 1798 | .code = KEY_VOLUMEUP, |
| 1799 | .gpio = GPIO_KEY_VOLUME_UP, |
| 1800 | .desc = "volume_up_key", |
| 1801 | .active_low = 1, |
| 1802 | .type = EV_KEY, |
| 1803 | .wakeup = 1, |
| 1804 | .debounce_interval = 15, |
| 1805 | }, |
| 1806 | { |
| 1807 | .code = KEY_VOLUMEDOWN, |
| 1808 | .gpio = GPIO_KEY_VOLUME_DOWN, |
| 1809 | .desc = "volume_down_key", |
| 1810 | .active_low = 1, |
| 1811 | .type = EV_KEY, |
| 1812 | .wakeup = 1, |
| 1813 | .debounce_interval = 15, |
| 1814 | }, |
| 1815 | { |
| 1816 | .code = SW_ROTATE_LOCK, |
| 1817 | .gpio = GPIO_KEY_ROTATION, |
| 1818 | .desc = "rotate_key", |
| 1819 | .active_low = 1, |
| 1820 | .type = EV_SW, |
| 1821 | .debounce_interval = 15, |
| 1822 | }, |
| 1823 | }; |
| 1824 | |
| 1825 | static struct gpio_keys_platform_data cdp_keys_data = { |
| 1826 | .buttons = cdp_keys, |
| 1827 | .nbuttons = ARRAY_SIZE(cdp_keys), |
| 1828 | }; |
| 1829 | |
| 1830 | static struct platform_device cdp_kp_pdev = { |
| 1831 | .name = "gpio-keys", |
| 1832 | .id = -1, |
| 1833 | .dev = { |
| 1834 | .platform_data = &cdp_keys_data, |
| 1835 | }, |
| 1836 | }; |
| 1837 | |
| 1838 | static struct gpio_keys_button mtp_keys[] = { |
| 1839 | { |
| 1840 | .code = KEY_CAMERA_FOCUS, |
| 1841 | .gpio = GPIO_KEY_CAM_FOCUS, |
| 1842 | .desc = "cam_focus_key", |
| 1843 | .active_low = 1, |
| 1844 | .type = EV_KEY, |
| 1845 | .wakeup = 1, |
| 1846 | .debounce_interval = 15, |
| 1847 | }, |
| 1848 | { |
| 1849 | .code = KEY_VOLUMEUP, |
| 1850 | .gpio = GPIO_KEY_VOLUME_UP, |
| 1851 | .desc = "volume_up_key", |
| 1852 | .active_low = 1, |
| 1853 | .type = EV_KEY, |
| 1854 | .wakeup = 1, |
| 1855 | .debounce_interval = 15, |
| 1856 | }, |
| 1857 | { |
| 1858 | .code = KEY_VOLUMEDOWN, |
| 1859 | .gpio = GPIO_KEY_VOLUME_DOWN, |
| 1860 | .desc = "volume_down_key", |
| 1861 | .active_low = 1, |
| 1862 | .type = EV_KEY, |
| 1863 | .wakeup = 1, |
| 1864 | .debounce_interval = 15, |
| 1865 | }, |
| 1866 | { |
| 1867 | .code = KEY_CAMERA_SNAPSHOT, |
| 1868 | .gpio = GPIO_KEY_CAM_SNAP, |
| 1869 | .desc = "cam_snap_key", |
| 1870 | .active_low = 1, |
| 1871 | .type = EV_KEY, |
| 1872 | .debounce_interval = 15, |
| 1873 | }, |
| 1874 | }; |
| 1875 | |
| 1876 | static struct gpio_keys_platform_data mtp_keys_data = { |
| 1877 | .buttons = mtp_keys, |
| 1878 | .nbuttons = ARRAY_SIZE(mtp_keys), |
| 1879 | }; |
| 1880 | |
| 1881 | static struct platform_device mtp_kp_pdev = { |
| 1882 | .name = "gpio-keys", |
| 1883 | .id = -1, |
| 1884 | .dev = { |
| 1885 | .platform_data = &mtp_keys_data, |
| 1886 | }, |
| 1887 | }; |
| 1888 | |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 1889 | /* Sensors DSPS platform data */ |
| 1890 | #define DSPS_PIL_GENERIC_NAME "dsps" |
| 1891 | static void __init apq8064_init_dsps(void) |
| 1892 | { |
| 1893 | struct msm_dsps_platform_data *pdata = |
| 1894 | msm_dsps_device_8064.dev.platform_data; |
| 1895 | pdata->pil_name = DSPS_PIL_GENERIC_NAME; |
| 1896 | pdata->gpios = NULL; |
| 1897 | pdata->gpios_num = 0; |
| 1898 | |
| 1899 | platform_device_register(&msm_dsps_device_8064); |
| 1900 | } |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 1901 | |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 1902 | static void __init apq8064_clock_init(void) |
| 1903 | { |
Tianyi Gou | acb588d | 2012-01-27 18:24:05 -0800 | [diff] [blame] | 1904 | if (machine_is_apq8064_rumi3()) |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 1905 | msm_clock_init(&apq8064_dummy_clock_init_data); |
Tianyi Gou | acb588d | 2012-01-27 18:24:05 -0800 | [diff] [blame] | 1906 | else |
| 1907 | msm_clock_init(&apq8064_clock_init_data); |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 1908 | } |
| 1909 | |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 1910 | #define I2C_SURF 1 |
| 1911 | #define I2C_FFA (1 << 1) |
| 1912 | #define I2C_RUMI (1 << 2) |
| 1913 | #define I2C_SIM (1 << 3) |
| 1914 | #define I2C_LIQUID (1 << 4) |
| 1915 | |
| 1916 | struct i2c_registry { |
| 1917 | u8 machs; |
| 1918 | int bus; |
| 1919 | struct i2c_board_info *info; |
| 1920 | int len; |
| 1921 | }; |
| 1922 | |
| 1923 | static struct i2c_registry apq8064_i2c_devices[] __initdata = { |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 1924 | { |
| 1925 | I2C_SURF | I2C_LIQUID, |
| 1926 | APQ_8064_GSBI3_QUP_I2C_BUS_ID, |
| 1927 | mxt_device_info, |
| 1928 | ARRAY_SIZE(mxt_device_info), |
| 1929 | }, |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 1930 | { |
| 1931 | I2C_FFA, |
| 1932 | APQ_8064_GSBI3_QUP_I2C_BUS_ID, |
| 1933 | cyttsp_info, |
| 1934 | ARRAY_SIZE(cyttsp_info), |
| 1935 | }, |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 1936 | { |
| 1937 | I2C_FFA | I2C_LIQUID, |
| 1938 | APQ_8064_GSBI1_QUP_I2C_BUS_ID, |
| 1939 | isa1200_board_info, |
| 1940 | ARRAY_SIZE(isa1200_board_info), |
| 1941 | }, |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 1942 | }; |
| 1943 | |
| 1944 | static void __init register_i2c_devices(void) |
| 1945 | { |
| 1946 | u8 mach_mask = 0; |
| 1947 | int i; |
| 1948 | |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 1949 | #ifdef CONFIG_MSM_CAMERA |
| 1950 | struct i2c_registry apq8064_camera_i2c_devices = { |
| 1951 | I2C_SURF | I2C_FFA | I2C_LIQUID | I2C_RUMI, |
| 1952 | APQ_8064_GSBI4_QUP_I2C_BUS_ID, |
| 1953 | apq8064_camera_board_info.board_info, |
| 1954 | apq8064_camera_board_info.num_i2c_board_info, |
| 1955 | }; |
| 1956 | #endif |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 1957 | /* Build the matching 'supported_machs' bitmask */ |
| 1958 | if (machine_is_apq8064_cdp()) |
| 1959 | mach_mask = I2C_SURF; |
| 1960 | else if (machine_is_apq8064_mtp()) |
| 1961 | mach_mask = I2C_FFA; |
| 1962 | else if (machine_is_apq8064_liquid()) |
| 1963 | mach_mask = I2C_LIQUID; |
| 1964 | else if (machine_is_apq8064_rumi3()) |
| 1965 | mach_mask = I2C_RUMI; |
| 1966 | else if (machine_is_apq8064_sim()) |
| 1967 | mach_mask = I2C_SIM; |
| 1968 | else |
| 1969 | pr_err("unmatched machine ID in register_i2c_devices\n"); |
| 1970 | |
| 1971 | /* Run the array and install devices as appropriate */ |
| 1972 | for (i = 0; i < ARRAY_SIZE(apq8064_i2c_devices); ++i) { |
| 1973 | if (apq8064_i2c_devices[i].machs & mach_mask) |
| 1974 | i2c_register_board_info(apq8064_i2c_devices[i].bus, |
| 1975 | apq8064_i2c_devices[i].info, |
| 1976 | apq8064_i2c_devices[i].len); |
| 1977 | } |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 1978 | #ifdef CONFIG_MSM_CAMERA |
| 1979 | if (apq8064_camera_i2c_devices.machs & mach_mask) |
| 1980 | i2c_register_board_info(apq8064_camera_i2c_devices.bus, |
| 1981 | apq8064_camera_i2c_devices.info, |
| 1982 | apq8064_camera_i2c_devices.len); |
| 1983 | #endif |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 1984 | } |
| 1985 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1986 | static void __init apq8064_common_init(void) |
| 1987 | { |
| 1988 | if (socinfo_init() < 0) |
| 1989 | pr_err("socinfo_init() failed!\n"); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1990 | BUG_ON(msm_rpm_init(&apq8064_rpm_data)); |
| 1991 | BUG_ON(msm_rpmrs_levels_init(&msm_rpmrs_data)); |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 1992 | regulator_suppress_info_printing(); |
| 1993 | platform_device_register(&apq8064_device_rpm_regulator); |
Stephen Boyd | 4d0d258 | 2012-02-10 14:49:40 -0800 | [diff] [blame] | 1994 | if (msm_xo_init()) |
| 1995 | pr_err("Failed to initialize XO votes\n"); |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 1996 | apq8064_clock_init(); |
Stepan Moskovchenko | 2327a95 | 2011-12-14 16:31:28 -0800 | [diff] [blame] | 1997 | apq8064_init_gpiomux(); |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 1998 | apq8064_i2c_init(); |
Jing Lin | 417fa45 | 2012-02-05 14:31:06 -0800 | [diff] [blame] | 1999 | register_i2c_devices(); |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 2000 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 2001 | apq8064_device_qup_spi_gsbi5.dev.platform_data = |
| 2002 | &apq8064_qup_spi_gsbi5_pdata; |
Stepan Moskovchenko | c1074f0 | 2011-12-14 17:51:57 -0800 | [diff] [blame] | 2003 | apq8064_init_pmic(); |
Hemant Kumar | 94e7da2 | 2012-02-03 16:52:29 -0800 | [diff] [blame] | 2004 | if (machine_is_apq8064_liquid()) |
| 2005 | msm_otg_pdata.mhl_enable = true; |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 2006 | apq8064_device_otg.dev.platform_data = &msm_otg_pdata; |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 2007 | apq8064_ehci_host_init(); |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 2008 | apq8064_init_buses(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2009 | platform_add_devices(common_devices, ARRAY_SIZE(common_devices)); |
Hemant Kumar | f1ca919 | 2012-02-07 18:59:33 -0800 | [diff] [blame] | 2010 | if (machine_is_apq8064_mtp()) { |
| 2011 | apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata; |
| 2012 | device_initialize(&apq8064_device_hsic_host.dev); |
| 2013 | } |
Jay Chokshi | e874128 | 2012-01-25 15:22:55 -0800 | [diff] [blame] | 2014 | apq8064_pm8xxx_gpio_mpp_init(); |
Sahitya Tummala | 3586ed9 | 2011-08-03 09:13:23 +0530 | [diff] [blame] | 2015 | apq8064_init_mmc(); |
Swaminathan Sathappan | 144b488 | 2012-02-06 17:01:20 -0800 | [diff] [blame] | 2016 | |
| 2017 | if (machine_is_apq8064_mtp()) { |
| 2018 | mdm_8064_device.dev.platform_data = &mdm_platform_data; |
| 2019 | platform_device_register(&mdm_8064_device); |
| 2020 | } |
| 2021 | platform_device_register(&apq8064_slim_ctrl); |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 2022 | slim_register_board_info(apq8064_slim_devices, |
| 2023 | ARRAY_SIZE(apq8064_slim_devices)); |
Jin Hong | d3024e6 | 2012-02-09 16:13:32 -0800 | [diff] [blame] | 2024 | apq8064_init_dsps(); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2025 | msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data)); |
Mahesh Sivasubramanian | cbce1ec | 2012-01-24 10:32:44 -0700 | [diff] [blame] | 2026 | acpuclk_init(&acpuclk_8064_soc_data); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 2027 | msm_spm_l2_init(msm_spm_l2_data); |
| 2028 | msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data)); |
| 2029 | msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ); |
| 2030 | msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates), |
| 2031 | msm_pm_data); |
| 2032 | BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata)); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2033 | } |
| 2034 | |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2035 | static void __init apq8064_allocate_memory_regions(void) |
| 2036 | { |
| 2037 | apq8064_allocate_fb_region(); |
| 2038 | } |
| 2039 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2040 | static void __init apq8064_sim_init(void) |
| 2041 | { |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 2042 | struct msm_watchdog_pdata *wdog_pdata = (struct msm_watchdog_pdata *) |
| 2043 | &msm8064_device_watchdog.dev.platform_data; |
| 2044 | |
| 2045 | wdog_pdata->bark_time = 15000; |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2046 | msm_tsens_early_init(&apq_tsens_pdata); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2047 | apq8064_common_init(); |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2048 | platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices)); |
| 2049 | } |
| 2050 | |
| 2051 | static void __init apq8064_rumi3_init(void) |
| 2052 | { |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2053 | msm_tsens_early_init(&apq_tsens_pdata); |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2054 | apq8064_common_init(); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 2055 | ethernet_init(); |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 2056 | platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices)); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 2057 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2058 | apq8064_init_fb(); |
Jordan Crouse | b3115fe | 2012-02-01 22:11:12 -0700 | [diff] [blame] | 2059 | apq8064_init_gpu(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2060 | } |
| 2061 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2062 | static void __init apq8064_cdp_init(void) |
| 2063 | { |
Siddartha Mohanadoss | caeaa92 | 2012-02-07 16:41:38 -0800 | [diff] [blame] | 2064 | msm_tsens_early_init(&apq_tsens_pdata); |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2065 | apq8064_common_init(); |
| 2066 | ethernet_init(); |
| 2067 | platform_add_devices(cdp_devices, ARRAY_SIZE(cdp_devices)); |
| 2068 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2069 | apq8064_init_fb(); |
Jordan Crouse | b3115fe | 2012-02-01 22:11:12 -0700 | [diff] [blame] | 2070 | apq8064_init_gpu(); |
Matt Wagantall | 1875d32 | 2012-02-22 16:11:33 -0800 | [diff] [blame] | 2071 | platform_add_devices(apq8064_fs_devices, apq8064_num_fs_devices); |
Kevin Chan | d07220e | 2012-02-13 15:52:22 -0800 | [diff] [blame] | 2072 | apq8064_init_cam(); |
Mohan Pallaka | 474b94b | 2012-01-25 12:59:58 +0530 | [diff] [blame] | 2073 | |
| 2074 | if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid()) |
| 2075 | platform_device_register(&cdp_kp_pdev); |
| 2076 | |
| 2077 | if (machine_is_apq8064_mtp()) |
| 2078 | platform_device_register(&mtp_kp_pdev); |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2079 | } |
| 2080 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2081 | MACHINE_START(APQ8064_SIM, "QCT APQ8064 SIMULATOR") |
| 2082 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 2083 | .reserve = apq8064_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2084 | .init_irq = apq8064_init_irq, |
Marc Zyngier | 89bdafd1 | 2011-12-22 11:39:20 +0530 | [diff] [blame] | 2085 | .handle_irq = gic_handle_irq, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2086 | .timer = &msm_timer, |
| 2087 | .init_machine = apq8064_sim_init, |
| 2088 | MACHINE_END |
| 2089 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2090 | MACHINE_START(APQ8064_RUMI3, "QCT APQ8064 RUMI3") |
| 2091 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 2092 | .reserve = apq8064_reserve, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2093 | .init_irq = apq8064_init_irq, |
Marc Zyngier | 89bdafd1 | 2011-12-22 11:39:20 +0530 | [diff] [blame] | 2094 | .handle_irq = gic_handle_irq, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2095 | .timer = &msm_timer, |
| 2096 | .init_machine = apq8064_rumi3_init, |
Huaibin Yang | 4a084e3 | 2011-12-15 15:25:52 -0800 | [diff] [blame] | 2097 | .init_early = apq8064_allocate_memory_regions, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 2098 | MACHINE_END |
| 2099 | |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2100 | MACHINE_START(APQ8064_CDP, "QCT APQ8064 CDP") |
| 2101 | .map_io = apq8064_map_io, |
| 2102 | .reserve = apq8064_reserve, |
| 2103 | .init_irq = apq8064_init_irq, |
| 2104 | .handle_irq = gic_handle_irq, |
| 2105 | .timer = &msm_timer, |
| 2106 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2107 | .init_early = apq8064_allocate_memory_regions, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2108 | MACHINE_END |
| 2109 | |
| 2110 | MACHINE_START(APQ8064_MTP, "QCT APQ8064 MTP") |
| 2111 | .map_io = apq8064_map_io, |
| 2112 | .reserve = apq8064_reserve, |
| 2113 | .init_irq = apq8064_init_irq, |
| 2114 | .handle_irq = gic_handle_irq, |
| 2115 | .timer = &msm_timer, |
| 2116 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2117 | .init_early = apq8064_allocate_memory_regions, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2118 | MACHINE_END |
| 2119 | |
| 2120 | MACHINE_START(APQ8064_LIQUID, "QCT APQ8064 LIQUID") |
| 2121 | .map_io = apq8064_map_io, |
| 2122 | .reserve = apq8064_reserve, |
| 2123 | .init_irq = apq8064_init_irq, |
| 2124 | .handle_irq = gic_handle_irq, |
| 2125 | .timer = &msm_timer, |
| 2126 | .init_machine = apq8064_cdp_init, |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 2127 | .init_early = apq8064_allocate_memory_regions, |
Joel King | 82b7e3f | 2012-01-05 10:03:27 -0800 | [diff] [blame] | 2128 | MACHINE_END |
| 2129 | |
Joel King | 11ca820 | 2012-02-13 16:19:03 -0800 | [diff] [blame] | 2130 | MACHINE_START(MPQ8064_HRD, "QCT MPQ8064 HRD") |
| 2131 | .map_io = apq8064_map_io, |
| 2132 | .reserve = apq8064_reserve, |
| 2133 | .init_irq = apq8064_init_irq, |
| 2134 | .handle_irq = gic_handle_irq, |
| 2135 | .timer = &msm_timer, |
| 2136 | .init_machine = apq8064_cdp_init, |
| 2137 | MACHINE_END |
| 2138 | |
| 2139 | MACHINE_START(MPQ8064_DTV, "QCT MPQ8064 DTV") |
| 2140 | .map_io = apq8064_map_io, |
| 2141 | .reserve = apq8064_reserve, |
| 2142 | .init_irq = apq8064_init_irq, |
| 2143 | .handle_irq = gic_handle_irq, |
| 2144 | .timer = &msm_timer, |
| 2145 | .init_machine = apq8064_cdp_init, |
| 2146 | MACHINE_END |
| 2147 | |