Skip to contentSkip to conversation

dt-bindings: Consolidate "sram" property definition

PATCH In review Rob Herring (Arm) 15 participants 16 messages May 11 – Jun 2

Subsystems (26)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Consolidate "sram" property definition

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

---
 .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
 .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----
 .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
 .../bindings/media/cnm,wave521c.yaml          |  2 +-
 .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
 .../bindings/media/rockchip,vdec.yaml         |  5 ++--
 .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
 .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
 .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
 .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
 .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
 .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
 .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
 .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
 16 files changed, 48 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml +1 -1
index 27118f4c0d28..fd095e5742c5 100644
@@ -41,7 +41,7 @@ properties:
       - const: sw3
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description: phandle pointing to the mmio-sram device node
 
 required:
Documentation/devicetree/bindings/display/msm/gpu.yaml +1 -5
index 04b2328903ca..358759fad8dc 100644
@@ -84,13 +84,9 @@ properties:
     maxItems: 64
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions.
+    description:
       phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
       a4xx Snapdragon SoCs. See
       Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
Documentation/devicetree/bindings/dma/stericsson,dma40.yaml +2 -6
index 607da11e7baa..d8f92838f4c9 100644
@@ -136,13 +136,9 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-    description: A phandle array with inner size 1 (no arg cells).
-      First phandle is the LCPA (Logical Channel Parameter Address) memory.
-      Second phandle is the  LCLA (Logical Channel Link base Address) memory.
-    maxItems: 2
     items:
-      maxItems: 1
+      - description: LCPA (Logical Channel Parameter Address) memory.
+      - description: LCLA (Logical Channel Link base Address) memory.
 
   memcpy-channels:
     $ref: /schemas/types.yaml#/definitions/uint32-array
Documentation/devicetree/bindings/media/cnm,wave521c.yaml +1 -1
index 6a11c1d11fb5..6cd33dfd095d 100644
@@ -37,7 +37,7 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       The VPU uses the SRAM to store some of the reference data instead of
       storing it on DMA memory. It is mainly used for the purpose of reducing
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +3 -3
index 18cc6315a821..6ba668aa633d 100644
@@ -56,10 +56,10 @@ properties:
     maxItems: 5               # Wrapper and 4 slots
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      Optional phandle to a reserved on-chip SRAM regions. The SRAM can
-      be used for descriptor storage, which may improve bus utilization.
+      The SRAM can be used for descriptor storage, which may improve bus
+      utilization.
 
 required:
   - compatible
Documentation/devicetree/bindings/media/rockchip,vdec.yaml +2 -3
index 42022401d0ff..4f38a0ef29d8 100644
@@ -91,9 +91,8 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      phandle to a reserved on-chip SRAM regions.
+    maxItems: 1
+    description:
       Some SoCs, like rk3588 provide on-chip SRAM to store temporary
       buffers during decoding.
 
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +3 -3
index d9fbb90b0977..7c2ddd27780f 100644
@@ -47,10 +47,10 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      phandle to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
Documentation/devicetree/bindings/net/mediatek,net.yaml +1 -2
index cc346946291a..6bbd83c6aaf7 100644
@@ -67,8 +67,7 @@ properties:
       - const: ppe
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: phandle to mmio SRAM
+    maxItems: 1
 
   mediatek,ethsys:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml +1 -1
index c296e5711848..883033b19b8f 100644
@@ -21,7 +21,7 @@ properties:
       - ti,am654-sr1-icssg-prueth  # for AM65x SoC family, SR1.0
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to MSMC SRAM node
 
Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml +1 -1
index a98ad45ca66f..9370c43bc66a 100644
@@ -24,7 +24,7 @@ properties:
       - ti,am3359-prueth   # for AM33x SoC family
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to OCMC SRAM node
 
Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml +1 -6
index 76e8ca44906a..3f710433e937 100644
@@ -48,12 +48,7 @@ properties:
     minItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      phandles to a reserved SRAM region which is used as the memory of
-      the ARC core. The region should be defined as child nodes of the
-      AHB SRAM node as per the generic bindings in
-      Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
 
   amlogic,secbus2:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +0 -8
