summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx6/colibri_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/colibri_imx6/colibri_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/colibri_imx6/colibri_imx6.c')
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 5a3678e506..f97e292f01 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -507,8 +507,6 @@ static void enable_rgb(struct display_info_t const *dev)
imx_iomux_v3_setup_multiple_pads(
rgb_pads,
ARRAY_SIZE(rgb_pads));
- gpio_direction_output(RGB_BACKLIGHT_GP, 1);
- gpio_direction_output(RGB_BACKLIGHTPWM_GP, 0);
}
static int detect_default(struct display_info_t const *dev)
@@ -634,6 +632,15 @@ static void setup_display(void)
gpio_direction_output(RGB_BACKLIGHTPWM_GP, 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)