dt-bindings: arm: stm32: Document st,stm32mp23/25-syscfg subnodes and cells
Subsystems (2)
PATCH v5 1/2 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.
---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Roullier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
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/[email protected]/
V5: - Add missing contains: into conditional
- Add phy subnodes into required list for stm32mp23-syscfg/stm32mp25-syscfg
--- .../bindings/arm/stm32/st,stm32-syscon.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +19 -1
@@ -39,6 +39,17 @@ properties: "#clock-cells": const: 0 + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + $ref: /schemas/phy/st,stm32-usb2phy.yaml + required: - compatible - reg
@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains: + enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800 additionalProperties: false
Signature · 1 line
2.53.0
PATCH v5 2/2 soc: st: Add STM32MP2 SYSCFG driver
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.
---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Roullier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
V4: New patch
V5: No change
--- 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
drivers/soc/Kconfig +1 -0
@@ -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"
drivers/soc/Makefile +1 -0
@@ -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/
drivers/soc/st/Kconfig new file +12 -0
@@ -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
drivers/soc/st/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_SOC_STM32MP2) += stm32mp2-syscfg.o
drivers/soc/st/stm32mp2-syscfg.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* 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 <[email protected]>" ); +MODULE_DESCRIPTION ("ST STM32MP2 SYSCFG driver" ); +MODULE_LICENSE ("GPL" );
Signature · 1 line
2.53.0
Re: [Linux-stm32] [PATCH v5 2/2] soc: st: Add STM32MP2 SYSCFG driver
Quoted 89 lines · Marek Vasut
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.
Signed-off-by Marek Vasut <[email protected]>---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Roullier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
V4: New patch
V5: No change--- 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.cdrivers/soc/Kconfig +1
-0@@ -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"drivers/soc/Makefile +1
-0@@ -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/drivers/soc/st/Kconfig new file +12
-0@@ -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 + +endmenudrivers/soc/st/Makefile new file +1
-0@@ -0,0 +1 @@ +obj-$(CONFIG_SOC_STM32MP2) += stm32mp2-syscfg.odrivers/soc/st/stm32mp2-syscfg.c new file +0
-0
drivers/soc/st/stm32mp2-syscfg.c line 1
Quoted 1 line
drivers/soc/st/stm32mp2-syscfg.c new file +1
-0@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0
Hello Marek,
I think this header is deprecated:
https://spdx.org/licenses/GPL-2.0.html
Suggest to adopt GPL-2.0-only
https://spdx.org/licenses/GPL-2.0-only.html
With that, you can add my:
Thanks & BR,
Fabrice
Quoted 32 lines
drivers/soc/st/stm32mp2-syscfg.c new file +32
-0+/* +* 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 <[email protected]>" ); +MODULE_DESCRIPTION ("ST STM32MP2 SYSCFG driver" ); +MODULE_LICENSE ("GPL" );
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Backward Incompatible Schema Breakage for Existing Device Trees - [Low] Broken Schema Reference to…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Backward Incompatible Schema Breakage for Existing Device Trees
- [Low] Broken Schema Reference to Non-Existent File
--
commit 03ebc2d5d17d202d6c215a130814ee9c1eb855c2
Author: Marek Vasut <[email protected]>
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.
Quoted 8 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +0
-0@@ -39,6 +39,17 @@ properties: "#clock-cells": const: 0
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml properties: · line 51
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +10
-0+ "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + $ref: /schemas/phy/st,stm32-usb2phy.yaml
[Severity: Low]
Does this reference a non-existent schema file?
Running dt_binding_check fails because the target file /schemas/phy/st,stm32-usb2phy.yaml cannot be resolved, which breaks the schema validation tooling.
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +2
-1+ required: - compatible - reg@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains:
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml allOf: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +7
-0+ enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800
[Severity: High]
The commit message mentions these nodes "can have subnodes", suggesting they should be optional.
Making them mandatory in this conditional block will cause existing valid device trees to fail schema validation.
For example, this existing node in arch/arm64/boot/dts/st/stm32mp251.dtsi currently lacks these new properties:
syscfg: syscon@44230000 {
compatible = "st,stm32mp25-syscfg", "syscon";
reg = <0x44230000 0x10000>;
#clock-cells = <0>;
};Similar nodes exist in stm32mp231.dtsi.
Could these new required properties be made optional to avoid breaking existing upstream device trees?
Quoted 2 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +0
-0additionalProperties: false
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 62 lines · Marek Vasut
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 <[email protected]>---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Roullier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
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/[email protected]/
V5: - Add missing contains: into conditional
- Add phy subnodes into required list for stm32mp23-syscfg/stm32mp25-syscfg--- .../bindings/arm/stm32/st,stm32-syscon.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +12
-1@@ -39,6 +39,17 @@ properties: "#clock-cells": const: 0 + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + $ref: /schemas/phy/st,stm32-usb2phy.yaml + required: - compatible - reg@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains:
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml allOf: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +7
-0+ enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800
This looks good now, thanks.
I got hung up last time though and maybe didn't notice - in addition to requiring these things here, should we also not forbid them on other platforms that don't have them? IOW, adding "else: properties: foo: false".
With that, if appropriate,
pw-bot: not-applicable
Quoted 6 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +0
-0additionalProperties: falseSignature · 1 line
2.53.0
On 9/1/26 8:11 PM, Conor Dooley wrote:
Hello Conor,
Quoted 19 lines
Quoted 6 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +1
-1@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains:Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml allOf: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +7
-0+ enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800This looks good now, thanks.
Quoted 3 lines
I got hung up last time though and maybe didn't notice - in addition to requiring these things here, should we also not forbid them on other platforms that don't have them? IOW, adding "else: properties: foo: false".
I did add this, and reduced the pattern in patternProperties to match only on phy@2400 and phy@2800 so I can disable those too.
Quoted 2 lines
With that, if appropriate,
Reviewed-by Conor Dooley <[email protected]>
I will send a V6 without this tag, please have a look one more time.
Thank you for your help !
Re: [Linux-stm32] [PATCH v5 1/2] dt-bindings: arm: stm32: Document st, stm32mp23/25-syscfg subnodes and cells
In reply to Marek VasutQuoted 62 lines · Marek Vasut
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 <[email protected]>---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Roullier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
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/[email protected]/
V5: - Add missing contains: into conditional
- Add phy subnodes into required list for stm32mp23-syscfg/stm32mp25-syscfg--- .../bindings/arm/stm32/st,stm32-syscon.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +12
-1@@ -39,6 +39,17 @@ properties: "#clock-cells": const: 0 + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + $ref: /schemas/phy/st,stm32-usb2phy.yaml + required: - compatible - reg@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains:
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml allOf: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +7
-0+ enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800
Hi Marek,
Is just saw the discussing on V4 with Conor. That's mainly a thought:
I'm not sure USB is required, e.g. mandatory for a product, even if not so likely (I don't know if this could exist out there). Still, the nodes could be tweaked (deleted) in a board, to reduce dtb size in such case. I'd relax, e.g. let these 4 props as optional. Do you see any drawback ? That can also be relaxed later, if the case is seen.
Thanks & BR,
Fabrice
Quoted 3 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +0
-0additionalProperties: false
Re: [Linux-stm32] [PATCH v5 1/2] dt-bindings: arm: stm32: Document st, stm32mp23/25-syscfg subnodes and cells
On 9/2/26 10:55 AM, Fabrice Gasnier wrote:
Hello Fabrice,
Quoted 19 lines
Quoted 6 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +1
-1@@ -57,10 +68,17 @@ allOf: - if: properties: compatible: - const: st,stm32mp25-syscfg + contains:Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml allOf: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +7
-0+ enum: + - st,stm32mp23-syscfg + - st,stm32mp25-syscfg then: required: - "#clock-cells" + - "#address-cells" + - "#size-cells" + - phy@2400 + - phy@2800Hi Marek,
Quoted 3 lines
Is just saw the discussing on V4 with Conor. That's mainly a thought:
I'm not sure USB is required, e.g. mandatory for a product, even if not so likely (I don't know if this could exist out there).
I assume you have two use cases in mind:
A) A wall-mount HMI device with only display/touchscreen (No USB plug)
B) A RPi form evaluation kit with all kinds of plugs (Yes USB plug) ?
Quoted 4 lines
Still, the nodes
could be tweaked (deleted) in a board, to reduce dtb size in such case. I'd relax, e.g. let these 4 props as optional. Do you see any drawback ? That can also be relaxed later, if the case is seen.
DT is a hardware description. The PHY IP is not removed from the chip silicon only because the USB signals are not used on that specific product. Therefore, for device type:
A) without USB plug - no action is necessary, the PHYs are already disabled by default in SoC DTSI
B) with USB plug - board DT sets status = "okay" on the PHYs and controllers.
As for reducing the DT size, removing DT nodes for hardware that is present in the silicon negatively impacts the ability to apply DTOs outside of the kernel build process, so I would argue against preemptively removing any DT nodes from DTs to reduce size.
One exception is U-Boot, which adds additional generic bootph-* properties to a subset of DT nodes which should be available early on, and also contains a mechanism which reduces DT size for its U-Boot SPL which operates in severely size constrained environment. However, this is a special case, where removal of nodes from the DT is justified, because in that case, it is certain that those nodes would not and could not be used, and would only waste time.
On the contrary, the DTs that are used to boot Linux should be complete, because the user might enable an IP in there by setting status = "okay" after reaching U-Boot shell, and before booting Linux.