* [PATCH 0/5] i.MX7 Splash Screen and PWM fixes
@ 2025-11-25 23:41 Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video Thomas Bonnefille
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
This series adds support for the PWM functions of the i.MX7 SoC, it also
allows a splash screen to stay when booting the OS by letting the video
driver up when the OS is started.
---
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
Thomas Bonnefille (5):
drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video
arm: include: imx7: rename PWM registers to match driver name
mx7: clock: add pwm enabling clock function
pwm: imx: allow i.MX7 to use PWM3 and PWM4
board: toradex: add splash screen to Toradex i.MX7D Colibri board
arch/arm/include/asm/arch-mx7/clock.h | 3 +++
arch/arm/include/asm/arch-mx7/imx-regs.h | 25 +++++++++++++++----
arch/arm/mach-imx/mx7/clock.c | 29 ++++++++++++++++++++++
board/toradex/colibri_imx7/colibri_imx7.c | 40 +++++++++++++++++++++++--------
drivers/pwm/pwm-imx.c | 2 +-
drivers/video/mxsfb.c | 6 +++--
6 files changed, 88 insertions(+), 17 deletions(-)
---
base-commit: 020688fb85624ce7fb01dbf412f9ecfacc9ef8d3
change-id: 20251006-repair_imx7_splash-2a3f5812ee33
Best regards,
--
Thomas Bonnefille <thomas.bonnefille@bootlin.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
@ 2025-11-25 23:41 ` Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 2/5] arm: include: imx7: rename PWM registers to match driver name Thomas Bonnefille
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
This commit condition the removal of the video driver to the existence
of the VIDEO_REMOVE kconfig parameter on the model of what has been done
on commit b8d3a6c7d12f ("drivers: video: tidss: tidss_drv: Use kconfig
VIDEO_REMOVE to remove video") for TI DSS driver.
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
drivers/video/mxsfb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index e72839cead4..f30818d90c7 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -375,9 +375,11 @@ static int mxs_video_bind(struct udevice *dev)
static int mxs_video_remove(struct udevice *dev)
{
- struct video_uc_plat *plat = dev_get_uclass_plat(dev);
+ if (CONFIG_IS_ENABLED(VIDEO_REMOVE)) {
+ struct video_uc_plat *plat = dev_get_uclass_plat(dev);
- mxs_remove_common(plat->base);
+ mxs_remove_common(plat->base);
+ }
return 0;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] arm: include: imx7: rename PWM registers to match driver name
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video Thomas Bonnefille
@ 2025-11-25 23:41 ` Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 3/5] mx7: clock: add pwm enabling clock function Thomas Bonnefille
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
The imx pwm driver uses PWMn_BASE_ADDR as the address of the different
PWM controllers, as the current names used for the PWM addresses aren't
used anywhere, this commit renames the macro to match what has been done
for i.MX6 and i.MX5.
It also adds some basic bit descriptions, macros and structure to give
to the pwm-imx driver based on what has already been done for the other
i.MX models.
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
arch/arm/include/asm/arch-mx7/imx-regs.h | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
index 849c5482241..d1cc176d6dc 100644
--- a/arch/arm/include/asm/arch-mx7/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
@@ -127,10 +127,10 @@
#define ECSPI4_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x30000)
#define FTM1_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x40000)
#define FTM2_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x50000)
-#define PWM1_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x60000)
-#define PWM2_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x70000)
-#define PWM3_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x80000)
-#define PWM4_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x90000)
+#define PWM1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x60000)
+#define PWM2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x70000)
+#define PWM3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x80000)
+#define PWM4_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x90000)
#define SYSCNT_RD_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xA0000)
#define SYSCNT_CMP_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xB0000)
#define SYSCNT_CTRL_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xC0000)
@@ -970,6 +970,23 @@ struct aipstz_regs {
u32 opacr4;
};
+#define PWMCR_PRESCALER(x) ((((x) - 1) & 0xFFF) << 4)
+#define PWMCR_DOZEEN BIT(24)
+#define PWMCR_WAITEN BIT(23)
+#define PWMCR_DBGEN BIT(22)
+#define PWMCR_CLKSRC_IPG_HIGH (BIT(17) | BIT(16))
+#define PWMCR_CLKSRC_IPG BIT(16)
+#define PWMCR_EN BIT(0)
+
+struct pwm_regs {
+ u32 cr;
+ u32 sr;
+ u32 ir;
+ u32 sar;
+ u32 pr;
+ u32 cnr;
+};
+
struct wdog_regs {
u16 wcr; /* Control */
u16 wsr; /* Service */
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] mx7: clock: add pwm enabling clock function
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 2/5] arm: include: imx7: rename PWM registers to match driver name Thomas Bonnefille
@ 2025-11-25 23:41 ` Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 4/5] pwm: imx: allow i.MX7 to use PWM3 and PWM4 Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
4 siblings, 0 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
Add function to enable the clock of the different PWM controllers on i.MX7.
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
arch/arm/include/asm/arch-mx7/clock.h | 3 +++
arch/arm/mach-imx/mx7/clock.c | 29 +++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index 48c7c3367a5..03d1cc76e53 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -347,6 +347,9 @@ void clock_init(void);
#ifdef CONFIG_SYS_I2C_MXC
int enable_i2c_clk(unsigned char enable, unsigned i2c_num);
#endif
+#ifdef CONFIG_PWM_IMX
+int enable_pwm_clk(unsigned char enable, unsigned int pwm_num);
+#endif
#ifdef CONFIG_FEC_MXC
int set_clk_enet(enum enet_freq type);
#endif
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index a8328a0b224..72e0051373f 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -524,6 +524,35 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
return 0;
}
+#ifdef CONFIG_PWM_IMX
+/* pwm_num can be 0 - 3 */
+int enable_pwm_clk(unsigned char enable, unsigned int pwm_num)
+{
+ u32 target;
+
+ if (pwm_num >= 4)
+ return -EINVAL;
+
+ if (enable) {
+ clock_enable(CCGR_PWM1 + pwm_num, 0);
+
+ /* Set i2c root clock to PLL_SYS_MAIN_120M_CLK */
+
+ target = CLK_ROOT_ON |
+ PWM1_CLK_ROOT_FROM_PLL_SYS_MAIN_120M_CLK |
+ CLK_ROOT_PRE_DIV(CLK_ROOT_PRE_DIV1) |
+ CLK_ROOT_POST_DIV(CLK_ROOT_POST_DIV2);
+ clock_set_target_val(PWM1_CLK_ROOT + pwm_num, target);
+
+ clock_enable(CCGR_PWM1 + pwm_num, 1);
+ } else {
+ clock_enable(CCGR_PWM1 + pwm_num, 0);
+ }
+
+ return 0;
+}
+#endif
+
#ifdef CONFIG_SYS_I2C_MXC
/* i2c_num can be 0 - 3 */
int enable_i2c_clk(unsigned char enable, unsigned i2c_num)
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] pwm: imx: allow i.MX7 to use PWM3 and PWM4
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
` (2 preceding siblings ...)
2025-11-25 23:41 ` [PATCH 3/5] mx7: clock: add pwm enabling clock function Thomas Bonnefille
@ 2025-11-25 23:41 ` Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
4 siblings, 0 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
This commit creates a new condition in which i.MX7 SoCs will be able to
use the third and fourth PWM controllers in the pwm-imx driver.
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
drivers/pwm/pwm-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 28187b4fcbb..8e655943eec 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -43,7 +43,7 @@ struct pwm_regs *pwm_id_to_reg(int pwm_id)
return (struct pwm_regs *)PWM1_BASE_ADDR;
case 1:
return (struct pwm_regs *)PWM2_BASE_ADDR;
-#ifdef CONFIG_MX6
+#if defined(CONFIG_MX6) || defined(CONFIG_MX7)
case 2:
return (struct pwm_regs *)PWM3_BASE_ADDR;
case 3:
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
` (3 preceding siblings ...)
2025-11-25 23:41 ` [PATCH 4/5] pwm: imx: allow i.MX7 to use PWM3 and PWM4 Thomas Bonnefille
@ 2025-11-25 23:41 ` Thomas Bonnefille
2025-11-26 11:59 ` Francesco Dolcini
` (2 more replies)
4 siblings, 3 replies; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-25 23:41 UTC (permalink / raw)
To: u-boot, NXP i.MX U-Boot Team
Cc: Thomas Petazzoni, Miquèl Raynal, Anatolij Gustschin,
Tom Rini, Thomas Bonnefille, Stefano Babic, Fabio Estevam,
Simon Glass, Francesco Dolcini
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@bootlin.com>
---
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);
+ if (ret)
+ return ret;
+ ret = pwm_enable(0);
}
#endif
@@ -142,12 +151,11 @@ static int setup_lcd(void)
*/
void board_preboot_os(void)
{
-#ifdef CONFIG_VIDEO
- gpio_direction_output(GPIO_PWM_A, 1);
- gpio_direction_output(GPIO_BL_ON, 0);
-#endif
+ if (IS_ENABLED(CONFIG_VIDEO) && IS_ENABLED(CONFIG_VIDEO_REMOVE)) {
+ gpio_direction_output(GPIO_PWM_A, 1);
+ gpio_direction_output(GPIO_BL_ON, 0);
+ }
}
-
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -277,6 +285,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
{
#if defined(CONFIG_IMX_BOOTAUX) && defined(CONFIG_ARCH_FIXUP_FDT_MEMORY)
int up;
+ int ret = -1;
up = arch_auxiliary_core_check_up(0);
if (up) {
@@ -313,6 +322,17 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#endif
+ if (IS_ENABLED(CONFIG_FDT_SIMPLEFB))
+ ret = fdt_simplefb_enable_and_mem_rsv(blob);
+
+ /* If simplefb is not enabled and video is active, then at least reserve
+ * the framebuffer region to preserve the splash screen while OS is booting
+ */
+ if (IS_ENABLED(CONFIG_VIDEO) && IS_ENABLED(CONFIG_OF_LIBFDT)) {
+ if (ret && video_is_active())
+ return fdt_add_fb_mem_rsv(blob);
+ }
+
return ft_common_board_setup(blob, bd);
}
#endif
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
@ 2025-11-26 11:59 ` Francesco Dolcini
2025-11-26 17:54 ` Thomas Bonnefille
2025-11-28 11:29 ` Francesco Dolcini
2025-12-01 17:16 ` Fabio Estevam
2 siblings, 1 reply; 11+ messages in thread
From: Francesco Dolcini @ 2025-11-26 11:59 UTC (permalink / raw)
To: Thomas Bonnefille
Cc: u-boot, NXP i.MX U-Boot Team, Thomas Petazzoni,
Miquèl Raynal, Anatolij Gustschin, Tom Rini, Stefano Babic,
Fabio Estevam, Simon Glass, Francesco Dolcini
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@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-26 11:59 ` Francesco Dolcini
@ 2025-11-26 17:54 ` Thomas Bonnefille
2025-11-28 11:27 ` Francesco Dolcini
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Bonnefille @ 2025-11-26 17:54 UTC (permalink / raw)
To: Francesco Dolcini, Thomas Bonnefille
Cc: u-boot, NXP i.MX U-Boot Team, Thomas Petazzoni,
Miquèl Raynal, Anatolij Gustschin, Tom Rini, Stefano Babic,
Fabio Estevam, Simon Glass, Francesco Dolcini
Hello Francesco,
On Wed Nov 26, 2025 at 12:59 PM CET, Francesco Dolcini wrote:
> [...]
>> -
>> - 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?
Indeed there isn't, however for my tests I used the Toradex Colibri
Evaluation Board with the Toradex 7 inch Capacitive Touch Display [1] that is
meant to be used with the Colibri Evaluation Board.
This display typically uses a 150Hz PWM for its backlight so I chose this
value.
However there the pwm_config configure a 150Hz PWM with 0ns duty cycle so
in fact, no matter the frequency, this pin will act as an always off GPIO.
1: https://docs.toradex.com/104497-7-inch-parallel-capacitive-touch-display-800x480-datasheet.pdf
Thomas
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-26 17:54 ` Thomas Bonnefille
@ 2025-11-28 11:27 ` Francesco Dolcini
0 siblings, 0 replies; 11+ messages in thread
From: Francesco Dolcini @ 2025-11-28 11:27 UTC (permalink / raw)
To: Thomas Bonnefille
Cc: Francesco Dolcini, u-boot, NXP i.MX U-Boot Team, Thomas Petazzoni,
Miquèl Raynal, Anatolij Gustschin, Tom Rini, Stefano Babic,
Fabio Estevam, Simon Glass, Francesco Dolcini
On Wed, Nov 26, 2025 at 06:54:48PM +0100, Thomas Bonnefille wrote:
> Hello Francesco,
> On Wed Nov 26, 2025 at 12:59 PM CET, Francesco Dolcini wrote:
> > [...]
> >> -
> >> - 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?
>
> Indeed there isn't, however for my tests I used the Toradex Colibri
> Evaluation Board with the Toradex 7 inch Capacitive Touch Display [1] that is
> meant to be used with the Colibri Evaluation Board.
> This display typically uses a 150Hz PWM for its backlight so I chose this
> value.
> However there the pwm_config configure a 150Hz PWM with 0ns duty cycle so
> in fact, no matter the frequency, this pin will act as an always off GPIO.
Yes, make sense. At the same time you might have display with the
opposite polarity for the PWM ...
To me this change is ok to go in, it does not make the code any more
specific than it was before.
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Not sure if you have any next step planned, but adding support for a
specific display in the generic SoM support code does not seem right to
me.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
2025-11-26 11:59 ` Francesco Dolcini
@ 2025-11-28 11:29 ` Francesco Dolcini
2025-12-01 17:16 ` Fabio Estevam
2 siblings, 0 replies; 11+ messages in thread
From: Francesco Dolcini @ 2025-11-28 11:29 UTC (permalink / raw)
To: Thomas Bonnefille
Cc: u-boot, NXP i.MX U-Boot Team, Thomas Petazzoni,
Miquèl Raynal, Anatolij Gustschin, Tom Rini, Stefano Babic,
Fabio Estevam, Simon Glass, Francesco Dolcini
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@bootlin.com>
> ---
> 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>
The includes here are "somehow" sorted, please keep it the same way.
Francesco
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
2025-11-26 11:59 ` Francesco Dolcini
2025-11-28 11:29 ` Francesco Dolcini
@ 2025-12-01 17:16 ` Fabio Estevam
2 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2025-12-01 17:16 UTC (permalink / raw)
To: Thomas Bonnefille
Cc: u-boot, NXP i.MX U-Boot Team, Thomas Petazzoni,
Miquèl Raynal, Anatolij Gustschin, Tom Rini, Stefano Babic,
Simon Glass, Francesco Dolcini
Hi Thomas,
On Tue, Nov 25, 2025 at 8:42 PM Thomas Bonnefille
<thomas.bonnefille@bootlin.com> wrote:
>
> This commit fixes the PWM<A> that was previously used as a GPIO output
Nit: don't start with "This commit fixes the PAM...". Use the
imperative mood: "Fix the PWM..."
The same applies to other patches in this series.
Thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-12-01 17:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 23:41 [PATCH 0/5] i.MX7 Splash Screen and PWM fixes Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 2/5] arm: include: imx7: rename PWM registers to match driver name Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 3/5] mx7: clock: add pwm enabling clock function Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 4/5] pwm: imx: allow i.MX7 to use PWM3 and PWM4 Thomas Bonnefille
2025-11-25 23:41 ` [PATCH 5/5] board: toradex: add splash screen to Toradex i.MX7D Colibri board Thomas Bonnefille
2025-11-26 11:59 ` Francesco Dolcini
2025-11-26 17:54 ` Thomas Bonnefille
2025-11-28 11:27 ` Francesco Dolcini
2025-11-28 11:29 ` Francesco Dolcini
2025-12-01 17:16 ` Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.