index b51bb863d759..8b1ed384ef22 100644
@@ -75,16 +75,8 @@ properties:
 # --------------------
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions. The regions
-      should be defined as child nodes of the respective SRAM node, and
-      should be defined as per the generic bindings in,
-      Documentation/devicetree/bindings/sram/sram.yaml
 
 allOf:
   - if:
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +0 -8
index 775e9b3a1938..14e6b2f817b3 100644
@@ -224,16 +224,8 @@ patternProperties:
           at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted.
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 4
-        items:
-          maxItems: 1
-        description: |
-          phandles to one or more reserved on-chip SRAM regions. The regions
-          should be defined as child nodes of the respective SRAM node, and
-          should be defined as per the generic bindings in,
-          Documentation/devicetree/bindings/sram/sram.yaml
 
     required:
       - compatible
Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml +1 -8
index ee63c03949c9..c7d5e58330d6 100644
@@ -106,20 +106,13 @@ patternProperties:
           - const: rx
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 8
-        items:
-          maxItems: 1
-        description: |
+        description:
           phandles to one or more reserved on-chip SRAM regions. Other than TCM,
           the RPU can execute instructions and access data from the OCM memory,
           the main DDR memory, and other system memories.
 
-          The regions should be defined as child nodes of the respective SRAM
-          node, and should be defined as per the generic bindings in
-          Documentation/devicetree/bindings/sram/sram.yaml
-
       memory-region:
         description: |
           List of phandles to the reserved memory regions associated with the
Documentation/devicetree/bindings/spi/st,stm32-spi.yaml +4 -6
index 472e92974714..6d7d595e4ab3 100644
@@ -89,12 +89,10 @@ properties:
       - const: rxm2m
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Phandles to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
-      The region should be defined as child node of the AHB SRAM node
-      as per the generic bindings in Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
+    description:
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   power-domains:
     maxItems: 1
Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +26 -0
new file mode 100644
index 000000000000..f00087bd2879
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SRAM Consumers
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+select: true
+
+properties:
+  sram:
+    description:
+      Phandles to one or more reserved on-chip SRAM regions. The regions
+      should be defined as child nodes of the respective SRAM node, and
+      should be defined as per the generic bindings in,
+      Documentation/devicetree/bindings/sram/sram.yaml
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      maxItems: 1
+
+additionalProperties: true
+...
Signature · 1 line
2.53.0
maintainer
#1 lore raw

PATCH 1/1 dt-bindings: Consolidate "sram" property definition

Gentlemen, please test this patch on your respective platforms and provide "Tested-by:" tags publicly.

---------- Forwarded message ---------
From: Rob Herring (Arm) <[email protected]>
Date: Mon, 11 May 2026 at 10:59
Subject: [PATCH] dt-bindings: Consolidate "sram" property definition
To: Liu Ying <[email protected]>, Philipp Zabel <[email protected]>, Maarten Lankhorst <[email protected]>, Maxime Ripard <[email protected]>, Thomas Zimmermann <[email protected]>, David Airlie <[email protected]>, Simona Vetter <[email protected]>, Krzysztof Kozlowski <[email protected]>, Conor Dooley <[email protected]>, Frank Li <[email protected]>, Sascha Hauer <[email protected]>, Pengutronix Kernel Team <[email protected]>, Fabio Estevam <[email protected]>, Rob Clark <[email protected]>, Sean Paul <[email protected]>, Konrad Dybcio <[email protected]>, Akhil P Oommen <[email protected]>, Dmitry Baryshkov <[email protected]>, Abhinav Kumar <[email protected]>, Jessica Zhang <[email protected]>, Marijn Suijten <[email protected]>, Vinod Koul <[email protected]>, Nas Chung <[email protected]>, Jackson Lee <[email protected]>, Mauro Carvalho Chehab <[email protected]>, Mirela Rabulea <[email protected]>, Detlev Casanova <[email protected]>, Ezequiel Garcia <[email protected]>, Heiko Stuebner <[email protected]>, Hugues Fruchet <[email protected]>, Alain Volmat <[email protected]>, Maxime Coquelin <[email protected]>, Alexandre Torgue <[email protected]>, Andrew Lunn <[email protected]>, David S. Miller <[email protected]>, Eric Dumazet <[email protected]>, Jakub Kicinski <[email protected]>, Paolo Abeni <[email protected]>, MD Danish Anwar <[email protected]>, Roger Quadros <[email protected]>, Parvathi Pudi <[email protected]>, Mohan Reddy Putluru <[email protected]>, Bjorn Andersson <[email protected]>, Mathieu Poirier <[email protected]>, Neil Armstrong <[email protected]>, Kevin Hilman <[email protected]>, Jerome Brunet <[email protected]>, Martin Blumenstingl <[email protected]>, Michal Simek <[email protected]>, Mark Brown <[email protected]>, Matthias Brugger <[email protected]>, AngeloGioacchino Del Regno <[email protected]>, Linus Walleij <[email protected]>, Lorenzo Bianconi <[email protected]>, Felix Fietkau <[email protected]>, Andrew F. Davis <[email protected]>, Hussain Khaja <[email protected]>, Suman Anna <[email protected]>, Ben Levinsky <[email protected]>, Tanmay Shah <[email protected]>, Erwan Leray <[email protected]>, Fabrice Gasnier <[email protected]>
Cc: Roger Quadros <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

