diff options
author | Gerard Salvatella <gerard.salvatella@toradex.com> | 2018-08-31 09:47:44 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-09-13 14:06:50 +0200 |
commit | 5717b9a050a123d3e1eafa7c0883810847e74d2c (patch) | |
tree | 679d577c617588db0b29754a0a70619ec2dd895f | |
parent | 71c46c0c7531467a8387d3a686aef66397abd94c (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>
-rw-r--r-- | board/toradex/apalis-tk1/apalis-tk1.c | 9 | ||||
-rw-r--r-- | board/toradex/apalis_imx6/apalis_imx6.c | 9 | ||||
-rw-r--r-- | board/toradex/apalis_t30/apalis_t30.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri-imx6ull/colibri_imx6ull.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_imx6/colibri_imx6.c | 11 | ||||
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_t20/colibri_t20.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_t30/colibri_t30.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_vf/colibri_vf.c | 10 |
9 files changed, 82 insertions, 2 deletions
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c index a6a3897a75a..92ce1a95923 100644 --- a/board/toradex/apalis-tk1/apalis-tk1.c +++ b/board/toradex/apalis-tk1/apalis-tk1.c @@ -281,3 +281,12 @@ void start_cpu_fan(void) gpio_request(FAN_EN, "FAN_EN"); gpio_direction_output(FAN_EN, 1); } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(TEGRA_GPIO(BB, 5), "BL_ON"); + gpio_direction_output(TEGRA_GPIO(BB, 5), 0); +} diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 5ceecb352d3..e42d9bd2531 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) diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c index 7dcd6648e35..a03bc22ab5c 100644 --- a/board/toradex/apalis_t30/apalis_t30.c +++ b/board/toradex/apalis_t30/apalis_t30.c @@ -213,3 +213,12 @@ void tegra_pcie_board_port_reset(struct tegra_pcie_port *port) #endif /* CONFIG_APALIS_T30_PCIE_EVALBOARD_INIT */ } #endif /* CONFIG_PCI_TEGRA */ + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(TEGRA_GPIO(V, 2), "BKL1_ON"); + gpio_direction_output(TEGRA_GPIO(V, 2), 0); +} diff --git a/board/toradex/colibri-imx6ull/colibri_imx6ull.c b/board/toradex/colibri-imx6ull/colibri_imx6ull.c index b1558f0b726..cf9e90559db 100644 --- a/board/toradex/colibri-imx6ull/colibri_imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri_imx6ull.c @@ -166,6 +166,15 @@ static int setup_lcd(void) return 0; } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_direction_output(GPIO_PWM_A, 1); + gpio_direction_output(GPIO_BL_ON, 0); +} #endif #ifdef CONFIG_FEC_MXC diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 5a3678e506e..f97e292f010 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) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index ca28f1cc5d5..e9f81a53f57 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -188,6 +188,15 @@ static int setup_lcd(void) return 0; } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_direction_output(GPIO_PWM_A, 1); + gpio_direction_output(GPIO_BL_ON, 0); +} #endif #ifdef CONFIG_FEC_MXC diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c index 15ab2f586c1..67b21d67f65 100644 --- a/board/toradex/colibri_t20/colibri_t20.c +++ b/board/toradex/colibri_t20/colibri_t20.c @@ -232,4 +232,13 @@ void pin_mux_display(void) pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM); pinmux_tristate_disable(PMUX_PINGRP_SDC); } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(TEGRA_GPIO(T, 4), "BL_ON"); + gpio_direction_output(TEGRA_GPIO(T, 4), 0); +} #endif diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c index 7d07247d5ed..8d79e12e783 100644 --- a/board/toradex/colibri_t30/colibri_t30.c +++ b/board/toradex/colibri_t30/colibri_t30.c @@ -81,3 +81,12 @@ void pin_mux_usb(void) udelay(5); gpio_set_value(TEGRA_GPIO(DD, 0), 1); } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(TEGRA_GPIO(V, 2), "BL_ON"); + gpio_direction_output(TEGRA_GPIO(V, 2), 0); +} diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 02997e18a82..025eefc784a 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -42,6 +42,7 @@ DECLARE_GLOBAL_DATA_PTR; #define USB_PEN_GPIO 83 #define USB_CDET_GPIO 102 +#define PTC0_GPIO_45 45 static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { { DDRMC_CR79_CTLUPD_AREF(1), 79 }, @@ -650,3 +651,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); +} |