summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorErik Lilliebjerg <elilliebjerg@nvidia.com>2012-01-06 19:59:50 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-16 09:04:59 -0800
commit6759a2fd2b74e7548d65eb23510568e9b2ec3552 (patch)
tree82874137eebded38ce6a48c85352ab7310ea1285 /arch/arm
parent606723d6205008300778abd4e5e2c2f3e49247c7 (diff)
arm: tegra: cardhu: pm269 board support for sh532u
Add PM269 board support for sh532u focuser by adding regulator defines and the PM269 reset GPIO's. Bug 923072 Change-Id: Ic042d2c9c2cf78a38a1b72fab2db0289fb1d9909 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/73877 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Reviewed-on: http://git-master/r/75146 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c7
-rw-r--r--arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c7
-rw-r--r--arch/arm/mach-tegra/board-cardhu-sensors.c59
3 files changed, 63 insertions, 10 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c b/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c
index d1ad617b64df..50e10fc69364 100644
--- a/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c
+++ b/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c
@@ -486,14 +486,14 @@ static int gpio_switch_en_vdd_pnl1_voltages[] = { 3300};
/* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
static struct regulator_consumer_supply gpio_switch_cam1_ldo_en_supply[] = {
REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
- REGULATOR_SUPPLY("vdd_2v8_cam1_af", NULL),
+ REGULATOR_SUPPLY("vdd", "6-0072"),
};
static int gpio_switch_cam1_ldo_en_voltages[] = { 2800};
/* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
static struct regulator_consumer_supply gpio_switch_cam2_ldo_en_supply[] = {
REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
- REGULATOR_SUPPLY("vdd_2v8_cam2_af", NULL),
+ REGULATOR_SUPPLY("vdd", "7-0072"),
};
static int gpio_switch_cam2_ldo_en_voltages[] = { 2800};
@@ -538,6 +538,9 @@ static struct regulator_consumer_supply gpio_switch_en_1v8_cam_supply[] = {
REGULATOR_SUPPLY("vdd_1v8_cam1", NULL),
REGULATOR_SUPPLY("vdd_1v8_cam2", NULL),
REGULATOR_SUPPLY("vdd_1v8_cam3", NULL),
+ REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
+ REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+ REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
};
static int gpio_switch_en_1v8_cam_voltages[] = { 1800};
diff --git a/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c b/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c
index 76f358cabee5..0b79534a0522 100644
--- a/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c
+++ b/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c
@@ -473,14 +473,14 @@ static int gpio_switch_en_vdd_pnl1_voltages[] = { 3300};
/* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
static struct regulator_consumer_supply gpio_switch_cam1_ldo_en_supply[] = {
REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
- REGULATOR_SUPPLY("vdd_2v8_cam1_af", NULL),
+ REGULATOR_SUPPLY("vdd", "6-0072"),
};
static int gpio_switch_cam1_ldo_en_voltages[] = { 2800};
/* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
static struct regulator_consumer_supply gpio_switch_cam2_ldo_en_supply[] = {
REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
- REGULATOR_SUPPLY("vdd_2v8_cam2_af", NULL),
+ REGULATOR_SUPPLY("vdd", "7-0072"),
};
static int gpio_switch_cam2_ldo_en_voltages[] = { 2800};
@@ -525,6 +525,9 @@ static struct regulator_consumer_supply gpio_switch_en_1v8_cam_supply[] = {
REGULATOR_SUPPLY("vdd_1v8_cam1", NULL),
REGULATOR_SUPPLY("vdd_1v8_cam2", NULL),
REGULATOR_SUPPLY("vdd_1v8_cam3", NULL),
+ REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
+ REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+ REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
};
static int gpio_switch_en_1v8_cam_voltages[] = { 1800};
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c
index e464ffe32aa1..c96933760bf9 100644
--- a/arch/arm/mach-tegra/board-cardhu-sensors.c
+++ b/arch/arm/mach-tegra/board-cardhu-sensors.c
@@ -485,6 +485,20 @@ static struct sh532u_platform_data sh532u_right_pdata = {
.gpio_reset = TEGRA_GPIO_PBB0,
};
+static struct sh532u_platform_data pm269_sh532u_left_pdata = {
+ .num = 1,
+ .sync = 2,
+ .dev_name = "focuser",
+ .gpio_reset = CAM1_RST_L_GPIO,
+};
+
+static struct sh532u_platform_data pm269_sh532u_right_pdata = {
+ .num = 2,
+ .sync = 1,
+ .dev_name = "focuser",
+ .gpio_reset = CAM2_RST_L_GPIO,
+};
+
static struct nvc_torch_pin_state cardhu_tps61050_pinstate = {
.mask = 0x0008, /*VGP3*/
.values = 0x0008,
@@ -524,6 +538,28 @@ static struct i2c_board_info cardhu_i2c7_board_info[] = {
},
};
+static struct i2c_board_info pm269_i2c6_board_info[] = {
+ {
+ I2C_BOARD_INFO("ov5650L", 0x36),
+ .platform_data = &cardhu_left_ov5650_data,
+ },
+ {
+ I2C_BOARD_INFO("sh532u", 0x72),
+ .platform_data = &pm269_sh532u_left_pdata,
+ },
+};
+
+static struct i2c_board_info pm269_i2c7_board_info[] = {
+ {
+ I2C_BOARD_INFO("ov5650R", 0x36),
+ .platform_data = &cardhu_right_ov5650_data,
+ },
+ {
+ I2C_BOARD_INFO("sh532u", 0x72),
+ .platform_data = &pm269_sh532u_right_pdata,
+ },
+};
+
static struct i2c_board_info cardhu_i2c8_board_info[] = {
{
I2C_BOARD_INFO("ov2710", 0x36),
@@ -835,12 +871,23 @@ int __init cardhu_sensors_init(void)
#else
/* Left camera is on PCA954x's I2C BUS0, Right camera is on BUS1 &
* Front camera is on BUS2 */
- i2c_register_board_info(PCA954x_I2C_BUS0, cardhu_i2c6_board_info,
- ARRAY_SIZE(cardhu_i2c6_board_info));
-
- i2c_register_board_info(PCA954x_I2C_BUS1, cardhu_i2c7_board_info,
- ARRAY_SIZE(cardhu_i2c7_board_info));
-
+ if (board_info.board_id != BOARD_PM269) {
+ i2c_register_board_info(PCA954x_I2C_BUS0,
+ cardhu_i2c6_board_info,
+ ARRAY_SIZE(cardhu_i2c6_board_info));
+
+ i2c_register_board_info(PCA954x_I2C_BUS1,
+ cardhu_i2c7_board_info,
+ ARRAY_SIZE(cardhu_i2c7_board_info));
+ } else {
+ i2c_register_board_info(PCA954x_I2C_BUS0,
+ pm269_i2c6_board_info,
+ ARRAY_SIZE(pm269_i2c6_board_info));
+
+ i2c_register_board_info(PCA954x_I2C_BUS1,
+ pm269_i2c7_board_info,
+ ARRAY_SIZE(pm269_i2c7_board_info));
+ }
i2c_register_board_info(PCA954x_I2C_BUS2, cardhu_i2c8_board_info,
ARRAY_SIZE(cardhu_i2c8_board_info));