[PATCH v6 02/10] dt-bindings: arm: stm32: allow TAMP nvram child node for syscon

Patrice Chotard patrice.chotard at foss.st.com
Tue Nov 24 08:47:35 PST 2026


The STM32 TAMP node (compatible "st,stm32-tamp", "syscon", "simple-mfd")
exposes its backup registers through an nvram child node described by
nvmem/st,stm32-tamp-nvram.yaml. That requires the TAMP node to carry
"#address-cells", "#size-cells", "ranges" and an "nvram at ..." child.

st,stm32-syscon.yaml uses "additionalProperties: false" and disallowed
these properties for the TAMP variant, so wiring the nvram provider into
the DTSI made "make dtbs_check" fail on every STM32MP TAMP node:

  tamp at 46010000 (st,stm32-tamp): 'nvram at 46010100', 'ranges' do not match
  any of the regexes: '^phy at 2[48]00$', '^pinctrl-[0-9]+$'

Allow the addressing properties and the nvram child, gated on the
st,stm32-tamp compatible so the other syscon variants stay strict.
"#size-cells" may be 1 or 2: the STM32MP21 soc bus uses two size cells
while the other STM32MP SoCs use one.

Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
---
 .../bindings/arm/stm32/st,stm32-syscon.yaml        | 43 ++++++++++++++++++++--
 1 file changed, 40 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
index a559f8b03b84..70266070c57b 100644
--- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
@@ -43,13 +43,19 @@ properties:
     const: 1
 
   "#size-cells":
-    const: 1
+    enum: [1, 2]
+
+  ranges: true
 
 patternProperties:
   "^phy at 2[48]00$":
     type: object
     $ref: /schemas/phy/st,stm32-usb2phy.yaml
 
+  "^nvram@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/nvmem/st,stm32-tamp-nvram.yaml
+
 required:
   - compatible
   - reg
@@ -76,6 +82,9 @@ allOf:
               - st,stm32mp23-syscfg
               - st,stm32mp25-syscfg
     then:
+      properties:
+        "#size-cells":
+          const: 1
       required:
         - "#address-cells"
         - "#clock-cells"
@@ -84,11 +93,39 @@ allOf:
         - phy at 2800
     else:
       properties:
-        '#address-cells': false
         '#clock-cells': false
-        '#size-cells': false
         phy at 2400: false
         phy at 2800: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: st,stm32-tamp
+    then:
+      properties:
+        "#size-cells":
+          enum: [1, 2]
+    else:
+      properties:
+        ranges: false
+      patternProperties:
+        "^nvram@[0-9a-f]+$": false
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - st,stm32-tamp
+              - st,stm32mp23-syscfg
+              - st,stm32mp25-syscfg
+    then:
+      required:
+        - "#address-cells"
+        - "#size-cells"
+    else:
+      properties:
+        '#address-cells': false
+        '#size-cells': false
 
 additionalProperties: false
 

-- 
2.43.0




More information about the linux-arm-kernel mailing list