---
 .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
 .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----
 .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
 .../bindings/media/cnm,wave521c.yaml          |  2 +-
 .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
 .../bindings/media/rockchip,vdec.yaml         |  5 ++--
 .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
 .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
 .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
 .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
 .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
 .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
 .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
 .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
 16 files changed, 48 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml index 27118f4c0d28..fd095e5742c5 100644

Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml +1 -1
@@ -41,7 +41,7 @@ properties:
       - const: sw3
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description: phandle pointing to the mmio-sram device node
 
 required:
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/display/msm/gpu.yaml index 04b2328903ca..358759fad8dc 100644

Documentation/devicetree/bindings/display/msm/gpu.yaml +1 -5
@@ -84,13 +84,9 @@ properties:
     maxItems: 64
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions.
+    description:
       phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
       a4xx Snapdragon SoCs. See
       Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml index 607da11e7baa..d8f92838f4c9 100644

Documentation/devicetree/bindings/dma/stericsson,dma40.yaml +2 -6
@@ -136,13 +136,9 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-    description: A phandle array with inner size 1 (no arg cells).
-      First phandle is the LCPA (Logical Channel Parameter Address) memory.
-      Second phandle is the  LCLA (Logical Channel Link base Address) memory.
-    maxItems: 2
     items:
-      maxItems: 1
+      - description: LCPA (Logical Channel Parameter Address) memory.
+      - description: LCLA (Logical Channel Link base Address) memory.
 
   memcpy-channels:
     $ref: /schemas/types.yaml#/definitions/uint32-array
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/media/cnm,wave521c.yaml index 6a11c1d11fb5..6cd33dfd095d 100644

Documentation/devicetree/bindings/media/cnm,wave521c.yaml +1 -1
@@ -37,7 +37,7 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       The VPU uses the SRAM to store some of the reference data instead of
       storing it on DMA memory. It is mainly used for the purpose of reducing
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml index 18cc6315a821..6ba668aa633d 100644

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +3 -3
@@ -56,10 +56,10 @@ properties:
     maxItems: 5               # Wrapper and 4 slots
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      Optional phandle to a reserved on-chip SRAM regions. The SRAM can
-      be used for descriptor storage, which may improve bus utilization.
+      The SRAM can be used for descriptor storage, which may improve bus
+      utilization.
 
 required:
   - compatible
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml index 42022401d0ff..4f38a0ef29d8 100644

Documentation/devicetree/bindings/media/rockchip,vdec.yaml +2 -3
@@ -91,9 +91,8 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      phandle to a reserved on-chip SRAM regions.
+    maxItems: 1
+    description:
       Some SoCs, like rk3588 provide on-chip SRAM to store temporary
       buffers during decoding.
 
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml index d9fbb90b0977..7c2ddd27780f 100644

Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +3 -3
@@ -47,10 +47,10 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      phandle to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/net/mediatek,net.yaml index cc346946291a..6bbd83c6aaf7 100644

