[PATCH v3 4/7] video: stm32: ltdc: support new hardware version for STM32MP25 SoC

Patrice CHOTARD patrice.chotard at foss.st.com
Fri Sep 12 18:41:41 CEST 2025



On 9/4/25 14:53, Raphael Gallais-Pou wrote:
> STM32MP2 SoCs feature a new version of the LTDC IP.  This new version
> features a bus clock, as well as a 150MHz pad frequency.  Add its
> compatible to the list of device to probe and handle quirks.  The new
> hardware version features a bus clock.
> 
> Reviewed-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Acked-by: Yannick Fertre <yannick.fertre at foss.st.com>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou at foss.st.com>
> ---
>  drivers/video/stm32/stm32_ltdc.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
> index 0a062c8939dbe49b11aa50f5ca9701bdbe5c5b0b..efe9a00996eca0301d2a2b82074ba9690a967a73 100644
> --- a/drivers/video/stm32/stm32_ltdc.c
> +++ b/drivers/video/stm32/stm32_ltdc.c
> @@ -262,6 +262,7 @@ static const u32 layer_regs_a2[] = {
>  #define HWVER_10300 0x010300
>  #define HWVER_20101 0x020101
>  #define HWVER_40100 0x040100
> +#define HWVER_40101 0x040101
>  
>  enum stm32_ltdc_pix_fmt {
>  	PF_ARGB8888 = 0,	/* ARGB [32 bits] */
> @@ -529,7 +530,7 @@ static int stm32_ltdc_probe(struct udevice *dev)
>  	struct udevice *bridge = NULL;
>  	struct udevice *panel = NULL;
>  	struct display_timing timings;
> -	struct clk pclk;
> +	struct clk pclk, bclk;
>  	struct reset_ctl rst;
>  	ulong rate;
>  	int ret;
> @@ -540,7 +541,21 @@ static int stm32_ltdc_probe(struct udevice *dev)
>  		return -EINVAL;
>  	}
>  
> -	ret = clk_get_by_index(dev, 0, &pclk);
> +	ret = clk_get_by_name(dev, "bus", &bclk);
> +	if (ret) {
> +		if (ret != -ENODATA) {
> +			dev_err(dev, "bus clock get error %d\n", ret);
> +			return ret;
> +		}
> +	} else {
> +		ret = clk_enable(&bclk);
> +		if (ret) {
> +			dev_err(dev, "bus clock enable error %d\n", ret);
> +			return ret;
> +		}
> +	}
> +
> +	ret = clk_get_by_name(dev, "lcd", &pclk);
>  	if (ret) {
>  		dev_err(dev, "peripheral clock get error %d\n", ret);
>  		return ret;
> @@ -566,6 +581,7 @@ static int stm32_ltdc_probe(struct udevice *dev)
>  		priv->pix_fmt_hw = pix_fmt_a1;
>  		break;
>  	case HWVER_40100:
> +	case HWVER_40101:
>  		priv->layer_regs = layer_regs_a2;
>  		priv->pix_fmt_hw = pix_fmt_a2;
>  		break;
> @@ -688,6 +704,8 @@ static int stm32_ltdc_bind(struct udevice *dev)
>  
>  static const struct udevice_id stm32_ltdc_ids[] = {
>  	{ .compatible = "st,stm32-ltdc" },
> +	{ .compatible = "st,stm32mp251-ltdc" },
> +	{ .compatible = "st,stm32mp255-ltdc" },

in V1, only "st,stm32mp251-ltdc" compatible was introduced.
Why are you adding "st,stm32mp255-ltdc" compatible ? 

For me only "st,stm32-ltdc" is needed, currently, nothing in drivers/video/stm32/stm32_ltdc.c
is justifying to add "st,stm32mp251-ltdc" or "st,stm32mp251-ltdc" new compatible.

Patrice

>  	{ }
>  };
>  
> 


More information about the U-Boot mailing list