diff options
author | Rakesh Iyer <riyer@nvidia.com> | 2012-09-26 11:35:45 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-10-26 16:58:18 -0700 |
commit | e74b0efefcef78b0fc7d164447291eecd3fb75c3 (patch) | |
tree | b9a19aced91024ee2843b4758e58f9ee9250fd35 | |
parent | 03c75193e53c552d934b39ede464a919df9ede5b (diff) |
video: tegra: dsi: set dsib clock source to pll_d
Program dsib clock source to pll_d. Add mechanism for panels to be reset
during command sequences.
Change-Id: Ia426d7ae0f5f849911f1da705f9634988d874cae
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/139116
(cherry picked from commit 7e95c6c88e89865de973b5a6bd2b25e5a69d27b6)
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/147610
Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r-- | arch/arm/mach-tegra/include/mach/dc.h | 8 | ||||
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 15 |
2 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h index f44780a696cd..1268394e79d0 100644 --- a/arch/arm/mach-tegra/include/mach/dc.h +++ b/arch/arm/mach-tegra/include/mach/dc.h @@ -80,6 +80,7 @@ enum { enum { TEGRA_DSI_PACKET_CMD, TEGRA_DSI_DELAY_MS, + TEGRA_DSI_GPIO_SET, }; struct tegra_dsi_cmd { @@ -88,6 +89,7 @@ struct tegra_dsi_cmd { union { u16 data_len; u16 delay_ms; + unsigned gpio; struct { u8 data0; u8 data1; @@ -120,6 +122,12 @@ struct tegra_dsi_cmd { .sp_len_dly.delay_ms = ms, \ } +#define DSI_GPIO_SET(rst_gpio, on) { \ + .cmd_type = TEGRA_DSI_GPIO_SET, \ + .data_id = on, \ + .sp_len_dly.gpio = rst_gpio, \ + } + #define DSI_CMD_LONG(di, ptr) { \ .cmd_type = TEGRA_DSI_PACKET_CMD, \ .data_id = di, \ diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 20b449cfe3c3..a05bd5a1329a 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c @@ -2562,9 +2562,15 @@ static int tegra_dsi_send_panel_cmd(struct tegra_dc *dc, struct tegra_dsi_cmd *cur_cmd; cur_cmd = &cmd[i]; - if (cur_cmd->cmd_type == TEGRA_DSI_DELAY_MS) + /* + * Some Panels need reset midway in the command sequence. + */ + if (cur_cmd->cmd_type == TEGRA_DSI_GPIO_SET) { + gpio_set_value(cur_cmd->sp_len_dly.gpio, + cur_cmd->data_id); + } else if (cur_cmd->cmd_type == TEGRA_DSI_DELAY_MS) { mdelay(cur_cmd->sp_len_dly.delay_ms); - else { + } else { err = tegra_dsi_write_data(dc, dsi, cur_cmd->pdata, cur_cmd->data_id, @@ -3479,7 +3485,10 @@ static int _tegra_dc_dsi_init(struct tegra_dc *dc) int err = 0; int dsi_enum = -1; - dsi_enum = tegra_dsi_get_enumeration(); + if (dc->pdata->default_out->dsi->dsi_instance) + dsi_enum = 1; + else + dsi_enum = tegra_dsi_get_enumeration(); if (dsi_enum < 0) { err = -EINVAL; dev_err(&dc->ndev->dev, "dsi: invalid enum retured\n"); |