* [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells
@ 2026-09-02 12:39 Marek Vasut
2026-09-02 12:39 ` [PATCH v6 2/2] soc: st: Add STM32MP2 SYSCFG driver Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Vasut @ 2026-09-02 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Cc: fabrice.gasnier, Marek Vasut, Alexandre Torgue,
Christophe Roullier, Conor Dooley, Krzysztof Kozlowski,
Maxime Coquelin, Raphael Gallais-Pou, Rob Herring, Yannick Fertre,
devicetree, kernel, linux-kernel, linux-stm32
The st,stm32mp23-syscfg and st,stm32mp25-syscfg can have subnodes, which
represent the USB 2.0 FEMTO-PHY. Document subnodes pattern properties and
address/size cells.
Signed-off-by: Marek Vasut <marex@nabladev.com>
---
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Christophe Roullier <christophe.roullier@foss.st.com>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Marek Vasut <marex@nabladev.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Yannick Fertre <yannick.fertre@foss.st.com>
Cc: devicetree@vger.kernel.org
Cc: kernel@dh-electronics.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
---
V2: New patch
V3: Fix the bindings
V4: - Undo simple-mfd in favor of dedicated SYSCFG SoC driver
- Update commit message to match, this used to be patch
dt-bindings: arm: stm32: Switch st,stm32mp23/25-syscfg into simple-mfd
- Split this from series arm64: dts: phy: st: usb: Add STM32MP2 USB support
https://lore.kernel.org/all/20260822074816.548662-1-marex@nabladev.com/
V5: - Add missing contains: into conditional
- Add phy subnodes into required list for stm32mp23-syscfg/stm32mp25-syscfg
V6: - Reduce the pattern in patternProperties to match only on phy@2400 and phy@2800
- Disable address/clock/size-cells/phy@2400/phy@2800 unless compatible
with st,stm32mp23-syscfg or st,stm32mp25-syscfg
- Disable clocks unless compatible with st,stm32mp157-syscfg or st,stm32f4-gcan
---
.../bindings/arm/stm32/st,stm32-syscon.yaml | 30 ++++++++++++++++++-
1 file changed, 29 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 95d2319afe235..a559f8b03b842 100644
--- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
@@ -39,6 +39,17 @@ properties:
"#clock-cells":
const: 0
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+patternProperties:
+ "^phy@2[48]00$":
+ type: object
+ $ref: /schemas/phy/st,stm32-usb2phy.yaml
+
required:
- compatible
- reg
@@ -54,13 +65,30 @@ allOf:
then:
required:
- clocks
+ else:
+ properties:
+ clocks: false
- if:
properties:
compatible:
- const: st,stm32mp25-syscfg
+ contains:
+ enum:
+ - st,stm32mp23-syscfg
+ - st,stm32mp25-syscfg
then:
required:
+ - "#address-cells"
- "#clock-cells"
+ - "#size-cells"
+ - phy@2400
+ - phy@2800
+ else:
+ properties:
+ '#address-cells': false
+ '#clock-cells': false
+ '#size-cells': false
+ phy@2400: false
+ phy@2800: false
additionalProperties: false
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v6 2/2] soc: st: Add STM32MP2 SYSCFG driver
2026-09-02 12:39 [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells Marek Vasut
@ 2026-09-02 12:39 ` Marek Vasut
2026-09-02 12:59 ` [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells sashiko-bot
2026-09-02 17:04 ` Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2026-09-02 12:39 UTC (permalink / raw)
To: linux-arm-kernel
Cc: fabrice.gasnier, Marek Vasut, Alexandre Torgue,
Christophe Roullier, Conor Dooley, Krzysztof Kozlowski,
Maxime Coquelin, Raphael Gallais-Pou, Rob Herring, Yannick Fertre,
devicetree, kernel, linux-kernel, linux-stm32
Add trivial SYSCFG driver for ST STM32MP25xx, which binds drivers
to its subnodes. This is currently used to bind USB PHY drivers to
subnodes described in the SYSCFG DT node.
Acked-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Tested-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Marek Vasut <marex@nabladev.com>
---
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Christophe Roullier <christophe.roullier@foss.st.com>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Marek Vasut <marex@nabladev.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Yannick Fertre <yannick.fertre@foss.st.com>
Cc: devicetree@vger.kernel.org
Cc: kernel@dh-electronics.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
---
V4: New patch
V5: No change
V6: - Fix up the SPDX-License-Identifier
- Add AB/TB from Fabrice
---
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/st/Kconfig | 12 ++++++++++++
drivers/soc/st/Makefile | 1 +
drivers/soc/st/stm32mp2-syscfg.c | 33 ++++++++++++++++++++++++++++++++
5 files changed, 48 insertions(+)
create mode 100644 drivers/soc/st/Kconfig
create mode 100644 drivers/soc/st/Makefile
create mode 100644 drivers/soc/st/stm32mp2-syscfg.c
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index a2d65adffb805..dfe5cec592626 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -24,6 +24,7 @@ source "drivers/soc/renesas/Kconfig"
source "drivers/soc/rockchip/Kconfig"
source "drivers/soc/samsung/Kconfig"
source "drivers/soc/sophgo/Kconfig"
+source "drivers/soc/st/Kconfig"
source "drivers/soc/sunxi/Kconfig"
source "drivers/soc/tegra/Kconfig"
source "drivers/soc/ti/Kconfig"
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
index c9e689080ceb7..894bd6ebaaa4d 100644
--- a/drivers/soc/Makefile
+++ b/drivers/soc/Makefile
@@ -30,6 +30,7 @@ obj-y += renesas/
obj-y += rockchip/
obj-$(CONFIG_SOC_SAMSUNG) += samsung/
obj-y += sophgo/
+obj-y += st/
obj-y += sunxi/
obj-$(CONFIG_ARCH_TEGRA) += tegra/
obj-y += ti/
diff --git a/drivers/soc/st/Kconfig b/drivers/soc/st/Kconfig
new file mode 100644
index 0000000000000..2a9d6a77be450
--- /dev/null
+++ b/drivers/soc/st/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menu "ST SoC drivers"
+
+config SOC_STM32MP2
+ tristate "STM32MP2 SoC family support"
+ depends on ARCH_STM32 || COMPILE_TEST
+ default ARCH_STM32 && ARM64
+ select SOC_BUS
+ help
+ If you say yes here, you get support for the ST STM32MP2 family
+
+endmenu
diff --git a/drivers/soc/st/Makefile b/drivers/soc/st/Makefile
new file mode 100644
index 0000000000000..5ca313476ca93
--- /dev/null
+++ b/drivers/soc/st/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_SOC_STM32MP2) += stm32mp2-syscfg.o
diff --git a/drivers/soc/st/stm32mp2-syscfg.c b/drivers/soc/st/stm32mp2-syscfg.c
new file mode 100644
index 0000000000000..770321a4a6f71
--- /dev/null
+++ b/drivers/soc/st/stm32mp2-syscfg.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2026 Marek Vasut
+ */
+
+#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);
+}
+
+static const struct of_device_id stm32mp2_syscfg_ids[] = {
+ { .compatible = "st,stm32mp23-syscfg" },
+ { .compatible = "st,stm32mp25-syscfg" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, stm32mp2_syscfg_ids);
+
+static struct platform_driver stm32mp2_syscfg_driver = {
+ .driver = {
+ .name = "stm32mp2_syscfg",
+ .of_match_table = stm32mp2_syscfg_ids,
+ },
+ .probe = stm32mp2_syscfg_probe,
+};
+module_platform_driver(stm32mp2_syscfg_driver);
+
+MODULE_AUTHOR("Marek Vasut <marex@nabladev.com>");
+MODULE_DESCRIPTION("ST STM32MP2 SYSCFG driver");
+MODULE_LICENSE("GPL");
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells
2026-09-02 12:39 [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells Marek Vasut
2026-09-02 12:39 ` [PATCH v6 2/2] soc: st: Add STM32MP2 SYSCFG driver Marek Vasut
@ 2026-09-02 12:59 ` sashiko-bot
2026-09-02 17:04 ` Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-09-02 12:59 UTC (permalink / raw)
To: Marek Vasut; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `clocks: false` restriction in the `else` block incorrectly forbids the `clocks` property for `st,stm32-syscfg`, breaking validation of existing in-tree device trees.
- [High] Making `phy@2400`, `phy@2800`, `#address-cells`, and `#size-cells` unconditionally `required` contradicts their optional nature and breaks existing device trees.
- [Medium] The patternProperties entry contains a $ref to a schema file (`st,stm32-usb2phy.yaml`) that does not exist in the repository.
--
commit ddc0637029fe22061a9355ce24276a2cff5c6682
Author: Marek Vasut <marex@nabladev.com>
dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells
The st,stm32mp23-syscfg and st,stm32mp25-syscfg can have subnodes, which
represent the USB 2.0 FEMTO-PHY. Document subnodes pattern properties and
address/size cells.
> diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> index 95d2319afe235..a559f8b03b842 100644
> --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> @@ -39,6 +39,17 @@ properties:
[ ... ]
> +patternProperties:
> + "^phy@2[48]00$":
> + type: object
> + $ref: /schemas/phy/st,stm32-usb2phy.yaml
[Severity: Medium]
Does this reference target a schema file (st,stm32-usb2phy.yaml) that is
missing from the repository? Schema validation tooling might fail to resolve
this reference.
> required:
> - compatible
> - reg
> @@ -54,13 +65,30 @@ allOf:
> then:
> required:
> - clocks
> + else:
> + properties:
> + clocks: false
[Severity: High]
Does this block incorrectly forbid the clocks property for other compatibles,
breaking validation of existing in-tree device trees?
For example, platforms like STM32F429 use the st,stm32-syscfg compatible and
define clocks:
arch/arm/boot/dts/st/stm32f429.dtsi:syscfg {
...
clocks = <&rcc 0 STM32F4_APB2_CLOCK(SYSCFG)>;
...
}
Because st,stm32-syscfg does not match the preceding if condition, it falls
into this else block, which will cause dtbs_check to fail.
> - if:
> properties:
> compatible:
> - const: st,stm32mp25-syscfg
> + contains:
> + enum:
> + - st,stm32mp23-syscfg
> + - st,stm32mp25-syscfg
> then:
> required:
> + - "#address-cells"
> - "#clock-cells"
> + - "#size-cells"
> + - phy@2400
> + - phy@2800
[Severity: High]
Does making these properties unconditionally required contradict their optional
nature implied by "can have subnodes" in the commit message?
Existing devicetrees without these subnodes will fail validation. For
example, in arch/arm64/boot/dts/st/stm32mp251.dtsi:
syscfg: syscon@44230000 {
compatible = "st,stm32mp25-syscfg", "syscon";
reg = <0x44230000 0x10000>;
#clock-cells = <0>;
};
This node will immediately fail dtbs_check because it lacks the newly
mandated phy@2400, phy@2800, #address-cells, and #size-cells properties.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260902124018.606544-1-marex@nabladev.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells
2026-09-02 12:39 [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells Marek Vasut
2026-09-02 12:39 ` [PATCH v6 2/2] soc: st: Add STM32MP2 SYSCFG driver Marek Vasut
2026-09-02 12:59 ` [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells sashiko-bot
@ 2026-09-02 17:04 ` Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-09-02 17:04 UTC (permalink / raw)
To: Marek Vasut
Cc: linux-arm-kernel, fabrice.gasnier, Alexandre Torgue,
Christophe Roullier, Conor Dooley, Krzysztof Kozlowski,
Maxime Coquelin, Raphael Gallais-Pou, Rob Herring, Yannick Fertre,
devicetree, kernel, linux-kernel, linux-stm32
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
On Wed, Sep 02, 2026 at 02:39:49PM +0200, Marek Vasut wrote:
> The st,stm32mp23-syscfg and st,stm32mp25-syscfg can have subnodes, which
> represent the USB 2.0 FEMTO-PHY. Document subnodes pattern properties and
> address/size cells.
>
> Signed-off-by: Marek Vasut <marex@nabladev.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-02 17:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 12:39 [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells Marek Vasut
2026-09-02 12:39 ` [PATCH v6 2/2] soc: st: Add STM32MP2 SYSCFG driver Marek Vasut
2026-09-02 12:59 ` [PATCH v6 1/2] dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells sashiko-bot
2026-09-02 17:04 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox