blob: 87f3f56d4f222c4b3a041c8576321cf803d377f5 [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,
Angshuman Sarkarfb1cce92012-02-21 15:20:43 +0530721 &msm8625_device_smd,
Taniya Das43bcdd62011-12-02 17:33:27 +0530722 &msm8625_device_uart1,
Taniya Das9d187142011-12-02 15:53:25 +0530723 &msm8625_device_qup_i2c_gsbi0,
Taniya Das43bcdd62011-12-02 17:33:27 +0530724};
725
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700726static struct platform_device *surf_ffa_devices[] __initdata = {
727 &msm_device_dmov,
728 &msm_device_smd,
729 &msm_device_uart1,
730 &msm_device_uart_dm1,
731 &msm_device_uart_dm2,
732 &msm_device_nand,
733 &msm_gsbi0_qup_i2c_device,
734 &msm_gsbi1_qup_i2c_device,
735 &msm_device_otg,
736 &msm_device_gadget_peripheral,
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800737 &fmem_device,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700738 &android_usb_device,
739 &android_pmem_device,
740 &android_pmem_adsp_device,
741 &android_pmem_audio_device,
742 &msm_device_snd,
743 &msm_device_adspdec,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700744 &msm_batt_device,
745 &smsc911x_device,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700746 &msm_kgsl_3d0,
747#ifdef CONFIG_BT
748 &msm_bt_power_device,
749#endif
Manish Dewangan3a260992011-06-24 18:01:34 +0530750 &asoc_msm_pcm,
751 &asoc_msm_dai0,
752 &asoc_msm_dai1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700753};
754
755static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE;
756static int __init pmem_kernel_ebi1_size_setup(char *p)
757{
758 pmem_kernel_ebi1_size = memparse(p, NULL);
759 return 0;
760}
761early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
762
763static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
764static int __init pmem_audio_size_setup(char *p)
765{
766 pmem_audio_size = memparse(p, NULL);
767 return 0;
768}
769early_param("pmem_audio_size", pmem_audio_size_setup);
770
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700771static struct memtype_reserve msm7x27a_reserve_table[] __initdata = {
772 [MEMTYPE_SMI] = {
773 },
774 [MEMTYPE_EBI0] = {
775 .flags = MEMTYPE_FLAGS_1M_ALIGN,
776 },
777 [MEMTYPE_EBI1] = {
778 .flags = MEMTYPE_FLAGS_1M_ALIGN,
779 },
780};
781
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800782#ifdef CONFIG_ANDROID_PMEM
783static struct android_pmem_platform_data *pmem_pdata_array[] __initdata = {
784 &android_pmem_adsp_pdata,
785 &android_pmem_audio_pdata,
786 &android_pmem_pdata,
787};
788#endif
789
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700790static void __init size_pmem_devices(void)
791{
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800792#ifdef CONFIG_ANDROID_PMEM
793 unsigned int i;
794 unsigned int reusable_count = 0;
Jeevan Shriramf40764e2011-10-31 23:28:26 +0530795
796 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
797 pmem_mdp_size = MSM7x25A_MSM_PMEM_MDP_SIZE;
798 pmem_adsp_size = MSM7x25A_MSM_PMEM_ADSP_SIZE;
799 } else {
800 pmem_mdp_size = MSM_PMEM_MDP_SIZE;
801 pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
802 }
803
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700804 android_pmem_adsp_pdata.size = pmem_adsp_size;
805 android_pmem_pdata.size = pmem_mdp_size;
806 android_pmem_audio_pdata.size = pmem_audio_size;
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800807
808 fmem_pdata.size = 0;
809
810 /* Find pmem devices that should use FMEM (reusable) memory.
811 */
812 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) {
813 struct android_pmem_platform_data *pdata = pmem_pdata_array[i];
814
815 if (!reusable_count && pdata->reusable)
816 fmem_pdata.size += pdata->size;
817
818 reusable_count += (pdata->reusable) ? 1 : 0;
819
820 if (pdata->reusable && reusable_count > 1) {
821 pr_err("%s: Too many PMEM devices specified as reusable. PMEM device %s was not configured as reusable.\n",
822 __func__, pdata->name);
823 pdata->reusable = 0;
824 }
825 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700826#endif
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800827
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700828}
829
830static void __init reserve_memory_for(struct android_pmem_platform_data *p)
831{
832 msm7x27a_reserve_table[p->memory_type].size += p->size;
833}
834
835static void __init reserve_pmem_memory(void)
836{
837#ifdef CONFIG_ANDROID_PMEM
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800838 unsigned int i;
839 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) {
840 if (!pmem_pdata_array[i]->reusable)
841 reserve_memory_for(pmem_pdata_array[i]);
842 }
843
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700844 msm7x27a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
845#endif
846}
847
848static void __init msm7x27a_calculate_reserve_sizes(void)
849{
850 size_pmem_devices();
851 reserve_pmem_memory();
852}
853
854static int msm7x27a_paddr_to_memtype(unsigned int paddr)
855{
856 return MEMTYPE_EBI1;
857}
858
859static struct reserve_info msm7x27a_reserve_info __initdata = {
860 .memtype_reserve_table = msm7x27a_reserve_table,
861 .calculate_reserve_sizes = msm7x27a_calculate_reserve_sizes,
862 .paddr_to_memtype = msm7x27a_paddr_to_memtype,
863};
864
865static void __init msm7x27a_reserve(void)
866{
867 reserve_info = &msm7x27a_reserve_info;
868 msm_reserve();
Laura Abbott8f3d58b2011-12-18 10:47:03 -0800869 fmem_pdata.phys = reserve_memory_for_fmem(fmem_pdata.size);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700870}
871
Taniya Das2b16d1d2011-12-02 14:44:19 +0530872static void __init msm8625_reserve(void)
873{
874 memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8);
875}
876
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700877static void __init msm_device_i2c_init(void)
878{
Taniya Das9d187142011-12-02 15:53:25 +0530879 if (machine_is_msm8625_rumi3()) {
880 msm8625_device_qup_i2c_gsbi0.dev.platform_data =
881 &msm8625_gsbi0_qup_i2c_pdata;
882 return;
883 }
884
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700885 msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
886 msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
887}
888
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700889#define MSM_EBI2_PHYS 0xa0d00000
890#define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030
891
892static void __init msm7x27a_init_ebi2(void)
893{
894 uint32_t ebi2_cfg;
895 void __iomem *ebi2_cfg_ptr;
896
897 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_PHYS, sizeof(uint32_t));
898 if (!ebi2_cfg_ptr)
899 return;
900
901 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +0530902 if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() ||
903 machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700904 ebi2_cfg |= (1 << 4); /* CS2 */
905
906 writel(ebi2_cfg, ebi2_cfg_ptr);
907 iounmap(ebi2_cfg_ptr);
908
909 /* Enable A/D MUX[bit 31] from EBI2_XMEM_CS2_CFG1 */
910 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_XMEM_CS2_CFG1,
911 sizeof(uint32_t));
912 if (!ebi2_cfg_ptr)
913 return;
914
915 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +0530916 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700917 ebi2_cfg |= (1 << 31);
918
919 writel(ebi2_cfg, ebi2_cfg_ptr);
920 iounmap(ebi2_cfg_ptr);
921}
922
923#define ATMEL_TS_I2C_NAME "maXTouch"
Justin Paupored98328e2011-08-19 13:48:31 -0700924
925static struct regulator_bulk_data regs_atmel[] = {
926 { .supply = "ldo2", .min_uV = 2850000, .max_uV = 2850000 },
927 { .supply = "smps3", .min_uV = 1800000, .max_uV = 1800000 },
928};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700929
930#define ATMEL_TS_GPIO_IRQ 82
931
932static int atmel_ts_power_on(bool on)
933{
Justin Paupored98328e2011-08-19 13:48:31 -0700934 int rc = on ?
935 regulator_bulk_enable(ARRAY_SIZE(regs_atmel), regs_atmel) :
936 regulator_bulk_disable(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700937
Justin Paupored98328e2011-08-19 13:48:31 -0700938 if (rc)
939 pr_err("%s: could not %sable regulators: %d\n",
940 __func__, on ? "en" : "dis", rc);
941 else
942 msleep(50);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700943
Justin Paupored98328e2011-08-19 13:48:31 -0700944 return rc;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700945}
946
947static int atmel_ts_platform_init(struct i2c_client *client)
948{
949 int rc;
Justin Paupored98328e2011-08-19 13:48:31 -0700950 struct device *dev = &client->dev;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700951
Justin Paupored98328e2011-08-19 13:48:31 -0700952 rc = regulator_bulk_get(dev, ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700953 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700954 dev_err(dev, "%s: could not get regulators: %d\n",
955 __func__, rc);
956 goto out;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700957 }
958
Justin Paupored98328e2011-08-19 13:48:31 -0700959 rc = regulator_bulk_set_voltage(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700960 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700961 dev_err(dev, "%s: could not set voltages: %d\n",
962 __func__, rc);
963 goto reg_free;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700964 }
965
966 rc = gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
967 GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,
968 GPIO_CFG_8MA), GPIO_CFG_ENABLE);
969 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700970 dev_err(dev, "%s: gpio_tlmm_config for %d failed\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700971 __func__, ATMEL_TS_GPIO_IRQ);
Justin Paupored98328e2011-08-19 13:48:31 -0700972 goto reg_free;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700973 }
974
975 /* configure touchscreen interrupt gpio */
976 rc = gpio_request(ATMEL_TS_GPIO_IRQ, "atmel_maxtouch_gpio");
977 if (rc) {
Justin Paupored98328e2011-08-19 13:48:31 -0700978 dev_err(dev, "%s: unable to request gpio %d\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700979 __func__, ATMEL_TS_GPIO_IRQ);
980 goto ts_gpio_tlmm_unconfig;
981 }
982
983 rc = gpio_direction_input(ATMEL_TS_GPIO_IRQ);
984 if (rc < 0) {
Justin Paupored98328e2011-08-19 13:48:31 -0700985 dev_err(dev, "%s: unable to set the direction of gpio %d\n",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700986 __func__, ATMEL_TS_GPIO_IRQ);
987 goto free_ts_gpio;
988 }
989 return 0;
990
991free_ts_gpio:
992 gpio_free(ATMEL_TS_GPIO_IRQ);
993ts_gpio_tlmm_unconfig:
994 gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
995 GPIO_CFG_INPUT, GPIO_CFG_NO_PULL,
996 GPIO_CFG_2MA), GPIO_CFG_DISABLE);
Justin Paupored98328e2011-08-19 13:48:31 -0700997reg_free:
998 regulator_bulk_free(ARRAY_SIZE(regs_atmel), regs_atmel);
999out:
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001000 return rc;
1001}
1002
1003static int atmel_ts_platform_exit(struct i2c_client *client)
1004{
1005 gpio_free(ATMEL_TS_GPIO_IRQ);
1006 gpio_tlmm_config(GPIO_CFG(ATMEL_TS_GPIO_IRQ, 0,
1007 GPIO_CFG_INPUT, GPIO_CFG_NO_PULL,
1008 GPIO_CFG_2MA), GPIO_CFG_DISABLE);
Justin Paupored98328e2011-08-19 13:48:31 -07001009 regulator_bulk_free(ARRAY_SIZE(regs_atmel), regs_atmel);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001010 return 0;
1011}
1012
1013static u8 atmel_ts_read_chg(void)
1014{
1015 return gpio_get_value(ATMEL_TS_GPIO_IRQ);
1016}
1017
1018static u8 atmel_ts_valid_interrupt(void)
1019{
1020 return !atmel_ts_read_chg();
1021}
1022
1023#define ATMEL_X_OFFSET 13
1024#define ATMEL_Y_OFFSET 0
1025
Mohan Pallaka4e9a94e2011-11-23 16:34:21 +05301026static struct maxtouch_platform_data atmel_ts_pdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001027 .numtouch = 4,
1028 .init_platform_hw = atmel_ts_platform_init,
1029 .exit_platform_hw = atmel_ts_platform_exit,
1030 .power_on = atmel_ts_power_on,
1031 .display_res_x = 480,
1032 .display_res_y = 864,
1033 .min_x = ATMEL_X_OFFSET,
1034 .max_x = (505 - ATMEL_X_OFFSET),
1035 .min_y = ATMEL_Y_OFFSET,
1036 .max_y = (863 - ATMEL_Y_OFFSET),
1037 .valid_interrupt = atmel_ts_valid_interrupt,
1038 .read_chg = atmel_ts_read_chg,
1039};
1040
1041static struct i2c_board_info atmel_ts_i2c_info[] __initdata = {
1042 {
1043 I2C_BOARD_INFO(ATMEL_TS_I2C_NAME, 0x4a),
1044 .platform_data = &atmel_ts_pdata,
1045 .irq = MSM_GPIO_TO_INT(ATMEL_TS_GPIO_IRQ),
1046 },
1047};
1048
1049#define KP_INDEX(row, col) ((row)*ARRAY_SIZE(kp_col_gpios) + (col))
1050
1051static unsigned int kp_row_gpios[] = {31, 32, 33, 34, 35};
1052static unsigned int kp_col_gpios[] = {36, 37, 38, 39, 40};
1053
1054static const unsigned short keymap[ARRAY_SIZE(kp_col_gpios) *
1055 ARRAY_SIZE(kp_row_gpios)] = {
1056 [KP_INDEX(0, 0)] = KEY_7,
1057 [KP_INDEX(0, 1)] = KEY_DOWN,
1058 [KP_INDEX(0, 2)] = KEY_UP,
1059 [KP_INDEX(0, 3)] = KEY_RIGHT,
1060 [KP_INDEX(0, 4)] = KEY_ENTER,
1061
1062 [KP_INDEX(1, 0)] = KEY_LEFT,
1063 [KP_INDEX(1, 1)] = KEY_SEND,
1064 [KP_INDEX(1, 2)] = KEY_1,
1065 [KP_INDEX(1, 3)] = KEY_4,
1066 [KP_INDEX(1, 4)] = KEY_CLEAR,
1067
1068 [KP_INDEX(2, 0)] = KEY_6,
1069 [KP_INDEX(2, 1)] = KEY_5,
1070 [KP_INDEX(2, 2)] = KEY_8,
1071 [KP_INDEX(2, 3)] = KEY_3,
1072 [KP_INDEX(2, 4)] = KEY_NUMERIC_STAR,
1073
1074 [KP_INDEX(3, 0)] = KEY_9,
1075 [KP_INDEX(3, 1)] = KEY_NUMERIC_POUND,
1076 [KP_INDEX(3, 2)] = KEY_0,
1077 [KP_INDEX(3, 3)] = KEY_2,
1078 [KP_INDEX(3, 4)] = KEY_SLEEP,
1079
1080 [KP_INDEX(4, 0)] = KEY_BACK,
1081 [KP_INDEX(4, 1)] = KEY_HOME,
1082 [KP_INDEX(4, 2)] = KEY_MENU,
1083 [KP_INDEX(4, 3)] = KEY_VOLUMEUP,
1084 [KP_INDEX(4, 4)] = KEY_VOLUMEDOWN,
1085};
1086
1087/* SURF keypad platform device information */
1088static struct gpio_event_matrix_info kp_matrix_info = {
1089 .info.func = gpio_event_matrix_func,
1090 .keymap = keymap,
1091 .output_gpios = kp_row_gpios,
1092 .input_gpios = kp_col_gpios,
1093 .noutputs = ARRAY_SIZE(kp_row_gpios),
1094 .ninputs = ARRAY_SIZE(kp_col_gpios),
1095 .settle_time.tv_nsec = 40 * NSEC_PER_USEC,
1096 .poll_time.tv_nsec = 20 * NSEC_PER_MSEC,
1097 .flags = GPIOKPF_LEVEL_TRIGGERED_IRQ | GPIOKPF_DRIVE_INACTIVE |
1098 GPIOKPF_PRINT_UNMAPPED_KEYS,
1099};
1100
1101static struct gpio_event_info *kp_info[] = {
1102 &kp_matrix_info.info
1103};
1104
1105static struct gpio_event_platform_data kp_pdata = {
1106 .name = "7x27a_kp",
1107 .info = kp_info,
1108 .info_count = ARRAY_SIZE(kp_info)
1109};
1110
1111static struct platform_device kp_pdev = {
1112 .name = GPIO_EVENT_DEV_NAME,
1113 .id = -1,
1114 .dev = {
1115 .platform_data = &kp_pdata,
1116 },
1117};
1118
1119static struct msm_handset_platform_data hs_platform_data = {
1120 .hs_name = "7k_handset",
1121 .pwr_key_delay_ms = 500, /* 0 will disable end key */
1122};
1123
1124static struct platform_device hs_pdev = {
1125 .name = "msm-handset",
1126 .id = -1,
1127 .dev = {
1128 .platform_data = &hs_platform_data,
1129 },
1130};
1131
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001132static struct platform_device msm_proccomm_regulator_dev = {
1133 .name = PROCCOMM_REGULATOR_DEV_NAME,
1134 .id = -1,
1135 .dev = {
1136 .platform_data = &msm7x27a_proccomm_regulator_data
1137 }
1138};
1139
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301140static void msm_adsp_add_pdev(void)
1141{
1142 int rc = 0;
1143 struct rpc_board_dev *rpc_adsp_pdev;
1144
1145 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1146 if (rpc_adsp_pdev == NULL) {
1147 pr_err("%s: Memory Allocation failure\n", __func__);
1148 return;
1149 }
1150 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1151 rpc_adsp_pdev->pdev = msm_adsp_device;
1152 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1153 if (rc < 0) {
1154 pr_err("%s: return val: %d\n", __func__, rc);
1155 kfree(rpc_adsp_pdev);
1156 }
1157}
1158
1159static void msm_adsp_8625_add_pdev(void)
1160{
1161 int rc = 0;
1162 struct rpc_board_dev *rpc_adsp_pdev;
1163
1164 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1165 if (rpc_adsp_pdev == NULL) {
1166 pr_err("%s: Memory Allocation failure\n", __func__);
1167 return;
1168 }
1169 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1170 rpc_adsp_pdev->pdev = msm8625_device_adsp;
1171 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1172 if (rc < 0) {
1173 pr_err("%s: return val: %d\n", __func__, rc);
1174 kfree(rpc_adsp_pdev);
1175 }
1176}
1177
Trilok Soni16f61af2011-07-26 16:06:58 +05301178static void __init msm7627a_rumi3_init(void)
1179{
1180 msm7x27a_init_ebi2();
1181 platform_add_devices(rumi_sim_devices,
1182 ARRAY_SIZE(rumi_sim_devices));
1183}
1184
Taniya Das43bcdd62011-12-02 17:33:27 +05301185static void __init msm8625_rumi3_init(void)
1186{
1187 msm7x2x_misc_init();
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301188 msm_adsp_8625_add_pdev();
Taniya Das9d187142011-12-02 15:53:25 +05301189 msm_device_i2c_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301190 platform_add_devices(msm8625_rumi3_devices,
1191 ARRAY_SIZE(msm8625_rumi3_devices));
1192}
1193
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001194#define LED_GPIO_PDM 96
1195#define UART1DM_RX_GPIO 45
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301196
1197#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
1198static int __init msm7x27a_init_ar6000pm(void)
1199{
Santosh Sajjan374d6592012-01-19 23:16:46 +05301200 msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301201 return platform_device_register(&msm_wlan_ar6000_pm_device);
1202}
1203#else
1204static int __init msm7x27a_init_ar6000pm(void) { return 0; }
1205#endif
1206
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001207static void __init msm7x27a_init_regulators(void)
1208{
1209 int rc = platform_device_register(&msm_proccomm_regulator_dev);
1210 if (rc)
1211 pr_err("%s: could not register regulator device: %d\n",
1212 __func__, rc);
1213}
1214
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001215static void __init msm7x2x_init(void)
1216{
Trilok Sonia416c492011-07-22 20:20:23 +05301217 msm7x2x_misc_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001218
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001219 /* Initialize regulators first so that other devices can use them */
1220 msm7x27a_init_regulators();
1221
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001222 /* Common functions for SURF/FFA/RUMI3 */
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301223 msm_adsp_add_pdev();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001224 msm_device_i2c_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001225 msm7x27a_init_ebi2();
1226 msm7x27a_cfg_uart2dm_serial();
1227#ifdef CONFIG_SERIAL_MSM_HS
1228 msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
1229 msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
1230#endif
1231
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001232#ifdef CONFIG_USB_MSM_OTG_72K
Trilok Soni16f61af2011-07-26 16:06:58 +05301233 msm_otg_pdata.swfi_latency =
1234 msm7x27a_pm_data
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001235 [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
Trilok Soni16f61af2011-07-26 16:06:58 +05301236 msm_device_otg.dev.platform_data = &msm_otg_pdata;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001237#endif
Trilok Soni16f61af2011-07-26 16:06:58 +05301238 msm_device_gadget_peripheral.dev.platform_data =
1239 &msm_gadget_pdata;
1240 msm7x27a_cfg_smsc911x();
1241 platform_add_devices(msm_footswitch_devices,
1242 msm_num_footswitch_devices);
1243 platform_add_devices(surf_ffa_devices,
1244 ARRAY_SIZE(surf_ffa_devices));
Sujith Reddy Thummaad7c9a82011-09-30 20:54:38 +05301245 /* Ensure ar6000pm device is registered before MMC/SDC */
1246 msm7x27a_init_ar6000pm();
1247#ifdef CONFIG_MMC_MSM
Chintan Pandyacf467fc2011-12-01 17:11:11 +05301248 msm7627a_init_mmc();
Sujith Reddy Thummaad7c9a82011-09-30 20:54:38 +05301249#endif
Trilok Soni16f61af2011-07-26 16:06:58 +05301250 msm_fb_add_devices();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001251#ifdef CONFIG_USB_EHCI_MSM_72K
Trilok Soni16f61af2011-07-26 16:06:58 +05301252 msm7x2x_init_host();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001253#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001254
1255 msm_pm_set_platform_data(msm7x27a_pm_data,
1256 ARRAY_SIZE(msm7x27a_pm_data));
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -06001257 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001258
1259#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
1260 register_i2c_devices();
1261#endif
1262#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Chintan Pandya13490c02011-12-20 13:03:36 +05301263 msm7627a_bt_power_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001264#endif
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301265 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001266 atmel_ts_pdata.min_x = 0;
1267 atmel_ts_pdata.max_x = 480;
1268 atmel_ts_pdata.min_y = 0;
1269 atmel_ts_pdata.max_y = 320;
1270 }
1271
1272 i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
1273 atmel_ts_i2c_info,
1274 ARRAY_SIZE(atmel_ts_i2c_info));
1275
Pankaj Kumar5be2a3e2011-09-26 11:45:02 +05301276#if defined(CONFIG_MSM_CAMERA)
Chintan Pandya40762702011-12-06 13:47:06 +05301277 msm7627a_camera_init();
Pankaj Kumar5be2a3e2011-09-26 11:45:02 +05301278#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001279 platform_device_register(&kp_pdev);
1280 platform_device_register(&hs_pdev);
1281
1282 /* configure it as a pdm function*/
1283 if (gpio_tlmm_config(GPIO_CFG(LED_GPIO_PDM, 3,
1284 GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL,
1285 GPIO_CFG_8MA), GPIO_CFG_ENABLE))
1286 pr_err("%s: gpio_tlmm_config for %d failed\n",
1287 __func__, LED_GPIO_PDM);
1288 else
1289 platform_device_register(&led_pdev);
1290
1291#ifdef CONFIG_MSM_RPC_VIBRATOR
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301292 if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001293 msm_init_pmic_vibrator();
1294#endif
1295 /*7x25a kgsl initializations*/
1296 msm7x25a_kgsl_3d0_init();
1297}
1298
1299static void __init msm7x2x_init_early(void)
1300{
Chintan Pandya250c2e52012-01-19 17:15:49 +05301301 msm_msm7627a_allocate_memory_regions();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001302}
1303
1304MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3")
1305 .boot_params = PHYS_OFFSET + 0x100,
1306 .map_io = msm_common_io_init,
1307 .reserve = msm7x27a_reserve,
1308 .init_irq = msm_init_irq,
Trilok Soni16f61af2011-07-26 16:06:58 +05301309 .init_machine = msm7627a_rumi3_init,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001310 .timer = &msm_timer,
1311 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301312 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001313MACHINE_END
1314MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF")
1315 .boot_params = PHYS_OFFSET + 0x100,
1316 .map_io = msm_common_io_init,
1317 .reserve = msm7x27a_reserve,
1318 .init_irq = msm_init_irq,
1319 .init_machine = msm7x2x_init,
1320 .timer = &msm_timer,
1321 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301322 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001323MACHINE_END
1324MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA")
1325 .boot_params = PHYS_OFFSET + 0x100,
1326 .map_io = msm_common_io_init,
1327 .reserve = msm7x27a_reserve,
1328 .init_irq = msm_init_irq,
1329 .init_machine = msm7x2x_init,
1330 .timer = &msm_timer,
1331 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301332 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001333MACHINE_END
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301334MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF")
1335 .boot_params = PHYS_OFFSET + 0x100,
1336 .map_io = msm_common_io_init,
1337 .reserve = msm7x27a_reserve,
1338 .init_irq = msm_init_irq,
1339 .init_machine = msm7x2x_init,
1340 .timer = &msm_timer,
1341 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301342 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301343MACHINE_END
1344MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA")
1345 .boot_params = PHYS_OFFSET + 0x100,
1346 .map_io = msm_common_io_init,
1347 .reserve = msm7x27a_reserve,
1348 .init_irq = msm_init_irq,
1349 .init_machine = msm7x2x_init,
1350 .timer = &msm_timer,
1351 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301352 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301353MACHINE_END
Taniya Das43bcdd62011-12-02 17:33:27 +05301354MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3")
1355 .boot_params = PHYS_OFFSET + 0x100,
1356 .map_io = msm8625_map_io,
Taniya Das2b16d1d2011-12-02 14:44:19 +05301357 .reserve = msm8625_reserve,
Taniya Das43bcdd62011-12-02 17:33:27 +05301358 .init_irq = msm8625_init_irq,
1359 .init_machine = msm8625_rumi3_init,
1360 .timer = &msm_timer,
1361 .handle_irq = gic_handle_irq,
1362MACHINE_END