Merge "msm: camera: Enable clock and gpio for camera on 8x26"

This commit is contained in:
Linux Build Service Account
2013-03-25 04:54:18 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 114 additions and 2 deletions
+110
View File
@@ -288,6 +288,115 @@ static struct msm_gpiomux_config wcnss_5wire_interface[] = {
},
},
};
static struct gpiomux_setting gpio_suspend_config[] = {
{
.func = GPIOMUX_FUNC_GPIO, /* IN-NP */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_NONE,
},
{
.func = GPIOMUX_FUNC_GPIO, /* O-LOW */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_NONE,
.dir = GPIOMUX_OUT_LOW,
},
};
static struct gpiomux_setting cam_settings[] = {
{
.func = GPIOMUX_FUNC_1, /*active 1*/ /* 0 */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_NONE,
},
{
.func = GPIOMUX_FUNC_1, /*suspend*/ /* 1 */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_DOWN,
},
{
.func = GPIOMUX_FUNC_1, /*i2c suspend*/ /* 2 */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_KEEPER,
},
{
.func = GPIOMUX_FUNC_GPIO, /*active 0*/ /* 3 */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_NONE,
},
{
.func = GPIOMUX_FUNC_GPIO, /*suspend 0*/ /* 4 */
.drv = GPIOMUX_DRV_2MA,
.pull = GPIOMUX_PULL_DOWN,
},
};
static struct msm_gpiomux_config msm_sensor_configs[] __initdata = {
{
.gpio = 26, /* CAM_MCLK0 */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[0],
[GPIOMUX_SUSPENDED] = &cam_settings[1],
},
},
{
.gpio = 27, /* CAM_MCLK1 */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[0],
[GPIOMUX_SUSPENDED] = &cam_settings[1],
},
},
{
.gpio = 29, /* CCI_I2C_SDA0 */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[0],
[GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
},
},
{
.gpio = 30, /* CCI_I2C_SCL0 */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[0],
[GPIOMUX_SUSPENDED] = &gpio_suspend_config[0],
},
},
{
.gpio = 36, /* CAM1_STANDBY_N */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[3],
[GPIOMUX_SUSPENDED] = &cam_settings[4],
},
},
{
.gpio = 37, /* CAM1_RST_N */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[3],
[GPIOMUX_SUSPENDED] = &cam_settings[4],
},
},
{
.gpio = 35, /* CAM2_STANDBY_N */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[3],
[GPIOMUX_SUSPENDED] = &cam_settings[4],
},
},
{
.gpio = 28, /* CAM2_RST_N */
.settings = {
[GPIOMUX_ACTIVE] = &cam_settings[3],
[GPIOMUX_SUSPENDED] = &cam_settings[4],
},
},
};
void __init msm8226_init_gpiomux(void)
{
int rc;
@@ -313,4 +422,5 @@ void __init msm8226_init_gpiomux(void)
ARRAY_SIZE(msm_synaptics_configs));
msm_gpiomux_install_nowrite(msm_lcd_configs,
ARRAY_SIZE(msm_lcd_configs));
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
}
+4 -2
View File
@@ -3261,10 +3261,12 @@ static struct clk_lookup msm_clocks_8226[] = {
CLK_LOOKUP("core_clk", mdss_axi_clk.c, "fd928000.qcom,iommu"),
/* MM sensor clocks */
CLK_LOOKUP("cam_src_clk", mclk0_clk_src.c, "6e.qcom,camera"),
CLK_LOOKUP("cam_src_clk", mclk0_clk_src.c, "6f.qcom,camera"),
CLK_LOOKUP("cam_src_clk", mclk1_clk_src.c, "90.qcom,camera"),
CLK_LOOKUP("cam_clk", camss_mclk0_clk.c, "6e.qcom,camera"),
CLK_LOOKUP("cam_src_clk", mclk0_clk_src.c, "6d.qcom,camera"),
CLK_LOOKUP("cam_clk", camss_mclk0_clk.c, "6f.qcom,camera"),
CLK_LOOKUP("cam_clk", camss_mclk1_clk.c, "90.qcom,camera"),
CLK_LOOKUP("cam_clk", camss_mclk0_clk.c, "6d.qcom,camera"),
/* CCI clocks */
CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c,