summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx7/colibri_imx7.c
diff options
context:
space:
mode:
authorGerard Salvatella <gerard.salvatella@toradex.com>2018-11-19 15:54:10 +0100
committerTom Warren <twarren@nvidia.com>2019-02-20 09:01:45 -0700
commita3c9021771608f5b514c75874fa0d8fbee2873d6 (patch)
treede9dd8d381fdcecc7c8be000b7edc8782febcad1 /board/toradex/colibri_imx7/colibri_imx7.c
parent146680003a776d9217d6d351ca4186f416a77226 (diff)
board: toradex: turn off lcd backlight before OS handover
U-Boot typically tears down the display controller before handing control over to Linux. On LCD displays disabling pixel clock leads to a fading out effect with vertical/horizontal lines. Make sure to disable back light before booting Linux. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'board/toradex/colibri_imx7/colibri_imx7.c')
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 392fda92da..61bf8bfd58 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -150,6 +150,15 @@ static int setup_lcd(void)
}
#endif
+/*
+ * Backlight off before OS handover
+ */
+void board_preboot_os(void)
+{
+ gpio_direction_output(GPIO_PWM_A, 1);
+ gpio_direction_output(GPIO_BL_ON, 0);
+}
+
#ifdef CONFIG_FEC_MXC
static iomux_v3_cfg_t const fec1_pads[] = {
#ifndef CONFIG_COLIBRI_IMX7_EXT_PHYCLK