mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux
@ 2026-11-24 13:41 Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez, Brian Masney

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. They are
only described on STM32MP235 and STM32MP255, which have the LVDS and the
DSI and whose LTDC uses this clock, with new SoC specific SYSCFG
compatibles. 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 attaches its first
clock to the SYSCFG regmap, i.e. the LTDC kernel clock on STM32MP235 and
STM32MP255: this clock is kept prepared, with its parents, and enabled
around each register access. The SYSCFG registers don't need it, but
this has no functional impact. The LTDC kernel clock is listed first as
it is always provided by the RCC, while the LVDS may be disabled, which
would defer all the SYSCFG users.

v3 avoided this by registering the SYSCFG regmap from the SYSCFG
driver, but the syscon users could create it before, all the more as
fw_devlink defers the SYSCFG probe until its clocks are available. As
doing it reliably would require an early initcall, this patch is
dropped. Please let me know if you would prefer this approach.

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 v4:
- Describe the mux inputs only on STM32MP235 and STM32MP255, whose LTDC
  uses the SYSCFG clock, and make them fixed for each compatible instead
  of a variable minItems list (Krzysztof): add the "st,stm32mp235-syscfg"
  and "st,stm32mp255-syscfg" compatibles, the family ones being shared
  with the SoCs which don't have this mux
- dt-bindings: arm: stm32: drop Krzysztof's Reviewed-by from v3, as the
  binding changed substantially (minItems removed, SoC-specific
  compatibles added); it needs a new review
- Drop "soc: st: stm32mp2-syscfg: register the syscon regmap": the
  syscon users could create the SYSCFG regmap before the SYSCFG driver
  probes, and the regmap was leaked or left registered on errors
  (Sashiko). The syscon core thus attaches the LTDC kernel clock to the
  SYSCFG regmap, see above
- soc: st: stm32mp2-syscfg: add my missing Signed-off-by to the patch
  from Dario (Sashiko)
- Link to v3: https://lore.kernel.org/r/20261118-ups_mp25_clk_syscfg-v3-0-935de791a4ce@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 (4):
      dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG
      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        |  40 ++++++-
 arch/arm64/boot/dts/st/stm32mp235.dtsi             |   6 +
 arch/arm64/boot/dts/st/stm32mp255.dtsi             |   8 +-
 drivers/clk/stm32/Kconfig                          |  13 +++
 drivers/clk/stm32/Makefile                         |   1 +
 drivers/clk/stm32/clk-stm32mp25-syscfg.c           | 127 +++++++++++++++++++++
 drivers/soc/st/Kconfig                             |   1 +
 drivers/soc/st/stm32mp2-syscfg.c                   |  14 ++-
 8 files changed, 207 insertions(+), 3 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] 6+ messages in thread

