Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 2 | * |
| 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_9615_H |
| 14 | #define __ARCH_ARM_MACH_MSM_BOARD_9615_H |
| 15 | |
| 16 | #include <mach/irqs.h> |
| 17 | #include <linux/mfd/pm8xxx/pm8018.h> |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 18 | #include <linux/regulator/msm-gpio-regulator.h> |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 19 | |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 20 | /* |
| 21 | * MDM9x15 I2S. |
| 22 | */ |
| 23 | #ifdef CONFIG_I2C |
| 24 | #define I2C_SURF 1 |
| 25 | #define I2C_FFA (1 << 1) |
| 26 | #define I2C_RUMI (1 << 2) |
| 27 | #define I2C_SIM (1 << 3) |
| 28 | #define I2C_FLUID (1 << 4) |
| 29 | #define I2C_LIQUID (1 << 5) |
| 30 | |
| 31 | struct i2c_registry { |
| 32 | u8 machs; |
| 33 | int bus; |
| 34 | struct i2c_board_info *info; |
| 35 | int len; |
| 36 | }; |
| 37 | #endif |
| 38 | /* Tabla slave address for I2C */ |
| 39 | #define TABLA_I2C_SLAVE_ADDR 0x0d |
| 40 | #define TABLA_ANALOG_I2C_SLAVE_ADDR 0x77 |
| 41 | #define TABLA_DIGITAL1_I2C_SLAVE_ADDR 0x66 |
| 42 | #define TABLA_DIGITAL2_I2C_SLAVE_ADDR 0x55 |
| 43 | #define MSM_9615_GSBI5_QUP_I2C_BUS_ID 0 |
| 44 | /* |
| 45 | * MDM9x15 I2S. |
| 46 | */ |
| 47 | |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 48 | /* Macros assume PMIC GPIOs and MPPs start at 1 */ |
| 49 | #define PM8018_GPIO_BASE NR_GPIO_IRQS |
| 50 | #define PM8018_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8018_GPIO_BASE) |
| 51 | #define PM8018_MPP_BASE (PM8018_GPIO_BASE + PM8018_NR_GPIOS) |
| 52 | #define PM8018_MPP_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8018_MPP_BASE) |
| 53 | #define PM8018_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS) |
| 54 | #define PM8018_MPP_IRQ_BASE (PM8018_IRQ_BASE + NR_GPIO_IRQS) |
| 55 | |
David Collins | 8c695c5 | 2011-12-12 15:46:02 -0800 | [diff] [blame] | 56 | extern struct pm8xxx_regulator_platform_data |
David Collins | 00b31e6 | 2011-08-31 20:00:10 -0700 | [diff] [blame] | 57 | msm_pm8018_regulator_pdata[] __devinitdata; |
| 58 | |
| 59 | extern int msm_pm8018_regulator_pdata_len __devinitdata; |
| 60 | |
David Collins | bea297a | 2011-09-28 13:11:14 -0700 | [diff] [blame] | 61 | extern struct rpm_regulator_platform_data |
| 62 | msm_rpm_regulator_9615_pdata __devinitdata; |
| 63 | |
David Collins | 0f9942a | 2011-10-31 09:47:34 -0700 | [diff] [blame] | 64 | #define GPIO_VREG_ID_EXT_2P95V 0 |
| 65 | |
| 66 | extern struct gpio_regulator_platform_data msm_gpio_regulator_pdata[]; |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 67 | uint32_t msm9615_rpm_get_swfi_latency(void); |
Rohit Vaswani | a681589 | 2011-12-15 20:20:39 -0800 | [diff] [blame] | 68 | int msm9615_init_gpiomux(void); |
Rohit Vaswani | e9a1ae3 | 2011-12-15 20:26:47 -0800 | [diff] [blame] | 69 | void msm9615_init_mmc(void); |
Zhang Chang Ken | a48794b | 2012-03-31 17:45:21 -0400 | [diff] [blame] | 70 | void mdm9615_allocate_fb_region(void); |
| 71 | void mdm9615_init_fb(void); |
David Collins | fb88c43 | 2011-08-25 15:12:47 -0700 | [diff] [blame] | 72 | #endif |