Documentation/devicetree/bindings/net/mediatek,net.yaml +1 -2
@@ -67,8 +67,7 @@ properties:
       - const: ppe
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: phandle to mmio SRAM
+    maxItems: 1
 
   mediatek,ethsys:
     $ref: /schemas/types.yaml#/definitions/phandle
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml index c296e5711848..883033b19b8f 100644

Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml +1 -1
@@ -21,7 +21,7 @@ properties:
       - ti,am654-sr1-icssg-prueth  # for AM65x SoC family, SR1.0
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to MSMC SRAM node
 
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml index a98ad45ca66f..9370c43bc66a 100644

Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml +1 -1
@@ -24,7 +24,7 @@ properties:
       - ti,am3359-prueth   # for AM33x SoC family
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to OCMC SRAM node
 
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml index 76e8ca44906a..3f710433e937 100644

Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml +1 -6
@@ -48,12 +48,7 @@ properties:
     minItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      phandles to a reserved SRAM region which is used as the memory of
-      the ARC core. The region should be defined as child nodes of the
-      AHB SRAM node as per the generic bindings in
-      Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
 
   amlogic,secbus2:
     $ref: /schemas/types.yaml#/definitions/phandle
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml index b51bb863d759..8b1ed384ef22 100644

Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +0 -8
@@ -75,16 +75,8 @@ properties:
 # --------------------
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions. The regions
-      should be defined as child nodes of the respective SRAM node, and
-      should be defined as per the generic bindings in,
-      Documentation/devicetree/bindings/sram/sram.yaml
 
 allOf:
   - if:
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml index 775e9b3a1938..14e6b2f817b3 100644

Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +0 -8
@@ -224,16 +224,8 @@ patternProperties:
           at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted.
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 4
-        items:
-          maxItems: 1
-        description: |
-          phandles to one or more reserved on-chip SRAM regions. The regions
-          should be defined as child nodes of the respective SRAM node, and
-          should be defined as per the generic bindings in,
-          Documentation/devicetree/bindings/sram/sram.yaml
 
     required:
       - compatible
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml index ee63c03949c9..c7d5e58330d6 100644

Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml +1 -4
@@ -106,20 +106,13 @@ patternProperties:
           - const: rx
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 8
-        items:
-          maxItems: 1
-        description: |
+        description:
           phandles to one or more reserved on-chip SRAM regions.

Other than TCM,
the RPU can execute instructions and access data from the OCM memory, the main DDR memory, and other system memories.

-          The regions should be defined as child nodes of the respective SRAM
-          node, and should be defined as per the generic bindings in
-          Documentation/devicetree/bindings/sram/sram.yaml

-
memory-region:
description: |
List of phandles to the reserved memory regions associated with the

(quoted diff) +0 -0

b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml index 472e92974714..6d7d595e4ab3 100644

Documentation/devicetree/bindings/spi/st,stm32-spi.yaml +0 -6
@@ -89,12 +89,10 @@ properties:
       - const: rxm2m
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Phandles to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
-      The region should be defined as child node of the AHB SRAM node
-      as per the generic bindings in

Documentation/devicetree/bindings/sram/sram.yaml
+ maxItems: 1
+ description:
+ SRAM region which is used as temporary storage memory between DMA and
+ MDMA engines.

power-domains:
maxItems: 1

(quoted diff) +0 -0

b/Documentation/devicetree/bindings/sram/sram-consumer.yaml new file mode 100644
index 000000000000..f00087bd2879

Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +26 -0
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SRAM Consumers
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+select: true
+
+properties:
+  sram:
+    description:
+      Phandles to one or more reserved on-chip SRAM regions. The regions
+      should be defined as child nodes of the respective SRAM node, and
+      should be defined as per the generic bindings in,
+      Documentation/devicetree/bindings/sram/sram.yaml
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      maxItems: 1
+
+additionalProperties: true
+...

