summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana-panel.c
diff options
context:
space:
mode:
authorRenuka Apte <rapte@nvidia.com>2010-11-30 16:14:56 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:06 -0800
commitcfa44e5529cadaedacb73d50b547b04672c7f393 (patch)
treee9c8a6f9674d0b618d352e5fc88190e74d31b34d /arch/arm/mach-tegra/board-ventana-panel.c
parent3d4c6b1cd5438d1fc58348ade4c68a2b2e6bbc7c (diff)
tegra: ventana: Enable HDMI in board file
Note: The current mirroring mode seems to require both the internal and external panel to be set at 1280X720. Since ventana uses 1366X768, the HDMI monitor shows corruption. Original-Change-Id: Iec0ce9fd92d6cd7050e881a1af6fa7e1ace92280 Reviewed-on: http://git-master/r/11655 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R46aa4ae04a2380bded8643c955551b4925fef0ca
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c39
1 files changed, 33 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index f3e75e25bf6b..b2f61b323e27 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -40,6 +40,10 @@
#define ventana_hdmi_hpd TEGRA_GPIO_PN7
#define ventana_hdmi_enb TEGRA_GPIO_PV5
+static struct regulator *ventana_hdmi_reg = NULL;
+static struct regulator *ventana_hdmi_pll = NULL;
+
+
static int ventana_backlight_init(struct device *dev) {
int ret;
@@ -112,12 +116,35 @@ static int ventana_panel_disable(void)
static int ventana_hdmi_enable(void)
{
gpio_set_value(ventana_hdmi_enb, 1);
+ if (!ventana_hdmi_reg) {
+ ventana_hdmi_reg = regulator_get(NULL, "avdd_hdmi"); /* LD07 */
+ if (IS_ERR_OR_NULL(ventana_hdmi_reg)) {
+ pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
+ ventana_hdmi_reg = NULL;
+ return PTR_ERR(ventana_hdmi_reg);
+ }
+ }
+ regulator_enable(ventana_hdmi_reg);
+
+ if (!ventana_hdmi_pll) {
+ ventana_hdmi_pll = regulator_get(NULL, "avdd_hdmi_pll"); /* LD08 */
+ if (IS_ERR_OR_NULL(ventana_hdmi_pll)) {
+ pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
+ ventana_hdmi_pll = NULL;
+ regulator_disable(ventana_hdmi_reg);
+ ventana_hdmi_reg = NULL;
+ return PTR_ERR(ventana_hdmi_pll);
+ }
+ }
+ regulator_enable(ventana_hdmi_pll);
return 0;
}
static int ventana_hdmi_disable(void)
{
gpio_set_value(ventana_hdmi_enb, 0);
+ regulator_disable(ventana_hdmi_reg);
+ regulator_disable(ventana_hdmi_pll);
return 0;
}
@@ -194,8 +221,8 @@ static struct tegra_fb_data ventana_fb_data = {
static struct tegra_fb_data ventana_hdmi_fb_data = {
.win = 0,
- .xres = 1280,
- .yres = 720,
+ .xres = 1366,
+ .yres = 768,
.bits_per_pixel = 16,
};
@@ -233,7 +260,7 @@ static struct tegra_dc_platform_data ventana_disp1_pdata = {
};
static struct tegra_dc_platform_data ventana_disp2_pdata = {
- .flags = TEGRA_DC_FLAG_ENABLED,
+ .flags = 0,
.default_out = &ventana_disp2_out,
.fb = &ventana_hdmi_fb_data,
};
@@ -303,13 +330,13 @@ int __init ventana_panel_init(void)
gpio_direction_output(ventana_lvds_shutdown, 1);
tegra_gpio_enable(ventana_lvds_shutdown);
- gpio_request(ventana_hdmi_enb, "hdmi_5v_en");
- gpio_direction_output(ventana_hdmi_enb, 0);
tegra_gpio_enable(ventana_hdmi_enb);
+ gpio_request(ventana_hdmi_enb, "hdmi_5v_en");
+ gpio_direction_output(ventana_hdmi_enb, 1);
+ tegra_gpio_enable(ventana_hdmi_hpd);
gpio_request(ventana_hdmi_hpd, "hdmi_hpd");
gpio_direction_input(ventana_hdmi_hpd);
- tegra_gpio_enable(ventana_hdmi_hpd);
err = platform_add_devices(ventana_gfx_devices,
ARRAY_SIZE(ventana_gfx_devices));