Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gabriel Fernandez" <gabriel.fernandez@foss.st.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 5/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25
Date: Thu, 03 Dec 2026 19:28:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-248505@kernel.org> (raw)
In-Reply-To: <20261203-ups_mp25_clk_syscfg-v6-5-76d65d1b811d@foss.st.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: st: syscfg clocks[0] attaches CK_KER_LTDC to
  syscon regmap
--

commit ee3cdb295fa05bcdffcd6456761965495db86435
Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com>

arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25

This commit adds the STM32MP255-specific compatible and the three LTDC
pixel clock mux input clocks to the syscfg node in stm32mp255.dtsi.

> diff --git a/arch/arm64/boot/dts/st/stm32mp255.dtsi b/arch/arm64/boot/dts/st/stm32mp255.dtsi
> index 7a598f53a2a0e..4d4d100d3f894 100644
> --- a/arch/arm64/boot/dts/st/stm32mp255.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp255.dtsi
> @@ -40,4 +40,10 @@ venc: venc@480e0000 {
>  		clocks = <&rcc CK_BUS_VENC>;
>  		access-controllers = <&rifsc 90>;
>  	};
> -};
> \ No newline at end of file
> +};
> +
> +&syscfg {
> +	compatible = "st,stm32mp255-syscfg", "st,stm32mp25-syscfg", "syscon";
> +	clocks = <&rcc CK_KER_LTDC>, <&lvds>, <&clk_dsi_txbyte>;
> +	clock-names = "ltdc", "lvds", "dsi";
> +};

[Severity: Medium]
Does placing CK_KER_LTDC at clocks[0] on a generic syscon node cause
of_syscon_register() to attach it to the shared syscfg MMIO regmap?

Because stm32mp2-syscfg does not register a custom regmap,
of_syscon_register() fetches clocks[0] via of_clk_get(np, 0) and passes it
to regmap_mmio_attach_clk().  Every syscfg regmap access then brackets the
MMIO operation with clk_enable() and clk_disable() on CK_KER_LTDC.

CK_KER_LTDC shares GATE_LTDC with CK_BUS_LTDC, starting at refcount zero.
When stm32mp25_syscfg_mux_get_parent() reads SYSCFG_DISPLAYCLKCR during
syscfg probe before simpledrm or ltdc claims the LTDC clocks, that cycle
clears GATE_LTDC and gates off an active bootloader display.

In addition, regmap_mmio_attach_clk() calls clk_prepare() once and never
unprepares it.  Since parent CK_SCMI_FLEXGEN_27 uses the non-atomic OP-TEE
SCMI transport (enabling the clock in .prepare), it stays enabled in
firmware for the entire uptime, even when LTDC is unused or suspended.

Having drivers/soc/st/stm32mp2-syscfg.c register a clock-less regmap via
of_syscon_register_regmap() would avoid both issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-ups_mp25_clk_syscfg-v6-0-76d65d1b811d@foss.st.com?part=5

      reply	other threads:[~2026-12-03 19:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:11 [PATCH v6 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
2026-12-03 17:11 ` [PATCH v6 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
2026-12-03 18:19   ` sashiko-bot
2026-12-03 17:11 ` [PATCH v6 2/5] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
2026-12-03 18:50   ` sashiko-bot
2026-12-03 17:11 ` [PATCH v6 3/5] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
2026-12-03 17:11 ` [PATCH v6 4/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
2026-12-03 17:11 ` [PATCH v6 5/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25 Gabriel Fernandez
2026-12-03 19:28   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-248505@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox