blob: f106b95cdb98f5e2a2ffb351a221330cb1588dc2 [file] [log] [blame]
Kevin Chan412e9f92012-01-24 10:45:23 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Jay Chokshiea67c622011-07-29 17:12:26 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ARCH_ARM_MACH_MSM_BOARD_APQ8064_H
14#define __ARCH_ARM_MACH_MSM_BOARD_APQ8064_H
15
16#include <linux/mfd/pm8xxx/pm8921.h>
Jay Chokshi44873f72011-08-30 17:24:26 -070017#include <linux/mfd/pm8xxx/pm8821.h>
Huaibin Yang4a084e32011-12-15 15:25:52 -080018#include <mach/msm_memtypes.h>
Jay Chokshibc3d98d2011-08-10 17:14:23 -070019/* Macros assume PMIC GPIOs and MPPs start at 1 */
20#define PM8921_GPIO_BASE NR_GPIO_IRQS
21#define PM8921_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8921_GPIO_BASE)
22#define PM8921_MPP_BASE (PM8921_GPIO_BASE + PM8921_NR_GPIOS)
23#define PM8921_MPP_PM_TO_SYS(pm_mpp) (pm_mpp - 1 + PM8921_MPP_BASE)
24#define PM8921_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS)
25
Jay Chokshi44873f72011-08-30 17:24:26 -070026#define PM8821_MPP_BASE (PM8921_MPP_BASE + PM8921_NR_MPPS)
27#define PM8821_MPP_PM_TO_SYS(pm_mpp) (pm_mpp - 1 + PM8821_MPP_BASE)
28#define PM8821_IRQ_BASE (PM8921_IRQ_BASE + PM8921_NR_IRQS)
29
David Collins75016742011-12-02 15:04:25 -080030extern struct pm8xxx_regulator_platform_data
Jay Chokshiea67c622011-07-29 17:12:26 -070031 msm8064_pm8921_regulator_pdata[] __devinitdata;
32
33extern int msm8064_pm8921_regulator_pdata_len __devinitdata;
Sahitya Tummala3586ed92011-08-03 09:13:23 +053034
Jay Chokshi7805b5a2011-11-07 15:55:30 -080035extern struct regulator_init_data msm8064_saw_regulator_pdata_8921_s5;
36extern struct regulator_init_data msm8064_saw_regulator_pdata_8921_s6;
37extern struct regulator_init_data msm8064_saw_regulator_pdata_8821_s0;
38extern struct regulator_init_data msm8064_saw_regulator_pdata_8821_s1;
39
Sahitya Tummala3586ed92011-08-03 09:13:23 +053040struct mmc_platform_data;
41int __init apq8064_add_sdcc(unsigned int controller,
42 struct mmc_platform_data *plat);
43
Stepan Moskovchenkoe438b632011-12-06 13:44:03 -080044void apq8064_init_mmc(void);
Stepan Moskovchenko2327a952011-12-14 16:31:28 -080045void apq8064_init_gpiomux(void);
Stepan Moskovchenkoc1074f02011-12-14 17:51:57 -080046void apq8064_init_pmic(void);
Jordan Crouseb3115fe2012-02-01 22:11:12 -070047
Kevin Chan412e9f92012-01-24 10:45:23 -080048extern struct msm_camera_board_info apq8064_camera_board_info;
49void apq8064_init_cam(void);
50#define APQ_8064_GSBI4_QUP_I2C_BUS_ID 4
Huaibin Yang4a084e32011-12-15 15:25:52 -080051
52void apq8064_init_fb(void);
53void apq8064_allocate_fb_region(void);
54void apq8064_mdp_writeback(struct memtype_reserve *reserve_table);
Jordan Crouseb3115fe2012-02-01 22:11:12 -070055
56void apq8064_init_gpu(void);
Jay Chokshie8741282012-01-25 15:22:55 -080057void apq8064_pm8xxx_gpio_mpp_init(void);
Jordan Crouseb3115fe2012-02-01 22:11:12 -070058
Jay Chokshiea67c622011-07-29 17:12:26 -070059#endif