diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2023-01-16 22:04:57 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2023-01-30 22:59:09 +0300 |
commit | 717783ecdcb19534f8d34baaf5cb2b9e415fdf23 (patch) | |
tree | 1a56339b75a3e7b4c2da293eae43734311275d23 /board/toradex | |
parent | fe7b2b322ec49ab3c78494054f15e23ad5256fc9 (diff) | |
download | u-boot-717783ecdcb19534f8d34baaf5cb2b9e415fdf23.tar.xz |
apalis-imx8: 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 GPIO Apalis BKL1 before booting Linux.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Diffstat (limited to 'board/toradex')
-rw-r--r-- | board/toradex/apalis-imx8/apalis-imx8.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 6f28367cf0..1622900bd1 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -182,9 +182,18 @@ int board_early_init_f(void) } #if CONFIG_IS_ENABLED(DM_GPIO) + +#define BKL1_GPIO IMX_GPIO_NR(1, 10) + +static iomux_cfg_t board_gpios[] = { + SC_P_LVDS1_GPIO00 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(GPIO_PAD_CTRL), +}; + static void board_gpio_init(void) { - /* TODO */ + imx8_iomux_setup_multiple_pads(board_gpios, ARRAY_SIZE(board_gpios)); + + gpio_request(BKL1_GPIO, "BKL1_GPIO"); } #else static inline void board_gpio_init(void) {} @@ -202,6 +211,14 @@ int board_phy_config(struct phy_device *phydev) } #endif +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_direction_output(BKL1_GPIO, 0); +} + int checkboard(void) { puts("Model: Toradex Apalis iMX8\n"); |