summaryrefslogtreecommitdiff
path: root/board/toradex/apalis_imx6/apalis_imx6.c
diff options
context:
space:
mode:
authorGerard Salvatella <gerard.salvatella@toradex.com>2018-08-31 09:47:44 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-09-13 14:06:50 +0200
commit5717b9a050a123d3e1eafa7c0883810847e74d2c (patch)
tree679d577c617588db0b29754a0a70619ec2dd895f /board/toradex/apalis_imx6/apalis_imx6.c
parent71c46c0c7531467a8387d3a686aef66397abd94c (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> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board/toradex/apalis_imx6/apalis_imx6.c')
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 5ceecb352d..e42d9bd253 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -756,6 +756,15 @@ static void setup_display(void)
gpio_direction_output(RGB_BACKLIGHTPWM_OE, 0);
gpio_direction_output(RGB_BACKLIGHT_GP, 1);
}
+
+/*
+ * Backlight off before OS handover
+ */
+void board_preboot_os(void)
+{
+ gpio_direction_output(RGB_BACKLIGHTPWM_GP, 1);
+ gpio_direction_output(RGB_BACKLIGHT_GP, 0);
+}
#endif /* defined(CONFIG_VIDEO_IPUV3) */
int board_early_init_f(void)