blob: 90cfee4c0642cdf8bc8aefe77054113a00940442 [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>
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -060042#include <mach/rpm-smd.h>
David Collins8f4cebc2012-05-08 16:54:50 -070043#include <mach/rpm-regulator-smd.h>
Michael Bohan115cf652012-01-05 14:32:59 -080044#include <mach/qpnp-int.h>
Vikram Mulukutlaaeadb5f2012-05-04 14:03:07 -070045#include <mach/socinfo.h>
Sathish Ambleyc58afc22011-10-09 21:55:39 -070046#include "clock.h"
Michael Bohan037a0f52012-02-29 19:13:09 -080047#include "devices.h"
Praveen Chidambaramda9501d2012-04-26 19:48:29 -060048#include "spm.h"
Sathish Ambleyc58afc22011-10-09 21:55:39 -070049
Olav Hauganb800c8c2012-01-30 08:50:45 -080050#define MSM_KERNEL_EBI1_MEM_SIZE 0x280000
51#ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY
52#define MSM_ION_SF_SIZE 0x4000000 /* 64 Mbytes */
53#else
54#define MSM_ION_SF_SIZE 0x2800000 /* 40 Mbytes */
55#endif
Ashray Kulkarni2ad8a7d2012-05-15 14:03:44 -070056#define MSM_ION_MM_FW_SIZE 0xa00000 /* (10MB) */
Olav Hauganb800c8c2012-01-30 08:50:45 -080057#define MSM_ION_MM_SIZE 0x7800000 /* (120MB) */
58#define MSM_ION_QSECOM_SIZE 0x100000 /* (1MB) */
59#define MSM_ION_MFC_SIZE SZ_8K
60#define MSM_ION_AUDIO_SIZE 0x2B4000
61#define MSM_ION_HEAP_NUM 8
62
63#ifdef CONFIG_KERNEL_PMEM_EBI_REGION
64static unsigned kernel_ebi1_mem_size = MSM_KERNEL_EBI1_MEM_SIZE;
65static int __init kernel_ebi1_mem_size_setup(char *p)
66{
67 kernel_ebi1_mem_size = memparse(p, NULL);
68 return 0;
69}
70early_param("kernel_ebi1_mem_size", kernel_ebi1_mem_size_setup);
71#endif
72
73static struct memtype_reserve msm_copper_reserve_table[] __initdata = {
74 [MEMTYPE_SMI] = {
75 },
76 [MEMTYPE_EBI0] = {
77 .flags = MEMTYPE_FLAGS_1M_ALIGN,
78 },
79 [MEMTYPE_EBI1] = {
80 .flags = MEMTYPE_FLAGS_1M_ALIGN,
81 },
82};
83
84static int msm_copper_paddr_to_memtype(unsigned int paddr)
85{
86 return MEMTYPE_EBI1;
87}
88
89#ifdef CONFIG_ION_MSM
90static struct ion_cp_heap_pdata cp_mm_ion_pdata = {
91 .permission_type = IPT_TYPE_MM_CARVEOUT,
92 .align = PAGE_SIZE,
93};
94
95static struct ion_cp_heap_pdata cp_mfc_ion_pdata = {
96 .permission_type = IPT_TYPE_MFC_SHAREDMEM,
97 .align = PAGE_SIZE,
98};
99
100static struct ion_co_heap_pdata co_ion_pdata = {
101 .adjacent_mem_id = INVALID_HEAP_ID,
102 .align = PAGE_SIZE,
103};
104
105static struct ion_co_heap_pdata fw_co_ion_pdata = {
106 .adjacent_mem_id = ION_CP_MM_HEAP_ID,
107 .align = SZ_128K,
108};
109
Olav Haugan9cdfc2f2012-02-15 09:52:57 -0800110/**
111 * These heaps are listed in the order they will be allocated. Due to
112 * video hardware restrictions and content protection the FW heap has to
113 * be allocated adjacent (below) the MM heap and the MFC heap has to be
114 * allocated after the MM heap to ensure MFC heap is not more than 256MB
115 * away from the base address of the FW heap.
116 * However, the order of FW heap and MM heap doesn't matter since these
117 * two heaps are taken care of by separate code to ensure they are adjacent
118 * to each other.
119 * Don't swap the order unless you know what you are doing!
120 */
Olav Hauganb800c8c2012-01-30 08:50:45 -0800121static struct ion_platform_data ion_pdata = {
122 .nr = MSM_ION_HEAP_NUM,
123 .heaps = {
124 {
125 .id = ION_SYSTEM_HEAP_ID,
126 .type = ION_HEAP_TYPE_SYSTEM,
127 .name = ION_VMALLOC_HEAP_NAME,
128 },
129 {
Olav Hauganb800c8c2012-01-30 08:50:45 -0800130 .id = ION_CP_MM_HEAP_ID,
131 .type = ION_HEAP_TYPE_CP,
132 .name = ION_MM_HEAP_NAME,
133 .size = MSM_ION_MM_SIZE,
134 .memory_type = ION_EBI_TYPE,
135 .extra_data = (void *) &cp_mm_ion_pdata,
136 },
137 {
138 .id = ION_MM_FIRMWARE_HEAP_ID,
139 .type = ION_HEAP_TYPE_CARVEOUT,
140 .name = ION_MM_FIRMWARE_HEAP_NAME,
141 .size = MSM_ION_MM_FW_SIZE,
142 .memory_type = ION_EBI_TYPE,
143 .extra_data = (void *) &fw_co_ion_pdata,
144 },
145 {
146 .id = ION_CP_MFC_HEAP_ID,
147 .type = ION_HEAP_TYPE_CP,
148 .name = ION_MFC_HEAP_NAME,
149 .size = MSM_ION_MFC_SIZE,
150 .memory_type = ION_EBI_TYPE,
151 .extra_data = (void *) &cp_mfc_ion_pdata,
152 },
153 {
Olav Haugan9cdfc2f2012-02-15 09:52:57 -0800154 .id = ION_SF_HEAP_ID,
155 .type = ION_HEAP_TYPE_CARVEOUT,
156 .name = ION_SF_HEAP_NAME,
157 .size = MSM_ION_SF_SIZE,
158 .memory_type = ION_EBI_TYPE,
159 .extra_data = (void *) &co_ion_pdata,
160 },
161 {
Olav Hauganb800c8c2012-01-30 08:50:45 -0800162 .id = ION_IOMMU_HEAP_ID,
163 .type = ION_HEAP_TYPE_IOMMU,
164 .name = ION_IOMMU_HEAP_NAME,
165 },
166 {
167 .id = ION_QSECOM_HEAP_ID,
168 .type = ION_HEAP_TYPE_CARVEOUT,
169 .name = ION_QSECOM_HEAP_NAME,
170 .size = MSM_ION_QSECOM_SIZE,
171 .memory_type = ION_EBI_TYPE,
172 .extra_data = (void *) &co_ion_pdata,
173 },
174 {
175 .id = ION_AUDIO_HEAP_ID,
176 .type = ION_HEAP_TYPE_CARVEOUT,
177 .name = ION_AUDIO_HEAP_NAME,
178 .size = MSM_ION_AUDIO_SIZE,
179 .memory_type = ION_EBI_TYPE,
180 .extra_data = (void *) &co_ion_pdata,
181 },
182 }
183};
184
185static struct platform_device ion_dev = {
186 .name = "ion-msm",
187 .id = 1,
188 .dev = { .platform_data = &ion_pdata },
189};
190
Stephen Boyd668d7652012-04-25 11:31:01 -0700191static void __init reserve_ion_memory(void)
Olav Hauganb800c8c2012-01-30 08:50:45 -0800192{
193 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_SIZE;
194 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MM_FW_SIZE;
195 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_SF_SIZE;
196 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_MFC_SIZE;
197 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_QSECOM_SIZE;
198 msm_copper_reserve_table[MEMTYPE_EBI1].size += MSM_ION_AUDIO_SIZE;
199#ifdef CONFIG_KERNEL_PMEM_EBI_REGION
200 msm_copper_reserve_table[MEMTYPE_EBI1].size += kernel_ebi1_mem_size;
201#endif
202}
203#endif
204
Jeff Hugo70946092012-02-10 11:30:43 -0700205static struct resource smd_resource[] = {
206 {
207 .name = "modem_smd_in",
208 .start = 32 + 17, /* mss_sw_to_kpss_ipc_irq0 */
209 .flags = IORESOURCE_IRQ,
210 },
211 {
212 .name = "modem_smsm_in",
213 .start = 32 + 18, /* mss_sw_to_kpss_ipc_irq1 */
214 .flags = IORESOURCE_IRQ,
215 },
216 {
217 .name = "adsp_smd_in",
218 .start = 32 + 156, /* lpass_to_kpss_ipc_irq0 */
219 .flags = IORESOURCE_IRQ,
220 },
221 {
222 .name = "adsp_smsm_in",
223 .start = 32 + 157, /* lpass_to_kpss_ipc_irq1 */
224 .flags = IORESOURCE_IRQ,
225 },
226 {
227 .name = "wcnss_smd_in",
228 .start = 32 + 142, /* WcnssAppsSmdMedIrq */
229 .flags = IORESOURCE_IRQ,
230 },
231 {
232 .name = "wcnss_smsm_in",
Jeff Hugo89046272012-03-29 14:45:37 -0600233 .start = 32 + 144, /* RivaAppsWlanSmsmIrq */
Jeff Hugo70946092012-02-10 11:30:43 -0700234 .flags = IORESOURCE_IRQ,
235 },
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600236 {
237 .name = "rpm_smd_in",
238 .start = 32 + 168, /* rpm_to_kpss_ipc_irq4 */
239 .flags = IORESOURCE_IRQ,
240 },
Jeff Hugo70946092012-02-10 11:30:43 -0700241};
242
243static struct smd_subsystem_config smd_config_list[] = {
244 {
245 .irq_config_id = SMD_MODEM,
246 .subsys_name = "modem",
247 .edge = SMD_APPS_MODEM,
248
249 .smd_int.irq_name = "modem_smd_in",
250 .smd_int.flags = IRQF_TRIGGER_RISING,
251 .smd_int.irq_id = -1,
252 .smd_int.device_name = "smd_dev",
253 .smd_int.dev_id = 0,
254 .smd_int.out_bit_pos = 1 << 12,
255 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
256 .smd_int.out_offset = 0x8,
257
258 .smsm_int.irq_name = "modem_smsm_in",
259 .smsm_int.flags = IRQF_TRIGGER_RISING,
260 .smsm_int.irq_id = -1,
261 .smsm_int.device_name = "smsm_dev",
262 .smsm_int.dev_id = 0,
263 .smsm_int.out_bit_pos = 1 << 13,
264 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
265 .smsm_int.out_offset = 0x8,
266 },
267 {
268 .irq_config_id = SMD_Q6,
269 .subsys_name = "q6",
270 .edge = SMD_APPS_QDSP,
271
272 .smd_int.irq_name = "adsp_smd_in",
273 .smd_int.flags = IRQF_TRIGGER_RISING,
274 .smd_int.irq_id = -1,
275 .smd_int.device_name = "smd_dev",
276 .smd_int.dev_id = 0,
277 .smd_int.out_bit_pos = 1 << 8,
278 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
279 .smd_int.out_offset = 0x8,
280
281 .smsm_int.irq_name = "adsp_smsm_in",
282 .smsm_int.flags = IRQF_TRIGGER_RISING,
283 .smsm_int.irq_id = -1,
284 .smsm_int.device_name = "smsm_dev",
285 .smsm_int.dev_id = 0,
286 .smsm_int.out_bit_pos = 1 << 9,
287 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
288 .smsm_int.out_offset = 0x8,
289 },
290 {
291 .irq_config_id = SMD_WCNSS,
292 .subsys_name = "wcnss",
293 .edge = SMD_APPS_WCNSS,
294
295 .smd_int.irq_name = "wcnss_smd_in",
296 .smd_int.flags = IRQF_TRIGGER_RISING,
297 .smd_int.irq_id = -1,
298 .smd_int.device_name = "smd_dev",
299 .smd_int.dev_id = 0,
300 .smd_int.out_bit_pos = 1 << 17,
301 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
302 .smd_int.out_offset = 0x8,
303
304 .smsm_int.irq_name = "wcnss_smsm_in",
305 .smsm_int.flags = IRQF_TRIGGER_RISING,
306 .smsm_int.irq_id = -1,
307 .smsm_int.device_name = "smsm_dev",
308 .smsm_int.dev_id = 0,
309 .smsm_int.out_bit_pos = 1 << 19,
310 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
311 .smsm_int.out_offset = 0x8,
312 },
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600313 {
314 .irq_config_id = SMD_RPM,
315 .subsys_name = NULL, /* do not use PIL to load RPM */
316 .edge = SMD_APPS_RPM,
317
318 .smd_int.irq_name = "rpm_smd_in",
319 .smd_int.flags = IRQF_TRIGGER_RISING,
320 .smd_int.irq_id = -1,
321 .smd_int.device_name = "smd_dev",
322 .smd_int.dev_id = 0,
323 .smd_int.out_bit_pos = 1 << 0,
324 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
325 .smd_int.out_offset = 0x8,
326
327 .smsm_int.irq_name = NULL, /* RPM does not support SMSM */
328 .smsm_int.flags = 0,
329 .smsm_int.irq_id = 0,
330 .smsm_int.device_name = NULL,
331 .smsm_int.dev_id = 0,
332 .smsm_int.out_bit_pos = 0,
333 .smsm_int.out_base = NULL,
334 .smsm_int.out_offset = 0,
335 },
336};
337
338static struct smd_smem_regions aux_smem_areas[] = {
339 {
340 .phys_addr = (void *)(0xfc428000),
341 .size = 0x4000,
342 },
Jeff Hugo70946092012-02-10 11:30:43 -0700343};
344
Jeff Hugo3e366292012-03-29 15:19:14 -0600345static struct smd_subsystem_restart_config smd_ssr_cfg = {
346 .disable_smsm_reset_handshake = 1,
347};
348
Jeff Hugo70946092012-02-10 11:30:43 -0700349static struct smd_platform smd_platform_data = {
350 .num_ss_configs = ARRAY_SIZE(smd_config_list),
351 .smd_ss_configs = smd_config_list,
Jeff Hugo3e366292012-03-29 15:19:14 -0600352 .smd_ssr_config = &smd_ssr_cfg,
Jeff Hugo9a5dc6e2012-03-29 14:39:42 -0600353 .num_smem_areas = ARRAY_SIZE(aux_smem_areas),
354 .smd_smem_areas = aux_smem_areas,
Jeff Hugo70946092012-02-10 11:30:43 -0700355};
356
357struct platform_device msm_device_smd_copper = {
358 .name = "msm_smd",
359 .id = -1,
360 .resource = smd_resource,
361 .num_resources = ARRAY_SIZE(smd_resource),
362 .dev = {
363 .platform_data = &smd_platform_data,
364 }
365};
366
Olav Hauganb800c8c2012-01-30 08:50:45 -0800367static void __init msm_copper_calculate_reserve_sizes(void)
368{
369#ifdef CONFIG_ION_MSM
370 reserve_ion_memory();
371#endif
372}
373
374static struct reserve_info msm_copper_reserve_info __initdata = {
375 .memtype_reserve_table = msm_copper_reserve_table,
376 .calculate_reserve_sizes = msm_copper_calculate_reserve_sizes,
377 .paddr_to_memtype = msm_copper_paddr_to_memtype,
378};
379
380static void __init msm_copper_early_memory(void)
381{
382 reserve_info = &msm_copper_reserve_info;
383}
384
385void __init msm_copper_reserve(void)
386{
387 msm_reserve();
388}
389
Pavankumar Kondeti8c447382012-03-29 09:02:09 +0530390static struct platform_device android_usb_device = {
391 .name = "android_usb",
392 .id = -1,
393};
394
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700395#define SHARED_IMEM_TZ_BASE 0xFE805720
Hariprasad Dhalinarasimha5a6d7d62012-05-29 17:48:52 -0700396static struct resource copper_tzlog_resources[] = {
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700397 {
398 .start = SHARED_IMEM_TZ_BASE,
399 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
400 .flags = IORESOURCE_MEM,
401 },
402};
403
Hariprasad Dhalinarasimha5a6d7d62012-05-29 17:48:52 -0700404struct platform_device copper_device_tz_log = {
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700405 .name = "tz_log",
406 .id = 0,
Hariprasad Dhalinarasimha5a6d7d62012-05-29 17:48:52 -0700407 .num_resources = ARRAY_SIZE(copper_tzlog_resources),
408 .resource = copper_tzlog_resources,
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700409};
410
Hariprasad Dhalinarasimha3bd477a2012-05-23 12:02:54 -0700411#ifdef CONFIG_HW_RANDOM_MSM
412/* PRNG device */
413#define MSM_PRNG_PHYS 0xF9BFF000
414static struct resource rng_resources = {
415 .flags = IORESOURCE_MEM,
416 .start = MSM_PRNG_PHYS,
417 .end = MSM_PRNG_PHYS + SZ_512 - 1,
418};
419
420struct platform_device msm8974_device_rng = {
421 .name = "msm_rng",
422 .id = 0,
423 .num_resources = 1,
424 .resource = &rng_resources,
425};
426#endif
427
Hariprasad Dhalinarasimhaf42732a2012-05-21 18:00:49 -0700428
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700429void __init msm_copper_add_devices(void)
430{
Olav Hauganb800c8c2012-01-30 08:50:45 -0800431#ifdef CONFIG_ION_MSM
432 platform_device_register(&ion_dev);
433#endif
Jeff Hugo70946092012-02-10 11:30:43 -0700434 platform_device_register(&msm_device_smd_copper);
Pavankumar Kondeti8c447382012-03-29 09:02:09 +0530435 platform_device_register(&android_usb_device);
Michael Bohan037a0f52012-02-29 19:13:09 -0800436 platform_add_devices(msm_copper_stub_regulator_devices,
437 msm_copper_stub_regulator_devices_len);
Hariprasad Dhalinarasimha5a6d7d62012-05-29 17:48:52 -0700438 platform_device_register(&copper_device_tz_log);
Hariprasad Dhalinarasimha3bd477a2012-05-23 12:02:54 -0700439#ifdef CONFIG_HW_RANDOM_MSM
440 platform_device_register(&msm8974_device_rng);
441#endif
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700442}
443
Michael Bohane7c2b472012-03-30 14:27:18 -0700444/*
445 * Used to satisfy dependencies for devices that need to be
446 * run early or in a particular order. Most likely your device doesn't fall
447 * into this category, and thus the driver should not be added here. The
448 * EPROBE_DEFER can satisfy most dependency problems.
449 */
450void __init msm_copper_add_drivers(void)
451{
Mahesh Sivasubramanian56186f82012-05-09 13:11:59 -0600452 msm_smd_init();
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -0600453 msm_rpm_driver_init();
David Collins8f4cebc2012-05-08 16:54:50 -0700454 rpm_regulator_smd_driver_init();
Praveen Chidambaramda9501d2012-04-26 19:48:29 -0600455 msm_spm_device_init();
Michael Bohane7c2b472012-03-30 14:27:18 -0700456 regulator_stub_init();
457}
458
Michael Bohanc7224532012-01-06 16:02:52 -0800459static struct of_device_id irq_match[] __initdata = {
460 { .compatible = "qcom,msm-qgic2", .data = gic_of_init, },
Michael Bohan0425f6f2012-01-17 14:36:39 -0800461 { .compatible = "qcom,msm-gpio", .data = msm_gpio_of_init, },
Michael Bohan115cf652012-01-05 14:32:59 -0800462 { .compatible = "qcom,spmi-pmic-arb", .data = qpnpint_of_init, },
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700463 {}
464};
465
466void __init msm_copper_init_irq(void)
467{
Michael Bohanc7224532012-01-06 16:02:52 -0800468 of_irq_init(irq_match);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700469}
470
471static struct clk_lookup msm_clocks_dummy[] = {
Matt Wagantallb3fe8992011-12-07 19:26:55 -0800472 CLK_DUMMY("xo", XO_CLK, NULL, OFF),
Tianyi Gouc1e049f82011-11-23 14:20:16 -0800473 CLK_DUMMY("xo", XO_CLK, "pil_pronto", OFF),
Sathish Ambley3d50c762011-10-25 15:26:00 -0700474 CLK_DUMMY("core_clk", BLSP2_UART_CLK, "msm_serial_hsl.0", OFF),
475 CLK_DUMMY("iface_clk", BLSP2_UART_CLK, "msm_serial_hsl.0", OFF),
Sujit Reddy Thumma1a4a79e2011-11-04 09:44:32 +0530476 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
477 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
478 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
479 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530480 CLK_DUMMY("phy_clk", NULL, "msm_otg", OFF),
481 CLK_DUMMY("core_clk", NULL, "msm_otg", OFF),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530482 CLK_DUMMY("iface_clk", NULL, "msm_otg", OFF),
Pavankumar Kondeti066bfbf2012-02-20 14:10:20 +0530483 CLK_DUMMY("xo", NULL, "msm_otg", OFF),
Yan He1466daa2011-11-30 17:25:38 -0800484 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
485 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
486 CLK_DUMMY("mem_clk", NULL, NULL, 0),
Harini Jayaraman5f98dbb2011-12-20 13:38:19 -0700487 CLK_DUMMY("core_clk", SPI_CLK, "spi_qsd.1", OFF),
488 CLK_DUMMY("iface_clk", SPI_P_CLK, "spi_qsd.1", OFF),
Sagar Dharia218edb92012-01-15 18:03:01 -0700489 CLK_DUMMY("core_clk", NULL, "f9966000.i2c", 0),
490 CLK_DUMMY("iface_clk", NULL, "f9966000.i2c", 0),
Sagar Dhariaa316a962012-03-21 16:13:22 -0600491 CLK_DUMMY("core_clk", NULL, "fe12f000.slim", OFF),
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700492};
493
494struct clock_init_data msm_dummy_clock_init_data __initdata = {
495 .table = msm_clocks_dummy,
496 .size = ARRAY_SIZE(msm_clocks_dummy),
497};
498
499static struct of_dev_auxdata msm_copper_auxdata_lookup[] __initdata = {
Sathish Ambleyab783ab2011-11-27 22:21:48 -0800500 OF_DEV_AUXDATA("qcom,msm-lsuart-v14", 0xF991F000, \
Sathish Ambley3d50c762011-10-25 15:26:00 -0700501 "msm_serial_hsl.0", NULL),
Pavankumar Kondeti0063b842012-01-16 12:19:58 +0530502 OF_DEV_AUXDATA("qcom,hsusb-otg", 0xF9A55000, \
503 "msm_otg", NULL),
Harini Jayaraman5f98dbb2011-12-20 13:38:19 -0700504 OF_DEV_AUXDATA("qcom,spi-qup-v2", 0xF9924000, \
505 "spi_qsd.1", NULL),
Kenneth Heitkef3c829c2012-01-13 17:02:43 -0700506 OF_DEV_AUXDATA("qcom,spmi-pmic-arb", 0xFC4C0000, \
507 "spmi-pmic-arb.0", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530508 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF9824000, \
David Ng665140f2012-04-12 16:03:45 -0700509 "msm_sdcc.1", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530510 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98A4000, \
511 "msm_sdcc.2", NULL),
512 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF9864000, \
David Ng665140f2012-04-12 16:03:45 -0700513 "msm_sdcc.3", NULL),
Sujit Reddy Thumma85fc52c2012-05-02 12:53:45 +0530514 OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98E4000, \
515 "msm_sdcc.4", NULL),
Matt Wagantallc2bbdc32012-03-21 19:44:50 -0700516 OF_DEV_AUXDATA("qcom,pil-q6v5-lpass", 0xFE200000, \
517 "pil-q6v5-lpass", NULL),
Tianyi Gouc1e049f82011-11-23 14:20:16 -0800518 OF_DEV_AUXDATA("qcom,pil-pronto", 0xFB21B000, \
519 "pil_pronto", NULL),
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700520 {}
521};
522
523void __init msm_copper_init(struct of_dev_auxdata **adata)
524{
Sathish Ambleyb17ec7e2012-04-03 15:20:03 -0700525 msm_copper_init_gpiomux();
Vikram Mulukutlaaeadb5f2012-05-04 14:03:07 -0700526
527 if (machine_is_copper_rumi())
528 msm_clock_init(&msm_dummy_clock_init_data);
529 else
530 msm_clock_init(&msmcopper_clock_init_data);
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700531
532 *adata = msm_copper_auxdata_lookup;
Matt Wagantallecaa1172012-05-08 21:38:45 -0700533
534 regulator_has_full_constraints();
Sathish Ambleyc58afc22011-10-09 21:55:39 -0700535}
Olav Hauganb800c8c2012-01-30 08:50:45 -0800536
537void __init msm_copper_very_early(void)
538{
539 msm_copper_early_memory();
540}