* [PATCH v4 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG
  2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
@ 2026-11-24 13:41 ` Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 2/5] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez

The SYSCFG of the STM32MP23x and STM32MP25x SoCs is the provider of the
LTDC pixel clock, which it selects in its DISPLAYCLKCR register among
the LTDC kernel clock, the LVDS PHY pixel clock and the DSI PHY byte
lane clock.

This clock is only used on STM32MP235 and STM32MP255, which have the
LVDS and the DSI: the LTDC of STM32MP231/233 and STM32MP251/253 takes
the LTDC kernel clock directly. As the SYSCFG compatibles are shared by
all the SoCs of a family, add the "st,stm32mp235-syscfg" and
"st,stm32mp255-syscfg" compatibles, with the family ones as fallback, as
done for the LVDS of these SoCs.

Describe the three inputs of the mux with the clocks and clock-names
properties, required with these compatibles only. The existing
devicetrees thus remain valid.

The LTDC kernel clock comes first: the SYSCFG node being a syscon, the
syscon core takes its first clock as the clock of the SYSCFG registers,
and the RCC always provides this one, while the LVDS may be disabled,
which would defer all the SYSCFG users.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
 .../bindings/arm/stm32/st,stm32-syscon.yaml        | 40 +++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
index a559f8b03b84..2a3c0ce90391 100644
--- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
@@ -25,6 +25,14 @@ properties:
               - st,stm32mp23-syscfg
               - st,stm32mp25-syscfg
           - const: syscon
+      - items:
+          - const: st,stm32mp235-syscfg
+          - const: st,stm32mp23-syscfg
+          - const: syscon
+      - items:
+          - const: st,stm32mp255-syscfg
+          - const: st,stm32mp25-syscfg
+          - const: syscon
       - items:
           - const: st,stm32-tamp
           - const: syscon
@@ -34,7 +42,14 @@ properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 3
+
+  clock-names:
+    items:
+      - const: ltdc
+      - const: lvds
+      - const: dsi
 
   "#clock-cells":
     const: 0
@@ -62,12 +77,35 @@ allOf:
             enum:
               - st,stm32mp157-syscfg
               - st,stm32f4-gcan
+              - st,stm32mp235-syscfg
+              - st,stm32mp255-syscfg
     then:
       required:
         - clocks
     else:
       properties:
         clocks: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - st,stm32mp235-syscfg
+              - st,stm32mp255-syscfg
+    then:
+      properties:
+        clocks:
+          items:
+            - description: LTDC kernel clock
+            - description: LVDS PHY pixel clock
+            - description: DSI PHY byte lane clock
+      required:
+        - clock-names
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names: false
   - if:
       properties:
         compatible:

-- 
2.43.0


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

* [PATCH v4 2/5] clk: stm32: Add STM32MP25 SYSCFG clock driver
  2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
@ 2026-11-24 13:41 ` Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 3/5] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez, Brian Masney

On STM32MP23x and STM32MP25x, the LTDC pixel clock is selected in the
SYSCFG DISPLAYCLKCR register among the DSI PHY byte lane clock, the LVDS
PHY pixel clock (reset value) and the LTDC kernel clock, the latter
being the one needed by the RGB (DPI) output.

The SYSCFG node is described as the provider of this clock, but no
driver registers it, so the selection can't be changed from its reset
value and a display connected to the LTDC RGB output can't work.

Add a driver registering this clock as a mux. The SYSCFG node is bound
to the STM32MP2 SYSCFG driver, so this driver is an auxiliary driver,
probed from an auxiliary device which shares the SYSCFG node. The mux
parents are taken from the "clocks" property of the SYSCFG node, which
remains the clock provider.

The DISPLAYCLKCR register is accessed through the syscon regmap of the
SYSCFG node. On STM32MP235 and STM32MP255, the syscon core attaches the
first clock of the node, the LTDC kernel clock, to this regmap: it is
kept prepared and enabled around each register access. The SYSCFG
registers don't need it, but this has no functional impact.

Co-developed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: Brian Masney <masneyb@kernel.org>
---
 drivers/clk/stm32/Kconfig                |  13 ++++
 drivers/clk/stm32/Makefile               |   1 +
 drivers/clk/stm32/clk-stm32mp25-syscfg.c | 127 +++++++++++++++++++++++++++++++
 3 files changed, 141 insertions(+)

diff --git a/drivers/clk/stm32/Kconfig b/drivers/clk/stm32/Kconfig
index 5dbd75cde657..18289816f030 100644
--- a/drivers/clk/stm32/Kconfig
+++ b/drivers/clk/stm32/Kconfig
@@ -39,5 +39,18 @@ config COMMON_CLK_STM32MP257
 	help
 	  Support for stm32mp25x SoC family clocks.
 
+config COMMON_CLK_STM32MP25_SYSCFG
+	tristate "Clock driver for stm32mp25x SYSCFG clocks"
+	depends on COMMON_CLK_STM32MP257
+	depends on SOC_STM32MP2 || COMPILE_TEST
+	select AUXILIARY_BUS
+	select MFD_SYSCON
+	default COMMON_CLK_STM32MP257
+	help
+	  Support for the clocks provided by the stm32mp25x SYSCFG, i.e.
+	  the LTDC pixel clock source selection between the LTDC kernel
+	  clock (RGB output), the LVDS PHY pixel clock and the DSI byte
+	  lane clock.
+
 endif
 