--
2.53.0

#2 lore raw
Quoted 2 lines · Mathieu Poirier

Gentlemen, please test this patch on your respective platforms and provide "Tested-by:" tags publicly.

Instead of "Tested-by", please rather provide reviewed-by (if reviewing everything) or acked-by.

Testing in term of bindings is a build process and Rob + various bots already do that, thus tag is not really applicable. It's not possible to test a binding on the device.

Best regards,
Krzysztof

Acked-by on v1 1/1
#7 lore raw
In reply to Rob Herring (Arm)
Quoted 4 lines

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

Quoted 319 lines
---
 .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
 .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----
 .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
 .../bindings/media/cnm,wave521c.yaml          |  2 +-
 .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
 .../bindings/media/rockchip,vdec.yaml         |  5 ++--
 .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
 .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
 .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
 .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
 .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
 .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
 .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
 .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
 16 files changed, 48 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml +1 -1
index 27118f4c0d28..fd095e5742c5 100644
@@ -41,7 +41,7 @@ properties:
       - const: sw3
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description: phandle pointing to the mmio-sram device node
 
 required:
Documentation/devicetree/bindings/display/msm/gpu.yaml +1 -5
index 04b2328903ca..358759fad8dc 100644
@@ -84,13 +84,9 @@ properties:
     maxItems: 64
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions.
+    description:
       phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
       a4xx Snapdragon SoCs. See
       Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
Documentation/devicetree/bindings/dma/stericsson,dma40.yaml +2 -6
index 607da11e7baa..d8f92838f4c9 100644
@@ -136,13 +136,9 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-    description: A phandle array with inner size 1 (no arg cells).
-      First phandle is the LCPA (Logical Channel Parameter Address) memory.
-      Second phandle is the  LCLA (Logical Channel Link base Address) memory.
-    maxItems: 2
     items:
-      maxItems: 1
+      - description: LCPA (Logical Channel Parameter Address) memory.
+      - description: LCLA (Logical Channel Link base Address) memory.
 
   memcpy-channels:
     $ref: /schemas/types.yaml#/definitions/uint32-array
Documentation/devicetree/bindings/media/cnm,wave521c.yaml +1 -1
index 6a11c1d11fb5..6cd33dfd095d 100644
@@ -37,7 +37,7 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       The VPU uses the SRAM to store some of the reference data instead of
       storing it on DMA memory. It is mainly used for the purpose of reducing
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +3 -3
index 18cc6315a821..6ba668aa633d 100644
@@ -56,10 +56,10 @@ properties:
     maxItems: 5               # Wrapper and 4 slots
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      Optional phandle to a reserved on-chip SRAM regions. The SRAM can
-      be used for descriptor storage, which may improve bus utilization.
+      The SRAM can be used for descriptor storage, which may improve bus
+      utilization.
 
 required:
   - compatible
Documentation/devicetree/bindings/media/rockchip,vdec.yaml +2 -3
index 42022401d0ff..4f38a0ef29d8 100644
@@ -91,9 +91,8 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      phandle to a reserved on-chip SRAM regions.
+    maxItems: 1
+    description:
       Some SoCs, like rk3588 provide on-chip SRAM to store temporary
       buffers during decoding.
 
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +3 -3
index d9fbb90b0977..7c2ddd27780f 100644
@@ -47,10 +47,10 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      phandle to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
Documentation/devicetree/bindings/net/mediatek,net.yaml +1 -2
index cc346946291a..6bbd83c6aaf7 100644
@@ -67,8 +67,7 @@ properties:
       - const: ppe
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: phandle to mmio SRAM
+    maxItems: 1
 
   mediatek,ethsys:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml +1 -1
index c296e5711848..883033b19b8f 100644
@@ -21,7 +21,7 @@ properties:
       - ti,am654-sr1-icssg-prueth  # for AM65x SoC family, SR1.0
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to MSMC SRAM node
 
Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml +1 -1
index a98ad45ca66f..9370c43bc66a 100644
@@ -24,7 +24,7 @@ properties:
       - ti,am3359-prueth   # for AM33x SoC family
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to OCMC SRAM node
 
Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml +1 -6
index 76e8ca44906a..3f710433e937 100644
@@ -48,12 +48,7 @@ properties:
     minItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      phandles to a reserved SRAM region which is used as the memory of
