blob: d1c68f374409ae2a7c6ac5c2d17e1c4fe2a9ef54 [file] [log] [blame]
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +05301/* 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#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/gpio_event.h>
Taniya Das2b16d1d2011-12-02 14:44:19 +053015#include <linux/memblock.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016#include <asm/mach-types.h>
17#include <asm/mach/arch.h>
Taniya Das43bcdd62011-12-02 17:33:27 +053018#include <asm/hardware/gic.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <mach/board.h>
20#include <mach/msm_iomap.h>
21#include <mach/msm_hsusb.h>
22#include <mach/rpc_hsusb.h>
23#include <mach/rpc_pmapp.h>
24#include <mach/usbdiag.h>
25#include <mach/msm_memtypes.h>
26#include <mach/msm_serial_hs.h>
27#include <linux/usb/android.h>
28#include <linux/platform_device.h>
29#include <linux/io.h>
30#include <linux/gpio.h>
31#include <mach/vreg.h>
32#include <mach/pmic.h>
33#include <mach/socinfo.h>
34#include <linux/mtd/nand.h>
35#include <linux/mtd/partitions.h>
36#include <asm/mach/mmc.h>
37#include <linux/i2c.h>
38#include <linux/i2c/sx150x.h>
39#include <linux/gpio.h>
40#include <linux/android_pmem.h>
41#include <linux/bootmem.h>
42#include <linux/mfd/marimba.h>
43#include <mach/vreg.h>
44#include <linux/power_supply.h>
Justin Paupored98328e2011-08-19 13:48:31 -070045#include <linux/regulator/consumer.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070046#include <mach/rpc_pmapp.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047#include <mach/msm_battery.h>
48#include <linux/smsc911x.h>
49#include <linux/atmel_maxtouch.h>
Laura Abbott8f3d58b2011-12-18 10:47:03 -080050#include <linux/fmem.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070051#include "devices.h"
52#include "timer.h"
Justin Pauporeb3a33b72011-08-23 15:30:32 -070053#include "board-msm7x27a-regulator.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070054#include "devices-msm7x2xa.h"
Matt Wagantall7cca4642012-02-01 16:43:24 -080055#include "pm.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070056#include <mach/rpc_server_handset.h>
57#include <mach/socinfo.h>
Maheshkumar Sivasubramanian8ccc16e2011-10-25 15:59:57 -060058#include "pm-boot.h"
Chintan Pandyacf467fc2011-12-01 17:11:11 +053059#include "board-msm7627a.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070060
61#define PMEM_KERNEL_EBI1_SIZE 0x3A000
62#define MSM_PMEM_AUDIO_SIZE 0x5B000
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +053063#define ADSP_RPC_PROG 0x3000000a
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070064
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070065#if defined(CONFIG_GPIO_SX150X)
66enum {
67 SX150X_CORE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070068};
69
70static struct sx150x_platform_data sx150x_data[] __initdata = {
71 [SX150X_CORE] = {
72 .gpio_base = GPIO_CORE_EXPANDER_BASE,
73 .oscio_is_gpo = false,
74 .io_pullup_ena = 0,
pankaj kumarc5c01392011-08-12 13:44:05 +053075 .io_pulldn_ena = 0x02,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070076 .io_open_drain_ena = 0xfef8,
77 .irq_summary = -1,
78 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070079};
80#endif
81
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070082
Santosh Sajjan6822c682011-07-26 10:49:36 +053083static struct platform_device msm_wlan_ar6000_pm_device = {
84 .name = "wlan_ar6000_pm_dev",
85 .id = -1,
86};
87
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070088#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
89static struct i2c_board_info core_exp_i2c_info[] __initdata = {
90 {
91 I2C_BOARD_INFO("sx1509q", 0x3e),
92 },
93};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070094
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070095static void __init register_i2c_devices(void)
96{
Trilok Soni3d0f6c52011-07-26 16:06:58 +053097 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070098 sx150x_data[SX150X_CORE].io_open_drain_ena = 0xe0f0;
99
100 core_exp_i2c_info[0].platform_data =
101 &sx150x_data[SX150X_CORE];
102
103 i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
104 core_exp_i2c_info,
105 ARRAY_SIZE(core_exp_i2c_info));
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700106}
107#endif
108
109static struct msm_gpio qup_i2c_gpios_io[] = {
110 { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
111 "qup_scl" },
112 { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
113 "qup_sda" },
114 { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
115 "qup_scl" },
116 { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
117 "qup_sda" },
118};
119
120static struct msm_gpio qup_i2c_gpios_hw[] = {
121 { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
122 "qup_scl" },
123 { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
124 "qup_sda" },
125 { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
126 "qup_scl" },
127 { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
128 "qup_sda" },
129};
130
131static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type)
132{
133 int rc;
134
135 if (adap_id < 0 || adap_id > 1)
136 return;
137
138 /* Each adapter gets 2 lines from the table */
139 if (config_type)
140 rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2);
141 else
142 rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2);
143 if (rc < 0)
144 pr_err("QUP GPIO request/enable failed: %d\n", rc);
145}
146
147static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = {
148 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700149 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
150};
151
152static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = {
153 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700154 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
155};
156
Taniya Das9d187142011-12-02 15:53:25 +0530157static struct msm_i2c_platform_data msm8625_gsbi0_qup_i2c_pdata = {
158 .clk_freq = 100000,
159};
160
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700161#ifdef CONFIG_ARCH_MSM7X27A
Neti Ravi Kumar061726e2011-12-08 15:14:57 +0530162#define MSM_PMEM_MDP_SIZE 0x2300000
163#define MSM7x25A_MSM_PMEM_MDP_SIZE 0x1500000
Jeevan Shriramf40764e2011-10-31 23:28:26 +0530164
Mahesh Lankaa2f6df12012-01-05 16:54:40 +0530165#define MSM_PMEM_ADSP_SIZE 0x1100000
Jeevan Shriramf40764e2011-10-31 23:28:26 +0530166#define MSM7x25A_MSM_PMEM_ADSP_SIZE 0xB91000
167
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700168#endif
169
170static struct android_usb_platform_data android_usb_pdata = {
171 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
172};
173
174static struct platform_device android_usb_device = {
175 .name = "android_usb",
176 .id = -1,
177 .dev = {
178 .platform_data = &android_usb_pdata,
179 },
180};
181
182#ifdef CONFIG_USB_EHCI_MSM_72K
183static void msm_hsusb_vbus_power(unsigned phy_info, int on)
184{
185 int rc = 0;
186 unsigned gpio;
187
188 gpio = GPIO_HOST_VBUS_EN;
189
190 rc = gpio_request(gpio, "i2c_host_vbus_en");
191 if (rc < 0) {
192 pr_err("failed to request %d GPIO\n", gpio);
193 return;
194 }
195 gpio_direction_output(gpio, !!on);
196 gpio_set_value_cansleep(gpio, !!on);
197 gpio_free(gpio);
198}
199
200static struct msm_usb_host_platform_data msm_usb_host_pdata = {
201 .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM),
202};
203
204static void __init msm7x2x_init_host(void)
205{
206 msm_add_host(0, &msm_usb_host_pdata);
207}
208#endif
209
210#ifdef CONFIG_USB_MSM_OTG_72K
211static int hsusb_rpc_connect(int connect)
212{
213 if (connect)
214 return msm_hsusb_rpc_connect();
215 else
216 return msm_hsusb_rpc_close();
217}
218
Justin Paupored98328e2011-08-19 13:48:31 -0700219static struct regulator *reg_hsusb;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700220static int msm_hsusb_ldo_init(int init)
221{
Justin Paupored98328e2011-08-19 13:48:31 -0700222 int rc = 0;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700223
Justin Paupored98328e2011-08-19 13:48:31 -0700224 if (init) {
225 reg_hsusb = regulator_get(NULL, "usb");
226 if (IS_ERR(reg_hsusb)) {
227 rc = PTR_ERR(reg_hsusb);
228 pr_err("%s: could not get regulator: %d\n",
229 __func__, rc);
230 goto out;
231 }
232
233 rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000);
234 if (rc) {
235 pr_err("%s: could not set voltage: %d\n",
236 __func__, rc);
237 goto reg_free;
238 }
239
240 return 0;
241 }
242 /* else fall through */
243reg_free:
244 regulator_put(reg_hsusb);
245out:
246 reg_hsusb = NULL;
247 return rc;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700248}
249
250static int msm_hsusb_ldo_enable(int enable)
251{
252 static int ldo_status;
253
Justin Paupored98328e2011-08-19 13:48:31 -0700254 if (IS_ERR_OR_NULL(reg_hsusb))
255 return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700256
257 if (ldo_status == enable)
258 return 0;
259
260 ldo_status = enable;
261
Justin Paupored98328e2011-08-19 13:48:31 -0700262 return enable ?
263 regulator_enable(reg_hsusb) :
264 regulator_disable(reg_hsusb);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700265}
266
267#ifndef CONFIG_USB_EHCI_MSM_72K
268static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init)
269{
270 int ret = 0;
271
272 if (init)
273 ret = msm_pm_app_rpc_init(callback);
274 else
275 msm_pm_app_rpc_deinit(callback);
276
277 return ret;
278}
279#endif
280
281static struct msm_otg_platform_data msm_otg_pdata = {
282#ifndef CONFIG_USB_EHCI_MSM_72K
283 .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init,
284#else
285 .vbus_power = msm_hsusb_vbus_power,
286#endif
287 .rpc_connect = hsusb_rpc_connect,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700288 .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT,
289 .cdr_autoreset = CDR_AUTO_RESET_DISABLE,
290 .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT,
291 .se1_gating = SE1_GATING_DISABLE,
292 .ldo_init = msm_hsusb_ldo_init,
293 .ldo_enable = msm_hsusb_ldo_enable,
294 .chg_init = hsusb_chg_init,
295 .chg_connected = hsusb_chg_connected,
296 .chg_vbus_draw = hsusb_chg_vbus_draw,
297};
298#endif
299
300static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
301 .is_phy_status_timer_on = 1,
302};
303
304static struct resource smc91x_resources[] = {
305 [0] = {
306 .start = 0x90000300,
307 .end = 0x900003ff,
308 .flags = IORESOURCE_MEM,
309 },
310 [1] = {
311 .start = MSM_GPIO_TO_INT(4),
312 .end = MSM_GPIO_TO_INT(4),
313 .flags = IORESOURCE_IRQ,
314 },
315};
316
317static struct platform_device smc91x_device = {
318 .name = "smc91x",
319 .id = 0,
320 .num_resources = ARRAY_SIZE(smc91x_resources),
321 .resource = smc91x_resources,
322};
323
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700324#ifdef CONFIG_SERIAL_MSM_HS
325static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
326 .inject_rx_on_wakeup = 1,
327 .rx_to_inject = 0xFD,
328};
329#endif
330static struct msm_pm_platform_data msm7x27a_pm_data[MSM_PM_SLEEP_MODE_NR] = {
Murali Nalajalab10363d2012-01-12 16:29:01 +0530331 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700332 .idle_supported = 1,
333 .suspend_supported = 1,
334 .idle_enabled = 1,
335 .suspend_enabled = 1,
336 .latency = 16000,
337 .residency = 20000,
338 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530339 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700340 .idle_supported = 1,
341 .suspend_supported = 1,
342 .idle_enabled = 1,
343 .suspend_enabled = 1,
344 .latency = 12000,
345 .residency = 20000,
346 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530347 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700348 .idle_supported = 1,
349 .suspend_supported = 1,
350 .idle_enabled = 0,
351 .suspend_enabled = 1,
352 .latency = 2000,
353 .residency = 0,
354 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530355 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700356 .idle_supported = 1,
357 .suspend_supported = 1,
358 .idle_enabled = 1,
359 .suspend_enabled = 1,
360 .latency = 2,
361 .residency = 0,
362 },
363};
364
Sujit Reddy Thummaca0c1062012-02-24 14:47:05 +0530365u32 msm7627a_power_collapse_latency(enum msm_pm_sleep_mode mode)
366{
367 switch (mode) {
368 case MSM_PM_SLEEP_MODE_POWER_COLLAPSE:
369 return msm7x27a_pm_data
370 [MSM_PM_SLEEP_MODE_POWER_COLLAPSE].latency;
371 case MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN:
372 return msm7x27a_pm_data
373 [MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN].latency;
374 case MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT:
375 return msm7x27a_pm_data
376 [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
377 case MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT:
378 return msm7x27a_pm_data
379 [MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency;
380 default:
381 return 0;
382 }
383}
384
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600385static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +0530386 .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS,
387 .p_addr = 0,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600388};
389
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700390static struct android_pmem_platform_data android_pmem_adsp_pdata = {
391 .name = "pmem_adsp",
392 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
Mahesh Lankac6af7eb2011-08-02 18:00:35 +0530393 .cached = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700394 .memory_type = MEMTYPE_EBI1,
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800395 .request_region = request_fmem_c_region,
396 .release_region = release_fmem_c_region,
397 .reusable = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700398};
399
400static struct platform_device android_pmem_adsp_device = {
401 .name = "android_pmem",
402 .id = 1,
403 .dev = { .platform_data = &android_pmem_adsp_pdata },
404};
405
406static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE;
407static int __init pmem_mdp_size_setup(char *p)
408{
409 pmem_mdp_size = memparse(p, NULL);
410 return 0;
411}
412
413early_param("pmem_mdp_size", pmem_mdp_size_setup);
414
415static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
416static int __init pmem_adsp_size_setup(char *p)
417{
418 pmem_adsp_size = memparse(p, NULL);
419 return 0;
420}
421
422early_param("pmem_adsp_size", pmem_adsp_size_setup);
423
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700424#define SND(desc, num) { .name = #desc, .id = num }
425static struct snd_endpoint snd_endpoints_list[] = {
426 SND(HANDSET, 0),
427 SND(MONO_HEADSET, 2),
428 SND(HEADSET, 3),
429 SND(SPEAKER, 6),
430 SND(TTY_HEADSET, 8),
431 SND(TTY_VCO, 9),
432 SND(TTY_HCO, 10),
433 SND(BT, 12),
434 SND(IN_S_SADC_OUT_HANDSET, 16),
435 SND(IN_S_SADC_OUT_SPEAKER_PHONE, 25),
436 SND(FM_DIGITAL_STEREO_HEADSET, 26),
437 SND(FM_DIGITAL_SPEAKER_PHONE, 27),
438 SND(FM_DIGITAL_BT_A2DP_HEADSET, 28),
Shashi Kumar64e07602011-10-11 13:18:57 +0530439 SND(STEREO_HEADSET_AND_SPEAKER, 31),
Sidipotu Ashokab34ca42011-07-22 16:34:20 +0530440 SND(CURRENT, 0x7FFFFFFE),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700441 SND(FM_ANALOG_STEREO_HEADSET, 35),
442 SND(FM_ANALOG_STEREO_HEADSET_CODEC, 36),
443};
444#undef SND
445
446static struct msm_snd_endpoints msm_device_snd_endpoints = {
447 .endpoints = snd_endpoints_list,
448 .num = sizeof(snd_endpoints_list) / sizeof(struct snd_endpoint)
449};
450
451static struct platform_device msm_device_snd = {
452 .name = "msm_snd",
453 .id = -1,
454 .dev = {
455 .platform_data = &msm_device_snd_endpoints
456 },
457};
458
459#define DEC0_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
460 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
461 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
462 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
463 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
464 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
465#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
466 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
467 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
468 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
469 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
470 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
471#define DEC2_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
472 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
473 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
474 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
475 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
476 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
477#define DEC3_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
478 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
479 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
480 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
481 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
482 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
483#define DEC4_FORMAT (1<<MSM_ADSP_CODEC_MIDI)
484
485static unsigned int dec_concurrency_table[] = {
486 /* Audio LP */
487 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DMA)), 0,
488 0, 0, 0,
489
490 /* Concurrency 1 */
491 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
492 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
493 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
494 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
495 (DEC4_FORMAT),
496
497 /* Concurrency 2 */
498 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
499 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
500 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
501 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
502 (DEC4_FORMAT),
503
504 /* Concurrency 3 */
505 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
506 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
507 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
508 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
509 (DEC4_FORMAT),
510
511 /* Concurrency 4 */
512 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
513 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
514 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
515 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
516 (DEC4_FORMAT),
517
518 /* Concurrency 5 */
519 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
520 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
521 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
522 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
523 (DEC4_FORMAT),
524
525 /* Concurrency 6 */
526 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
527 0, 0, 0, 0,
528
529 /* Concurrency 7 */
530 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
531 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
532 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
533 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
534 (DEC4_FORMAT),
535};
536
537#define DEC_INFO(name, queueid, decid, nr_codec) { .module_name = name, \
538 .module_queueid = queueid, .module_decid = decid, \
539 .nr_codec_support = nr_codec}
540
541static struct msm_adspdec_info dec_info_list[] = {
542 DEC_INFO("AUDPLAY0TASK", 13, 0, 11), /* AudPlay0BitStreamCtrlQueue */
543 DEC_INFO("AUDPLAY1TASK", 14, 1, 11), /* AudPlay1BitStreamCtrlQueue */
544 DEC_INFO("AUDPLAY2TASK", 15, 2, 11), /* AudPlay2BitStreamCtrlQueue */
545 DEC_INFO("AUDPLAY3TASK", 16, 3, 11), /* AudPlay3BitStreamCtrlQueue */
546 DEC_INFO("AUDPLAY4TASK", 17, 4, 1), /* AudPlay4BitStreamCtrlQueue */
547};
548
549static struct msm_adspdec_database msm_device_adspdec_database = {
550 .num_dec = ARRAY_SIZE(dec_info_list),
551 .num_concurrency_support = (ARRAY_SIZE(dec_concurrency_table) / \
552 ARRAY_SIZE(dec_info_list)),
553 .dec_concurrency_table = dec_concurrency_table,
554 .dec_info_list = dec_info_list,
555};
556
557static struct platform_device msm_device_adspdec = {
558 .name = "msm_adspdec",
559 .id = -1,
560 .dev = {
561 .platform_data = &msm_device_adspdec_database
562 },
563};
564
565static struct android_pmem_platform_data android_pmem_audio_pdata = {
566 .name = "pmem_audio",
567 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
568 .cached = 0,
569 .memory_type = MEMTYPE_EBI1,
570};
571
572static struct platform_device android_pmem_audio_device = {
573 .name = "android_pmem",
574 .id = 2,
575 .dev = { .platform_data = &android_pmem_audio_pdata },
576};
577
578static struct android_pmem_platform_data android_pmem_pdata = {
579 .name = "pmem",
580 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
581 .cached = 1,
582 .memory_type = MEMTYPE_EBI1,
583};
584static struct platform_device android_pmem_device = {
585 .name = "android_pmem",
586 .id = 0,
587 .dev = { .platform_data = &android_pmem_pdata },
588};
589
590static u32 msm_calculate_batt_capacity(u32 current_voltage);
591
592static struct msm_psy_batt_pdata msm_psy_batt_data = {
593 .voltage_min_design = 2800,
594 .voltage_max_design = 4300,
595 .avail_chg_sources = AC_CHG | USB_CHG ,
596 .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION,
597 .calculate_capacity = &msm_calculate_batt_capacity,
598};
599
600static u32 msm_calculate_batt_capacity(u32 current_voltage)
601{
602 u32 low_voltage = msm_psy_batt_data.voltage_min_design;
603 u32 high_voltage = msm_psy_batt_data.voltage_max_design;
604
605 return (current_voltage - low_voltage) * 100
606 / (high_voltage - low_voltage);
607}
608
609static struct platform_device msm_batt_device = {
610 .name = "msm-battery",
611 .id = -1,
612 .dev.platform_data = &msm_psy_batt_data,
613};
614
615static struct smsc911x_platform_config smsc911x_config = {
616 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
617 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
618 .flags = SMSC911X_USE_16BIT,
619};
620
621static struct resource smsc911x_resources[] = {
622 [0] = {
623 .start = 0x90000000,
624 .end = 0x90007fff,
625 .flags = IORESOURCE_MEM,
626 },
627 [1] = {
628 .start = MSM_GPIO_TO_INT(48),
629 .end = MSM_GPIO_TO_INT(48),
630 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
631 },
632};
633
634static struct platform_device smsc911x_device = {
635 .name = "smsc911x",
636 .id = 0,
637 .num_resources = ARRAY_SIZE(smsc911x_resources),
638 .resource = smsc911x_resources,
639 .dev = {
640 .platform_data = &smsc911x_config,
641 },
642};
643
644static struct msm_gpio smsc911x_gpios[] = {
645 { GPIO_CFG(48, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
646 "smsc911x_irq" },
647 { GPIO_CFG(49, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
648 "eth_fifo_sel" },
649};
650
651#define ETH_FIFO_SEL_GPIO 49
652static void msm7x27a_cfg_smsc911x(void)
653{
654 int res;
655
656 res = msm_gpios_request_enable(smsc911x_gpios,
657 ARRAY_SIZE(smsc911x_gpios));
658 if (res) {
659 pr_err("%s: unable to enable gpios for SMSC911x\n", __func__);
660 return;
661 }
662
663 /* ETH_FIFO_SEL */
664 res = gpio_direction_output(ETH_FIFO_SEL_GPIO, 0);
665 if (res) {
666 pr_err("%s: unable to get direction for gpio %d\n", __func__,
667 ETH_FIFO_SEL_GPIO);
668 msm_gpios_disable_free(smsc911x_gpios,
669 ARRAY_SIZE(smsc911x_gpios));
670 return;
671 }
672 gpio_set_value(ETH_FIFO_SEL_GPIO, 0);
673}
674
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700675#if defined(CONFIG_SERIAL_MSM_HSL_CONSOLE) \
676 && defined(CONFIG_MSM_SHARED_GPIO_FOR_UART2DM)
677static struct msm_gpio uart2dm_gpios[] = {
678 {GPIO_CFG(19, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
679 "uart2dm_rfr_n" },
680 {GPIO_CFG(20, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
681 "uart2dm_cts_n" },
682 {GPIO_CFG(21, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
683 "uart2dm_rx" },
684 {GPIO_CFG(108, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
685 "uart2dm_tx" },
686};
687
688static void msm7x27a_cfg_uart2dm_serial(void)
689{
690 int ret;
691 ret = msm_gpios_request_enable(uart2dm_gpios,
692 ARRAY_SIZE(uart2dm_gpios));
693 if (ret)
694 pr_err("%s: unable to enable gpios for uart2dm\n", __func__);
695}
696#else
697static void msm7x27a_cfg_uart2dm_serial(void) { }
698#endif
699
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800700struct fmem_platform_data fmem_pdata;
701
702struct platform_device fmem_device = {
703 .name = "fmem",
704 .id = -1,
705 .dev = { .platform_data = &fmem_pdata },
706};
707
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700708static struct platform_device *rumi_sim_devices[] __initdata = {
709 &msm_device_dmov,
710 &msm_device_smd,
711 &smc91x_device,
712 &msm_device_uart1,
713 &msm_device_nand,
714 &msm_device_uart_dm1,
715 &msm_gsbi0_qup_i2c_device,
716 &msm_gsbi1_qup_i2c_device,
717};
718
Taniya Das43bcdd62011-12-02 17:33:27 +0530719static struct platform_device *msm8625_rumi3_devices[] __initdata = {
720 &msm8625_device_dmov,
721 &msm8625_device_uart1,
Taniya Das9d187142011-12-02 15:53:25 +0530722 &msm8625_device_qup_i2c_gsbi0,
Taniya Das43bcdd62011-12-02 17:33:27 +0530723};
724
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700725static struct platform_device *surf_ffa_devices[] __initdata = {
726 &msm_device_dmov,
727 &msm_device_smd,
728 &msm_device_uart1,
729 &msm_device_uart_dm1,
730 &msm_device_uart_dm2,
731 &msm_device_nand,
732 &msm_gsbi0_qup_i2c_device,
733 &msm_gsbi1_qup_i2c_device,
734 &msm_device_otg,
735 &msm_device_gadget_peripheral,
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800736 &fmem_device,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700737 &android_usb_device,
738 &android_pmem_device,
739 &android_pmem_adsp_device,
740 &android_pmem_audio_device,
741 &msm_device_snd,
742 &msm_device_adspdec,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700743 &msm_batt_device,
744 &smsc911x_device,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700745 &msm_kgsl_3d0,
746#ifdef CONFIG_BT
747 &msm_bt_power_device,
748#endif
Manish Dewangan3a260992011-06-24 18:01:34 +0530749 &asoc_msm_pcm,
750 &asoc_msm_dai0,
751 &asoc_msm_dai1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700752};
753
754static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE;
755static int __init pmem_kernel_ebi1_size_setup(char *p)
756{
757 pmem_kernel_ebi1_size = memparse(p, NULL);
758 return 0;
759}
760early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
761
762static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
763static int __init pmem_audio_size_setup(char *p)
764{
765 pmem_audio_size = memparse(p, NULL);
766 return 0;
767}
768early_param("pmem_audio_size", pmem_audio_size_setup);
769
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700770static struct memtype_reserve msm7x27a_reserve_table[] __initdata = {
771 [MEMTYPE_SMI] = {
772 },
773 [MEMTYPE_EBI0] = {
774 .flags = MEMTYPE_FLAGS_1M_ALIGN,
775 },
776 [MEMTYPE_EBI1] = {
777 .flags = MEMTYPE_FLAGS_1M_ALIGN,
778 },
779};
780
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800781#ifdef CONFIG_ANDROID_PMEM
782static struct android_pmem_platform_data *pmem_pdata_array[] __initdata = {
783 &android_pmem_adsp_pdata,
784 &android_pmem_audio_pdata,
785 &android_pmem_pdata,
786};
787#endif
788
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700789static void __init size_pmem_devices(void)
790{
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800791#ifdef CONFIG_ANDROID_PMEM
792 unsigned int i;
793 unsigned int reusable_count = 0;
Jeevan Shriramf40764e2011-10-31 23:28:26 +0530794
795 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
796 pmem_mdp_size = MSM7x25A_MSM_PMEM_MDP_SIZE;
797 pmem_adsp_size = MSM7x25A_MSM_PMEM_ADSP_SIZE;
798 } else {
799 pmem_mdp_size = MSM_PMEM_MDP_SIZE;
800 pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
801 }
802
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700803 android_pmem_adsp_pdata.size = pmem_adsp_size;
804 android_pmem_pdata.size = pmem_mdp_size;
805 android_pmem_audio_pdata.size = pmem_audio_size;
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800806
807 fmem_pdata.size = 0;
808
809 /* Find pmem devices that should use FMEM (reusable) memory.
810 */
811 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) {
812 struct android_pmem_platform_data *pdata = pmem_pdata_array[i];
813
814 if (!reusable_count && pdata->reusable)
815 fmem_pdata.size += pdata->size;
816
817 reusable_count += (pdata->reusable) ? 1 : 0;
818
819 if (pdata->reusable && reusable_count > 1) {
820 pr_err("%s: Too many PMEM devices specified as reusable. PMEM device %s was not configured as reusable.\n",
821 __func__, pdata->name);
822 pdata->reusable = 0;
823 }
824 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700825#endif
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800826
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700827}
828
829static void __init reserve_memory_for(struct android_pmem_platform_data *p)
830{
831 msm7x27a_reserve_table[p->memory_type].size += p->size;
832}
833
834static void __init reserve_pmem_memory(void)
835{
836#ifdef CONFIG_ANDROID_PMEM
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800837 unsigned int i;
838 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) {
839 if (!pmem_pdata_array[i]->reusable)
840 reserve_memory_for(pmem_pdata_array[i]);
841 }
842
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700843 msm7x27a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
844#endif
845}
846
847static void __init msm7x27a_calculate_reserve_sizes(void)
848{
849 size_pmem_devices();
850 reserve_pmem_memory();
851}
852
853static int msm7x27a_paddr_to_memtype(unsigned int paddr)
854{
855 return MEMTYPE_EBI1;
856}
857
858static struct reserve_info msm7x27a_reserve_info __initdata = {
859 .memtype_reserve_table = msm7x27a_reserve_table,
860 .calculate_reserve_sizes = msm7x27a_calculate_reserve_sizes,
861 .paddr_to_memtype = msm7x27a_paddr_to_memtype,
862};
863
864static void __init msm7x27a_reserve(void)
865{
866 reserve_info = &msm7x27a_reserve_info;
867 msm_reserve();
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800868 fmem_pdata.phys = reserve_memory_for_fmem(fmem_pdata.size);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700869}
870
Taniya Das2b16d1d2011-12-02 14:44:19 +0530871static void __init msm8625_reserve(void)
872{
873 memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8);
874}
875
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700876static void __init msm_device_i2c_init(void)
877{
Taniya Das9d187142011-12-02 15:53:25 +0530878 if (machine_is_msm8625_rumi3()) {
879 msm8625_device_qup_i2c_gsbi0.dev.platform_data =
880 &msm8625_gsbi0_qup_i2c_pdata;
881 return;
882 }
883
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700884 msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
885 msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
886}
887
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700888#define MSM_EBI2_PHYS 0xa0d00000
889#define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030
890
891static void __init msm7x27a_init_ebi2(void)
892{
893 uint32_t ebi2_cfg;
894 void __iomem *ebi2_cfg_ptr;
895
896 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_PHYS, sizeof(uint32_t));
897 if (!ebi2_cfg_ptr)
898 return;
899
900 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +0530901 if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() ||
902 machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700903 ebi2_cfg |= (1 << 4); /* CS2 */
904
905 writel(ebi2_cfg, ebi2_cfg_ptr);
906 iounmap(ebi2_cfg_ptr);
907
908 /* Enable A/D MUX[bit 31] from EBI2_XMEM_CS2_CFG1 */
909 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_XMEM_CS2_CFG1,
910 sizeof(uint32_t));
911 if (!ebi2_cfg_ptr)
912 return;
913
914 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +0530915 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700916 ebi2_cfg |= (1 << 31);
917
918 writel(ebi2_cfg, ebi2_cfg_ptr);
919 iounmap(ebi2_cfg_ptr);
920}
921
922#define ATMEL_TS_I2C_NAME "maXTouch"
Justin Paupored98328e2011-08-19 13:48:31 -0700923
924static struct regulator_bulk_data regs_atmel[] = {
925 { .supply = "ldo2", .min_uV = 2850000, .max_uV = 2850000 },
926 { .supply = "smps3", .min_uV = 1800000, .max_uV = 1800000 },
927};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700928
929#define ATMEL_TS_GPIO_IRQ 82
930
931static int atmel_ts_power_on(bool on)
932{
Justin Paupored98328e2011-08-19 13:48:31 -0700933 int rc = on ?
934 regulator_bulk_enable(ARRAY_SIZE(regs_atmel), regs_atmel) :
935 regulator_bulk_disable(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700936
Justin Paupored98328e2011-08-19 13:48:31 -0700937 if (rc)
938 pr_err("%s: could not %sable regulators: %d\n",
939 __func__, on ? "en" : "dis", rc);
940 else
941 msleep(50);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700942
Justin Paupored98328e2011-08-19 13:48:31 -0700943 return rc;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700944}
945
946static int atmel_ts_platform_init(struct i2c_client *client)
947{
948 int rc;
Justin Paupored98328e2011-08-19 13:48:31 -0700949 struct device *dev = &client->dev;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700950
Justin Paupored98328e2011-08-19 13:48:31 -0700951 rc = regulator_bulk_get(dev, ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700952 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700953 dev_err(dev, "%s: could not get regulators: %d\n",
954 __func__, rc);
955 goto out;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700956 }
957
Justin Paupored98328e2011-08-19 13:48:31 -0700958 rc = regulator_bulk_set_voltage(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700959 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700960 dev_err(dev, "%s: could not set voltages: %d\n",
961 __func__, rc);
962 goto reg_free;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700963 }
964
965 rc = gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
966 GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,
967 GPIO_CFG_8MA), GPIO_CFG_ENABLE);
968 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700969 dev_err(dev, "%s: gpio_tlmm_config for %d failed\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700970 __func__, ATMEL_TS_GPIO_IRQ);
Justin Paupored98328e2011-08-19 13:48:31 -0700971 goto reg_free;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700972 }
973
974 /* configure touchscreen interrupt gpio */
975 rc = gpio_request(ATMEL_TS_GPIO_IRQ, "atmel_maxtouch_gpio");
976 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700977 dev_err(dev, "%s: unable to request gpio %d\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700978 __func__, ATMEL_TS_GPIO_IRQ);
979 goto ts_gpio_tlmm_unconfig;
980 }
981
982 rc = gpio_direction_input(ATMEL_TS_GPIO_IRQ);
983 if (rc < 0) {
Justin Paupored98328e2011-08-19 13:48:31 -0700984 dev_err(dev, "%s: unable to set the direction of gpio %d\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700985 __func__, ATMEL_TS_GPIO_IRQ);
986 goto free_ts_gpio;
987 }
988 return 0;
989
990free_ts_gpio:
991 gpio_free(ATMEL_TS_GPIO_IRQ);
992ts_gpio_tlmm_unconfig:
993 gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
994 GPIO_CFG_INPUT, GPIO_CFG_NO_PULL,
995 GPIO_CFG_2MA), GPIO_CFG_DISABLE);
Justin Paupored98328e2011-08-19 13:48:31 -0700996reg_free:
997 regulator_bulk_free(ARRAY_SIZE(regs_atmel), regs_atmel);
998out:
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700999 return rc;
1000}
1001
1002static int atmel_ts_platform_exit(struct i2c_client *client)
1003{
1004 gpio_free(ATMEL_TS_GPIO_IRQ);
1005 gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
1006 GPIO_CFG_INPUT, GPIO_CFG_NO_PULL,
1007 GPIO_CFG_2MA), GPIO_CFG_DISABLE);
Justin Paupored98328e2011-08-19 13:48:31 -07001008 regulator_bulk_free(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001009 return 0;
1010}
1011
1012static u8 atmel_ts_read_chg(void)
1013{
1014 return gpio_get_value(ATMEL_TS_GPIO_IRQ);
1015}
1016
1017static u8 atmel_ts_valid_interrupt(void)
1018{
1019 return !atmel_ts_read_chg();
1020}
1021
1022#define ATMEL_X_OFFSET 13
1023#define ATMEL_Y_OFFSET 0
1024
Mohan Pallaka4e9a94e2011-11-23 16:34:21 +05301025static struct maxtouch_platform_data atmel_ts_pdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001026 .numtouch = 4,
1027 .init_platform_hw = atmel_ts_platform_init,
1028 .exit_platform_hw = atmel_ts_platform_exit,
1029 .power_on = atmel_ts_power_on,
1030 .display_res_x = 480,
1031 .display_res_y = 864,
1032 .min_x = ATMEL_X_OFFSET,
1033 .max_x = (505 - ATMEL_X_OFFSET),
1034 .min_y = ATMEL_Y_OFFSET,
1035 .max_y = (863 - ATMEL_Y_OFFSET),
1036 .valid_interrupt = atmel_ts_valid_interrupt,
1037 .read_chg = atmel_ts_read_chg,
1038};
1039
1040static struct i2c_board_info atmel_ts_i2c_info[] __initdata = {
1041 {
1042 I2C_BOARD_INFO(ATMEL_TS_I2C_NAME, 0x4a),
1043 .platform_data = &atmel_ts_pdata,
1044 .irq = MSM_GPIO_TO_INT(ATMEL_TS_GPIO_IRQ),
1045 },
1046};
1047
1048#define KP_INDEX(row, col) ((row)*ARRAY_SIZE(kp_col_gpios) + (col))
1049
1050static unsigned int kp_row_gpios[] = {31, 32, 33, 34, 35};
1051static unsigned int kp_col_gpios[] = {36, 37, 38, 39, 40};
1052
1053static const unsigned short keymap[ARRAY_SIZE(kp_col_gpios) *
1054 ARRAY_SIZE(kp_row_gpios)] = {
1055 [KP_INDEX(0, 0)] = KEY_7,
1056 [KP_INDEX(0, 1)] = KEY_DOWN,
1057 [KP_INDEX(0, 2)] = KEY_UP,
1058 [KP_INDEX(0, 3)] = KEY_RIGHT,
1059 [KP_INDEX(0, 4)] = KEY_ENTER,
1060
1061 [KP_INDEX(1, 0)] = KEY_LEFT,
1062 [KP_INDEX(1, 1)] = KEY_SEND,
1063 [KP_INDEX(1, 2)] = KEY_1,
1064 [KP_INDEX(1, 3)] = KEY_4,
1065 [KP_INDEX(1, 4)] = KEY_CLEAR,
1066
1067 [KP_INDEX(2, 0)] = KEY_6,
1068 [KP_INDEX(2, 1)] = KEY_5,
1069 [KP_INDEX(2, 2)] = KEY_8,
1070 [KP_INDEX(2, 3)] = KEY_3,
1071 [KP_INDEX(2, 4)] = KEY_NUMERIC_STAR,
1072
1073 [KP_INDEX(3, 0)] = KEY_9,
1074 [KP_INDEX(3, 1)] = KEY_NUMERIC_POUND,
1075 [KP_INDEX(3, 2)] = KEY_0,
1076 [KP_INDEX(3, 3)] = KEY_2,
1077 [KP_INDEX(3, 4)] = KEY_SLEEP,
1078
1079 [KP_INDEX(4, 0)] = KEY_BACK,
1080 [KP_INDEX(4, 1)] = KEY_HOME,
1081 [KP_INDEX(4, 2)] = KEY_MENU,
1082 [KP_INDEX(4, 3)] = KEY_VOLUMEUP,
1083 [KP_INDEX(4, 4)] = KEY_VOLUMEDOWN,
1084};
1085
1086/* SURF keypad platform device information */
1087static struct gpio_event_matrix_info kp_matrix_info = {
1088 .info.func = gpio_event_matrix_func,
1089 .keymap = keymap,
1090 .output_gpios = kp_row_gpios,
1091 .input_gpios = kp_col_gpios,
1092 .noutputs = ARRAY_SIZE(kp_row_gpios),
1093 .ninputs = ARRAY_SIZE(kp_col_gpios),
1094 .settle_time.tv_nsec = 40 * NSEC_PER_USEC,
1095 .poll_time.tv_nsec = 20 * NSEC_PER_MSEC,
1096 .flags = GPIOKPF_LEVEL_TRIGGERED_IRQ | GPIOKPF_DRIVE_INACTIVE |
1097 GPIOKPF_PRINT_UNMAPPED_KEYS,
1098};
1099
1100static struct gpio_event_info *kp_info[] = {
1101 &kp_matrix_info.info
1102};
1103
1104static struct gpio_event_platform_data kp_pdata = {
1105 .name = "7x27a_kp",
1106 .info = kp_info,
1107 .info_count = ARRAY_SIZE(kp_info)
1108};
1109
1110static struct platform_device kp_pdev = {
1111 .name = GPIO_EVENT_DEV_NAME,
1112 .id = -1,
1113 .dev = {
1114 .platform_data = &kp_pdata,
1115 },
1116};
1117
1118static struct msm_handset_platform_data hs_platform_data = {
1119 .hs_name = "7k_handset",
1120 .pwr_key_delay_ms = 500, /* 0 will disable end key */
1121};
1122
1123static struct platform_device hs_pdev = {
1124 .name = "msm-handset",
1125 .id = -1,
1126 .dev = {
1127 .platform_data = &hs_platform_data,
1128 },
1129};
1130
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001131static struct platform_device msm_proccomm_regulator_dev = {
1132 .name = PROCCOMM_REGULATOR_DEV_NAME,
1133 .id = -1,
1134 .dev = {
1135 .platform_data = &msm7x27a_proccomm_regulator_data
1136 }
1137};
1138
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301139static void msm_adsp_add_pdev(void)
1140{
1141 int rc = 0;
1142 struct rpc_board_dev *rpc_adsp_pdev;
1143
1144 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1145 if (rpc_adsp_pdev == NULL) {
1146 pr_err("%s: Memory Allocation failure\n", __func__);
1147 return;
1148 }
1149 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1150 rpc_adsp_pdev->pdev = msm_adsp_device;
1151 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1152 if (rc < 0) {
1153 pr_err("%s: return val: %d\n", __func__, rc);
1154 kfree(rpc_adsp_pdev);
1155 }
1156}
1157
1158static void msm_adsp_8625_add_pdev(void)
1159{
1160 int rc = 0;
1161 struct rpc_board_dev *rpc_adsp_pdev;
1162
1163 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1164 if (rpc_adsp_pdev == NULL) {
1165 pr_err("%s: Memory Allocation failure\n", __func__);
1166 return;
1167 }
1168 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1169 rpc_adsp_pdev->pdev = msm8625_device_adsp;
1170 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1171 if (rc < 0) {
1172 pr_err("%s: return val: %d\n", __func__, rc);
1173 kfree(rpc_adsp_pdev);
1174 }
1175}
1176
Trilok Soni16f61af2011-07-26 16:06:58 +05301177static void __init msm7627a_rumi3_init(void)
1178{
1179 msm7x27a_init_ebi2();
1180 platform_add_devices(rumi_sim_devices,
1181 ARRAY_SIZE(rumi_sim_devices));
1182}
1183
Taniya Das43bcdd62011-12-02 17:33:27 +05301184static void __init msm8625_rumi3_init(void)
1185{
1186 msm7x2x_misc_init();
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301187 msm_adsp_8625_add_pdev();
Taniya Das9d187142011-12-02 15:53:25 +05301188 msm_device_i2c_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301189 platform_add_devices(msm8625_rumi3_devices,
1190 ARRAY_SIZE(msm8625_rumi3_devices));
1191}
1192
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001193#define LED_GPIO_PDM 96
1194#define UART1DM_RX_GPIO 45
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301195
1196#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
1197static int __init msm7x27a_init_ar6000pm(void)
1198{
Santosh Sajjan374d6592012-01-19 23:16:46 +05301199 msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301200 return platform_device_register(&msm_wlan_ar6000_pm_device);
1201}
1202#else
1203static int __init msm7x27a_init_ar6000pm(void) { return 0; }
1204#endif
1205
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001206static void __init msm7x27a_init_regulators(void)
1207{
1208 int rc = platform_device_register(&msm_proccomm_regulator_dev);
1209 if (rc)
1210 pr_err("%s: could not register regulator device: %d\n",
1211 __func__, rc);
1212}
1213
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001214static void __init msm7x2x_init(void)
1215{
Trilok Sonia416c492011-07-22 20:20:23 +05301216 msm7x2x_misc_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001217
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001218 /* Initialize regulators first so that other devices can use them */
1219 msm7x27a_init_regulators();
1220
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001221 /* Common functions for SURF/FFA/RUMI3 */
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301222 msm_adsp_add_pdev();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001223 msm_device_i2c_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001224 msm7x27a_init_ebi2();
1225 msm7x27a_cfg_uart2dm_serial();
1226#ifdef CONFIG_SERIAL_MSM_HS
1227 msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
1228 msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
1229#endif
1230
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001231#ifdef CONFIG_USB_MSM_OTG_72K
Trilok Soni16f61af2011-07-26 16:06:58 +05301232 msm_otg_pdata.swfi_latency =
1233 msm7x27a_pm_data
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001234 [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
Trilok Soni16f61af2011-07-26 16:06:58 +05301235 msm_device_otg.dev.platform_data = &msm_otg_pdata;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001236#endif
Trilok Soni16f61af2011-07-26 16:06:58 +05301237 msm_device_gadget_peripheral.dev.platform_data =
1238 &msm_gadget_pdata;
1239 msm7x27a_cfg_smsc911x();
1240 platform_add_devices(msm_footswitch_devices,
1241 msm_num_footswitch_devices);
1242 platform_add_devices(surf_ffa_devices,
1243 ARRAY_SIZE(surf_ffa_devices));
Sujith Reddy Thummaad7c9a82011-09-30 20:54:38 +05301244 /* Ensure ar6000pm device is registered before MMC/SDC */
1245 msm7x27a_init_ar6000pm();
1246#ifdef CONFIG_MMC_MSM
Chintan Pandyacf467fc2011-12-01 17:11:11 +05301247 msm7627a_init_mmc();
Sujith Reddy Thummaad7c9a82011-09-30 20:54:38 +05301248#endif
Trilok Soni16f61af2011-07-26 16:06:58 +05301249 msm_fb_add_devices();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001250#ifdef CONFIG_USB_EHCI_MSM_72K
Trilok Soni16f61af2011-07-26 16:06:58 +05301251 msm7x2x_init_host();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001252#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001253
1254 msm_pm_set_platform_data(msm7x27a_pm_data,
1255 ARRAY_SIZE(msm7x27a_pm_data));
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -06001256 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001257
1258#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
1259 register_i2c_devices();
1260#endif
1261#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Chintan Pandya13490c02011-12-20 13:03:36 +05301262 msm7627a_bt_power_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001263#endif
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301264 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001265 atmel_ts_pdata.min_x = 0;
1266 atmel_ts_pdata.max_x = 480;
1267 atmel_ts_pdata.min_y = 0;
1268 atmel_ts_pdata.max_y = 320;
1269 }
1270
1271 i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
1272 atmel_ts_i2c_info,
1273 ARRAY_SIZE(atmel_ts_i2c_info));
1274
Pankaj Kumar5be2a3e2011-09-26 11:45:02 +05301275#if defined(CONFIG_MSM_CAMERA)
Chintan Pandya40762702011-12-06 13:47:06 +05301276 msm7627a_camera_init();
Pankaj Kumar5be2a3e2011-09-26 11:45:02 +05301277#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001278 platform_device_register(&kp_pdev);
1279 platform_device_register(&hs_pdev);
1280
1281 /* configure it as a pdm function*/
1282 if (gpio_tlmm_config(GPIO_CFG(LED_GPIO_PDM, 3,
1283 GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL,
1284 GPIO_CFG_8MA), GPIO_CFG_ENABLE))
1285 pr_err("%s: gpio_tlmm_config for %d failed\n",
1286 __func__, LED_GPIO_PDM);
1287 else
1288 platform_device_register(&led_pdev);
1289
1290#ifdef CONFIG_MSM_RPC_VIBRATOR
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301291 if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001292 msm_init_pmic_vibrator();
1293#endif
1294 /*7x25a kgsl initializations*/
1295 msm7x25a_kgsl_3d0_init();
1296}
1297
1298static void __init msm7x2x_init_early(void)
1299{
Chintan Pandya250c2e52012-01-19 17:15:49 +05301300 msm_msm7627a_allocate_memory_regions();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001301}
1302
1303MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3")
1304 .boot_params = PHYS_OFFSET + 0x100,
1305 .map_io = msm_common_io_init,
1306 .reserve = msm7x27a_reserve,
1307 .init_irq = msm_init_irq,
Trilok Soni16f61af2011-07-26 16:06:58 +05301308 .init_machine = msm7627a_rumi3_init,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001309 .timer = &msm_timer,
1310 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301311 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001312MACHINE_END
1313MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF")
1314 .boot_params = PHYS_OFFSET + 0x100,
1315 .map_io = msm_common_io_init,
1316 .reserve = msm7x27a_reserve,
1317 .init_irq = msm_init_irq,
1318 .init_machine = msm7x2x_init,
1319 .timer = &msm_timer,
1320 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301321 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001322MACHINE_END
1323MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA")
1324 .boot_params = PHYS_OFFSET + 0x100,
1325 .map_io = msm_common_io_init,
1326 .reserve = msm7x27a_reserve,
1327 .init_irq = msm_init_irq,
1328 .init_machine = msm7x2x_init,
1329 .timer = &msm_timer,
1330 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301331 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001332MACHINE_END
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301333MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF")
1334 .boot_params = PHYS_OFFSET + 0x100,
1335 .map_io = msm_common_io_init,
1336 .reserve = msm7x27a_reserve,
1337 .init_irq = msm_init_irq,
1338 .init_machine = msm7x2x_init,
1339 .timer = &msm_timer,
1340 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301341 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301342MACHINE_END
1343MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA")
1344 .boot_params = PHYS_OFFSET + 0x100,
1345 .map_io = msm_common_io_init,
1346 .reserve = msm7x27a_reserve,
1347 .init_irq = msm_init_irq,
1348 .init_machine = msm7x2x_init,
1349 .timer = &msm_timer,
1350 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301351 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301352MACHINE_END
Taniya Das43bcdd62011-12-02 17:33:27 +05301353MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3")
1354 .boot_params = PHYS_OFFSET + 0x100,
1355 .map_io = msm8625_map_io,
Taniya Das2b16d1d2011-12-02 14:44:19 +05301356 .reserve = msm8625_reserve,
Taniya Das43bcdd62011-12-02 17:33:27 +05301357 .init_irq = msm8625_init_irq,
1358 .init_machine = msm8625_rumi3_init,
1359 .timer = &msm_timer,
1360 .handle_irq = gic_handle_irq,
1361MACHINE_END