diff --git a/drivers/clk/stm32/Makefile b/drivers/clk/stm32/Makefile
index e04727b59449..8088d172651f 100644
--- a/drivers/clk/stm32/Makefile
+++ b/drivers/clk/stm32/Makefile
@@ -2,3 +2,4 @@ obj-$(CONFIG_COMMON_CLK_STM32MP135)	+= clk-stm32mp13.o clk-stm32-core.o reset-st
 obj-$(CONFIG_COMMON_CLK_STM32MP157)	+= clk-stm32mp1.o reset-stm32.o
 obj-$(CONFIG_COMMON_CLK_STM32MP215)	+= clk-stm32mp21.o clk-stm32-core.o reset-stm32.o
 obj-$(CONFIG_COMMON_CLK_STM32MP257)	+= clk-stm32mp25.o clk-stm32-core.o reset-stm32.o
+obj-$(CONFIG_COMMON_CLK_STM32MP25_SYSCFG)	+= clk-stm32mp25-syscfg.o
diff --git a/drivers/clk/stm32/clk-stm32mp25-syscfg.c b/drivers/clk/stm32/clk-stm32mp25-syscfg.c
new file mode 100644
index 000000000000..c7e840fb2d95
--- /dev/null
+++ b/drivers/clk/stm32/clk-stm32mp25-syscfg.c
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) STMicroelectronics 2026 - All Rights Reserved
+ * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/clk-provider.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/limits.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+
+#define SYSCFG_DISPLAYCLKCR		0x5000
+#define DISPLAYCLKCR_DPIVSLVDS		GENMASK(1, 0)
+
+/*
+ * The LTDC pixel clock source is selected in SYSCFG_DISPLAYCLKCR among
+ * the DSI byte lane clock, the LVDS PHY pixel clock (reset value) and
+ * the LTDC kernel clock, which is used with the RGB (DPI) output.
+ *
+ * The parents are listed in the DPIVSLVDS field order, while .index refers
+ * to the "clocks" property of the SYSCFG node, ordered "ltdc", "lvds", "dsi".
+ */
+static const struct clk_parent_data clk_pix_ltdc_parents[] = {
+	{ .index = 2 },	/* dsi */
+	{ .index = 1 },	/* lvds */
+	{ .index = 0 },	/* ltdc */
+};
+
+struct stm32mp25_syscfg_mux {
+	struct clk_hw hw;
+	struct device *dev;
+	struct regmap *regmap;
+};
+
+static inline struct stm32mp25_syscfg_mux *to_syscfg_mux(struct clk_hw *hw)
+{
+	return container_of(hw, struct stm32mp25_syscfg_mux, hw);
+}
+
+static u8 stm32mp25_syscfg_mux_get_parent(struct clk_hw *hw)
+{
+	struct stm32mp25_syscfg_mux *mux = to_syscfg_mux(hw);
+	unsigned int val;
+	int ret;
+
+	ret = regmap_read(mux->regmap, SYSCFG_DISPLAYCLKCR, &val);
+	if (ret) {
+		dev_err(mux->dev, "%s: failed to read the parent: %pe\n",
+			clk_hw_get_name(hw), ERR_PTR(ret));
+		/* An out of range index leaves the clock orphan */
+		return U8_MAX;
+	}
+
+	return FIELD_GET(DISPLAYCLKCR_DPIVSLVDS, val);
+}
+
+static int stm32mp25_syscfg_mux_set_parent(struct clk_hw *hw, u8 index)
+{
+	struct stm32mp25_syscfg_mux *mux = to_syscfg_mux(hw);
+
+	return regmap_update_bits(mux->regmap, SYSCFG_DISPLAYCLKCR,
+				  DISPLAYCLKCR_DPIVSLVDS,
+				  FIELD_PREP(DISPLAYCLKCR_DPIVSLVDS, index));
+}
+
+static const struct clk_ops stm32mp25_syscfg_mux_ops = {
+	.get_parent = stm32mp25_syscfg_mux_get_parent,
+	.set_parent = stm32mp25_syscfg_mux_set_parent,
+	.determine_rate = clk_hw_determine_rate_no_reparent,
+};
+
+static int stm32mp25_syscfg_clk_probe(struct auxiliary_device *adev,
+				      const struct auxiliary_device_id *id)
+{
+	struct stm32mp25_syscfg_mux *mux;
+	struct device *dev = &adev->dev;
+	struct clk_init_data init = { };
+	int ret;
+
+	mux = devm_kzalloc_obj(dev, *mux);
+	if (!mux)
+		return -ENOMEM;
+
+	mux->dev = dev;
+
+	/* The auxiliary device shares the node of the SYSCFG */
+	mux->regmap = syscon_node_to_regmap(dev->of_node);
+	if (IS_ERR(mux->regmap))
+		return dev_err_probe(dev, PTR_ERR(mux->regmap),
+				     "failed to get the SYSCFG regmap\n");
+
+	init.name = "clk_pix_ltdc";
+	init.ops = &stm32mp25_syscfg_mux_ops;
+	init.parent_data = clk_pix_ltdc_parents;
+	init.num_parents = ARRAY_SIZE(clk_pix_ltdc_parents);
+	init.flags = CLK_SET_RATE_PARENT;
+	mux->hw.init = &init;
+
+	ret = devm_clk_hw_register(dev, &mux->hw);
+	if (ret)
+		return dev_err_probe(dev, ret, "failed to register %s\n",
+				     init.name);
+
+	return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &mux->hw);
+}
+
+static const struct auxiliary_device_id stm32mp25_syscfg_clk_ids[] = {
+	{ .name = "stm32mp2_syscfg.clk" },
+	{ }
+};
+MODULE_DEVICE_TABLE(auxiliary, stm32mp25_syscfg_clk_ids);
+
+static struct auxiliary_driver stm32mp25_syscfg_clk_driver = {
+	.probe = stm32mp25_syscfg_clk_probe,
+	.id_table = stm32mp25_syscfg_clk_ids,
+};
+module_auxiliary_driver(stm32mp25_syscfg_clk_driver);
+
+MODULE_AUTHOR("Gabriel Fernandez <gabriel.fernandez@foss.st.com>");
+MODULE_DESCRIPTION("STM32MP25 SYSCFG clock driver");
+MODULE_LICENSE("GPL");

-- 
2.43.0


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

* [PATCH v4 3/5] soc: st: stm32mp2-syscfg: register the clock device
  2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 2/5] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
@ 2026-11-24 13:41 ` Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 4/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 5/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25 Gabriel Fernandez
  4 siblings, 0 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

The STM32MP23x and STM32MP25x SYSCFG provides the LTDC pixel clock mux,
whose driver is an auxiliary driver since the SYSCFG node is bound to
this driver.

Create the auxiliary device for the clock driver.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
[gabriel.fernandez@foss.st.com: create the device on STM32MP23x too]
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
 drivers/soc/st/Kconfig           |  1 +
 drivers/soc/st/stm32mp2-syscfg.c | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/st/Kconfig b/drivers/soc/st/Kconfig
index 2a9d6a77be45..62bbe8c63238 100644
--- a/drivers/soc/st/Kconfig
+++ b/drivers/soc/st/Kconfig
@@ -5,6 +5,7 @@ config SOC_STM32MP2
 	tristate "STM32MP2 SoC family support"
 	depends on ARCH_STM32 || COMPILE_TEST
 	default ARCH_STM32 && ARM64
+	select AUXILIARY_BUS
 	select SOC_BUS
 	help
 	  If you say yes here, you get support for the ST STM32MP2 family
diff --git a/drivers/soc/st/stm32mp2-syscfg.c b/drivers/soc/st/stm32mp2-syscfg.c
index 770321a4a6f7..1160b65d3dde 100644
--- a/drivers/soc/st/stm32mp2-syscfg.c
+++ b/drivers/soc/st/stm32mp2-syscfg.c
@@ -3,13 +3,25 @@
  * Copyright 2026 Marek Vasut
  */
 
+#include <linux/auxiliary_bus.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
 static int stm32mp2_syscfg_probe(struct platform_device *pdev)
 {
-	return devm_of_platform_populate(&pdev->dev);
+	struct device *dev = &pdev->dev;
+	int ret;
+
+	ret = devm_of_platform_populate(dev);
+	if (ret)
+		return ret;
+
+	if (!devm_auxiliary_device_create(dev, "clk", NULL))
+		return dev_err_probe(dev, -ENODEV,
+				     "failed to register the clock device\n");
+
+	return 0;
 }
 
 static const struct of_device_id stm32mp2_syscfg_ids[] = {

-- 
2.43.0


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

* [PATCH v4 4/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23
  2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
                   ` (2 preceding siblings ...)
  2026-11-24 13:41 ` [PATCH v4 3/5] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
@ 2026-11-24 13:41 ` Gabriel Fernandez
  2026-11-24 13:41 ` [PATCH v4 5/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25 Gabriel Fernandez
  4 siblings, 0 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez

Describe the inputs of the LTDC pixel clock mux in the SYSCFG node of
STM32MP235, which is the provider of the LTDC "ref" clock, and add its
SoC specific compatible.

The LTDC of STM32MP231 and STM32MP233 doesn't use this clock, it takes
the LTDC kernel clock directly, so their SYSCFG node is left unchanged.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp235.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp235.dtsi b/arch/arm64/boot/dts/st/stm32mp235.dtsi
index 7a87c344a4fe..a3423c247df5 100644
--- a/arch/arm64/boot/dts/st/stm32mp235.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp235.dtsi
@@ -32,3 +32,9 @@ vdec: vdec@480d0000 {
 		access-controllers = <&rifsc 89>;
 	};
 };
+
+&syscfg {
+	compatible = "st,stm32mp235-syscfg", "st,stm32mp23-syscfg", "syscon";
+	clocks = <&rcc CK_KER_LTDC>, <&lvds>, <&clk_dsi_txbyte>;
+	clock-names = "ltdc", "lvds", "dsi";
+};

-- 
2.43.0


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

* [PATCH v4 5/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25
  2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
                   ` (3 preceding siblings ...)
  2026-11-24 13:41 ` [PATCH v4 4/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
@ 2026-11-24 13:41 ` Gabriel Fernandez
  4 siblings, 0 replies; 6+ messages in thread
From: Gabriel Fernandez @ 2026-11-24 13:41 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Christophe Roullier
  Cc: Dario Binacchi, linux-clk, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Gabriel Fernandez

Describe the inputs of the LTDC pixel clock mux in the SYSCFG node of
STM32MP255, which is the provider of the LTDC "ref" clock, and add its
SoC specific compatible.

The LTDC of STM32MP251 and STM32MP253 doesn't use this clock, it takes
the LTDC kernel clock directly, so their SYSCFG node is left unchanged.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp255.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/st/stm32mp255.dtsi b/arch/arm64/boot/dts/st/stm32mp255.dtsi
index 7a598f53a2a0..4d4d100d3f89 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";
+};

-- 
2.43.0


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

end of thread, other threads:[~2026-11-24 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 13:41 [PATCH v4 0/5] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
2026-11-24 13:41 ` [PATCH v4 1/5] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
2026-11-24 13:41 ` [PATCH v4 2/5] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
2026-11-24 13:41 ` [PATCH v4 3/5] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
2026-11-24 13:41 ` [PATCH v4 4/5] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
2026-11-24 13:41 ` [PATCH v4 5/5] 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

all inboxes | Powered by JetHome®