[PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
Francesco Dolcini
francesco at dolcini.it
Wed Nov 26 12:59:31 CET 2025
Hello Thomas,
thanks for your patch
On Wed, Nov 26, 2025 at 12:41:57AM +0100, Thomas Bonnefille wrote:
> This commit fixes the PWM<A> that was previously used as a GPIO output
> instead of a real PWM, it also reserve the framebuffer region to
> preserve the splash screen while the OS is booting.
>
> Signed-off-by: Thomas Bonnefille <thomas.bonnefille at bootlin.com>
>From a quick look it seems ok to me, however ...
> ---
> board/toradex/colibri_imx7/colibri_imx7.c | 40 +++++++++++++++++++++++--------
> 1 file changed, 30 insertions(+), 10 deletions(-)
>
> diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
> index 69a8a18d3a7..b5d22337a04 100644
> --- a/board/toradex/colibri_imx7/colibri_imx7.c
> +++ b/board/toradex/colibri_imx7/colibri_imx7.c
> @@ -7,6 +7,8 @@
> #include <env.h>
> #include <init.h>
> #include <net.h>
> +#include <fdt_simplefb.h>
> +#include <video.h>
> #include <asm/arch/clock.h>
> #include <asm/arch/crm_regs.h>
> #include <asm/arch/imx-regs.h>
> @@ -29,6 +31,7 @@
> #include <netdev.h>
> #include <power/pmic.h>
> #include <power/rn5t567_pmic.h>
> +#include <pwm.h>
> #include <usb.h>
> #include <usb/ehci-ci.h>
> #include "../common/tdx-common.h"
> @@ -114,7 +117,7 @@ static iomux_v3_cfg_t const backlight_pads[] = {
> /* Backlight On */
> MX7D_PAD_SD1_WP__GPIO5_IO1 | MUX_PAD_CTRL(NO_PAD_CTRL),
> /* Backlight PWM<A> (multiplexed pin) */
> - MX7D_PAD_GPIO1_IO08__GPIO1_IO8 | MUX_PAD_CTRL(NO_PAD_CTRL),
> + MX7D_PAD_GPIO1_IO08__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL),
> MX7D_PAD_ECSPI2_MOSI__GPIO4_IO21 | MUX_PAD_CTRL(NO_PAD_CTRL),
> };
>
> @@ -123,6 +126,8 @@ static iomux_v3_cfg_t const backlight_pads[] = {
>
> static int setup_lcd(void)
> {
> + int ret = 0;
> +
> imx_iomux_v3_setup_multiple_pads(backlight_pads, ARRAY_SIZE(backlight_pads));
>
> /* Set BL_ON */
> @@ -130,10 +135,14 @@ static int setup_lcd(void)
> gpio_direction_output(GPIO_BL_ON, 1);
>
> /* Set PWM<A> to full brightness (assuming inversed polarity) */
> - gpio_request(GPIO_PWM_A, "PWM<A>");
> - gpio_direction_output(GPIO_PWM_A, 0);
> -
> - return 0;
> + enable_pwm_clk(1, 0);
> + ret = pwm_init(0, 0, 0);
> + if (ret)
> + return ret;
> + ret = pwm_config(0, 0, 6666666);
You are setting a period here for the PWM backlight (150Hz?),
considering that colibri imx7 is a SoM, e.g. there is no actual display
part of it, is this number generic enough?
Francesco
More information about the U-Boot
mailing list