From a3c9021771608f5b514c75874fa0d8fbee2873d6 Mon Sep 17 00:00:00 2001 From: Gerard Salvatella Date: Mon, 19 Nov 2018 15:54:10 +0100 Subject: 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 Signed-off-by: Philippe Schenker Signed-off-by: Tom Warren --- board/toradex/colibri_vf/colibri_vf.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'board/toradex/colibri_vf') diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 19cf748c5d6..79f702f2bf1 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -38,8 +38,9 @@ DECLARE_GLOBAL_DATA_PTR; #define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \ PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE) -#define USB_PEN_GPIO 83 +#define USB_PEN_GPIO 83 #define USB_CDET_GPIO 102 +#define PTC0_GPIO_45 45 static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { /* AXI */ @@ -632,3 +633,12 @@ int board_usb_phy_mode(int port) } } #endif + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(PTC0_GPIO_45, "BL_ON"); + gpio_direction_output(PTC0_GPIO_45, 0); +} -- cgit v1.2.3