Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH v3 0/6] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux
@ 2026-11-18 11:59 Gabriel Fernandez
  2026-11-18 11:59 ` [PATCH v3 1/6] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Gabriel Fernandez @ 2026-11-18 11:59 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier, patrick.delaunay,
	yannick.fertre
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez

On STM32MP23x and STM32MP25x, the LTDC pixel clock is selected in the
SYSCFG DISPLAYCLKCR register among the LTDC kernel clock (RGB output),
the LVDS PHY pixel clock (reset value) and the DSI PHY byte lane clock.
The SYSCFG node is already described as the provider of this clock, used
as the LTDC "ref" clock, but no driver registers it, so the RGB output
can't be used.

This series adds a clock driver for this mux. It is based on the RFC
sent by Dario [1] and on the driver delivered in the ST downstream
kernel.

The SYSCFG node remains the clock provider ('#clock-cells = <0>'), and
the inputs of the mux are described by its "clocks" property, so the
ones which don't exist on a SoC (no LVDS/DSI on STM32MP231/233 and
STM32MP251/253) are simply omitted. As the SYSCFG node is bound to the
STM32MP2 SYSCFG driver, the clock driver is an auxiliary driver, whose
device is created by the SYSCFG driver. The LTDC "ref" clock is left
unchanged.

As the SYSCFG node is a syscon, the syscon core would take the first
clock of the node, i.e. the LTDC kernel clock, as the clock of the SYSCFG
registers. The SYSCFG driver therefore creates the SYSCFG regmap itself
and registers it with the syscon core, without any clock.

Changes compared to the RFC [1]:
- parents described by clocks/clock-names instead of global names
- auxiliary device created on STM32MP23x too
- SoC devicetrees updated, Engicam board patches dropped

[1] https://lore.kernel.org/all/20261028135915.2665857-1-dario.binacchi@amarulasolutions.com/

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
Changes in v3:
- Drop the clock-controller sub-node, its binding and the dt-bindings
  header: describe the mux inputs in the SYSCFG node, which remains the
  clock provider with '#clock-cells = <0>' (Krzysztof, Conor)
- Keep '#clock-cells' in the SoC devicetrees and the SYSCFG node as LTDC
  "ref" clock, not to break the existing users (Krzysztof)
- Make the clock driver an auxiliary driver, whose device is created by
  the STM32MP2 SYSCFG driver (RFC patch 3/4 from Dario)
- New patch: create the SYSCFG regmap in the STM32MP2 SYSCFG driver, so
  that the syscon core doesn't attach the LTDC kernel clock to it
- clk driver: depend on SOC_STM32MP2 || COMPILE_TEST, check the
  regmap_read() return value, drop the redundant CLK_SET_RATE_NO_REPARENT
  flag, fix the copyright year and the order of the local variables
  (Brian). The of_get_parent() change doesn't apply anymore, the driver
  using the SYSCFG node directly
- clk driver: drop <linux/mod_devicetable.h> (Uwe)
- Link to v2: https://lore.kernel.org/r/20261110-ups_mp25_clk_syscfg-v2-0-624559bb8ec7@foss.st.com

Changes in v2:
- Deprecate the '#clock-cells' property of the SYSCFG node and remove it
  from the SoC devicetrees, the clock-controller sub-node being the only
  provider of the LTDC pixel clock (Sashiko)
- Explain why the mux needs a sub-node: its inputs can't be described by
  the "clocks" property of the SYSCFG node, which is a syscon (Sashiko)
- Link to v1: https://lore.kernel.org/r/20261110-ups_mp25_clk_syscfg-v1-0-667829cd290a@foss.st.com

---
Dario Binacchi (1):
      soc: st: stm32mp2-syscfg: register the clock device

Gabriel Fernandez (5):
      dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG
      soc: st: stm32mp2-syscfg: register the syscon regmap
      clk: stm32: Add STM32MP25 SYSCFG clock driver
      arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23
      arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25

 .../bindings/arm/stm32/st,stm32-syscon.yaml        |  28 ++++-
 arch/arm64/boot/dts/st/stm32mp231.dtsi             |   2 +
 arch/arm64/boot/dts/st/stm32mp235.dtsi             |   5 +
 arch/arm64/boot/dts/st/stm32mp251.dtsi             |   2 +
 arch/arm64/boot/dts/st/stm32mp255.dtsi             |   7 +-
 drivers/clk/stm32/Kconfig                          |  13 +++
 drivers/clk/stm32/Makefile                         |   1 +
 drivers/clk/stm32/clk-stm32mp25-syscfg.c           | 125 +++++++++++++++++++++
 drivers/soc/st/Kconfig                             |   5 +-
 drivers/soc/st/stm32mp2-syscfg.c                   |  57 +++++++++-
 10 files changed, 240 insertions(+), 5 deletions(-)
---
base-commit: 630059a5a632377b9b7b487baccde92b7ae1dd47
change-id: 20261103-ups_mp25_clk_syscfg-6a4224156431

Best regards,
-- 
Gabriel Fernandez <gabriel.fernandez@foss.st.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-18 12:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 11:59 [PATCH v3 0/6] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 1/6] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 2/6] soc: st: stm32mp2-syscfg: register the syscon regmap Gabriel Fernandez
2026-11-18 12:37   ` sashiko-bot
2026-11-18 11:59 ` [PATCH v3 3/6] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 4/6] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
2026-11-18 12:13   ` sashiko-bot
2026-11-18 11:59 ` [PATCH v3 5/6] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 6/6] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25 Gabriel Fernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox