summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2015-01-12 18:02:11 +0800
committerHans de Goede <hdegoede@redhat.com>2015-01-14 14:56:40 +0100
commit507e27dfc9d6e1d196925dfd32409661cade45c0 (patch)
tree810835d8e46544caceaf44e745259cab4540a9f0 /drivers
parent2583d5b192fd31449abc74d239c149e02396926b (diff)
downloadu-boot-imx-507e27dfc9d6e1d196925dfd32409661cade45c0.zip
u-boot-imx-507e27dfc9d6e1d196925dfd32409661cade45c0.tar.gz
u-boot-imx-507e27dfc9d6e1d196925dfd32409661cade45c0.tar.bz2
sunxi: video: Add support for external DAC enable pin
The external DAC for VGA output might have either a power or reset control pin that needs to be pulled up, as is the case on the Hummingbird A31. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sunxi_display.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
index 47d820d..d92dfa8 100644
--- a/drivers/video/sunxi_display.c
+++ b/drivers/video/sunxi_display.c
@@ -813,6 +813,19 @@ static void sunxi_drc_init(void)
#endif
}
+#ifdef CONFIG_VIDEO_VGA_VIA_LCD
+static void sunxi_vga_external_dac_enable(void)
+{
+ int pin;
+
+ pin = sunxi_name_to_gpio(CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN);
+ if (pin != -1) {
+ gpio_request(pin, "vga_enable");
+ gpio_direction_output(pin, 1);
+ }
+}
+#endif /* CONFIG_VIDEO_VGA_VIA_LCD */
+
static void sunxi_engines_init(void)
{
sunxi_composer_init();
@@ -860,6 +873,7 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,
sunxi_lcdc_tcon0_mode_set(mode);
sunxi_composer_enable();
sunxi_lcdc_enable();
+ sunxi_vga_external_dac_enable();
#endif
break;
}