blob: febc55d5fd74105f5a9b80dd8bf6b9d9046c1f86 [file] [log] [blame]
Manu Gautam5143b252012-01-05 19:25:23 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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 Heitke748593a2011-07-15 15:45:11 -060017#include <linux/i2c.h>
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -060018#include <linux/slimbus/slimbus.h>
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -080019#include <linux/mfd/wcd9310/core.h>
20#include <linux/mfd/wcd9310/pdata.h>
Kenneth Heitke36920d32011-07-20 16:44:30 -060021#include <linux/msm_ssbi.h>
Stepan Moskovchenkoeed82a52011-09-02 13:19:23 -070022#include <linux/spi/spi.h>
Ramesh Masavarapu28311912011-10-27 11:04:12 -070023#include <linux/dma-mapping.h>
24#include <linux/platform_data/qcom_crypto_device.h>
Olav Haugan7c6aa742012-01-16 16:47:37 -080025#include <linux/ion.h>
Jack Cheung46bfffa2012-01-19 15:26:24 -080026#include <linux/memory.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/hardware/gic.h>
Sahitya Tummala3586ed92011-08-03 09:13:23 +053030#include <asm/mach/mmc.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031
32#include <mach/board.h>
33#include <mach/msm_iomap.h>
Olav Haugan7c6aa742012-01-16 16:47:37 -080034#include <mach/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070035#include <linux/usb/msm_hsusb.h>
36#include <linux/usb/android.h>
37#include <mach/socinfo.h>
Harini Jayaramanc4c58692011-07-19 14:50:10 -060038#include <mach/msm_spi.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070039#include "timer.h"
40#include "devices.h"
Joel King4ebccc62011-07-22 09:43:22 -070041#include <mach/gpio.h>
42#include <mach/gpiomux.h>
Praveen Chidambaram78499012011-11-01 17:15:17 -060043#include <mach/rpm.h>
Olav Haugan7c6aa742012-01-16 16:47:37 -080044#ifdef CONFIG_ANDROID_PMEM
Kevin Chan13be4e22011-10-20 11:30:32 -070045#include <linux/android_pmem.h>
Olav Haugan7c6aa742012-01-16 16:47:37 -080046#endif
Kevin Chan13be4e22011-10-20 11:30:32 -070047#include <mach/msm_memtypes.h>
48#include <linux/bootmem.h>
49#include <asm/setup.h>
Ramesh Masavarapu28311912011-10-27 11:04:12 -070050#include <mach/dma.h>
Gagan Mac8a7a5d32011-11-11 16:43:06 -070051#include <mach/msm_bus_board.h>
Praveen Chidambaram78499012011-11-01 17:15:17 -060052#include <mach/cpuidle.h>
Joel Kingdacbc822012-01-25 13:30:57 -080053#include <mach/mdm2.h>
Joel King4ebccc62011-07-22 09:43:22 -070054
Jeff Ohlstein7e668552011-10-06 16:17:25 -070055#include "msm_watchdog.h"
Stepan Moskovchenko5a83dba2011-12-05 17:30:17 -080056#include "board-8064.h"
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -070057#include "acpuclock.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060058#include "spm.h"
59#include "mpm.h"
60#include "rpm_resources.h"
Matt Wagantall7cca4642012-02-01 16:43:24 -080061#include "pm.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060062#include "pm-boot.h"
Rajesh Sastrulaaee8af32012-01-20 11:46:31 -080063#include "devices-msm8x60.h"
Jay Chokshiea67c622011-07-29 17:12:26 -070064
Olav Haugan7c6aa742012-01-16 16:47:37 -080065#define MSM_PMEM_ADSP_SIZE 0x7800000
Ben Romberger3ffcd812011-12-08 19:12:10 -080066#define MSM_PMEM_AUDIO_SIZE 0x2B4000
Olav Haugan7c6aa742012-01-16 16:47:37 -080067#ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY
68#define MSM_PMEM_SIZE 0x4000000 /* 64 Mbytes */
69#else
70#define MSM_PMEM_SIZE 0x2800000 /* 40 Mbytes */
71#endif
Kevin Chan13be4e22011-10-20 11:30:32 -070072
Olav Haugan7c6aa742012-01-16 16:47:37 -080073#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganedcf6832012-01-24 08:35:41 -080074#define MSM_PMEM_KERNEL_EBI1_SIZE 0x280000
Olav Haugan7c6aa742012-01-16 16:47:37 -080075#define MSM_ION_SF_SIZE MSM_PMEM_SIZE
Olav Haugand3d29682012-01-19 10:57:07 -080076#define MSM_ION_MM_FW_SIZE 0x200000 /* (2MB) */
Olav Haugan7c6aa742012-01-16 16:47:37 -080077#define MSM_ION_MM_SIZE MSM_PMEM_ADSP_SIZE
Olav Hauganf45e2142012-01-19 11:01:01 -080078#define MSM_ION_QSECOM_SIZE 0x100000 /* (1MB) */
Olav Haugan7c6aa742012-01-16 16:47:37 -080079#define MSM_ION_MFC_SIZE SZ_8K
Olav Haugan2c43fac2012-01-19 11:06:37 -080080#define MSM_ION_AUDIO_SIZE MSM_PMEM_AUDIO_SIZE
81#define MSM_ION_HEAP_NUM 8
Olav Haugan7c6aa742012-01-16 16:47:37 -080082#else
83#define MSM_PMEM_KERNEL_EBI1_SIZE 0x110C000
84#define MSM_ION_HEAP_NUM 1
85#endif
Kevin Chan13be4e22011-10-20 11:30:32 -070086
Olav Haugan7c6aa742012-01-16 16:47:37 -080087#ifdef CONFIG_KERNEL_PMEM_EBI_REGION
88static unsigned pmem_kernel_ebi1_size = MSM_PMEM_KERNEL_EBI1_SIZE;
89static int __init pmem_kernel_ebi1_size_setup(char *p)
Kevin Chan13be4e22011-10-20 11:30:32 -070090{
Olav Haugan7c6aa742012-01-16 16:47:37 -080091 pmem_kernel_ebi1_size = memparse(p, NULL);
92 return 0;
Kevin Chan13be4e22011-10-20 11:30:32 -070093}
Olav Haugan7c6aa742012-01-16 16:47:37 -080094early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
95#endif
Kevin Chan13be4e22011-10-20 11:30:32 -070096
Olav Haugan7c6aa742012-01-16 16:47:37 -080097#ifdef CONFIG_ANDROID_PMEM
Kevin Chan13be4e22011-10-20 11:30:32 -070098static unsigned pmem_size = MSM_PMEM_SIZE;
99static int __init pmem_size_setup(char *p)
100{
101 pmem_size = memparse(p, NULL);
102 return 0;
103}
104early_param("pmem_size", pmem_size_setup);
105
106static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
107
108static int __init pmem_adsp_size_setup(char *p)
109{
110 pmem_adsp_size = memparse(p, NULL);
111 return 0;
112}
113early_param("pmem_adsp_size", pmem_adsp_size_setup);
114
115static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
116
117static int __init pmem_audio_size_setup(char *p)
118{
119 pmem_audio_size = memparse(p, NULL);
120 return 0;
121}
122early_param("pmem_audio_size", pmem_audio_size_setup);
Olav Haugan7c6aa742012-01-16 16:47:37 -0800123#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700124
Olav Haugan7c6aa742012-01-16 16:47:37 -0800125#ifdef CONFIG_ANDROID_PMEM
126#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Kevin Chan13be4e22011-10-20 11:30:32 -0700127static struct android_pmem_platform_data android_pmem_pdata = {
128 .name = "pmem",
129 .allocator_type = PMEM_ALLOCATORTYPE_ALLORNOTHING,
130 .cached = 1,
131 .memory_type = MEMTYPE_EBI1,
132};
133
134static struct platform_device android_pmem_device = {
135 .name = "android_pmem",
136 .id = 0,
137 .dev = {.platform_data = &android_pmem_pdata},
138};
139
140static struct android_pmem_platform_data android_pmem_adsp_pdata = {
141 .name = "pmem_adsp",
142 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
143 .cached = 0,
144 .memory_type = MEMTYPE_EBI1,
145};
Kevin Chan13be4e22011-10-20 11:30:32 -0700146static struct platform_device android_pmem_adsp_device = {
147 .name = "android_pmem",
148 .id = 2,
149 .dev = { .platform_data = &android_pmem_adsp_pdata },
150};
Olav Haugan7c6aa742012-01-16 16:47:37 -0800151#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700152
153static struct android_pmem_platform_data android_pmem_audio_pdata = {
154 .name = "pmem_audio",
155 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
156 .cached = 0,
157 .memory_type = MEMTYPE_EBI1,
158};
159
160static struct platform_device android_pmem_audio_device = {
161 .name = "android_pmem",
162 .id = 4,
163 .dev = { .platform_data = &android_pmem_audio_pdata },
164};
Olav Haugan7c6aa742012-01-16 16:47:37 -0800165#endif
166
167static struct memtype_reserve apq8064_reserve_table[] __initdata = {
168 [MEMTYPE_SMI] = {
169 },
170 [MEMTYPE_EBI0] = {
171 .flags = MEMTYPE_FLAGS_1M_ALIGN,
172 },
173 [MEMTYPE_EBI1] = {
174 .flags = MEMTYPE_FLAGS_1M_ALIGN,
175 },
176};
Kevin Chan13be4e22011-10-20 11:30:32 -0700177
178static void __init size_pmem_devices(void)
179{
Olav Haugan7c6aa742012-01-16 16:47:37 -0800180#ifdef CONFIG_ANDROID_PMEM
181#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Kevin Chan13be4e22011-10-20 11:30:32 -0700182 android_pmem_adsp_pdata.size = pmem_adsp_size;
183 android_pmem_pdata.size = pmem_size;
Olav Haugan7c6aa742012-01-16 16:47:37 -0800184#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700185 android_pmem_audio_pdata.size = MSM_PMEM_AUDIO_SIZE;
Olav Haugan7c6aa742012-01-16 16:47:37 -0800186#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700187}
188
189static void __init reserve_memory_for(struct android_pmem_platform_data *p)
190{
191 apq8064_reserve_table[p->memory_type].size += p->size;
192}
193
Kevin Chan13be4e22011-10-20 11:30:32 -0700194static void __init reserve_pmem_memory(void)
195{
Olav Haugan7c6aa742012-01-16 16:47:37 -0800196#ifdef CONFIG_ANDROID_PMEM
197#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Kevin Chan13be4e22011-10-20 11:30:32 -0700198 reserve_memory_for(&android_pmem_adsp_pdata);
199 reserve_memory_for(&android_pmem_pdata);
Olav Haugan7c6aa742012-01-16 16:47:37 -0800200#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700201 reserve_memory_for(&android_pmem_audio_pdata);
202 apq8064_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
Olav Haugan7c6aa742012-01-16 16:47:37 -0800203#endif
204}
205
206static int apq8064_paddr_to_memtype(unsigned int paddr)
207{
208 return MEMTYPE_EBI1;
209}
210
211#ifdef CONFIG_ION_MSM
212#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
213static struct ion_cp_heap_pdata cp_mm_ion_pdata = {
214 .permission_type = IPT_TYPE_MM_CARVEOUT,
Olav Haugand3d29682012-01-19 10:57:07 -0800215 .align = PAGE_SIZE,
Olav Haugan7c6aa742012-01-16 16:47:37 -0800216};
217
218static struct ion_cp_heap_pdata cp_mfc_ion_pdata = {
219 .permission_type = IPT_TYPE_MFC_SHAREDMEM,
Olav Haugand3d29682012-01-19 10:57:07 -0800220 .align = PAGE_SIZE,
Olav Haugan7c6aa742012-01-16 16:47:37 -0800221};
222
223static struct ion_co_heap_pdata co_ion_pdata = {
Olav Haugand3d29682012-01-19 10:57:07 -0800224 .adjacent_mem_id = INVALID_HEAP_ID,
225 .align = PAGE_SIZE,
226};
227
228static struct ion_co_heap_pdata fw_co_ion_pdata = {
229 .adjacent_mem_id = ION_CP_MM_HEAP_ID,
230 .align = SZ_128K,
Olav Haugan7c6aa742012-01-16 16:47:37 -0800231};
232#endif
233static struct ion_platform_data ion_pdata = {
234 .nr = MSM_ION_HEAP_NUM,
235 .heaps = {
236 {
237 .id = ION_SYSTEM_HEAP_ID,
238 .type = ION_HEAP_TYPE_SYSTEM,
239 .name = ION_VMALLOC_HEAP_NAME,
240 },
241#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
242 {
243 .id = ION_SF_HEAP_ID,
244 .type = ION_HEAP_TYPE_CARVEOUT,
245 .name = ION_SF_HEAP_NAME,
246 .size = MSM_ION_SF_SIZE,
247 .memory_type = ION_EBI_TYPE,
248 .extra_data = (void *) &co_ion_pdata,
249 },
250 {
251 .id = ION_CP_MM_HEAP_ID,
252 .type = ION_HEAP_TYPE_CP,
253 .name = ION_MM_HEAP_NAME,
254 .size = MSM_ION_MM_SIZE,
255 .memory_type = ION_EBI_TYPE,
256 .extra_data = (void *) &cp_mm_ion_pdata,
257 },
258 {
Olav Haugand3d29682012-01-19 10:57:07 -0800259 .id = ION_MM_FIRMWARE_HEAP_ID,
260 .type = ION_HEAP_TYPE_CARVEOUT,
261 .name = ION_MM_FIRMWARE_HEAP_NAME,
262 .size = MSM_ION_MM_FW_SIZE,
263 .memory_type = ION_EBI_TYPE,
264 .extra_data = (void *) &fw_co_ion_pdata,
265 },
266 {
Olav Haugan7c6aa742012-01-16 16:47:37 -0800267 .id = ION_CP_MFC_HEAP_ID,
268 .type = ION_HEAP_TYPE_CP,
269 .name = ION_MFC_HEAP_NAME,
270 .size = MSM_ION_MFC_SIZE,
271 .memory_type = ION_EBI_TYPE,
272 .extra_data = (void *) &cp_mfc_ion_pdata,
273 },
274 {
275 .id = ION_IOMMU_HEAP_ID,
276 .type = ION_HEAP_TYPE_IOMMU,
277 .name = ION_IOMMU_HEAP_NAME,
278 },
Olav Hauganf45e2142012-01-19 11:01:01 -0800279 {
280 .id = ION_QSECOM_HEAP_ID,
281 .type = ION_HEAP_TYPE_CARVEOUT,
282 .name = ION_QSECOM_HEAP_NAME,
283 .size = MSM_ION_QSECOM_SIZE,
284 .memory_type = ION_EBI_TYPE,
285 .extra_data = (void *) &co_ion_pdata,
286 },
Olav Haugan2c43fac2012-01-19 11:06:37 -0800287 {
288 .id = ION_AUDIO_HEAP_ID,
289 .type = ION_HEAP_TYPE_CARVEOUT,
290 .name = ION_AUDIO_HEAP_NAME,
291 .size = MSM_ION_AUDIO_SIZE,
292 .memory_type = ION_EBI_TYPE,
293 .extra_data = (void *) &co_ion_pdata,
294 },
Olav Haugan7c6aa742012-01-16 16:47:37 -0800295#endif
296 }
297};
298
299static struct platform_device ion_dev = {
300 .name = "ion-msm",
301 .id = 1,
302 .dev = { .platform_data = &ion_pdata },
303};
304#endif
305
306static void reserve_ion_memory(void)
307{
308#if defined(CONFIG_ION_MSM) && defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
309 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_SIZE;
Olav Haugand3d29682012-01-19 10:57:07 -0800310 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_FW_SIZE;
Olav Haugan7c6aa742012-01-16 16:47:37 -0800311 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_SF_SIZE;
312 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MFC_SIZE;
Olav Hauganf45e2142012-01-19 11:01:01 -0800313 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_QSECOM_SIZE;
Olav Haugan2c43fac2012-01-19 11:06:37 -0800314 apq8064_reserve_table[MEMTYPE_EBI1].size += MSM_ION_AUDIO_SIZE;
Olav Haugan7c6aa742012-01-16 16:47:37 -0800315#endif
Kevin Chan13be4e22011-10-20 11:30:32 -0700316}
317
Huaibin Yang4a084e32011-12-15 15:25:52 -0800318static void __init reserve_mdp_memory(void)
319{
320 apq8064_mdp_writeback(apq8064_reserve_table);
321}
322
Kevin Chan13be4e22011-10-20 11:30:32 -0700323static void __init apq8064_calculate_reserve_sizes(void)
324{
325 size_pmem_devices();
326 reserve_pmem_memory();
Olav Haugan7c6aa742012-01-16 16:47:37 -0800327 reserve_ion_memory();
Huaibin Yang4a084e32011-12-15 15:25:52 -0800328 reserve_mdp_memory();
Kevin Chan13be4e22011-10-20 11:30:32 -0700329}
330
331static struct reserve_info apq8064_reserve_info __initdata = {
332 .memtype_reserve_table = apq8064_reserve_table,
333 .calculate_reserve_sizes = apq8064_calculate_reserve_sizes,
334 .paddr_to_memtype = apq8064_paddr_to_memtype,
335};
336
337static int apq8064_memory_bank_size(void)
338{
339 return 1<<29;
340}
341
342static void __init locate_unstable_memory(void)
343{
344 struct membank *mb = &meminfo.bank[meminfo.nr_banks - 1];
345 unsigned long bank_size;
346 unsigned long low, high;
347
348 bank_size = apq8064_memory_bank_size();
349 low = meminfo.bank[0].start;
350 high = mb->start + mb->size;
Olav Haugand76e3a82012-01-16 16:55:07 -0800351
352 /* Check if 32 bit overflow occured */
353 if (high < mb->start)
354 high = ~0UL;
355
Kevin Chan13be4e22011-10-20 11:30:32 -0700356 low &= ~(bank_size - 1);
357
358 if (high - low <= bank_size)
359 return;
Jack Cheung46bfffa2012-01-19 15:26:24 -0800360 apq8064_reserve_info.low_unstable_address = mb->start -
361 MIN_MEMORY_BLOCK_SIZE + mb->size;
362 apq8064_reserve_info.max_unstable_size = MIN_MEMORY_BLOCK_SIZE;
363
Kevin Chan13be4e22011-10-20 11:30:32 -0700364 apq8064_reserve_info.bank_size = bank_size;
365 pr_info("low unstable address %lx max size %lx bank size %lx\n",
366 apq8064_reserve_info.low_unstable_address,
367 apq8064_reserve_info.max_unstable_size,
368 apq8064_reserve_info.bank_size);
369}
370
371static void __init apq8064_reserve(void)
372{
373 reserve_info = &apq8064_reserve_info;
374 locate_unstable_memory();
375 msm_reserve();
376}
377
Hemant Kumara945b472012-01-25 15:08:06 -0800378#ifdef CONFIG_USB_EHCI_MSM_HSIC
379static struct msm_hsic_host_platform_data msm_hsic_pdata = {
380 .strobe = 88,
381 .data = 89,
382};
383#else
384static struct msm_hsic_host_platform_data msm_hsic_pdata;
385#endif
386
Hemant Kumarcb7d8a12012-01-25 12:25:55 -0800387#define PID_MAGIC_ID 0x71432909
388#define SERIAL_NUM_MAGIC_ID 0x61945374
389#define SERIAL_NUMBER_LENGTH 127
390#define DLOAD_USB_BASE_ADD 0x2A03F0C8
391
392struct magic_num_struct {
393 uint32_t pid;
394 uint32_t serial_num;
395};
396
397struct dload_struct {
398 uint32_t reserved1;
399 uint32_t reserved2;
400 uint32_t reserved3;
401 uint16_t reserved4;
402 uint16_t pid;
403 char serial_number[SERIAL_NUMBER_LENGTH];
404 uint16_t reserved5;
405 struct magic_num_struct magic_struct;
406};
407
408static int usb_diag_update_pid_and_serial_num(uint32_t pid, const char *snum)
409{
410 struct dload_struct __iomem *dload = 0;
411
412 dload = ioremap(DLOAD_USB_BASE_ADD, sizeof(*dload));
413 if (!dload) {
414 pr_err("%s: cannot remap I/O memory region: %08x\n",
415 __func__, DLOAD_USB_BASE_ADD);
416 return -ENXIO;
417 }
418
419 pr_debug("%s: dload:%p pid:%x serial_num:%s\n",
420 __func__, dload, pid, snum);
421 /* update pid */
422 dload->magic_struct.pid = PID_MAGIC_ID;
423 dload->pid = pid;
424
425 /* update serial number */
426 dload->magic_struct.serial_num = 0;
427 if (!snum) {
428 memset(dload->serial_number, 0, SERIAL_NUMBER_LENGTH);
429 goto out;
430 }
431
432 dload->magic_struct.serial_num = SERIAL_NUM_MAGIC_ID;
433 strlcpy(dload->serial_number, snum, SERIAL_NUMBER_LENGTH);
434out:
435 iounmap(dload);
436 return 0;
437}
438
439static struct android_usb_platform_data android_usb_pdata = {
440 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
441};
442
Hemant Kumar4933b072011-10-17 23:43:11 -0700443static struct platform_device android_usb_device = {
Hemant Kumarcb7d8a12012-01-25 12:25:55 -0800444 .name = "android_usb",
445 .id = -1,
446 .dev = {
447 .platform_data = &android_usb_pdata,
448 },
Hemant Kumar4933b072011-10-17 23:43:11 -0700449};
450
451static struct msm_otg_platform_data msm_otg_pdata = {
Hemant Kumard86c4882012-01-24 19:39:37 -0800452 .mode = USB_OTG,
453 .otg_control = OTG_PMIC_CONTROL,
Hemant Kumar4933b072011-10-17 23:43:11 -0700454 .phy_type = SNPS_28NM_INTEGRATED_PHY,
Hemant Kumard86c4882012-01-24 19:39:37 -0800455 .pmic_id_irq = PM8921_USB_ID_IN_IRQ(PM8921_IRQ_BASE),
456 .power_budget = 750,
Hemant Kumar4933b072011-10-17 23:43:11 -0700457};
458
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -0800459#define TABLA_INTERRUPT_BASE (NR_MSM_IRQS + NR_GPIO_IRQS + NR_PM8921_IRQS)
460
461/* Micbias setting is based on 8660 CDP/MTP/FLUID requirement
462 * 4 micbiases are used to power various analog and digital
463 * microphones operating at 1800 mV. Technically, all micbiases
464 * can source from single cfilter since all microphones operate
465 * at the same voltage level. The arrangement below is to make
466 * sure all cfilters are exercised. LDO_H regulator ouput level
467 * does not need to be as high as 2.85V. It is choosen for
468 * microphone sensitivity purpose.
469 */
470static struct tabla_pdata apq8064_tabla_platform_data = {
471 .slimbus_slave_device = {
472 .name = "tabla-slave",
473 .e_addr = {0, 0, 0x10, 0, 0x17, 2},
474 },
Swaminathan Sathappancef966d2011-12-15 17:27:04 -0800475 .irq = MSM_GPIO_TO_INT(42),
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -0800476 .irq_base = TABLA_INTERRUPT_BASE,
477 .num_irqs = NR_TABLA_IRQS,
478 .reset_gpio = PM8921_GPIO_PM_TO_SYS(34),
479 .micbias = {
480 .ldoh_v = TABLA_LDOH_2P85_V,
481 .cfilt1_mv = 1800,
482 .cfilt2_mv = 1800,
483 .cfilt3_mv = 1800,
484 .bias1_cfilt_sel = TABLA_CFILT1_SEL,
485 .bias2_cfilt_sel = TABLA_CFILT2_SEL,
486 .bias3_cfilt_sel = TABLA_CFILT3_SEL,
487 .bias4_cfilt_sel = TABLA_CFILT3_SEL,
488 }
489};
490
491static struct slim_device apq8064_slim_tabla = {
492 .name = "tabla-slim",
493 .e_addr = {0, 1, 0x10, 0, 0x17, 2},
494 .dev = {
495 .platform_data = &apq8064_tabla_platform_data,
496 },
497};
498
Swaminathan Sathappancef966d2011-12-15 17:27:04 -0800499static struct tabla_pdata apq8064_tabla20_platform_data = {
500 .slimbus_slave_device = {
501 .name = "tabla-slave",
502 .e_addr = {0, 0, 0x60, 0, 0x17, 2},
503 },
504 .irq = MSM_GPIO_TO_INT(42),
505 .irq_base = TABLA_INTERRUPT_BASE,
506 .num_irqs = NR_TABLA_IRQS,
507 .reset_gpio = PM8921_GPIO_PM_TO_SYS(34),
508 .micbias = {
509 .ldoh_v = TABLA_LDOH_2P85_V,
510 .cfilt1_mv = 1800,
511 .cfilt2_mv = 1800,
512 .cfilt3_mv = 1800,
513 .bias1_cfilt_sel = TABLA_CFILT1_SEL,
514 .bias2_cfilt_sel = TABLA_CFILT2_SEL,
515 .bias3_cfilt_sel = TABLA_CFILT3_SEL,
516 .bias4_cfilt_sel = TABLA_CFILT3_SEL,
517 }
518};
519
520static struct slim_device apq8064_slim_tabla20 = {
521 .name = "tabla2x-slim",
522 .e_addr = {0, 1, 0x60, 0, 0x17, 2},
523 .dev = {
524 .platform_data = &apq8064_tabla20_platform_data,
525 },
526};
527
Ramesh Masavarapu28311912011-10-27 11:04:12 -0700528#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
529 defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \
530 defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
531 defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
532
533#define QCE_SIZE 0x10000
534#define QCE_0_BASE 0x11000000
535
536#define QCE_HW_KEY_SUPPORT 0
537#define QCE_SHA_HMAC_SUPPORT 1
538#define QCE_SHARE_CE_RESOURCE 3
539#define QCE_CE_SHARED 0
540
541static struct resource qcrypto_resources[] = {
542 [0] = {
543 .start = QCE_0_BASE,
544 .end = QCE_0_BASE + QCE_SIZE - 1,
545 .flags = IORESOURCE_MEM,
546 },
547 [1] = {
548 .name = "crypto_channels",
549 .start = DMOV8064_CE_IN_CHAN,
550 .end = DMOV8064_CE_OUT_CHAN,
551 .flags = IORESOURCE_DMA,
552 },
553 [2] = {
554 .name = "crypto_crci_in",
555 .start = DMOV8064_CE_IN_CRCI,
556 .end = DMOV8064_CE_IN_CRCI,
557 .flags = IORESOURCE_DMA,
558 },
559 [3] = {
560 .name = "crypto_crci_out",
561 .start = DMOV8064_CE_OUT_CRCI,
562 .end = DMOV8064_CE_OUT_CRCI,
563 .flags = IORESOURCE_DMA,
564 },
565};
566
567static struct resource qcedev_resources[] = {
568 [0] = {
569 .start = QCE_0_BASE,
570 .end = QCE_0_BASE + QCE_SIZE - 1,
571 .flags = IORESOURCE_MEM,
572 },
573 [1] = {
574 .name = "crypto_channels",
575 .start = DMOV8064_CE_IN_CHAN,
576 .end = DMOV8064_CE_OUT_CHAN,
577 .flags = IORESOURCE_DMA,
578 },
579 [2] = {
580 .name = "crypto_crci_in",
581 .start = DMOV8064_CE_IN_CRCI,
582 .end = DMOV8064_CE_IN_CRCI,
583 .flags = IORESOURCE_DMA,
584 },
585 [3] = {
586 .name = "crypto_crci_out",
587 .start = DMOV8064_CE_OUT_CRCI,
588 .end = DMOV8064_CE_OUT_CRCI,
589 .flags = IORESOURCE_DMA,
590 },
591};
592
593#endif
594
595#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
596 defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
597
598static struct msm_ce_hw_support qcrypto_ce_hw_suppport = {
599 .ce_shared = QCE_CE_SHARED,
600 .shared_ce_resource = QCE_SHARE_CE_RESOURCE,
601 .hw_key_support = QCE_HW_KEY_SUPPORT,
602 .sha_hmac = QCE_SHA_HMAC_SUPPORT,
Ramesh Masavarapu49259682011-12-02 14:00:18 -0800603 .bus_scale_table = NULL,
Ramesh Masavarapu28311912011-10-27 11:04:12 -0700604};
605
606static struct platform_device qcrypto_device = {
607 .name = "qcrypto",
608 .id = 0,
609 .num_resources = ARRAY_SIZE(qcrypto_resources),
610 .resource = qcrypto_resources,
611 .dev = {
612 .coherent_dma_mask = DMA_BIT_MASK(32),
613 .platform_data = &qcrypto_ce_hw_suppport,
614 },
615};
616#endif
617
618#if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
619 defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
620
621static struct msm_ce_hw_support qcedev_ce_hw_suppport = {
622 .ce_shared = QCE_CE_SHARED,
623 .shared_ce_resource = QCE_SHARE_CE_RESOURCE,
624 .hw_key_support = QCE_HW_KEY_SUPPORT,
625 .sha_hmac = QCE_SHA_HMAC_SUPPORT,
Ramesh Masavarapu49259682011-12-02 14:00:18 -0800626 .bus_scale_table = NULL,
Ramesh Masavarapu28311912011-10-27 11:04:12 -0700627};
628
629static struct platform_device qcedev_device = {
630 .name = "qce",
631 .id = 0,
632 .num_resources = ARRAY_SIZE(qcedev_resources),
633 .resource = qcedev_resources,
634 .dev = {
635 .coherent_dma_mask = DMA_BIT_MASK(32),
636 .platform_data = &qcedev_ce_hw_suppport,
637 },
638};
639#endif
640
Joel Kingdacbc822012-01-25 13:30:57 -0800641static struct mdm_platform_data mdm_platform_data = {
642 .mdm_version = "3.0",
643 .ramdump_delay_ms = 2000,
Hemant Kumara945b472012-01-25 15:08:06 -0800644 .peripheral_platform_device = &apq8064_device_hsic_host,
Joel Kingdacbc822012-01-25 13:30:57 -0800645};
Ramesh Masavarapu28311912011-10-27 11:04:12 -0700646
Jeff Hugo0c0f5e92011-09-28 13:55:45 -0600647#define MSM_SHARED_RAM_PHYS 0x80000000
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700648static void __init apq8064_map_io(void)
649{
Jeff Hugo0c0f5e92011-09-28 13:55:45 -0600650 msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700651 msm_map_apq8064_io();
Jeff Ohlstein3a77f9f2011-09-06 14:50:20 -0700652 if (socinfo_init() < 0)
653 pr_err("socinfo_init() failed!\n");
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700654}
655
656static void __init apq8064_init_irq(void)
657{
Praveen Chidambaram78499012011-11-01 17:15:17 -0600658 struct msm_mpm_device_data *data = NULL;
659
660#ifdef CONFIG_MSM_MPM
661 data = &apq8064_mpm_dev_data;
662#endif
663
664 msm_mpm_irq_extn_init(data);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700665 gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE,
666 (void *)MSM_QGIC_CPU_BASE);
667
668 /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */
669 writel_relaxed(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
670
671 writel_relaxed(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET);
672 mb();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700673}
674
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800675static struct platform_device msm8064_device_saw_regulator_core0 = {
676 .name = "saw-regulator",
677 .id = 0,
678 .dev = {
679 .platform_data = &msm8064_saw_regulator_pdata_8921_s5,
680 },
681};
682
683static struct platform_device msm8064_device_saw_regulator_core1 = {
684 .name = "saw-regulator",
685 .id = 1,
686 .dev = {
687 .platform_data = &msm8064_saw_regulator_pdata_8921_s6,
688 },
689};
690
691static struct platform_device msm8064_device_saw_regulator_core2 = {
692 .name = "saw-regulator",
693 .id = 2,
694 .dev = {
695 .platform_data = &msm8064_saw_regulator_pdata_8821_s0,
696 },
697};
698
699static struct platform_device msm8064_device_saw_regulator_core3 = {
700 .name = "saw-regulator",
701 .id = 3,
702 .dev = {
703 .platform_data = &msm8064_saw_regulator_pdata_8821_s1,
Praveen Chidambaram78499012011-11-01 17:15:17 -0600704
705 },
706};
707
708static struct msm_rpmrs_level msm_rpmrs_levels[] __initdata = {
709 {
710 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT,
711 MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE),
712 true,
713 100, 8000, 100000, 1,
714 },
715
716 {
717 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE,
718 MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE),
719 true,
720 2000, 6000, 60100000, 3000,
721 },
722
723 {
724 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
725 MSM_RPMRS_LIMITS(ON, GDHS, MAX, ACTIVE),
726 false,
727 4200, 5000, 60350000, 3500,
728 },
729
730 {
731 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
732 MSM_RPMRS_LIMITS(ON, HSFS_OPEN, MAX, ACTIVE),
733 false,
734 6300, 4500, 65350000, 4800,
735 },
736
737 {
738 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
739 MSM_RPMRS_LIMITS(OFF, GDHS, MAX, ACTIVE),
740 false,
741 11700, 2500, 67850000, 5500,
742 },
743
744 {
745 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
746 MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, MAX, ACTIVE),
747 false,
748 13800, 2000, 71850000, 6800,
749 },
750
751 {
752 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
753 MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, ACTIVE, RET_HIGH),
754 false,
755 29700, 500, 75850000, 8800,
756 },
757
758 {
759 MSM_PM_SLEEP_MODE_POWER_COLLAPSE,
760 MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, RET_HIGH, RET_LOW),
761 false,
762 29700, 0, 76350000, 9800,
763 },
764};
765
766static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
767 .mode = MSM_PM_BOOT_CONFIG_TZ,
768};
769
770static struct msm_rpmrs_platform_data msm_rpmrs_data __initdata = {
771 .levels = &msm_rpmrs_levels[0],
772 .num_levels = ARRAY_SIZE(msm_rpmrs_levels),
773 .vdd_mem_levels = {
774 [MSM_RPMRS_VDD_MEM_RET_LOW] = 750000,
775 [MSM_RPMRS_VDD_MEM_RET_HIGH] = 750000,
776 [MSM_RPMRS_VDD_MEM_ACTIVE] = 1050000,
777 [MSM_RPMRS_VDD_MEM_MAX] = 1150000,
778 },
779 .vdd_dig_levels = {
780 [MSM_RPMRS_VDD_DIG_RET_LOW] = 500000,
781 [MSM_RPMRS_VDD_DIG_RET_HIGH] = 750000,
782 [MSM_RPMRS_VDD_DIG_ACTIVE] = 950000,
783 [MSM_RPMRS_VDD_DIG_MAX] = 1150000,
784 },
785 .vdd_mask = 0x7FFFFF,
786 .rpmrs_target_id = {
787 [MSM_RPMRS_ID_PXO_CLK] = MSM_RPM_ID_PXO_CLK,
788 [MSM_RPMRS_ID_L2_CACHE_CTL] = MSM_RPM_ID_LAST,
789 [MSM_RPMRS_ID_VDD_DIG_0] = MSM_RPM_ID_PM8921_S3_0,
790 [MSM_RPMRS_ID_VDD_DIG_1] = MSM_RPM_ID_PM8921_S3_1,
791 [MSM_RPMRS_ID_VDD_MEM_0] = MSM_RPM_ID_PM8921_L24_0,
792 [MSM_RPMRS_ID_VDD_MEM_1] = MSM_RPM_ID_PM8921_L24_1,
793 [MSM_RPMRS_ID_RPM_CTL] = MSM_RPM_ID_RPM_CTL,
794 },
795};
796
797static struct msm_cpuidle_state msm_cstates[] __initdata = {
798 {0, 0, "C0", "WFI",
799 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
800
801 {0, 1, "C1", "STANDALONE_POWER_COLLAPSE",
802 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
803
804 {0, 2, "C2", "POWER_COLLAPSE",
805 MSM_PM_SLEEP_MODE_POWER_COLLAPSE},
806
807 {1, 0, "C0", "WFI",
808 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
809
810 {1, 1, "C1", "STANDALONE_POWER_COLLAPSE",
811 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
812
813 {2, 0, "C0", "WFI",
814 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
815
816 {2, 1, "C1", "STANDALONE_POWER_COLLAPSE",
817 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
818
819 {3, 0, "C0", "WFI",
820 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
821
822 {3, 1, "C1", "STANDALONE_POWER_COLLAPSE",
823 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
824};
825
826static struct msm_pm_platform_data msm_pm_data[] = {
827 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
828 .idle_supported = 1,
829 .suspend_supported = 1,
830 .idle_enabled = 0,
831 .suspend_enabled = 0,
832 },
833
834 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
835 .idle_supported = 1,
836 .suspend_supported = 1,
837 .idle_enabled = 0,
838 .suspend_enabled = 0,
839 },
840
841 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
842 .idle_supported = 1,
843 .suspend_supported = 1,
844 .idle_enabled = 1,
845 .suspend_enabled = 1,
846 },
847
848 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
849 .idle_supported = 0,
850 .suspend_supported = 1,
851 .idle_enabled = 0,
852 .suspend_enabled = 0,
853 },
854
855 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
856 .idle_supported = 1,
857 .suspend_supported = 1,
858 .idle_enabled = 0,
859 .suspend_enabled = 0,
860 },
861
862 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
863 .idle_supported = 1,
864 .suspend_supported = 0,
865 .idle_enabled = 1,
866 .suspend_enabled = 0,
867 },
868
869 [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
870 .idle_supported = 0,
871 .suspend_supported = 1,
872 .idle_enabled = 0,
873 .suspend_enabled = 0,
874 },
875
876 [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
877 .idle_supported = 1,
878 .suspend_supported = 1,
879 .idle_enabled = 0,
880 .suspend_enabled = 0,
881 },
882
883 [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
884 .idle_supported = 1,
885 .suspend_supported = 0,
886 .idle_enabled = 1,
887 .suspend_enabled = 0,
888 },
889
890 [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
891 .idle_supported = 0,
892 .suspend_supported = 1,
893 .idle_enabled = 0,
894 .suspend_enabled = 0,
895 },
896
897 [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
898 .idle_supported = 1,
899 .suspend_supported = 1,
900 .idle_enabled = 0,
901 .suspend_enabled = 0,
902 },
903
904 [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
905 .idle_supported = 1,
906 .suspend_supported = 0,
907 .idle_enabled = 1,
908 .suspend_enabled = 0,
909 },
910};
911
912static uint8_t spm_wfi_cmd_sequence[] __initdata = {
913 0x03, 0x0f,
914};
915
916static uint8_t spm_power_collapse_without_rpm[] __initdata = {
917 0x00, 0x24, 0x54, 0x10,
918 0x09, 0x03, 0x01,
919 0x10, 0x54, 0x30, 0x0C,
920 0x24, 0x30, 0x0f,
921};
922
923static uint8_t spm_power_collapse_with_rpm[] __initdata = {
924 0x00, 0x24, 0x54, 0x10,
925 0x09, 0x07, 0x01, 0x0B,
926 0x10, 0x54, 0x30, 0x0C,
927 0x24, 0x30, 0x0f,
928};
929
930static struct msm_spm_seq_entry msm_spm_seq_list[] __initdata = {
931 [0] = {
932 .mode = MSM_SPM_MODE_CLOCK_GATING,
933 .notify_rpm = false,
934 .cmd = spm_wfi_cmd_sequence,
935 },
936 [1] = {
937 .mode = MSM_SPM_MODE_POWER_COLLAPSE,
938 .notify_rpm = false,
939 .cmd = spm_power_collapse_without_rpm,
940 },
941 [2] = {
942 .mode = MSM_SPM_MODE_POWER_COLLAPSE,
943 .notify_rpm = true,
944 .cmd = spm_power_collapse_with_rpm,
945 },
946};
947
948static uint8_t l2_spm_wfi_cmd_sequence[] __initdata = {
949 0x00, 0x20, 0x03, 0x20,
950 0x00, 0x0f,
951};
952
953static uint8_t l2_spm_gdhs_cmd_sequence[] __initdata = {
954 0x00, 0x20, 0x34, 0x64,
955 0x48, 0x07, 0x48, 0x20,
956 0x50, 0x64, 0x04, 0x34,
957 0x50, 0x0f,
958};
959static uint8_t l2_spm_power_off_cmd_sequence[] __initdata = {
960 0x00, 0x10, 0x34, 0x64,
961 0x48, 0x07, 0x48, 0x10,
962 0x50, 0x64, 0x04, 0x34,
963 0x50, 0x0F,
964};
965
966static struct msm_spm_seq_entry msm_spm_l2_seq_list[] __initdata = {
967 [0] = {
968 .mode = MSM_SPM_L2_MODE_RETENTION,
969 .notify_rpm = false,
970 .cmd = l2_spm_wfi_cmd_sequence,
971 },
972 [1] = {
973 .mode = MSM_SPM_L2_MODE_GDHS,
974 .notify_rpm = true,
975 .cmd = l2_spm_gdhs_cmd_sequence,
976 },
977 [2] = {
978 .mode = MSM_SPM_L2_MODE_POWER_COLLAPSE,
979 .notify_rpm = true,
980 .cmd = l2_spm_power_off_cmd_sequence,
981 },
982};
983
984
985static struct msm_spm_platform_data msm_spm_l2_data[] __initdata = {
986 [0] = {
987 .reg_base_addr = MSM_SAW_L2_BASE,
988 .reg_init_values[MSM_SPM_REG_SAW2_SECURE] = 0x00,
989 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x00,
990 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202,
991 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x00A000AE,
992 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x00A00020,
993 .modes = msm_spm_l2_seq_list,
994 .num_modes = ARRAY_SIZE(msm_spm_l2_seq_list),
995 },
996};
997
998static struct msm_spm_platform_data msm_spm_data[] __initdata = {
999 [0] = {
1000 .reg_base_addr = MSM_SAW0_BASE,
1001 .reg_init_values[MSM_SPM_REG_SAW2_SECURE] = 0x00,
1002 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F,
1003 .reg_init_values[MSM_SPM_REG_SAW2_VCTL] = 0x9C,
1004#if defined(CONFIG_MSM_AVS_HW)
1005 .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00,
1006 .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00,
1007#endif
1008 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
1009 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202,
1010 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C,
1011 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C,
1012 .vctl_timeout_us = 50,
1013 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
1014 .modes = msm_spm_seq_list,
1015 },
1016 [1] = {
1017 .reg_base_addr = MSM_SAW1_BASE,
1018 .reg_init_values[MSM_SPM_REG_SAW2_SECURE] = 0x00,
1019 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F,
1020 .reg_init_values[MSM_SPM_REG_SAW2_VCTL] = 0x9C,
1021#if defined(CONFIG_MSM_AVS_HW)
1022 .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00,
1023 .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00,
1024#endif
1025 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
1026 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202,
1027 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C,
1028 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C,
1029 .vctl_timeout_us = 50,
1030 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
1031 .modes = msm_spm_seq_list,
1032 },
1033 [2] = {
1034 .reg_base_addr = MSM_SAW2_BASE,
1035 .reg_init_values[MSM_SPM_REG_SAW2_SECURE] = 0x00,
1036 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F,
1037 .reg_init_values[MSM_SPM_REG_SAW2_VCTL] = 0x9C,
1038#if defined(CONFIG_MSM_AVS_HW)
1039 .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00,
1040 .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00,
1041#endif
1042 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
1043 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202,
1044 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C,
1045 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C,
1046 .vctl_timeout_us = 50,
1047 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
1048 .modes = msm_spm_seq_list,
1049 },
1050 [3] = {
1051 .reg_base_addr = MSM_SAW3_BASE,
1052 .reg_init_values[MSM_SPM_REG_SAW2_SECURE] = 0x00,
1053 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1F,
1054 .reg_init_values[MSM_SPM_REG_SAW2_VCTL] = 0x9C,
1055#if defined(CONFIG_MSM_AVS_HW)
1056 .reg_init_values[MSM_SPM_REG_SAW2_AVS_CTL] = 0x00,
1057 .reg_init_values[MSM_SPM_REG_SAW2_AVS_HYSTERESIS] = 0x00,
1058#endif
1059 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
1060 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DLY] = 0x02020202,
1061 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_0] = 0x0060009C,
1062 .reg_init_values[MSM_SPM_REG_SAW2_PMIC_DATA_1] = 0x0000001C,
1063 .vctl_timeout_us = 50,
1064 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
1065 .modes = msm_spm_seq_list,
Jay Chokshi7805b5a2011-11-07 15:55:30 -08001066 },
1067};
1068
Gagan Mac8a7a5d32011-11-11 16:43:06 -07001069static void __init apq8064_init_buses(void)
1070{
1071 msm_bus_rpm_set_mt_mask();
1072 msm_bus_8064_apps_fabric_pdata.rpm_enabled = 1;
1073 msm_bus_8064_sys_fabric_pdata.rpm_enabled = 1;
1074 msm_bus_8064_mm_fabric_pdata.rpm_enabled = 1;
1075 msm_bus_8064_apps_fabric.dev.platform_data =
1076 &msm_bus_8064_apps_fabric_pdata;
1077 msm_bus_8064_sys_fabric.dev.platform_data =
1078 &msm_bus_8064_sys_fabric_pdata;
1079 msm_bus_8064_mm_fabric.dev.platform_data =
1080 &msm_bus_8064_mm_fabric_pdata;
1081 msm_bus_8064_sys_fpb.dev.platform_data = &msm_bus_8064_sys_fpb_pdata;
1082 msm_bus_8064_cpss_fpb.dev.platform_data = &msm_bus_8064_cpss_fpb_pdata;
1083}
1084
David Collinsf0d00732012-01-25 15:46:50 -08001085static struct platform_device apq8064_device_ext_5v_vreg __devinitdata = {
1086 .name = GPIO_REGULATOR_DEV_NAME,
1087 .id = PM8921_MPP_PM_TO_SYS(7),
1088 .dev = {
1089 .platform_data
1090 = &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_5V],
1091 },
1092};
1093
1094static struct platform_device apq8064_device_ext_3p3v_vreg __devinitdata = {
1095 .name = GPIO_REGULATOR_DEV_NAME,
1096 .id = APQ8064_EXT_3P3V_REG_EN_GPIO,
1097 .dev = {
1098 .platform_data =
1099 &apq8064_gpio_regulator_pdata[GPIO_VREG_ID_EXT_3P3V],
1100 },
1101};
1102
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001103static struct platform_device *common_devices[] __initdata = {
Jin Hong01f2dbb2011-11-03 22:13:51 -07001104 &apq8064_device_dmov,
Kenneth Heitke748593a2011-07-15 15:45:11 -06001105 &apq8064_device_qup_i2c_gsbi4,
Harini Jayaramanc4c58692011-07-19 14:50:10 -06001106 &apq8064_device_qup_spi_gsbi5,
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -06001107 &apq8064_slim_ctrl,
David Collinsf0d00732012-01-25 15:46:50 -08001108 &apq8064_device_ext_5v_vreg,
1109 &apq8064_device_ext_3p3v_vreg,
Jay Chokshi9c25f072011-09-23 18:19:15 -07001110 &apq8064_device_ssbi_pmic1,
1111 &apq8064_device_ssbi_pmic2,
Jeff Hugo0c0f5e92011-09-28 13:55:45 -06001112 &msm_device_smd_apq8064,
Hemant Kumar4933b072011-10-17 23:43:11 -07001113 &apq8064_device_otg,
1114 &apq8064_device_gadget_peripheral,
Hemant Kumard86c4882012-01-24 19:39:37 -08001115 &apq8064_device_hsusb_host,
Hemant Kumara945b472012-01-25 15:08:06 -08001116 &apq8064_device_hsic_host,
Hemant Kumar4933b072011-10-17 23:43:11 -07001117 &android_usb_device,
Olav Haugan7c6aa742012-01-16 16:47:37 -08001118#ifdef CONFIG_ANDROID_PMEM
1119#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Kevin Chan13be4e22011-10-20 11:30:32 -07001120 &android_pmem_device,
1121 &android_pmem_adsp_device,
Olav Haugan7c6aa742012-01-16 16:47:37 -08001122#endif
Kevin Chan13be4e22011-10-20 11:30:32 -07001123 &android_pmem_audio_device,
Olav Haugan7c6aa742012-01-16 16:47:37 -08001124#endif
1125#ifdef CONFIG_ION_MSM
1126 &ion_dev,
1127#endif
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001128 &msm8064_device_watchdog,
Jay Chokshi7805b5a2011-11-07 15:55:30 -08001129 &msm8064_device_saw_regulator_core0,
1130 &msm8064_device_saw_regulator_core1,
1131 &msm8064_device_saw_regulator_core2,
1132 &msm8064_device_saw_regulator_core3,
Ramesh Masavarapu28311912011-10-27 11:04:12 -07001133#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
1134 defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
1135 &qcrypto_device,
1136#endif
1137
1138#if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
1139 defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
1140 &qcedev_device,
1141#endif
Ramesh Masavarapuf46be1b2011-11-03 11:13:41 -07001142
1143#ifdef CONFIG_HW_RANDOM_MSM
1144 &apq8064_device_rng,
1145#endif
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -08001146 &apq_pcm,
1147 &apq_pcm_routing,
1148 &apq_cpudai0,
1149 &apq_cpudai1,
1150 &apq_cpudai_hdmi_rx,
1151 &apq_cpudai_bt_rx,
1152 &apq_cpudai_bt_tx,
1153 &apq_cpudai_fm_rx,
1154 &apq_cpudai_fm_tx,
1155 &apq_cpu_fe,
1156 &apq_stub_codec,
1157 &apq_voice,
1158 &apq_voip,
1159 &apq_lpa_pcm,
1160 &apq_pcm_hostless,
1161 &apq_cpudai_afe_01_rx,
1162 &apq_cpudai_afe_01_tx,
1163 &apq_cpudai_afe_02_rx,
1164 &apq_cpudai_afe_02_tx,
1165 &apq_pcm_afe,
1166 &apq_cpudai_auxpcm_rx,
1167 &apq_cpudai_auxpcm_tx,
Praveen Chidambaram78499012011-11-01 17:15:17 -06001168 &apq8064_rpm_device,
1169 &apq8064_rpm_log_device,
1170 &apq8064_rpm_stat_device,
Gagan Mac8a7a5d32011-11-11 16:43:06 -07001171 &msm_bus_8064_apps_fabric,
1172 &msm_bus_8064_sys_fabric,
1173 &msm_bus_8064_mm_fabric,
1174 &msm_bus_8064_sys_fpb,
1175 &msm_bus_8064_cpss_fpb,
Rajesh Sastrulaaee8af32012-01-20 11:46:31 -08001176 &msm_device_vidc,
Matt Wagantalled832652012-02-02 19:23:17 -08001177 &msm_8960_riva,
Matt Wagantallb94b9a52012-02-02 21:59:54 -08001178 &msm_8960_q6_lpass,
Matt Wagantall292aace2012-01-26 19:12:34 -08001179 &msm_gss,
Harini Jayaramanc4c58692011-07-19 14:50:10 -06001180};
1181
Joel King4e7ad222011-08-17 15:47:38 -07001182static struct platform_device *sim_devices[] __initdata = {
Stepan Moskovchenko2701a442011-08-19 13:47:22 -07001183 &apq8064_device_uart_gsbi3,
Yan He06913ce2011-08-26 16:33:46 -07001184 &msm_device_sps_apq8064,
Stepan Moskovchenko2701a442011-08-19 13:47:22 -07001185};
1186
1187static struct platform_device *rumi3_devices[] __initdata = {
1188 &apq8064_device_uart_gsbi1,
Yan He435ed612011-11-23 17:34:59 -08001189 &msm_device_sps_apq8064,
Huaibin Yang4a084e32011-12-15 15:25:52 -08001190#ifdef CONFIG_MSM_ROTATOR
1191 &msm_rotator_device,
1192#endif
Joel King4e7ad222011-08-17 15:47:38 -07001193};
1194
Joel King82b7e3f2012-01-05 10:03:27 -08001195static struct platform_device *cdp_devices[] __initdata = {
1196 &apq8064_device_uart_gsbi1,
1197 &msm_device_sps_apq8064,
1198};
1199
Harini Jayaramanc4c58692011-07-19 14:50:10 -06001200static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = {
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -08001201 .max_clock_speed = 1100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001202};
1203
Stepan Moskovchenkoeed82a52011-09-02 13:19:23 -07001204#define KS8851_IRQ_GPIO 43
1205
1206static struct spi_board_info spi_board_info[] __initdata = {
1207 {
1208 .modalias = "ks8851",
1209 .irq = MSM_GPIO_TO_INT(KS8851_IRQ_GPIO),
1210 .max_speed_hz = 19200000,
1211 .bus_num = 0,
1212 .chip_select = 2,
1213 .mode = SPI_MODE_0,
1214 },
1215};
1216
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -06001217static struct slim_boardinfo apq8064_slim_devices[] = {
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -08001218 {
Swaminathan Sathappancef966d2011-12-15 17:27:04 -08001219 .bus_num = 1,
1220 .slim_slave = &apq8064_slim_tabla,
1221 },
1222 {
1223 .bus_num = 1,
1224 .slim_slave = &apq8064_slim_tabla20,
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -08001225 },
1226 /* add more slimbus slaves as needed */
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -06001227};
1228
Kenneth Heitke748593a2011-07-15 15:45:11 -06001229static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = {
1230 .clk_freq = 100000,
1231 .src_clk_rate = 24000000,
Kenneth Heitke748593a2011-07-15 15:45:11 -06001232};
1233
1234static void __init apq8064_i2c_init(void)
1235{
1236 apq8064_device_qup_i2c_gsbi4.dev.platform_data =
1237 &apq8064_i2c_qup_gsbi4_pdata;
1238}
1239
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -08001240#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
Stepan Moskovchenkoeed82a52011-09-02 13:19:23 -07001241static int ethernet_init(void)
1242{
1243 int ret;
1244 ret = gpio_request(KS8851_IRQ_GPIO, "ks8851_irq");
1245 if (ret) {
1246 pr_err("ks8851 gpio_request failed: %d\n", ret);
1247 goto fail;
1248 }
1249
1250 return 0;
1251fail:
1252 return ret;
1253}
1254#else
1255static int ethernet_init(void)
1256{
1257 return 0;
1258}
1259#endif
1260
Tianyi Gou41515e22011-09-01 19:37:43 -07001261static void __init apq8064_clock_init(void)
1262{
Tianyi Gouacb588d2012-01-27 18:24:05 -08001263 if (machine_is_apq8064_rumi3())
Tianyi Gou41515e22011-09-01 19:37:43 -07001264 msm_clock_init(&apq8064_dummy_clock_init_data);
Tianyi Gouacb588d2012-01-27 18:24:05 -08001265 else
1266 msm_clock_init(&apq8064_clock_init_data);
Tianyi Gou41515e22011-09-01 19:37:43 -07001267}
1268
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001269static void __init apq8064_common_init(void)
1270{
1271 if (socinfo_init() < 0)
1272 pr_err("socinfo_init() failed!\n");
Praveen Chidambaram78499012011-11-01 17:15:17 -06001273 BUG_ON(msm_rpm_init(&apq8064_rpm_data));
1274 BUG_ON(msm_rpmrs_levels_init(&msm_rpmrs_data));
Tianyi Gou41515e22011-09-01 19:37:43 -07001275 apq8064_clock_init();
Stepan Moskovchenko2327a952011-12-14 16:31:28 -08001276 apq8064_init_gpiomux();
Kenneth Heitke748593a2011-07-15 15:45:11 -06001277 apq8064_i2c_init();
Kenneth Heitke36920d32011-07-20 16:44:30 -06001278
Harini Jayaramanc4c58692011-07-19 14:50:10 -06001279 apq8064_device_qup_spi_gsbi5.dev.platform_data =
1280 &apq8064_qup_spi_gsbi5_pdata;
Stepan Moskovchenkoc1074f02011-12-14 17:51:57 -08001281 apq8064_init_pmic();
Hemant Kumar94e7da22012-02-03 16:52:29 -08001282 if (machine_is_apq8064_liquid())
1283 msm_otg_pdata.mhl_enable = true;
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -07001284 apq8064_device_otg.dev.platform_data = &msm_otg_pdata;
Hemant Kumara945b472012-01-25 15:08:06 -08001285 apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
Gagan Mac8a7a5d32011-11-11 16:43:06 -07001286 apq8064_init_buses();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001287 platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
Jay Chokshie8741282012-01-25 15:22:55 -08001288 apq8064_pm8xxx_gpio_mpp_init();
Sahitya Tummala3586ed92011-08-03 09:13:23 +05301289 apq8064_init_mmc();
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -06001290 slim_register_board_info(apq8064_slim_devices,
1291 ARRAY_SIZE(apq8064_slim_devices));
Praveen Chidambaram78499012011-11-01 17:15:17 -06001292 msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data));
Mahesh Sivasubramaniancbce1ec2012-01-24 10:32:44 -07001293 acpuclk_init(&acpuclk_8064_soc_data);
Praveen Chidambaram78499012011-11-01 17:15:17 -06001294 msm_spm_l2_init(msm_spm_l2_data);
1295 msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data));
1296 msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ);
1297 msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates),
1298 msm_pm_data);
1299 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
Jordan Crouseb3115fe2012-02-01 22:11:12 -07001300
Joel Kingdacbc822012-01-25 13:30:57 -08001301 if (machine_is_apq8064_mtp()) {
1302 mdm_8064_device.dev.platform_data = &mdm_platform_data;
1303 platform_device_register(&mdm_8064_device);
1304 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001305}
1306
Huaibin Yang4a084e32011-12-15 15:25:52 -08001307static void __init apq8064_allocate_memory_regions(void)
1308{
1309 apq8064_allocate_fb_region();
1310}
1311
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001312static void __init apq8064_sim_init(void)
1313{
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001314 struct msm_watchdog_pdata *wdog_pdata = (struct msm_watchdog_pdata *)
1315 &msm8064_device_watchdog.dev.platform_data;
1316
1317 wdog_pdata->bark_time = 15000;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001318 apq8064_common_init();
Joel King4e7ad222011-08-17 15:47:38 -07001319 platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices));
1320}
1321
1322static void __init apq8064_rumi3_init(void)
1323{
1324 apq8064_common_init();
Stepan Moskovchenkoeed82a52011-09-02 13:19:23 -07001325 ethernet_init();
Stepan Moskovchenko2701a442011-08-19 13:47:22 -07001326 platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));
Stepan Moskovchenkoeed82a52011-09-02 13:19:23 -07001327 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
Huaibin Yang4a084e32011-12-15 15:25:52 -08001328 apq8064_init_fb();
Jordan Crouseb3115fe2012-02-01 22:11:12 -07001329 apq8064_init_gpu();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001330}
1331
Joel King82b7e3f2012-01-05 10:03:27 -08001332static void __init apq8064_cdp_init(void)
1333{
1334 apq8064_common_init();
1335 ethernet_init();
1336 platform_add_devices(cdp_devices, ARRAY_SIZE(cdp_devices));
1337 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
Jordan Crouseb3115fe2012-02-01 22:11:12 -07001338 apq8064_init_gpu();
Joel King82b7e3f2012-01-05 10:03:27 -08001339}
1340
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001341MACHINE_START(APQ8064_SIM, "QCT APQ8064 SIMULATOR")
1342 .map_io = apq8064_map_io,
Kevin Chan13be4e22011-10-20 11:30:32 -07001343 .reserve = apq8064_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001344 .init_irq = apq8064_init_irq,
Marc Zyngier89bdafd12011-12-22 11:39:20 +05301345 .handle_irq = gic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001346 .timer = &msm_timer,
1347 .init_machine = apq8064_sim_init,
1348MACHINE_END
1349
Joel King4e7ad222011-08-17 15:47:38 -07001350MACHINE_START(APQ8064_RUMI3, "QCT APQ8064 RUMI3")
1351 .map_io = apq8064_map_io,
Kevin Chan13be4e22011-10-20 11:30:32 -07001352 .reserve = apq8064_reserve,
Joel King4e7ad222011-08-17 15:47:38 -07001353 .init_irq = apq8064_init_irq,
Marc Zyngier89bdafd12011-12-22 11:39:20 +05301354 .handle_irq = gic_handle_irq,
Joel King4e7ad222011-08-17 15:47:38 -07001355 .timer = &msm_timer,
1356 .init_machine = apq8064_rumi3_init,
Huaibin Yang4a084e32011-12-15 15:25:52 -08001357 .init_early = apq8064_allocate_memory_regions,
Joel King4e7ad222011-08-17 15:47:38 -07001358MACHINE_END
1359
Joel King82b7e3f2012-01-05 10:03:27 -08001360MACHINE_START(APQ8064_CDP, "QCT APQ8064 CDP")
1361 .map_io = apq8064_map_io,
1362 .reserve = apq8064_reserve,
1363 .init_irq = apq8064_init_irq,
1364 .handle_irq = gic_handle_irq,
1365 .timer = &msm_timer,
1366 .init_machine = apq8064_cdp_init,
1367MACHINE_END
1368
1369MACHINE_START(APQ8064_MTP, "QCT APQ8064 MTP")
1370 .map_io = apq8064_map_io,
1371 .reserve = apq8064_reserve,
1372 .init_irq = apq8064_init_irq,
1373 .handle_irq = gic_handle_irq,
1374 .timer = &msm_timer,
1375 .init_machine = apq8064_cdp_init,
1376MACHINE_END
1377
1378MACHINE_START(APQ8064_LIQUID, "QCT APQ8064 LIQUID")
1379 .map_io = apq8064_map_io,
1380 .reserve = apq8064_reserve,
1381 .init_irq = apq8064_init_irq,
1382 .handle_irq = gic_handle_irq,
1383 .timer = &msm_timer,
1384 .init_machine = apq8064_cdp_init,
1385MACHINE_END
1386