-      the ARC core. The region should be defined as child nodes of the
-      AHB SRAM node as per the generic bindings in
-      Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
 
   amlogic,secbus2:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +0 -8
index b51bb863d759..8b1ed384ef22 100644
@@ -75,16 +75,8 @@ properties:
 # --------------------
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions. The regions
-      should be defined as child nodes of the respective SRAM node, and
-      should be defined as per the generic bindings in,
-      Documentation/devicetree/bindings/sram/sram.yaml
 
 allOf:
   - if:
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +0 -8
index 775e9b3a1938..14e6b2f817b3 100644
@@ -224,16 +224,8 @@ patternProperties:
           at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted.
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 4
-        items:
-          maxItems: 1
-        description: |
-          phandles to one or more reserved on-chip SRAM regions. The regions
-          should be defined as child nodes of the respective SRAM node, and
-          should be defined as per the generic bindings in,
-          Documentation/devicetree/bindings/sram/sram.yaml
 
     required:
       - compatible
Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml +1 -8
index ee63c03949c9..c7d5e58330d6 100644
@@ -106,20 +106,13 @@ patternProperties:
           - const: rx
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 8
-        items:
-          maxItems: 1
-        description: |
+        description:
           phandles to one or more reserved on-chip SRAM regions. Other than TCM,
           the RPU can execute instructions and access data from the OCM memory,
           the main DDR memory, and other system memories.
 
-          The regions should be defined as child nodes of the respective SRAM
-          node, and should be defined as per the generic bindings in
-          Documentation/devicetree/bindings/sram/sram.yaml
-
       memory-region:
         description: |
           List of phandles to the reserved memory regions associated with the
Documentation/devicetree/bindings/spi/st,stm32-spi.yaml +4 -6
index 472e92974714..6d7d595e4ab3 100644
@@ -89,12 +89,10 @@ properties:
       - const: rxm2m
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Phandles to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
-      The region should be defined as child node of the AHB SRAM node
-      as per the generic bindings in Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
+    description:
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   power-domains:
     maxItems: 1
Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +26 -0
new file mode 100644
index 000000000000..f00087bd2879
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SRAM Consumers
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+select: true
+
+properties:
+  sram:
+    description:
+      Phandles to one or more reserved on-chip SRAM regions. The regions
+      should be defined as child nodes of the respective SRAM node, and
+      should be defined as per the generic bindings in,
+      Documentation/devicetree/bindings/sram/sram.yaml
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      maxItems: 1
+
+additionalProperties: true
+...
Signature · 1 line
2.53.0
#8 lore raw
In reply to Rob Herring (Arm)
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The global `sram-consumer.yaml` schema causes `dtbs_check` validation failures due to a…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The global sram-consumer.yaml schema causes dtbs_check validation failures due to a namespace collision with standard sram child nodes. --

commit b3fd675e204900532756fc42297dea0b1787d10f
Author: Rob Herring (Arm) <[email protected]>

dt-bindings: Consolidate "sram" property definition

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

[ ... ]

Quoted 17 lines
Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +11 -0
new file mode 100644
index 0000000000000..f00087bd2879b
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SRAM Consumers
+
+maintainers:
+  - Rob Herring <[email protected]>
+

Documentation/devicetree/bindings/sram/sram-consumer.yaml line 21

Quoted 10 lines
Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +10 -0
+select: true
+
+properties:
+  sram:
+    description:
+      Phandles to one or more reserved on-chip SRAM regions. The regions
+      should be defined as child nodes of the respective SRAM node, and
+      should be defined as per the generic bindings in,
+      Documentation/devicetree/bindings/sram/sram.yaml
+    $ref: /schemas/types.yaml#/definitions/phandle-array

Will this cause dtbs_check validation failures due to a namespace collision with standard sram child nodes?

