summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu-panel.c
diff options
context:
space:
mode:
authorankishore <ankishore@nvidia.com>2011-03-23 12:01:34 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:54:14 -0700
commit0ad35d6a01afb8c458259f312dcaf17b50e8c3f9 (patch)
tree71f3ae30048c19993fbe16f9524dd079c8e4251d /arch/arm/mach-tegra/board-cardhu-panel.c
parent6e6e2be7d2155e9a863c51fd0a2bbee683db6361 (diff)
arm: tegra: cardhu: Dsi 2nd instance support in board panel file
Adding support for dsi second instance in board panel file Original-Change-Id: I6c2e9f07aa8b185c5cea6ce27632bdcbb3e95fd1 Reviewed-on: http://git-master/r/22624 Reviewed-by: Animesh Kishore <ankishore@nvidia.com> Tested-by: Animesh Kishore <ankishore@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Iadf50148e14ec20e82c37219e8c79a59a836cb14
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index 367bd92fdda0..0d0e54eff009 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -44,6 +44,7 @@
#define DSI_PANEL_219 0
#define DSI_PANEL_218 1
#define AVDD_LCD PMU_TCA6416_GPIO_PORT17
+#define DSI_PANEL_RESET 1
#endif
#define cardhu_lvds_shutdown TEGRA_GPIO_PL2
@@ -83,7 +84,7 @@ static int cardhu_backlight_init(struct device *dev) {
else
tegra_gpio_enable(cardhu_bl_enb);
#else
- #if DSI_PANEL_219
+ #if DSI_PANEL_219 || DSI_PANEL_218
/* Enable back light for DSIa panel */
printk("cardhu_dsi_backlight_init\n");
ret = gpio_request(cardhu_dsia_bl_enb, "dsia_bl_enable");
@@ -120,7 +121,7 @@ static void cardhu_backlight_exit(struct device *dev) {
gpio_free(cardhu_bl_enb);
tegra_gpio_disable(cardhu_bl_enb);
#else
- #if DSI_PANEL_219
+ #if DSI_PANEL_219 || DSI_PANEL_218
/* Disable back light for DSIa panel */
gpio_set_value(cardhu_dsia_bl_enb, 0);
gpio_free(cardhu_dsia_bl_enb);
@@ -147,7 +148,7 @@ static int cardhu_backlight_notify(struct device *unused, int brightness)
gpio_request(cardhu_bl_enb, "backlight_enb");
gpio_set_value(cardhu_bl_enb, !!brightness);
#else
- #if DSI_PANEL_219
+ #if DSI_PANEL_219 || DSI_PANEL_218
/* DSIa */
gpio_set_value(cardhu_dsia_bl_enb, !!brightness);
@@ -321,6 +322,14 @@ static struct resource cardhu_disp1_resources[] = {
.flags = IORESOURCE_MEM,
},
#ifdef CONFIG_TEGRA_CARDHU_DSI
+#ifdef CONFIG_TEGRA_DSI_INSTANCE_1
+ {
+ .name = "dsi_regs",
+ .start = TEGRA_DSIB_BASE,
+ .end = TEGRA_DSIB_BASE + TEGRA_DSIB_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+#else
{
.name = "dsi_regs",
.start = TEGRA_DSI_BASE,
@@ -328,6 +337,7 @@ static struct resource cardhu_disp1_resources[] = {
.flags = IORESOURCE_MEM,
},
#endif
+#endif
};
static struct resource cardhu_disp2_resources[] = {
@@ -531,6 +541,7 @@ static int cardhu_dsi_panel_enable(void)
else
tegra_gpio_enable(AVDD_LCD);
+#if DSI_PANEL_RESET
ret = gpio_request(TEGRA_GPIO_PD2, "pd2");
if (ret < 0){
return ret;
@@ -549,6 +560,7 @@ static int cardhu_dsi_panel_enable(void)
gpio_set_value(TEGRA_GPIO_PD2, 1);
mdelay(2);
#endif
+#endif
return 0;
}
@@ -572,7 +584,11 @@ struct tegra_dsi_out cardhu_dsi = {
.virtual_channel = TEGRA_DSI_VIRTUAL_CHANNEL_0,
.panel_has_frame_buffer = true,
-
+#ifdef CONFIG_TEGRA_DSI_INSTANCE_1
+ .dsi_instance = 1,
+#else
+ .dsi_instance = 0,
+#endif
.n_init_cmd = ARRAY_SIZE(dsi_init_cmd),
.dsi_init_cmd = dsi_init_cmd,
@@ -598,7 +614,7 @@ static struct tegra_dc_mode cardhu_dsi_modes[] = {
#if DSI_PANEL_218
{
- .pclk = 48000000,
+ .pclk = 323000000,
.h_ref_to_sync = 11,
.v_ref_to_sync = 1,
.h_sync_width = 16,