blob: cf24ef0bc75bdf8132cdbb40de5eeb1df747a120 [file] [log] [blame]
Michael Bohan0425f6f2012-01-17 14:36:39 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Sathish Ambleyc58afc22011-10-09 21:55:39 -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>
17#include <linux/irqdomain.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <linux/of_platform.h>
Michael Bohanc7224532012-01-06 16:02:52 -080021#include <linux/of_irq.h>
Olav Hauganb800c8c2012-01-30 08:50:45 -080022#ifdef CONFIG_ION_MSM
23#include <linux/ion.h>
24#endif
25#include <linux/memory.h>
26#ifdef CONFIG_ANDROID_PMEM
27#include <linux/android_pmem.h>
28#endif
Michael Bohan037a0f52012-02-29 19:13:09 -080029#include <linux/regulator/stub-regulator.h>
Matt Wagantallecaa1172012-05-08 21:38:45 -070030#include <linux/regulator/machine.h>
Sathish Ambleyc58afc22011-10-09 21:55:39 -070031#include <asm/mach/map.h>
32#include <asm/hardware/gic.h>
33#include <mach/board.h>
34#include <mach/gpio.h>
35#include <mach/gpiomux.h>
36#include <mach/msm_iomap.h>
Olav Hauganb800c8c2012-01-30 08:50:45 -080037#ifdef CONFIG_ION_MSM
38#include <mach/ion.h>
39#endif
40#include <mach/msm_memtypes.h>
Jeff Hugo70946092012-02-10 11:30:43 -070041#include <mach/msm_smd.h>
Michael Bohan115cf652012-01-05 14:32:59 -080042#include <mach/qpnp-int.h>
Vikram Mulukutlaaeadb5f2012-05-04 14:03:07 -070043#include <mach/socinfo.h>
Sathish Ambleyc58afc22011-10-09 21:55:39 -070044#include "clock.h"
Michael Bohan037a0f52012-02-29 19:13:09 -080045#include "devices.h"
Praveen Chidambaramda9501d2012-04-26 19:48:29 -060046#include "spm.h"
Sathish Ambleyc58afc22011-10-09 21:55:39 -070047
Olav Hauganb800c8c2012-01-30 08:50:45 -080048#define MSM_KERNEL_EBI1_MEM_SIZE 0x280000
49#ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY
50#define MSM_ION_SF_SIZE 0x4000000 /* 64 Mbytes */
51#else
52#define MSM_ION_SF_SIZE 0x2800000 /* 40 Mbytes */
53#endif
Ashray Kulkarni2ad8a7d2012-05-15 14:03:44 -070054#define MSM_ION_MM_FW_SIZE 0xa00000 /* (10MB) */
Olav Hauganb800c8c2012-01-30 08:50:45 -080055#define MSM_ION_MM_SIZE 0x7800000 /* (120MB) */
56#define MSM_ION_QSECOM_SIZE 0x100000 /* (1MB) */
57#define MSM_ION_MFC_SIZE SZ_8K
58#define MSM_ION_AUDIO_SIZE 0x2B4000
59#define MSM_ION_HEAP_NUM 8
60
61#ifdef CONFIG_KERNEL_PMEM_EBI_REGION
62static unsigned kernel_ebi1_mem_size = MSM_KERNEL_EBI1_MEM_SIZE;
63static int __init kernel_ebi1_mem_size_setup(char *p)
64{
65 kernel_ebi1_mem_size = memparse(p, NULL);
66 return 0;
67}
68early_param("kernel_ebi1_mem_size", kernel_ebi1_mem_size_setup);
69#endif
70
71static struct memtype_reserve msm_copper_reserve_table[] __initdata = {
72 [MEMTYPE_SMI] = {
73 },
74 [MEMTYPE_EBI0] = {
75 .flags = MEMTYPE_FLAGS_1M_ALIGN,
76 },
77 [MEMTYPE_EBI1] = {
78 .flags = MEMTYPE_FLAGS_1M_ALIGN,
79 },
80};
81
82static int msm_copper_paddr_to_memtype(unsigned int paddr)
83{
84 return MEMTYPE_EBI1;
85}
86
87#ifdef CONFIG_ION_MSM
88static struct ion_cp_heap_pdata cp_mm_ion_pdata = {
89 .permission_type = IPT_TYPE_MM_CARVEOUT,
90 .align = PAGE_SIZE,
91};
92
93static struct ion_cp_heap_pdata cp_mfc_ion_pdata = {
94 .permission_type = IPT_TYPE_MFC_SHAREDMEM,
95 .align = PAGE_SIZE,
96};
97
98static struct ion_co_heap_pdata co_ion_pdata = {
99 .adjacent_mem_id = INVALID_HEAP_ID,
100 .align = PAGE_SIZE,
101};
102
103static struct ion_co_heap_pdata fw_co_ion_pdata = {
104 .adjacent_mem_id = ION_CP_MM_HEAP_ID,
105 .align = SZ_128K,
106};
107
Olav Haugan9cdfc2f2012-02-15 09:52:57 -0800108/**
109 * These heaps are listed in the order they will be allocated. Due to
110 * video hardware restrictions and content protection the FW heap has to
111 * be allocated adjacent (below) the MM heap and the MFC heap has to be
112 * allocated after the MM heap to ensure MFC heap is not more than 256MB
113 * away from the base address of the FW heap.
114 * However, the order of FW heap and MM heap doesn't matter since these
115 * two heaps are taken care of by separate code to ensure they are adjacent
116 * to each other.
117 * Don't swap the order unless you know what you are doing!
118 */
Olav Hauganb800c8c2012-01-30 08:50:45 -0800119static struct ion_platform_data ion_pdata = {
120 .nr = MSM_ION_HEAP_NUM,
121 .heaps = {
122 {
123 .id = ION_SYSTEM_HEAP_ID,
124 .type = ION_HEAP_TYPE_SYSTEM,
125 .name = ION_VMALLOC_HEAP_NAME,
126 },
127 {
Olav Hauganb800c8c2012-01-30 08:50:45 -0800128 .id = ION_CP_MM_HEAP_ID,
129 .type = ION_HEAP_TYPE_CP,
130 .name = ION_MM_HEAP_NAME,
131 .size = MSM_ION_MM_SIZE,
132 .memory_type = ION_EBI_TYPE,
133 .extra_data = (void *) &cp_mm_ion_pdata,
134 },
135 {
136 .id = ION_MM_FIRMWARE_HEAP_ID,
137 .type = ION_HEAP_TYPE_CARVEOUT,
138 .name = ION_MM_FIRMWARE_HEAP_NAME,
139 .size = MSM_ION_MM_FW_SIZE,
140 .memory_type = ION_EBI_TYPE,
141 .extra_data = (void *) &fw_co_ion_pdata,
142 },
143 {
144 .id = ION_CP_MFC_HEAP_ID,
145 .type = ION_HEAP_TYPE_CP,
146 .name = ION_MFC_HEAP_NAME,
147 .size = MSM_ION_MFC_SIZE,
148 .memory_type = ION_EBI_TYPE,
149 .extra_data = (void *) &cp_mfc_ion_pdata,
150 },
151 {
Olav Haugan9cdfc2f2012-02-15 09:52:57 -0800152 .id = ION_SF_HEAP_ID,
153 .type = ION_HEAP_TYPE_CARVEOUT,
154 .name = ION_SF_HEAP_NAME,
155 .size = MSM_ION_SF_SIZE,
156 .memory_type = ION_EBI_TYPE,
157 .extra_data = (void *) &co_ion_pdata,
158 },
159 {
Olav Hauganb800c8c2012-01-30 08:50:45 -0800160 .id = ION_IOMMU_HEAP_ID,
161 .type = ION_HEAP_TYPE_IOMMU,
162 .name = ION_IOMMU_HEAP_NAME,
163 },
164 {
165 .id = ION_QSECOM_HEAP_ID,
166 .type = ION_HEAP_TYPE_CARVEOUT,
167 .name = ION_QSECOM_HEAP_NAME,
168 .size = MSM_ION_QSECOM_SIZE,
169 .memory_type = ION_EBI_TYPE,
170 .extra_data = (void *) &co_ion_pdata,
171 },
172 {
173 .id = ION_AUDIO_HEAP_ID,
174 .type = ION_HEAP_TYPE_CARVEOUT,
175 .name = ION_AUDIO_HEAP_NAME,
176 .size = MSM_ION_AUDIO_SIZE,
177 .memory_type = ION_EBI_TYPE,
178 .extra_data = (void *) &co_ion_pdata,
179 },
180 }
181};
182
183static struct platform_device ion_dev = {
184 .name = "ion-msm",
185 .id = 1,
186 .dev = { .platform_data = &ion_pdata },
187};
188
Stephen Boyd668d7652012-04-25 11:31:01 -0700189static void __init reserve_ion_memory(void)
Olav Hauganb800c8c2012-01-30 08:50:45 -0800190{
191 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_SIZE;
192 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_FW_SIZE;
193 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_SF_SIZE;
194 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MFC_SIZE;
195 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_QSECOM_SIZE;
196 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_AUDIO_SIZE;
197#ifdef CONFIG_KERNEL_PMEM_EBI_REGION
198 msm_copper_reserve_table[MEMTYPE_EBI1].size += kernel_ebi1_mem_size;
199#endif
200}
201#endif
202
Jeff Hugo70946092012-02-10 11:30:43 -0700203static struct resource smd_resource[] = {
204 {
205 .name = "modem_smd_in",
206 .start = 32 + 17, /* mss_sw_to_kpss_ipc_irq0 */
207 .flags = IORESOURCE_IRQ,
208 },
209 {
210 .name = "modem_smsm_in",
211 .start = 32 + 18, /* mss_sw_to_kpss_ipc_irq1 */
212 .flags = IORESOURCE_IRQ,
213 },
214 {
215 .name = "adsp_smd_in",
216 .start = 32 + 156, /* lpass_to_kpss_ipc_irq0 */
217 .flags = IORESOURCE_IRQ,
218 },
219 {
220 .name = "adsp_smsm_in",
221 .start = 32 + 157, /* lpass_to_kpss_ipc_irq1 */
222 .flags = IORESOURCE_IRQ,
223 },
224 {
225 .name = "wcnss_smd_in",
226 .start = 32 + 142, /* WcnssAppsSmdMedIrq */
227 .flags = IORESOURCE_IRQ,
228 },
229 {
230 .name = "wcnss_smsm_in",
Jeff Hugo89046272012-03-29 14:45:37 -0600231 .start = 32 + 144, /* RivaAppsWlanSmsmIrq */
Jeff Hugo70946092012-02-10 11:30:43 -0700232 .flags = IORESOURCE_IRQ,
233 },
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600234 {
235 .name = "rpm_smd_in",
236 .start = 32 + 168, /* rpm_to_kpss_ipc_irq4 */
237 .flags = IORESOURCE_IRQ,
238 },
Jeff Hugo70946092012-02-10 11:30:43 -0700239};
240
241static struct smd_subsystem_config smd_config_list[] = {
242 {
243 .irq_config_id = SMD_MODEM,
244 .subsys_name = "modem",
245 .edge = SMD_APPS_MODEM,
246
247 .smd_int.irq_name = "modem_smd_in",
248 .smd_int.flags = IRQF_TRIGGER_RISING,
249 .smd_int.irq_id = -1,
250 .smd_int.device_name = "smd_dev",
251 .smd_int.dev_id = 0,
252 .smd_int.out_bit_pos = 1 << 12,
253 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
254 .smd_int.out_offset = 0x8,
255
256 .smsm_int.irq_name = "modem_smsm_in",
257 .smsm_int.flags = IRQF_TRIGGER_RISING,
258 .smsm_int.irq_id = -1,
259 .smsm_int.device_name = "smsm_dev",
260 .smsm_int.dev_id = 0,
261 .smsm_int.out_bit_pos = 1 << 13,
262 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
263 .smsm_int.out_offset = 0x8,
264 },
265 {
266 .irq_config_id = SMD_Q6,
267 .subsys_name = "q6",
268 .edge = SMD_APPS_QDSP,
269
270 .smd_int.irq_name = "adsp_smd_in",
271 .smd_int.flags = IRQF_TRIGGER_RISING,
272 .smd_int.irq_id = -1,
273 .smd_int.device_name = "smd_dev",
274 .smd_int.dev_id = 0,
275 .smd_int.out_bit_pos = 1 << 8,
276 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
277 .smd_int.out_offset = 0x8,
278
279 .smsm_int.irq_name = "adsp_smsm_in",
280 .smsm_int.flags = IRQF_TRIGGER_RISING,
281 .smsm_int.irq_id = -1,
282 .smsm_int.device_name = "smsm_dev",
283 .smsm_int.dev_id = 0,
284 .smsm_int.out_bit_pos = 1 << 9,
285 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
286 .smsm_int.out_offset = 0x8,
287 },
288 {
289 .irq_config_id = SMD_WCNSS,
290 .subsys_name = "wcnss",
291 .edge = SMD_APPS_WCNSS,
292
293 .smd_int.irq_name = "wcnss_smd_in",
294 .smd_int.flags = IRQF_TRIGGER_RISING,
295 .smd_int.irq_id = -1,
296 .smd_int.device_name = "smd_dev",
297 .smd_int.dev_id = 0,
298 .smd_int.out_bit_pos = 1 << 17,
299 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
300 .smd_int.out_offset = 0x8,
301
302 .smsm_int.irq_name = "wcnss_smsm_in",
303 .smsm_int.flags = IRQF_TRIGGER_RISING,
304 .smsm_int.irq_id = -1,
305 .smsm_int.device_name = "smsm_dev",
306 .smsm_int.dev_id = 0,
307 .smsm_int.out_bit_pos = 1 << 19,
308 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
309 .smsm_int.out_offset = 0x8,
310 },
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600311 {
312 .irq_config_id = SMD_RPM,
313 .subsys_name = NULL, /* do not use PIL to load RPM */
314 .edge = SMD_APPS_RPM,
315
316 .smd_int.irq_name = "rpm_smd_in",
317 .smd_int.flags = IRQF_TRIGGER_RISING,
318 .smd_int.irq_id = -1,
319 .smd_int.device_name = "smd_dev",
320 .smd_int.dev_id = 0,
321 .smd_int.out_bit_pos = 1 << 0,
322 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
323 .smd_int.out_offset = 0x8,
324
325 .smsm_int.irq_name = NULL, /* RPM does not support SMSM */
326 .smsm_int.flags = 0,
327 .smsm_int.irq_id = 0,
328 .smsm_int.device_name = NULL,
329 .smsm_int.dev_id = 0,
330 .smsm_int.out_bit_pos = 0,
331 .smsm_int.out_base = NULL,
332 .smsm_int.out_offset = 0,
333 },
334};
335
336static struct smd_smem_regions aux_smem_areas[] = {
337 {
338 .phys_addr = (void *)(0xfc428000),
339 .size = 0x4000,
340 },
Jeff Hugo70946092012-02-10 11:30:43 -0700341};
342
Jeff Hugo3e366292012-03-29 15:19:14 -0600343static struct smd_subsystem_restart_config smd_ssr_cfg = {
344 .disable_smsm_reset_handshake = 1,
345};
346
Jeff Hugo70946092012-02-10 11:30:43 -0700347static struct smd_platform smd_platform_data = {
348 .num_ss_configs = ARRAY_SIZE(smd_config_list),
349 .smd_ss_configs = smd_config_list,
Jeff Hugo3e366292012-03-29 15:19:14 -0600350 .smd_ssr_config = &smd_ssr_cfg,
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600351 .num_smem_areas = ARRAY_SIZE(aux_smem_areas),
352 .smd_smem_areas = aux_smem_areas,
Jeff Hugo70946092012-02-10 11:30:43 -0700353};
354
355struct platform_device msm_device_smd_copper = {
356 .name = "msm_smd",
357 .id = -1,
358 .resource = smd_resource,
359 .num_resources = ARRAY_SIZE(smd_resource),
360 .dev = {
361 .platform_data = &smd_platform_data,
362 }
363};
364
Olav Hauganb800c8c2012-01-30 08:50:45 -0800365static void __init msm_copper_calculate_reserve_sizes(void)
366{
367#ifdef CONFIG_ION_MSM
368 reserve_ion_memory();
369#endif
370}
371
372static struct reserve_info msm_copper_reserve_info __initdata = {
373 .memtype_reserve_table = msm_copper_reserve_table,
374 .calculate_reserve_sizes = msm_copper_calculate_reserve_sizes,
375 .paddr_to_memtype = msm_copper_paddr_to_memtype,
376};
377
378static void __init msm_copper_early_memory(void)
379{
380 reserve_info = &msm_copper_reserve_info;
381}
382
383void __init msm_copper_reserve(void)
384{
385 msm_reserve();
386}
387
Pavankumar Kondeti8c447382012-03-29 09:02:09 +0530388static struct platform_device android_usb_device = {
389 .name = "android_usb",
390 .id = -1,
391};
392
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700393#define SHARED_IMEM_TZ_BASE 0xFE805720
394static struct resource tzlog_resources[] = {
395 {
396 .start = SHARED_IMEM_TZ_BASE,
397 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
398 .flags = IORESOURCE_MEM,
399 },
400};
401
402struct platform_device apq_device_tz_log = {
403 .name = "tz_log",
404 .id = 0,
405 .num_resources = ARRAY_SIZE(tzlog_resources),
406 .resource = tzlog_resources,
407};
408
409
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700410void __init msm_copper_add_devices(void)
411{
Olav Hauganb800c8c2012-01-30 08:50:45 -0800412#ifdef CONFIG_ION_MSM
413 platform_device_register(&ion_dev);
414#endif
Jeff Hugo70946092012-02-10 11:30:43 -0700415 platform_device_register(&msm_device_smd_copper);
Pavankumar Kondeti8c447382012-03-29 09:02:09 +0530416 platform_device_register(&android_usb_device);
Michael Bohan037a0f52012-02-29 19:13:09 -0800417 platform_add_devices(msm_copper_stub_regulator_devices,
418 msm_copper_stub_regulator_devices_len);
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700419 platform_device_register(&apq_device_tz_log);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700420}
421
Michael Bohane7c2b472012-03-30 14:27:18 -0700422/*
423 * Used to satisfy dependencies for devices that need to be
424 * run early or in a particular order. Most likely your device doesn't fall
425 * into this category, and thus the driver should not be added here. The
426 * EPROBE_DEFER can satisfy most dependency problems.
427 */
428void __init msm_copper_add_drivers(void)
429{
Mahesh Sivasubramanian56186f82012-05-09 13:11:59 -0600430 msm_smd_init();
Praveen Chidambaramda9501d2012-04-26 19:48:29 -0600431 msm_spm_device_init();
Michael Bohane7c2b472012-03-30 14:27:18 -0700432 regulator_stub_init();
433}
434
Michael Bohanc7224532012-01-06 16:02:52 -0800435static struct of_device_id irq_match[] __initdata = {
436 { .compatible = "qcom,msm-qgic2", .data = gic_of_init, },
Michael Bohan0425f6f2012-01-17 14:36:39 -0800437 { .compatible = "qcom,msm-gpio", .data = msm_gpio_of_init, },
Michael Bohan115cf652012-01-05 14:32:59 -0800438 { .compatible = "qcom,spmi-pmic-arb", .data = qpnpint_of_init, },
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700439 {}
440};
441
442void __init msm_copper_init_irq(void)
443{
Michael Bohanc7224532012-01-06 16:02:52 -0800444 of_irq_init(irq_match);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700445}
446
447static struct clk_lookup msm_clocks_dummy[] = {
Matt Wagantallb3fe8992011-12-07 19:26:55 -0800448 CLK_DUMMY("xo", XO_CLK, NULL, OFF),
Tianyi Gouc1e049f82011-11-23 14:20:16 -0800449 CLK_DUMMY("xo", XO_CLK, "pil_pronto", OFF),
Sathish Ambley3d50c762011-10-25 15:26:00 -0700450 CLK_DUMMY("core_clk", BLSP2_UART_CLK, "msm_serial_hsl.0", OFF),
451 CLK_DUMMY("iface_clk", BLSP2_UART_CLK, "msm_serial_hsl.0", OFF),
Sujit Reddy Thumma1a4a79e2011-11-04 09:44:32 +0530452 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
453 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
454 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
455 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530456 CLK_DUMMY("phy_clk", NULL, "msm_otg", OFF),
457 CLK_DUMMY("core_clk", NULL, "msm_otg", OFF),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530458 CLK_DUMMY("iface_clk", NULL, "msm_otg", OFF),
Pavankumar Kondeti066bfbf2012-02-20 14:10:20 +0530459 CLK_DUMMY("xo", NULL, "msm_otg", OFF),
Yan He1466daa2011-11-30 17:25:38 -0800460 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
461 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
462 CLK_DUMMY("mem_clk", NULL, NULL, 0),
Harini Jayaraman5f98dbb2011-12-20 13:38:19 -0700463 CLK_DUMMY("core_clk", SPI_CLK, "spi_qsd.1", OFF),
464 CLK_DUMMY("iface_clk", SPI_P_CLK, "spi_qsd.1", OFF),
Sagar Dharia218edb92012-01-15 18:03:01 -0700465 CLK_DUMMY("core_clk", NULL, "f9966000.i2c", 0),
466 CLK_DUMMY("iface_clk", NULL, "f9966000.i2c", 0),
Sagar Dhariaa316a962012-03-21 16:13:22 -0600467 CLK_DUMMY("core_clk", NULL, "fe12f000.slim", OFF),
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700468};
469
470struct clock_init_data msm_dummy_clock_init_data __initdata = {
471 .table = msm_clocks_dummy,
472 .size = ARRAY_SIZE(msm_clocks_dummy),
473};
474
475static struct of_dev_auxdata msm_copper_auxdata_lookup[] __initdata = {
Sathish Ambleyab783ab2011-11-27 22:21:48 -0800476 OF_DEV_AUXDATA("qcom,msm-lsuart-v14", 0xF991F000, \
Sathish Ambley3d50c762011-10-25 15:26:00 -0700477 "msm_serial_hsl.0", NULL),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530478 OF_DEV_AUXDATA("qcom,hsusb-otg", 0xF9A55000, \
479 "msm_otg", NULL),
Harini Jayaraman5f98dbb2011-12-20 13:38:19 -0700480 OF_DEV_AUXDATA("qcom,spi-qup-v2", 0xF9924000, \
481 "spi_qsd.1", NULL),
Kenneth Heitkef3c829c2012-01-13 17:02:43 -0700482 OF_DEV_AUXDATA("qcom,spmi-pmic-arb", 0xFC4C0000, \
483 "spmi-pmic-arb.0", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530484 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF9824000, \
David Ng665140f2012-04-12 16:03:45 -0700485 "msm_sdcc.1", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530486 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98A4000, \
487 "msm_sdcc.2", NULL),
488 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF9864000, \
David Ng665140f2012-04-12 16:03:45 -0700489 "msm_sdcc.3", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530490 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98E4000, \
491 "msm_sdcc.4", NULL),
Matt Wagantallc2bbdc32012-03-21 19:44:50 -0700492 OF_DEV_AUXDATA("qcom,pil-q6v5-lpass", 0xFE200000, \
493 "pil-q6v5-lpass", NULL),
Tianyi Gouc1e049f82011-11-23 14:20:16 -0800494 OF_DEV_AUXDATA("qcom,pil-pronto", 0xFB21B000, \
495 "pil_pronto", NULL),
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700496 {}
497};
498
499void __init msm_copper_init(struct of_dev_auxdata **adata)
500{
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700501 msm_copper_init_gpiomux();
Vikram Mulukutlaaeadb5f2012-05-04 14:03:07 -0700502
503 if (machine_is_copper_rumi())
504 msm_clock_init(&msm_dummy_clock_init_data);
505 else
506 msm_clock_init(&msmcopper_clock_init_data);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700507
508 *adata = msm_copper_auxdata_lookup;
Matt Wagantallecaa1172012-05-08 21:38:45 -0700509
510 regulator_has_full_constraints();
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700511}
Olav Hauganb800c8c2012-01-30 08:50:45 -0800512
513void __init msm_copper_very_early(void)
514{
515 msm_copper_early_memory();
516}