Because select: true makes this apply globally, it intercepts the "sram" key for all nodes. In dt-schema, properties and child nodes share the exact same namespace.

A child node named sram without a unit-address (which is permitted by sram.yaml and exists in device trees like arch/powerpc/boot/dts/ebony.dts) is represented in the YAML output as a JSON object assigned to the "sram" key of its parent.

When dt-validate evaluates the parent node, this global schema will attempt to validate the child node object against the phandle-array constraints, triggering a schema validation error because an object is not an array.

Is there a way to limit the selection so it doesn't match these child nodes?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Acked-by on v1 1/1
#10 lore raw
In reply to Rob Herring (Arm)
Quoted 7 lines · Rob Herring (Arm)

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

---
 .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
 .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----
Quoted 17 lines
 .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
 .../bindings/media/cnm,wave521c.yaml          |  2 +-
 .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
 .../bindings/media/rockchip,vdec.yaml         |  5 ++--
 .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
 .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
 .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
 .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
 .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
 .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
 .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
 .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
 16 files changed, 48 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by Tanmay Shah on v1 1/1
#12 lore raw
In reply to Rob Herring (Arm)
Quoted 320 lines · Rob Herring (Arm)

The "sram" property has become a de facto standard property, so create a common schema for it and drop all the duplicated definitions.

---
 .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
 .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----
 .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
 .../bindings/media/cnm,wave521c.yaml          |  2 +-
 .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
 .../bindings/media/rockchip,vdec.yaml         |  5 ++--
 .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
 .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
 .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
 .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
 .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
 .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
 .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
 .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
 16 files changed, 48 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml +1 -1
index 27118f4c0d28..fd095e5742c5 100644
@@ -41,7 +41,7 @@ properties:
       - const: sw3
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description: phandle pointing to the mmio-sram device node
 
 required:
Documentation/devicetree/bindings/display/msm/gpu.yaml +1 -5
index 04b2328903ca..358759fad8dc 100644
@@ -84,13 +84,9 @@ properties:
     maxItems: 64
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions.
+    description:
       phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
       a4xx Snapdragon SoCs. See
       Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
Documentation/devicetree/bindings/dma/stericsson,dma40.yaml +2 -6
index 607da11e7baa..d8f92838f4c9 100644
@@ -136,13 +136,9 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-    description: A phandle array with inner size 1 (no arg cells).
-      First phandle is the LCPA (Logical Channel Parameter Address) memory.
-      Second phandle is the  LCLA (Logical Channel Link base Address) memory.
-    maxItems: 2
     items:
-      maxItems: 1
+      - description: LCPA (Logical Channel Parameter Address) memory.
+      - description: LCLA (Logical Channel Link base Address) memory.
 
   memcpy-channels:
     $ref: /schemas/types.yaml#/definitions/uint32-array
Documentation/devicetree/bindings/media/cnm,wave521c.yaml +1 -1
index 6a11c1d11fb5..6cd33dfd095d 100644
@@ -37,7 +37,7 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       The VPU uses the SRAM to store some of the reference data instead of
       storing it on DMA memory. It is mainly used for the purpose of reducing
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +3 -3
index 18cc6315a821..6ba668aa633d 100644
@@ -56,10 +56,10 @@ properties:
     maxItems: 5               # Wrapper and 4 slots
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      Optional phandle to a reserved on-chip SRAM regions. The SRAM can
-      be used for descriptor storage, which may improve bus utilization.
+      The SRAM can be used for descriptor storage, which may improve bus
+      utilization.
 
 required:
   - compatible
Documentation/devicetree/bindings/media/rockchip,vdec.yaml +2 -3
index 42022401d0ff..4f38a0ef29d8 100644
@@ -91,9 +91,8 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      phandle to a reserved on-chip SRAM regions.
+    maxItems: 1
+    description:
       Some SoCs, like rk3588 provide on-chip SRAM to store temporary
       buffers during decoding.
 
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +3 -3
index d9fbb90b0977..7c2ddd27780f 100644
@@ -47,10 +47,10 @@ properties:
     maxItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
-      phandle to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
Documentation/devicetree/bindings/net/mediatek,net.yaml +1 -2
index cc346946291a..6bbd83c6aaf7 100644
@@ -67,8 +67,7 @@ properties:
       - const: ppe
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: phandle to mmio SRAM
+    maxItems: 1
 
   mediatek,ethsys:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml +1 -1
index c296e5711848..883033b19b8f 100644
@@ -21,7 +21,7 @@ properties:
       - ti,am654-sr1-icssg-prueth  # for AM65x SoC family, SR1.0
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to MSMC SRAM node
 
Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml +1 -1
index a98ad45ca66f..9370c43bc66a 100644
@@ -24,7 +24,7 @@ properties:
       - ti,am3359-prueth   # for AM33x SoC family
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    maxItems: 1
     description:
       phandle to OCMC SRAM node
 
Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml +1 -6
index 76e8ca44906a..3f710433e937 100644
@@ -48,12 +48,7 @@ properties:
     minItems: 1
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      phandles to a reserved SRAM region which is used as the memory of
-      the ARC core. The region should be defined as child nodes of the
-      AHB SRAM node as per the generic bindings in
-      Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
 
   amlogic,secbus2:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +0 -8
index b51bb863d759..8b1ed384ef22 100644
@@ -75,16 +75,8 @@ properties:
 # --------------------
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
     minItems: 1
     maxItems: 4
-    items:
-      maxItems: 1
-    description: |
-      phandles to one or more reserved on-chip SRAM regions. The regions
-      should be defined as child nodes of the respective SRAM node, and
-      should be defined as per the generic bindings in,
-      Documentation/devicetree/bindings/sram/sram.yaml
 
 allOf:
   - if:
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +0 -8
index 775e9b3a1938..14e6b2f817b3 100644
@@ -224,16 +224,8 @@ patternProperties:
           at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted.
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 4
-        items:
-          maxItems: 1
-        description: |
-          phandles to one or more reserved on-chip SRAM regions. The regions
-          should be defined as child nodes of the respective SRAM node, and
-          should be defined as per the generic bindings in,
-          Documentation/devicetree/bindings/sram/sram.yaml
 
     required:
       - compatible
Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml +1 -8
index ee63c03949c9..c7d5e58330d6 100644
@@ -106,20 +106,13 @@ patternProperties:
           - const: rx
 
       sram:
-        $ref: /schemas/types.yaml#/definitions/phandle-array
         minItems: 1
         maxItems: 8
-        items:
-          maxItems: 1
-        description: |
+        description:
           phandles to one or more reserved on-chip SRAM regions. Other than TCM,
           the RPU can execute instructions and access data from the OCM memory,
           the main DDR memory, and other system memories.
 
-          The regions should be defined as child nodes of the respective SRAM
-          node, and should be defined as per the generic bindings in
-          Documentation/devicetree/bindings/sram/sram.yaml
-
       memory-region:
         description: |
           List of phandles to the reserved memory regions associated with the
Documentation/devicetree/bindings/spi/st,stm32-spi.yaml +4 -6
index 472e92974714..6d7d595e4ab3 100644
@@ -89,12 +89,10 @@ properties:
       - const: rxm2m
 
   sram:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Phandles to a reserved SRAM region which is used as temporary
-      storage memory between DMA and MDMA engines.
-      The region should be defined as child node of the AHB SRAM node
-      as per the generic bindings in Documentation/devicetree/bindings/sram/sram.yaml
+    maxItems: 1
+    description:
+      SRAM region which is used as temporary storage memory between DMA and
+      MDMA engines.
 
   power-domains:
     maxItems: 1
Documentation/devicetree/bindings/sram/sram-consumer.yaml new file +26 -0
new file mode 100644
index 000000000000..f00087bd2879
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SRAM Consumers
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+select: true
+
+properties:
+  sram:
+    description:
+      Phandles to one or more reserved on-chip SRAM regions. The regions
+      should be defined as child nodes of the respective SRAM node, and
+      should be defined as per the generic bindings in,
+      Documentation/devicetree/bindings/sram/sram.yaml
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      maxItems: 1
+
+additionalProperties: true
+...