public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
@ 2026-01-08 17:53 Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
                   ` (10 more replies)
  0 siblings, 11 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

The partition bindings fail to restrict undefined properties. This is 
primarily on fixed-partitions which can be nested and partition nodes 
without a compatible string. This series fixes those issues and then 
several problems exposed by restricting undefined properties. As part of 
this, the schema structure is reworked to follow more conventional 
structure of applying schemas by compatible and a schema only checks 1 
level of nodes (unless possible child nodes are fixed).

In theory, we could have all sorts of combinations of different 
partition types nesting, and those may or may not work. No attempt is 
made to support them here. Only the known cases are supported.

Rob

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
Rob Herring (Arm) (10):
      dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
      dt-bindings: mtd: fixed-partitions: Move "compression" to partition node
      dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml
      dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes
      dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas
      dt-bindings: mtd: partitions: Drop partitions.yaml
      dt-bindings: mtd: Ensure partition node properties are documented
      dt-bindings: mtd: fixed-partitions: Restrict undefined properties
      dt-bindings: mtd: partitions: Convert brcm,trx to DT schema
      dt-bindings: mtd: partitions: Combine simple partition bindings

 .../devicetree/bindings/mmc/mmc-card.yaml          | 20 ++-----
 .../devicetree/bindings/mtd/brcm,brcmnand.yaml     |  1 -
 Documentation/devicetree/bindings/mtd/mtd.yaml     | 10 +---
 .../mtd/partitions/arm,arm-firmware-suite.yaml     |  2 -
 .../devicetree/bindings/mtd/partitions/binman.yaml | 53 ------------------
 .../mtd/partitions/brcm,bcm4908-partitions.yaml    |  8 +--
 .../partitions/brcm,bcm947xx-cfe-partitions.yaml   |  2 -
 .../mtd/partitions/brcm,bcm963xx-imagetag.txt      | 45 ---------------
 .../bindings/mtd/partitions/brcm,trx.txt           | 42 --------------
 .../bindings/mtd/partitions/brcm,trx.yaml          | 65 ++++++++++++++++++++++
 .../bindings/mtd/partitions/fixed-partitions.yaml  | 43 ++++----------
 .../mtd/partitions/linksys,ns-partitions.yaml      | 10 +---
 .../bindings/mtd/partitions/partition.yaml         | 44 ++++++++++++++-
 .../bindings/mtd/partitions/partitions.yaml        | 42 --------------
 .../bindings/mtd/partitions/redboot-fis.yaml       |  4 --
 .../devicetree/bindings/mtd/partitions/seama.yaml  | 44 ---------------
 .../bindings/mtd/partitions/simple-partition.yaml  | 61 ++++++++++++++++++++
 .../partitions/tplink,safeloader-partitions.yaml   |  2 +-
 .../devicetree/bindings/mtd/partitions/u-boot.yaml |  2 +-
 .../devicetree/bindings/mtd/ti,davinci-nand.yaml   |  4 +-
 .../devicetree/bindings/mtd/ti,gpmc-onenand.yaml   |  2 +-
 MAINTAINERS                                        |  5 --
 22 files changed, 196 insertions(+), 315 deletions(-)
---
base-commit: fc4e91c639c0af93d63c3d5bc0ee45515dd7504a
change-id: 20260108-dt-mtd-partitions-3fd58ebadfa0

Best regards,
--  
Rob Herring (Arm) <robh@kernel.org>


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

* [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  8:56   ` Krzysztof Kozlowski
  2026-01-09 18:05   ` William Zhang
  2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Some users of "brcm,nand-iproc" include "brcm,brcmnand" and some don't.
The "brcm,brcmnand" compatible is not useful for iProc systems as
there's a separate driver for iProc. So drop it as a fallback.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
index 064e840aeaa1..3105f8e6cbd6 100644
--- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
+++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
@@ -66,7 +66,6 @@ properties:
         items:
           - const: brcm,nand-iproc
           - const: brcm,brcmnand-v6.1
-          - const: brcm,brcmnand
       - description: BCM63168 SoC-specific NAND controller
         items:
           - const: brcm,nand-bcm63168

-- 
2.51.0


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

* [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  8:58   ` Krzysztof Kozlowski
  2026-01-09 11:31   ` Simon Glass
  2026-01-08 17:53 ` [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml Rob Herring (Arm)
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

The "compression" property is defined in the wrong place as it applies
to individual partitions nodes, not all nodes.

Fixes: 8baba8d52ff5 ("dt-bindings: mtd: fixed-partitions: Add compression property")
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/mtd/partitions/fixed-partitions.yaml      | 18 ------------------
 .../devicetree/bindings/mtd/partitions/partition.yaml  | 18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index 62086366837c..73d74c0f5cb7 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -29,24 +29,6 @@ properties:
 
   "#size-cells": true
 
-  compression:
-    $ref: /schemas/types.yaml#/definitions/string
-    description: |
-      Compression algorithm used to store the data in this partition, chosen
-      from a list of well-known algorithms.
-
-      The contents are compressed using this algorithm.
-
-    enum:
-      - none
-      - bzip2
-      - gzip
-      - lzop
-      - lz4
-      - lzma
-      - xz
-      - zstd
-
 patternProperties:
   "@[0-9a-f]+$":
     $ref: partition.yaml#
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index 80d0452a2a33..0b989037a005 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -108,6 +108,24 @@ properties:
       with the padding bytes, so may grow. If ‘align-end’ is not provided,
       no alignment is performed.
 
+  compression:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: |
+      Compression algorithm used to store the data in this partition, chosen
+      from a list of well-known algorithms.
+
+      The contents are compressed using this algorithm.
+
+    enum:
+      - none
+      - bzip2
+      - gzip
+      - lzop
+      - lz4
+      - lzma
+      - xz
+      - zstd
+
 if:
   not:
     required: [ reg ]

-- 
2.51.0


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

* [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  9:22   ` Krzysztof Kozlowski
  2026-01-08 17:53 ` [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes Rob Herring (Arm)
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Defining child node properties specific to the parent schema doesn't work
unless all the child node properties are known. They aren't known because
any partition can define its own properties. The solution to this is
typically something like spi-peripheral-props.yaml, but that's overkill for
this single property. Just move it to partition.yaml instead.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml   | 10 ----------
 .../devicetree/bindings/mtd/partitions/partition.yaml          |  9 +++++++++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index 73d74c0f5cb7..b504d4376d0b 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -33,16 +33,6 @@ patternProperties:
   "@[0-9a-f]+$":
     $ref: partition.yaml#
 
-    properties:
-      sercomm,scpart-id:
-        description: Partition id in Sercomm partition map. Mtd parser
-          uses this id to find a record in the partition map containing
-          offset and size of the current partition. The values from
-          partition map overrides partition offset and size defined in
-          reg property of the dts. Frequently these values are the same,
-          but may differ if device has bad eraseblocks on a flash.
-        $ref: /schemas/types.yaml#/definitions/uint32
-
 required:
   - "#address-cells"
   - "#size-cells"
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index 0b989037a005..568fac50f921 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -126,6 +126,15 @@ properties:
       - xz
       - zstd
 
+  sercomm,scpart-id:
+    description: Partition id in Sercomm partition map. Mtd parser
+      uses this id to find a record in the partition map containing
+      offset and size of the current partition. The values from
+      partition map overrides partition offset and size defined in
+      reg property of the dts. Frequently these values are the same,
+      but may differ if device has bad eraseblocks on a flash.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
 if:
   not:
     required: [ reg ]

-- 
2.51.0


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

* [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (2 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  9:26   ` Krzysztof Kozlowski
  2026-01-08 17:53 ` [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas Rob Herring (Arm)
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

An "nvmem-layout" node can be used in any partition node, so add it.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index 568fac50f921..fe2f7d622e8b 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -135,6 +135,9 @@ properties:
       but may differ if device has bad eraseblocks on a flash.
     $ref: /schemas/types.yaml#/definitions/uint32
 
+  nvmem-layout:
+    $ref: /schemas/nvmem/layouts/nvmem-layout.yaml
+
 if:
   not:
     required: [ reg ]

-- 
2.51.0


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

* [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (3 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  9:31   ` Krzysztof Kozlowski
  2026-01-08 17:53 ` [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml Rob Herring (Arm)
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Whether "#address-cells" and "#size-cells" are used or not depends on
the specific partition type, so drop them from partitions.yaml and
define them in the specific partition schemas as needed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml        | 6 ++++--
 Documentation/devicetree/bindings/mtd/partitions/partitions.yaml    | 6 ------
 Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml   | 4 ----
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index b504d4376d0b..26bef777353d 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -25,9 +25,11 @@ properties:
           - const: sercomm,sc-partitions
           - const: fixed-partitions
 
-  "#address-cells": true
+  "#address-cells":
+    enum: [ 1, 2 ]
 
-  "#size-cells": true
+  "#size-cells":
+    enum: [ 1, 2 ]
 
 patternProperties:
   "@[0-9a-f]+$":
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
index 1dda2c80747b..76199506d690 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
@@ -26,12 +26,6 @@ oneOf:
 properties:
   compatible: true
 
-  '#address-cells':
-    enum: [1, 2]
-
-  '#size-cells':
-    enum: [1, 2]
-
 patternProperties:
   "^partition(-.+|@[0-9a-f]+)$":
     $ref: partition.yaml
diff --git a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
index e3978d2bc056..dc6421150c84 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
@@ -28,10 +28,6 @@ properties:
       device. On a flash memory with 32KB eraseblocks, 0 means the first
       eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on.
 
-  '#address-cells': false
-
-  '#size-cells': false
-
 required:
   - compatible
   - fis-index-block

-- 
2.51.0


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

* [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (4 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  9:34   ` Krzysztof Kozlowski
  2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

The partitions.yaml schema is an unusual structure in that it includes
all possible partition types, and it disables the normal matching by
compatible strings. As partitions.yaml has nothing to match on, it is
only applied when explicitly referenced. The use of "oneOf" also results
in misleading warnings which are difficult to understand. Drop
partitions.yaml and rely on the standard compatible matching instead.

The "mmc-card" case previously allowed any partition type, but now only
allows "fixed-partitions". There aren't any users and the original
intent appeared to be only for "fixed-partitions".

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/mmc/mmc-card.yaml          | 20 ++++--------
 Documentation/devicetree/bindings/mtd/mtd.yaml     |  2 +-
 .../mtd/partitions/arm,arm-firmware-suite.yaml     |  2 --
 .../mtd/partitions/brcm,bcm4908-partitions.yaml    |  2 --
 .../partitions/brcm,bcm947xx-cfe-partitions.yaml   |  2 --
 .../mtd/partitions/linksys,ns-partitions.yaml      |  2 --
 .../bindings/mtd/partitions/partitions.yaml        | 36 ----------------------
 .../devicetree/bindings/mtd/ti,davinci-nand.yaml   |  4 ++-
 8 files changed, 10 insertions(+), 60 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/mmc-card.yaml b/Documentation/devicetree/bindings/mmc/mmc-card.yaml
index 1d91d4272de0..a61d6c96df75 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-card.yaml
+++ b/Documentation/devicetree/bindings/mmc/mmc-card.yaml
@@ -32,21 +32,13 @@ properties:
 
 patternProperties:
   "^partitions(-boot[12]|-gp[14])?$":
-    $ref: /schemas/mtd/partitions/partitions.yaml
+    type: object
+    additionalProperties: true
 
-    patternProperties:
-      "^partition@[0-9a-f]+$":
-        $ref: /schemas/mtd/partitions/partition.yaml
-
-        properties:
-          reg:
-            description: Must be multiple of 512 as it's converted
-              internally from bytes to SECTOR_SIZE (512 bytes)
-
-        required:
-          - reg
-
-        unevaluatedProperties: false
+    properties:
+      compatible:
+        contains:
+          const: fixed-partitions
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index bbb56216a4e2..e56dba83f00a 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -30,7 +30,7 @@ properties:
     deprecated: true
 
   partitions:
-    $ref: /schemas/mtd/partitions/partitions.yaml
+    type: object
 
     required:
       - compatible
diff --git a/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml b/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml
index e9b1a6869910..d4b6013aefcc 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml
@@ -9,8 +9,6 @@ title: ARM Firmware Suite (AFS) Partitions
 maintainers:
   - Linus Walleij <linusw@kernel.org>
 
-select: false
-
 description: |
   The ARM Firmware Suite is a flash partitioning system found on the
   ARM reference designs: Integrator AP, Integrator CP, Versatile AB,
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
index 94f0742b375c..159b32d12803 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -17,8 +17,6 @@ description: |
 maintainers:
   - Rafał Miłecki <rafal@milecki.pl>
 
-select: false
-
 properties:
   compatible:
     const: brcm,bcm4908-partitions
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml
index 939e7b50db22..3484e06d6bcb 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml
@@ -35,8 +35,6 @@ description: |
 maintainers:
   - Rafał Miłecki <rafal@milecki.pl>
 
-select: false
-
 properties:
   compatible:
     const: brcm,bcm947xx-cfe-partitions
diff --git a/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
index c5fa78ff7125..02ecb51fcece 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
@@ -18,8 +18,6 @@ description: |
 maintainers:
   - Rafał Miłecki <rafal@milecki.pl>
 
-select: false
-
 properties:
   compatible:
     const: linksys,ns-partitions
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
deleted file mode 100644
index 76199506d690..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mtd/partitions/partitions.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Partitions
-
-description: |
-  This binding is generic and describes the content of the partitions container
-  node. All partition parsers must be referenced here.
-
-maintainers:
-  - Miquel Raynal <miquel.raynal@bootlin.com>
-
-oneOf:
-  - $ref: arm,arm-firmware-suite.yaml
-  - $ref: brcm,bcm4908-partitions.yaml
-  - $ref: brcm,bcm947xx-cfe-partitions.yaml
-  - $ref: fixed-partitions.yaml
-  - $ref: linksys,ns-partitions.yaml
-  - $ref: qcom,smem-part.yaml
-  - $ref: redboot-fis.yaml
-  - $ref: tplink,safeloader-partitions.yaml
-
-properties:
-  compatible: true
-
-patternProperties:
-  "^partition(-.+|@[0-9a-f]+)$":
-    $ref: partition.yaml
-
-required:
-  - compatible
-
-unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
index ed24b0ea86e5..7619b19e7a04 100644
--- a/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
@@ -24,7 +24,9 @@ properties:
       - description: AEMIF control registers.
 
   partitions:
-    $ref: /schemas/mtd/partitions/partitions.yaml
+    type: object
+    required:
+      - compatible
 
   ti,davinci-chipselect:
     description:

-- 
2.51.0


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

* [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (5 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-09  9:02   ` Miquel Raynal
  2026-01-09  9:36   ` Krzysztof Kozlowski
  2026-01-08 17:53 ` [PATCH 08/10] dt-bindings: mtd: fixed-partitions: Restrict undefined properties Rob Herring (Arm)
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Partition nodes without a compatible have no restrictions on additional
properties. Fix this by ensuring 'unevaluatedProperties' is set when
there's no compatible property. If there is a compatible property, then
there should be a specific schema for it which will enforce
'unevaluatedProperties'.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml               |  8 ++------
 .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml |  2 +-
 .../devicetree/bindings/mtd/partitions/partition.yaml        | 12 ++++++++++++
 .../mtd/partitions/tplink,safeloader-partitions.yaml         |  2 +-
 Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml |  2 +-
 Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml   |  2 +-
 6 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index e56dba83f00a..5a2d06c96c0d 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -36,12 +36,8 @@ properties:
       - compatible
 
 patternProperties:
-  "@[0-9a-f]+$":
-    $ref: partitions/partition.yaml
-    deprecated: true
-
-  "^partition@[0-9a-f]+":
-    $ref: partitions/partition.yaml
+  "(^partition)?@[0-9a-f]+$":
+    $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
     deprecated: true
 
   "^otp(-[0-9]+)?$":
diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index 26bef777353d..4d79f786fcd5 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -33,7 +33,7 @@ properties:
 
 patternProperties:
   "@[0-9a-f]+$":
-    $ref: partition.yaml#
+    $ref: partition.yaml#/$defs/partition-node
 
 required:
   - "#address-cells"
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index fe2f7d622e8b..51fd48af55ec 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -149,6 +149,18 @@ then:
 # This is a generic file other binding inherit from and extend
 additionalProperties: true
 
+$defs:
+  partition-node:
+    type: object
+    if:
+      not:
+        required: [ compatible ]
+    then:
+      $ref: '#'
+      unevaluatedProperties: false
+    else:
+      $ref: '#'
+
 examples:
   - |
     partitions {
diff --git a/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
index a24bbaac3a90..40e6eaab03ce 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
@@ -38,7 +38,7 @@ properties:
 
 patternProperties:
   "^partition-.*$":
-    $ref: partition.yaml#
+    $ref: partition.yaml#/$defs/partition-node
 
 required:
   - partitions-table-offset
diff --git a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
index 327fa872c001..d51bdcb7e585 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
@@ -29,7 +29,7 @@ properties:
 
 patternProperties:
   "^partition-.*$":
-    $ref: partition.yaml#
+    $ref: partition.yaml#/$defs/partition-node
 
 unevaluatedProperties: false
 
diff --git a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
index 7d3ace4f5505..8db991dee7eb 100644
--- a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
@@ -36,7 +36,7 @@ properties:
 
 patternProperties:
   "@[0-9a-f]+$":
-    $ref: /schemas/mtd/partitions/partition.yaml
+    $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
 
 allOf:
   - $ref: /schemas/memory-controllers/ti,gpmc-child.yaml

-- 
2.51.0


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

* [PATCH 08/10] dt-bindings: mtd: fixed-partitions: Restrict undefined properties
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (6 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 09/10] dt-bindings: mtd: partitions: Convert brcm,trx to DT schema Rob Herring (Arm)
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

The fixed-partitions schema allowed undefined properties in order to
avoid warnings when there are nested fixed-partitions.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml       | 7 +++++--
 Documentation/devicetree/bindings/mtd/partitions/partition.yaml    | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index 4d79f786fcd5..984823108f9c 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -39,7 +39,11 @@ required:
   - "#address-cells"
   - "#size-cells"
 
-additionalProperties: true
+# fixed-partitions can be nested
+allOf:
+  - $ref: partition.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
@@ -115,7 +119,6 @@ examples:
             compatible = "fixed-partitions";
             label = "calibration";
             reg = <0xf00000 0x100000>;
-            ranges = <0 0xf00000 0x100000>;
             #address-cells = <1>;
             #size-cells = <1>;
 
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index 51fd48af55ec..2397d97ecac5 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -144,7 +144,7 @@ if:
 then:
   properties:
     $nodename:
-      pattern: '^partition-.*$'
+      pattern: '^partitions?(-.+)?$'
 
 # This is a generic file other binding inherit from and extend
 additionalProperties: true

-- 
2.51.0


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

* [PATCH 09/10] dt-bindings: mtd: partitions: Convert brcm,trx to DT schema
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (7 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 08/10] dt-bindings: mtd: fixed-partitions: Restrict undefined properties Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-08 17:53 ` [PATCH 10/10] dt-bindings: mtd: partitions: Combine simple partition bindings Rob Herring (Arm)
  2026-01-19 10:48 ` [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Miquel Raynal
  10 siblings, 0 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Convert the brcm,trx partition binding to DT schema format.

As the "linksys,ns-firmware" compatible also uses "brcm,trx" as a
fallback, move it to the converted binding.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/mtd/partitions/brcm,trx.txt           | 42 --------------
 .../bindings/mtd/partitions/brcm,trx.yaml          | 65 ++++++++++++++++++++++
 .../mtd/partitions/linksys,ns-partitions.yaml      |  8 +--
 3 files changed, 66 insertions(+), 49 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt
deleted file mode 100644
index c2175d3c82ec..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Broadcom TRX Container Partition
-================================
-
-TRX is Broadcom's official firmware format for the BCM947xx boards. It's used by
-most of the vendors building devices based on Broadcom's BCM47xx SoCs and is
-supported by the CFE bootloader.
-
-Design of the TRX format is very minimalistic. Its header contains
-identification fields, CRC32 checksum and the locations of embedded partitions.
-Its purpose is to store a few partitions in a format that can be distributed as
-a standalone file and written in a flash memory.
-
-Container can hold up to 4 partitions. The first partition has to contain a
-device executable binary (e.g. a kernel) as it's what the CFE bootloader starts
-executing. Other partitions can be used for operating system purposes. This is
-useful for systems that keep kernel and rootfs separated.
-
-TRX doesn't enforce any strict partition boundaries or size limits. All
-partitions have to be less than the 4GiB max size limit.
-
-There are two existing/known TRX variants:
-1) v1 which contains 3 partitions
-2) v2 which contains 4 partitions
-
-There aren't separated compatible bindings for them as version can be trivialy
-detected by a software parsing TRX header.
-
-Required properties:
-- compatible : (required) must be "brcm,trx"
-
-Optional properties:
-
-- brcm,trx-magic: TRX magic, if it is different from the default magic
-		  0x30524448 as a u32.
-
-Example:
-
-flash@0 {
-	partitions {
-		compatible = "brcm,trx";
-	};
-};
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml
new file mode 100644
index 000000000000..71458b2c05fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/brcm,trx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom TRX Container Partition
+
+maintainers:
+  - Hauke Mehrtens <hauke@hauke-m.de>
+  - Rafał Miłecki <rafal@milecki.pl>
+
+description: >
+  TRX is Broadcom's official firmware format for the BCM947xx boards. It's used by
+  most of the vendors building devices based on Broadcom's BCM47xx SoCs and is
+  supported by the CFE bootloader.
+
+  Design of the TRX format is very minimalistic. Its header contains
+  identification fields, CRC32 checksum and the locations of embedded partitions.
+  Its purpose is to store a few partitions in a format that can be distributed as
+  a standalone file and written in a flash memory.
+
+  Container can hold up to 4 partitions. The first partition has to contain a
+  device executable binary (e.g. a kernel) as it's what the CFE bootloader starts
+  executing. Other partitions can be used for operating system purposes. This is
+  useful for systems that keep kernel and rootfs separated.
+
+  TRX doesn't enforce any strict partition boundaries or size limits. All
+  partitions have to be less than the 4GiB max size limit.
+
+  There are two existing/known TRX variants:
+    1) v1 which contains 3 partitions
+    2) v2 which contains 4 partitions
+
+  There aren't separated compatible bindings for them as version can be trivially
+  detected by a software parsing TRX header.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: linksys,ns-firmware
+          - const: brcm,trx
+      - const: brcm,trx
+
+  brcm,trx-magic:
+    description: TRX magic, if it is different from the default magic.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 0x30524448
+
+required:
+  - compatible
+
+allOf:
+  - $ref: partition.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    flash {
+        partitions {
+            compatible = "brcm,trx";
+        };
+    };
diff --git a/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
index 02ecb51fcece..61d7e701b110 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
@@ -30,13 +30,7 @@ properties:
 
 patternProperties:
   "^partition@[0-9a-f]+$":
-    $ref: partition.yaml#
-    properties:
-      compatible:
-        items:
-          - const: linksys,ns-firmware
-          - const: brcm,trx
-    unevaluatedProperties: false
+    $ref: partition.yaml#/$defs/partition-node
 
 required:
   - "#address-cells"

-- 
2.51.0


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

* [PATCH 10/10] dt-bindings: mtd: partitions: Combine simple partition bindings
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (8 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 09/10] dt-bindings: mtd: partitions: Convert brcm,trx to DT schema Rob Herring (Arm)
@ 2026-01-08 17:53 ` Rob Herring (Arm)
  2026-01-19 10:48 ` [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Miquel Raynal
  10 siblings, 0 replies; 35+ messages in thread
From: Rob Herring (Arm) @ 2026-01-08 17:53 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens
  Cc: linux-mtd, devicetree, linux-kernel, linux-mmc

Several partition node bindings are just a compatible plus properties
defined in partition.yaml. Move all of these bindings to a single schema
file.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/mtd/partitions/binman.yaml | 53 -------------------
 .../mtd/partitions/brcm,bcm4908-partitions.yaml    |  6 +--
 .../mtd/partitions/brcm,bcm963xx-imagetag.txt      | 45 ----------------
 .../devicetree/bindings/mtd/partitions/seama.yaml  | 44 ----------------
 .../bindings/mtd/partitions/simple-partition.yaml  | 61 ++++++++++++++++++++++
 MAINTAINERS                                        |  5 --
 6 files changed, 62 insertions(+), 152 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman.yaml b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml
deleted file mode 100644
index bb4b08546184..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/binman.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Binman entries
-
-description: |
-  This corresponds to a binman 'entry'. It is a single partition which holds
-  data of a defined type.
-
-  Binman uses the type to indicate what data file / type to place in the
-  partition. There are quite a number of binman-specific entry types, such as
-  section, fill and files, to be added later.
-
-maintainers:
-  - Simon Glass <sjg@chromium.org>
-
-allOf:
-  - $ref: /schemas/mtd/partitions/partition.yaml#
-
-properties:
-  compatible:
-    enum:
-      - u-boot       # u-boot.bin from U-Boot project
-      - tfa-bl31     # bl31.bin or bl31.elf from TF-A project
-
-required:
-  - compatible
-
-unevaluatedProperties: false
-
-examples:
-  - |
-    partitions {
-        compatible = "fixed-partitions";
-        #address-cells = <1>;
-        #size-cells = <1>;
-
-        partition@100000 {
-            compatible = "u-boot";
-            reg = <0x100000 0xf00000>;
-            align-size = <0x1000>;
-            align-end = <0x10000>;
-        };
-
-        partition@200000 {
-            compatible = "tfa-bl31";
-            reg = <0x200000 0x100000>;
-            align = <0x4000>;
-        };
-    };
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
index 159b32d12803..a6edf145df57 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -29,11 +29,7 @@ properties:
 
 patternProperties:
   "^partition@[0-9a-f]+$":
-    $ref: partition.yaml#
-    properties:
-      compatible:
-        const: brcm,bcm4908-firmware
-    unevaluatedProperties: false
+    type: object
 
 required:
   - "#address-cells"
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt
deleted file mode 100644
index f8b7418ed817..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-Broadcom BCM963XX ImageTag Partition Container
-==============================================
-
-Some Broadcom BCM63XX SoC based devices contain additional, non discoverable
-partitions or non standard bootloader partition sizes. For these a mixed layout
-needs to be used with an explicit firmware partition.
-
-The BCM963XX ImageTag is a simple firmware header describing the offsets and
-sizes of the rootfs and kernel parts contained in the firmware.
-
-Required properties:
-- compatible : must be "brcm,bcm963xx-imagetag"
-
-Example:
-
-flash@1e000000 {
-	compatible = "cfi-flash";
-	reg = <0x1e000000 0x2000000>;
-	bank-width = <2>;
-
-	partitions {
-		compatible = "fixed-partitions";
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		cfe@0 {
-			reg = <0x0 0x10000>;
-			read-only;
-		};
-
-		firmware@10000 {
-			reg = <0x10000 0x7d0000>;
-			compatible = "brcm,bcm963xx-imagetag";
-		};
-
-		caldata@7e0000 {
-			reg = <0x7e0000 0x10000>;
-			read-only;
-		};
-
-		nvram@7f0000 {
-			reg = <0x7f0000 0x10000>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
deleted file mode 100644
index 4af185204b4b..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Seattle Image Partitions
-
-description: The SEAttle iMAge (SEAMA) partition is a type of partition
-  used for NAND flash devices. This type of flash image is found in some
-  D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
-  DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
-  (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
-  does not have children defined in the device tree, they need to be
-  detected by software.
-
-allOf:
-  - $ref: partition.yaml#
-
-maintainers:
-  - Linus Walleij <linusw@kernel.org>
-
-properties:
-  compatible:
-    const: seama
-
-required:
-  - compatible
-
-unevaluatedProperties: false
-
-examples:
-  - |
-    partitions {
-        compatible = "fixed-partitions";
-        #address-cells = <1>;
-        #size-cells = <1>;
-
-        partition@0 {
-            compatible = "seama";
-            reg = <0x0 0x800000>;
-            label = "firmware";
-        };
-    };
diff --git a/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml
new file mode 100644
index 000000000000..14f5006c54a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/simple-partition.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple partition types
+
+description:
+  Simple partition types which only define a "compatible" value and no custom
+  properties.
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+  - Simon Glass <sjg@chromium.org>
+
+allOf:
+  - $ref: partition.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: brcm,bcm4908-firmware
+        description:
+          Broadcom BCM4908 CFE bootloader firmware partition
+
+      - const: brcm,bcm963xx-imagetag
+        description:
+          The BCM963XX ImageTag is a simple firmware header describing the
+          offsets and sizes of the rootfs and kernel parts contained in the
+          firmware.
+
+      - const: seama
+        description:
+          The SEAttle iMAge (SEAMA) partition is a type of partition used for
+          NAND flash devices. This type of flash image is found in some D-Link
+          routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L
+          and DCH-M225, as well as in WD and NEC routers on the ath79 (MIPS),
+          Broadcom BCM53xx, and RAMIPS platforms. This partition type does not
+          have children defined in the device tree, they need to be detected by
+          software.
+
+      - const: u-boot
+        description: >
+          u-boot.bin from U-Boot project.
+
+          This corresponds to a binman 'entry'. It is a single partition which holds
+          data of a defined type.
+
+          Binman uses the type to indicate what data file / type to place in the
+          partition. There are quite a number of binman-specific entry types, such as
+          section, fill and files, to be added later.
+
+      - const: tfa-bl31
+        description: >
+          bl31.bin or bl31.elf from TF-A project
+
+          This corresponds to a binman 'entry'. It is a single partition which holds
+          data of a defined type.
+
+unevaluatedProperties: false
diff --git a/MAINTAINERS b/MAINTAINERS
index d4b97d7181b5..032287c16cd7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4429,11 +4429,6 @@ F:	Documentation/filesystems/bfs.rst
 F:	fs/bfs/
 F:	include/uapi/linux/bfs_fs.h
 
-BINMAN
-M:	Simon Glass <sjg@chromium.org>
-S:	Supported
-F:	Documentation/devicetree/bindings/mtd/partitions/binman*
-
 BITMAP API
 M:	Yury Norov <yury.norov@gmail.com>
 R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>

-- 
2.51.0


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

* Re: [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
  2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
@ 2026-01-09  8:56   ` Krzysztof Kozlowski
  2026-01-09 18:05   ` William Zhang
  1 sibling, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  8:56 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:10AM -0600, Rob Herring (Arm) wrote:
> Some users of "brcm,nand-iproc" include "brcm,brcmnand" and some don't.
> The "brcm,brcmnand" compatible is not useful for iProc systems as
> there's a separate driver for iProc. So drop it as a fallback.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node
  2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
@ 2026-01-09  8:58   ` Krzysztof Kozlowski
  2026-01-09 11:31   ` Simon Glass
  1 sibling, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  8:58 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:11AM -0600, Rob Herring (Arm) wrote:
> The "compression" property is defined in the wrong place as it applies
> to individual partitions nodes, not all nodes.
> 
> Fixes: 8baba8d52ff5 ("dt-bindings: mtd: fixed-partitions: Add compression property")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../bindings/mtd/partitions/fixed-partitions.yaml      | 18 ------------------
>  .../devicetree/bindings/mtd/partitions/partition.yaml  | 18 ++++++++++++++++++
>  2 files changed, 18 insertions(+), 18 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
@ 2026-01-09  9:02   ` Miquel Raynal
  2026-01-10  0:34     ` Rob Herring
  2026-01-09  9:36   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 35+ messages in thread
From: Miquel Raynal @ 2026-01-09  9:02 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

Hello Rob,

On 08/01/2026 at 11:53:16 -06, "Rob Herring (Arm)" <robh@kernel.org> wrote:

> Partition nodes without a compatible have no restrictions on additional
> properties. Fix this by ensuring 'unevaluatedProperties' is set when
> there's no compatible property. If there is a compatible property, then
> there should be a specific schema for it which will enforce
> 'unevaluatedProperties'.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---

Overall thank you very much for this series, I've been sruggling while
defining these and your approach seems very relevant. I am fine with all
the patches in this series, but will wait a bit for others to make a bit
of feedback.

[...]

> +$defs:
> +  partition-node:
> +    type: object
> +    if:
> +      not:
> +        required: [ compatible ]
> +    then:
> +      $ref: '#'
> +      unevaluatedProperties: false
> +    else:
> +      $ref: '#'

This, however, is total blackmagic to me. Would you mind explaining what

      $ref: '#'

indicates? Is this a placeholder indicating "a reference must be given?

Also I do not understand the final else case, what is it covering?

Thanks for the little explanation (or you can give me a pointer to some
relevant doc I could read).

Thanks,
Miquèl

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

* Re: [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml
  2026-01-08 17:53 ` [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml Rob Herring (Arm)
@ 2026-01-09  9:22   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  9:22 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:12AM -0600, Rob Herring (Arm) wrote:
> Defining child node properties specific to the parent schema doesn't work
> unless all the child node properties are known. They aren't known because
> any partition can define its own properties. The solution to this is
> typically something like spi-peripheral-props.yaml, but that's overkill for
> this single property. Just move it to partition.yaml instead.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml   | 10 ----------
>  .../devicetree/bindings/mtd/partitions/partition.yaml          |  9 +++++++++
>  2 files changed, 9 insertions(+), 10 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes
  2026-01-08 17:53 ` [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes Rob Herring (Arm)
@ 2026-01-09  9:26   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  9:26 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:13AM -0600, Rob Herring (Arm) wrote:
> An "nvmem-layout" node can be used in any partition node, so add it.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas
  2026-01-08 17:53 ` [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas Rob Herring (Arm)
@ 2026-01-09  9:31   ` Krzysztof Kozlowski
  2026-01-12 15:50     ` Rob Herring
  0 siblings, 1 reply; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  9:31 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:14AM -0600, Rob Herring (Arm) wrote:
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> index e3978d2bc056..dc6421150c84 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> @@ -28,10 +28,6 @@ properties:
>        device. On a flash memory with 32KB eraseblocks, 0 means the first
>        eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on.
>  
> -  '#address-cells': false
> -
> -  '#size-cells': false

That's probably separate commit. These partitions never used child
nodes.

Best regards,
Krzysztof


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

* Re: [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml
  2026-01-08 17:53 ` [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml Rob Herring (Arm)
@ 2026-01-09  9:34   ` Krzysztof Kozlowski
  2026-01-12 22:57     ` Rob Herring
  0 siblings, 1 reply; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  9:34 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:15AM -0600, Rob Herring (Arm) wrote:
>  patternProperties:
>    "^partitions(-boot[12]|-gp[14])?$":
> -    $ref: /schemas/mtd/partitions/partitions.yaml
> +    type: object
> +    additionalProperties: true
>  
> -    patternProperties:
> -      "^partition@[0-9a-f]+$":
> -        $ref: /schemas/mtd/partitions/partition.yaml
> -
> -        properties:
> -          reg:
> -            description: Must be multiple of 512 as it's converted
> -              internally from bytes to SECTOR_SIZE (512 bytes)
> -
> -        required:
> -          - reg
> -
> -        unevaluatedProperties: false
> +    properties:
> +      compatible:
> +        contains:
> +          const: fixed-partitions
>  
>  required:
>    - compatible
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index bbb56216a4e2..e56dba83f00a 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -30,7 +30,7 @@ properties:
>      deprecated: true
>  
>    partitions:
> -    $ref: /schemas/mtd/partitions/partitions.yaml
> +    type: object

I think you need explicit, since we require it for incomplete nodes:

additionalProperties: true

>  
>      required:
>        - compatible

...

> -unevaluatedProperties: false
> diff --git a/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
> index ed24b0ea86e5..7619b19e7a04 100644
> --- a/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml
> @@ -24,7 +24,9 @@ properties:
>        - description: AEMIF control registers.
>  
>    partitions:
> -    $ref: /schemas/mtd/partitions/partitions.yaml
> +    type: object
> +    required:
> +      - compatible

Same here

Best regards,
Krzysztof


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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
  2026-01-09  9:02   ` Miquel Raynal
@ 2026-01-09  9:36   ` Krzysztof Kozlowski
  2026-01-10  0:25     ` Rob Herring
  1 sibling, 1 reply; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-09  9:36 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, Jan 08, 2026 at 11:53:16AM -0600, Rob Herring (Arm) wrote:
> Partition nodes without a compatible have no restrictions on additional
> properties. Fix this by ensuring 'unevaluatedProperties' is set when
> there's no compatible property. If there is a compatible property, then
> there should be a specific schema for it which will enforce
> 'unevaluatedProperties'.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml               |  8 ++------
>  .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml |  2 +-
>  .../devicetree/bindings/mtd/partitions/partition.yaml        | 12 ++++++++++++
>  .../mtd/partitions/tplink,safeloader-partitions.yaml         |  2 +-
>  Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml |  2 +-
>  Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml   |  2 +-
>  6 files changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index e56dba83f00a..5a2d06c96c0d 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -36,12 +36,8 @@ properties:
>        - compatible
>  
>  patternProperties:
> -  "@[0-9a-f]+$":
> -    $ref: partitions/partition.yaml
> -    deprecated: true
> -
> -  "^partition@[0-9a-f]+":
> -    $ref: partitions/partition.yaml
> +  "(^partition)?@[0-9a-f]+$":
> +    $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
>      deprecated: true

This makes partition@ deprecated. Looks unintended or needds commit msg
explanation.

>  
>    "^otp(-[0-9]+)?$":
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> index 26bef777353d..4d79f786fcd5 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> @@ -33,7 +33,7 @@ properties:

Best regards,
Krzysztof


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

* Re: [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node
  2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
  2026-01-09  8:58   ` Krzysztof Kozlowski
@ 2026-01-09 11:31   ` Simon Glass
  1 sibling, 0 replies; 35+ messages in thread
From: Simon Glass @ 2026-01-09 11:31 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Thu, 8 Jan 2026 at 10:53, Rob Herring (Arm) <robh@kernel.org> wrote:
>
> The "compression" property is defined in the wrong place as it applies
> to individual partitions nodes, not all nodes.
>
> Fixes: 8baba8d52ff5 ("dt-bindings: mtd: fixed-partitions: Add compression property")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../bindings/mtd/partitions/fixed-partitions.yaml      | 18 ------------------
>  .../devicetree/bindings/mtd/partitions/partition.yaml  | 18 ++++++++++++++++++
>  2 files changed, 18 insertions(+), 18 deletions(-)
>

Reviewed-by: Simon Glass <simon.glass@canonical.com>


> diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> index 62086366837c..73d74c0f5cb7 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
> @@ -29,24 +29,6 @@ properties:
>
>    "#size-cells": true
>
> -  compression:
> -    $ref: /schemas/types.yaml#/definitions/string
> -    description: |
> -      Compression algorithm used to store the data in this partition, chosen
> -      from a list of well-known algorithms.
> -
> -      The contents are compressed using this algorithm.
> -
> -    enum:
> -      - none
> -      - bzip2
> -      - gzip
> -      - lzop
> -      - lz4
> -      - lzma
> -      - xz
> -      - zstd
> -
>  patternProperties:
>    "@[0-9a-f]+$":
>      $ref: partition.yaml#
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
> index 80d0452a2a33..0b989037a005 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
> @@ -108,6 +108,24 @@ properties:
>        with the padding bytes, so may grow. If ‘align-end’ is not provided,
>        no alignment is performed.
>
> +  compression:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: |
> +      Compression algorithm used to store the data in this partition, chosen
> +      from a list of well-known algorithms.
> +
> +      The contents are compressed using this algorithm.
> +
> +    enum:
> +      - none
> +      - bzip2
> +      - gzip
> +      - lzop
> +      - lz4
> +      - lzma
> +      - xz
> +      - zstd
> +
>  if:
>    not:
>      required: [ reg ]
>
> --
> 2.51.0
>

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

* Re: [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
  2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
  2026-01-09  8:56   ` Krzysztof Kozlowski
@ 2026-01-09 18:05   ` William Zhang
  2026-01-12 15:48     ` Rob Herring
  1 sibling, 1 reply; 35+ messages in thread
From: William Zhang @ 2026-01-09 18:05 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]

Hi Rob,

On Thu, Jan 8, 2026 at 9:53 AM Rob Herring (Arm) <robh@kernel.org> wrote:
>
> Some users of "brcm,nand-iproc" include "brcm,brcmnand" and some don't.
> The "brcm,brcmnand" compatible is not useful for iProc systems as
> there's a separate driver for iProc. So drop it as a fallback.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> index 064e840aeaa1..3105f8e6cbd6 100644
> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> @@ -66,7 +66,6 @@ properties:
>          items:
>            - const: brcm,nand-iproc
>            - const: brcm,brcmnand-v6.1
> -          - const: brcm,brcmnand
>        - description: BCM63168 SoC-specific NAND controller
>          items:
>            - const: brcm,nand-bcm63168
>
> --
> 2.51.0
>

Another fix would be adding brcm,brcmnand to the users of
brcm,nand-iproc to keep consistency with all other brcmnand chips and
utilize the fallback mechanism in the driver, although I agree it does
not happen in real life case.
I don't have any strong opinion either way but a follow-up change is
needed to remove the fallback from the brcm,nand-iproc dts files if we
go this route.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5473 bytes --]

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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-09  9:36   ` Krzysztof Kozlowski
@ 2026-01-10  0:25     ` Rob Herring
  2026-01-11  9:45       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 35+ messages in thread
From: Rob Herring @ 2026-01-10  0:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Fri, Jan 9, 2026 at 3:36 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Jan 08, 2026 at 11:53:16AM -0600, Rob Herring (Arm) wrote:
> > Partition nodes without a compatible have no restrictions on additional
> > properties. Fix this by ensuring 'unevaluatedProperties' is set when
> > there's no compatible property. If there is a compatible property, then
> > there should be a specific schema for it which will enforce
> > 'unevaluatedProperties'.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/mtd/mtd.yaml               |  8 ++------
> >  .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml |  2 +-
> >  .../devicetree/bindings/mtd/partitions/partition.yaml        | 12 ++++++++++++
> >  .../mtd/partitions/tplink,safeloader-partitions.yaml         |  2 +-
> >  Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml |  2 +-
> >  Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml   |  2 +-
> >  6 files changed, 18 insertions(+), 10 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> > index e56dba83f00a..5a2d06c96c0d 100644
> > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> > @@ -36,12 +36,8 @@ properties:
> >        - compatible
> >
> >  patternProperties:
> > -  "@[0-9a-f]+$":
> > -    $ref: partitions/partition.yaml
> > -    deprecated: true
> > -
> > -  "^partition@[0-9a-f]+":
> > -    $ref: partitions/partition.yaml
> > +  "(^partition)?@[0-9a-f]+$":
> > +    $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
> >      deprecated: true
>
> This makes partition@ deprecated. Looks unintended or needds commit msg
> explanation.

No, the only change here is I combined the entries. "partition@" is
deprecated when not under "partitions" node.

Rob

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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-09  9:02   ` Miquel Raynal
@ 2026-01-10  0:34     ` Rob Herring
  2026-01-14 13:58       ` Miquel Raynal
  0 siblings, 1 reply; 35+ messages in thread
From: Rob Herring @ 2026-01-10  0:34 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On Fri, Jan 9, 2026 at 3:02 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hello Rob,
>
> On 08/01/2026 at 11:53:16 -06, "Rob Herring (Arm)" <robh@kernel.org> wrote:
>
> > Partition nodes without a compatible have no restrictions on additional
> > properties. Fix this by ensuring 'unevaluatedProperties' is set when
> > there's no compatible property. If there is a compatible property, then
> > there should be a specific schema for it which will enforce
> > 'unevaluatedProperties'.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > ---
>
> Overall thank you very much for this series, I've been sruggling while
> defining these and your approach seems very relevant. I am fine with all
> the patches in this series, but will wait a bit for others to make a bit
> of feedback.
>
> [...]
>
> > +$defs:
> > +  partition-node:
> > +    type: object
> > +    if:
> > +      not:
> > +        required: [ compatible ]
> > +    then:
> > +      $ref: '#'
> > +      unevaluatedProperties: false
> > +    else:
> > +      $ref: '#'
>
> This, however, is total blackmagic to me. Would you mind explaining what
>
>       $ref: '#'
>
> indicates? Is this a placeholder indicating "a reference must be given?

It's what's known as JSON pointers. The '#' is a reference to the top
level of this schema.

> Also I do not understand the final else case, what is it covering?

It's really just there so a $ref to
partition.yaml#/$defs/partition-node applies the schema (all of
partition.yaml) whether there's a compatible property or not.

This all just works around that a schema like this doesn't work:

$ref: foo.yaml
if:
  ...
then:
  unevaluatedProperties: false

The evaluation of unevaluatedProperties doesn't "see" the $ref being
in the parent. So we can't factor out the $ref.

Hope that makes sense.

Rob

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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-10  0:25     ` Rob Herring
@ 2026-01-11  9:45       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-11  9:45 UTC (permalink / raw)
  To: Rob Herring
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Fri, Jan 09, 2026 at 06:25:32PM -0600, Rob Herring wrote:
> > > -    $ref: partitions/partition.yaml
> > > -    deprecated: true
> > > -
> > > -  "^partition@[0-9a-f]+":
> > > -    $ref: partitions/partition.yaml
> > > +  "(^partition)?@[0-9a-f]+$":
> > > +    $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
> > >      deprecated: true
> >
> > This makes partition@ deprecated. Looks unintended or needds commit msg
> > explanation.
> 
> No, the only change here is I combined the entries. "partition@" is
> deprecated when not under "partitions" node.

Indeed, I misread the diff.


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
  2026-01-09 18:05   ` William Zhang
@ 2026-01-12 15:48     ` Rob Herring
  2026-01-14 19:31       ` William Zhang
  0 siblings, 1 reply; 35+ messages in thread
From: Rob Herring @ 2026-01-12 15:48 UTC (permalink / raw)
  To: William Zhang
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On Fri, Jan 09, 2026 at 10:05:04AM -0800, William Zhang wrote:
> Hi Rob,
> 
> On Thu, Jan 8, 2026 at 9:53 AM Rob Herring (Arm) <robh@kernel.org> wrote:
> >
> > Some users of "brcm,nand-iproc" include "brcm,brcmnand" and some don't.
> > The "brcm,brcmnand" compatible is not useful for iProc systems as
> > there's a separate driver for iProc. So drop it as a fallback.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > index 064e840aeaa1..3105f8e6cbd6 100644
> > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > @@ -66,7 +66,6 @@ properties:
> >          items:
> >            - const: brcm,nand-iproc
> >            - const: brcm,brcmnand-v6.1
> > -          - const: brcm,brcmnand
> >        - description: BCM63168 SoC-specific NAND controller
> >          items:
> >            - const: brcm,nand-bcm63168
> >
> > --
> > 2.51.0
> >
> 
> Another fix would be adding brcm,brcmnand to the users of
> brcm,nand-iproc to keep consistency with all other brcmnand chips and
> utilize the fallback mechanism in the driver, although I agree it does
> not happen in real life case.
> I don't have any strong opinion either way but a follow-up change is
> needed to remove the fallback from the brcm,nand-iproc dts files if we
> go this route.

The question to ask on a fallback is "is it usable on its own?". IOW, 
would a driver than only understands brcm,brcmnand function in this 
case. Given iproc needs its own driver and specific handling, the answer 
is no here.

Plus, this matches what dts files actually have at least for the arm64 
ones. 

Rob

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

* Re: [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas
  2026-01-09  9:31   ` Krzysztof Kozlowski
@ 2026-01-12 15:50     ` Rob Herring
  0 siblings, 0 replies; 35+ messages in thread
From: Rob Herring @ 2026-01-12 15:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Fri, Jan 09, 2026 at 10:31:03AM +0100, Krzysztof Kozlowski wrote:
> On Thu, Jan 08, 2026 at 11:53:14AM -0600, Rob Herring (Arm) wrote:
> > diff --git a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> > index e3978d2bc056..dc6421150c84 100644
> > --- a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
> > @@ -28,10 +28,6 @@ properties:
> >        device. On a flash memory with 32KB eraseblocks, 0 means the first
> >        eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on.
> >  
> > -  '#address-cells': false
> > -
> > -  '#size-cells': false
> 
> That's probably separate commit. These partitions never used child
> nodes.

It's all part of making the schemas consistent in the handling of these 
properties.

Rob

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

* Re: [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml
  2026-01-09  9:34   ` Krzysztof Kozlowski
@ 2026-01-12 22:57     ` Rob Herring
  0 siblings, 0 replies; 35+ messages in thread
From: Rob Herring @ 2026-01-12 22:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	William Zhang, Nick Terrell, David Sterba,
	Rafał Miłecki, Simon Glass, Linus Walleij, Ulf Hansson,
	Marcus Folkesson, Tony Lindgren, Roger Quadros, Hauke Mehrtens,
	linux-mtd, devicetree, linux-kernel, linux-mmc

On Fri, Jan 9, 2026 at 3:34 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Jan 08, 2026 at 11:53:15AM -0600, Rob Herring (Arm) wrote:
> >  patternProperties:
> >    "^partitions(-boot[12]|-gp[14])?$":
> > -    $ref: /schemas/mtd/partitions/partitions.yaml
> > +    type: object
> > +    additionalProperties: true
> >
> > -    patternProperties:
> > -      "^partition@[0-9a-f]+$":
> > -        $ref: /schemas/mtd/partitions/partition.yaml
> > -
> > -        properties:
> > -          reg:
> > -            description: Must be multiple of 512 as it's converted
> > -              internally from bytes to SECTOR_SIZE (512 bytes)
> > -
> > -        required:
> > -          - reg
> > -
> > -        unevaluatedProperties: false
> > +    properties:
> > +      compatible:
> > +        contains:
> > +          const: fixed-partitions
> >
> >  required:
> >    - compatible
> > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> > index bbb56216a4e2..e56dba83f00a 100644
> > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> > @@ -30,7 +30,7 @@ properties:
> >      deprecated: true
> >
> >    partitions:
> > -    $ref: /schemas/mtd/partitions/partitions.yaml
> > +    type: object
>
> I think you need explicit, since we require it for incomplete nodes:
>
> additionalProperties: true

I put what the tools required me to put. :) We only require it when
properties get defined because that's the case we don't know if the
schema is *all* properties or not.

Rob

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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-10  0:34     ` Rob Herring
@ 2026-01-14 13:58       ` Miquel Raynal
  2026-01-14 17:47         ` Rob Herring
  0 siblings, 1 reply; 35+ messages in thread
From: Miquel Raynal @ 2026-01-14 13:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

Hi Rob,

>> > +$defs:
>> > +  partition-node:
>> > +    type: object
>> > +    if:
>> > +      not:
>> > +        required: [ compatible ]
>> > +    then:
>> > +      $ref: '#'
>> > +      unevaluatedProperties: false
>> > +    else:
>> > +      $ref: '#'
>>
>> This, however, is total blackmagic to me. Would you mind explaining what
>>
>>       $ref: '#'
>>
>> indicates? Is this a placeholder indicating "a reference must be given?
>
> It's what's known as JSON pointers. The '#' is a reference to the top
> level of this schema.
>
>> Also I do not understand the final else case, what is it covering?
>
> It's really just there so a $ref to
> partition.yaml#/$defs/partition-node applies the schema (all of
> partition.yaml) whether there's a compatible property or not.
>
> This all just works around that a schema like this doesn't work:
>
> $ref: foo.yaml
> if:
>   ...
> then:
>   unevaluatedProperties: false
>
> The evaluation of unevaluatedProperties doesn't "see" the $ref being
> in the parent. So we can't factor out the $ref.

Oooh, ok, fully understood. I think I already faced that problem
before. First time I hear about JSON pointers, thanks a lot for the
heads up.

Regarding this series, it feels like in the end, if I understood the
discussion with Krzysztof correctly, there is no modification to bring?
Let me know if you plan on sending a v2 of if I shall take v1 otherwise.

Thanks,
Miquèl

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

* Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
  2026-01-14 13:58       ` Miquel Raynal
@ 2026-01-14 17:47         ` Rob Herring
  0 siblings, 0 replies; 35+ messages in thread
From: Rob Herring @ 2026-01-14 17:47 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On Wed, Jan 14, 2026 at 7:58 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Rob,
>
> >> > +$defs:
> >> > +  partition-node:
> >> > +    type: object
> >> > +    if:
> >> > +      not:
> >> > +        required: [ compatible ]
> >> > +    then:
> >> > +      $ref: '#'
> >> > +      unevaluatedProperties: false
> >> > +    else:
> >> > +      $ref: '#'
> >>
> >> This, however, is total blackmagic to me. Would you mind explaining what
> >>
> >>       $ref: '#'
> >>
> >> indicates? Is this a placeholder indicating "a reference must be given?
> >
> > It's what's known as JSON pointers. The '#' is a reference to the top
> > level of this schema.
> >
> >> Also I do not understand the final else case, what is it covering?
> >
> > It's really just there so a $ref to
> > partition.yaml#/$defs/partition-node applies the schema (all of
> > partition.yaml) whether there's a compatible property or not.
> >
> > This all just works around that a schema like this doesn't work:
> >
> > $ref: foo.yaml
> > if:
> >   ...
> > then:
> >   unevaluatedProperties: false
> >
> > The evaluation of unevaluatedProperties doesn't "see" the $ref being
> > in the parent. So we can't factor out the $ref.
>
> Oooh, ok, fully understood. I think I already faced that problem
> before. First time I hear about JSON pointers, thanks a lot for the
> heads up.
>
> Regarding this series, it feels like in the end, if I understood the
> discussion with Krzysztof correctly, there is no modification to bring?
> Let me know if you plan on sending a v2 of if I shall take v1 otherwise.

Right, I think v1 is good to go.

Rob

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

* Re: [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc
  2026-01-12 15:48     ` Rob Herring
@ 2026-01-14 19:31       ` William Zhang
  0 siblings, 0 replies; 35+ messages in thread
From: William Zhang @ 2026-01-14 19:31 UTC (permalink / raw)
  To: Rob Herring
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Krzysztof Kozlowski, Conor Dooley, Brian Norris, Kamal Dasu,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]

On Mon, Jan 12, 2026 at 7:48 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Jan 09, 2026 at 10:05:04AM -0800, William Zhang wrote:
> > Hi Rob,
> >
> > On Thu, Jan 8, 2026 at 9:53 AM Rob Herring (Arm) <robh@kernel.org> wrote:
> > >
> > > Some users of "brcm,nand-iproc" include "brcm,brcmnand" and some don't.
> > > The "brcm,brcmnand" compatible is not useful for iProc systems as
> > > there's a separate driver for iProc. So drop it as a fallback.
> > >
> > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > > ---
> > >  Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > > index 064e840aeaa1..3105f8e6cbd6 100644
> > > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > > @@ -66,7 +66,6 @@ properties:
> > >          items:
> > >            - const: brcm,nand-iproc
> > >            - const: brcm,brcmnand-v6.1
> > > -          - const: brcm,brcmnand
> > >        - description: BCM63168 SoC-specific NAND controller
> > >          items:
> > >            - const: brcm,nand-bcm63168
> > >
> > > --
> > > 2.51.0
> > >
> >
> > Another fix would be adding brcm,brcmnand to the users of
> > brcm,nand-iproc to keep consistency with all other brcmnand chips and
> > utilize the fallback mechanism in the driver, although I agree it does
> > not happen in real life case.
> > I don't have any strong opinion either way but a follow-up change is
> > needed to remove the fallback from the brcm,nand-iproc dts files if we
> > go this route.
>
> The question to ask on a fallback is "is it usable on its own?". IOW,
> would a driver than only understands brcm,brcmnand function in this
> case. Given iproc needs its own driver and specific handling, the answer
> is no here.
>
> Plus, this matches what dts files actually have at least for the arm64
> ones.
>
> Rob

Fair enough.  With that,
Reviewed-by: William Zhang <william.zhang@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5473 bytes --]

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

* Re: [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
  2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
                   ` (9 preceding siblings ...)
  2026-01-08 17:53 ` [PATCH 10/10] dt-bindings: mtd: partitions: Combine simple partition bindings Rob Herring (Arm)
@ 2026-01-19 10:48 ` Miquel Raynal
  2026-01-20  1:54   ` Rob Herring
  10 siblings, 1 reply; 35+ messages in thread
From: Miquel Raynal @ 2026-01-19 10:48 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

Hello Rob,

On 08/01/2026 at 11:53:09 -06, "Rob Herring (Arm)" <robh@kernel.org> wrote:

> The partition bindings fail to restrict undefined properties. This is 
> primarily on fixed-partitions which can be nested and partition nodes 
> without a compatible string. This series fixes those issues and then 
> several problems exposed by restricting undefined properties. As part of 
> this, the schema structure is reworked to follow more conventional 
> structure of applying schemas by compatible and a schema only checks 1 
> level of nodes (unless possible child nodes are fixed).

The series does not apply cleanly, I tried mtd/next and then
v6.19-rc1. Can you please rebase it and fix the conflicts (at least 2
patches fail, and then I stopped)?

Thanks,
Miquèl

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

* Re: [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
  2026-01-19 10:48 ` [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Miquel Raynal
@ 2026-01-20  1:54   ` Rob Herring
  2026-01-20 14:56     ` Miquel Raynal
  0 siblings, 1 reply; 35+ messages in thread
From: Rob Herring @ 2026-01-20  1:54 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On Mon, Jan 19, 2026 at 4:48 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hello Rob,
>
> On 08/01/2026 at 11:53:09 -06, "Rob Herring (Arm)" <robh@kernel.org> wrote:
>
> > The partition bindings fail to restrict undefined properties. This is
> > primarily on fixed-partitions which can be nested and partition nodes
> > without a compatible string. This series fixes those issues and then
> > several problems exposed by restricting undefined properties. As part of
> > this, the schema structure is reworked to follow more conventional
> > structure of applying schemas by compatible and a schema only checks 1
> > level of nodes (unless possible child nodes are fixed).
>
> The series does not apply cleanly, I tried mtd/next and then
> v6.19-rc1. Can you please rebase it and fix the conflicts (at least 2
> patches fail, and then I stopped)?

I rebased on mtd/next and sent v2. I only saw one conflict though, and
that was with seama.yaml. That's going to conflict with Linus' tree,
but the resolution is take the deleted file.

Rob

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

* Re: [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
  2026-01-20  1:54   ` Rob Herring
@ 2026-01-20 14:56     ` Miquel Raynal
  2026-01-20 15:13       ` Krzysztof Kozlowski
  2026-01-20 16:12       ` Rob Herring
  0 siblings, 2 replies; 35+ messages in thread
From: Miquel Raynal @ 2026-01-20 14:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

Hello,

>> The series does not apply cleanly, I tried mtd/next and then
>> v6.19-rc1. Can you please rebase it and fix the conflicts (at least 2
>> patches fail, and then I stopped)?
>
> I rebased on mtd/next and sent v2. I only saw one conflict though, and
> that was with seama.yaml. That's going to conflict with Linus' tree,
> but the resolution is take the deleted file.

I didn't see where this seama file was modified, except for Linus W.'s
address change. Is there an -rc I need to pull? Or an immutable tag?

Maybe this series applies on top of your next branch? I can give an ack
for the full series if that's the case and you can take it.

I generally try my best to avoid conflicts at merge.

Thanks,
Miquèl

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

* Re: [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
  2026-01-20 14:56     ` Miquel Raynal
@ 2026-01-20 15:13       ` Krzysztof Kozlowski
  2026-01-20 16:12       ` Rob Herring
  1 sibling, 0 replies; 35+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-20 15:13 UTC (permalink / raw)
  To: Miquel Raynal, Rob Herring
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On 20/01/2026 15:56, Miquel Raynal wrote:
> Hello,
> 
>>> The series does not apply cleanly, I tried mtd/next and then
>>> v6.19-rc1. Can you please rebase it and fix the conflicts (at least 2
>>> patches fail, and then I stopped)?
>>
>> I rebased on mtd/next and sent v2. I only saw one conflict though, and
>> that was with seama.yaml. That's going to conflict with Linus' tree,
>> but the resolution is take the deleted file.
> 
> I didn't see where this seama file was modified, except for Linus W.'s
> address change. Is there an -rc I need to pull? Or an immutable tag?
> 
> Maybe this series applies on top of your next branch? I can give an ack
> for the full series if that's the case and you can take it.
> 
> I generally try my best to avoid conflicts at merge.

For the record, v2 applied cleanly on mtd/next.

Best regards,
Krzysztof

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

* Re: [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring
  2026-01-20 14:56     ` Miquel Raynal
  2026-01-20 15:13       ` Krzysztof Kozlowski
@ 2026-01-20 16:12       ` Rob Herring
  1 sibling, 0 replies; 35+ messages in thread
From: Rob Herring @ 2026-01-20 16:12 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Krzysztof Kozlowski,
	Conor Dooley, Brian Norris, Kamal Dasu, William Zhang,
	Nick Terrell, David Sterba, Rafał Miłecki, Simon Glass,
	Linus Walleij, Ulf Hansson, Marcus Folkesson, Tony Lindgren,
	Roger Quadros, Hauke Mehrtens, linux-mtd, devicetree,
	linux-kernel, linux-mmc

On Tue, Jan 20, 2026 at 8:56 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hello,
>
> >> The series does not apply cleanly, I tried mtd/next and then
> >> v6.19-rc1. Can you please rebase it and fix the conflicts (at least 2
> >> patches fail, and then I stopped)?
> >
> > I rebased on mtd/next and sent v2. I only saw one conflict though, and
> > that was with seama.yaml. That's going to conflict with Linus' tree,
> > but the resolution is take the deleted file.
>
> I didn't see where this seama file was modified, except for Linus W.'s
> address change. Is there an -rc I need to pull? Or an immutable tag?

That's the only modification and it is in 6.19-rc2.

> Maybe this series applies on top of your next branch? I can give an ack
> for the full series if that's the case and you can take it.
>
> I generally try my best to avoid conflicts at merge.

That's not really necessary for trivial merge resolutions like this one.

Rob

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

end of thread, other threads:[~2026-01-20 16:12 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
2026-01-09  8:56   ` Krzysztof Kozlowski
2026-01-09 18:05   ` William Zhang
2026-01-12 15:48     ` Rob Herring
2026-01-14 19:31       ` William Zhang
2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
2026-01-09  8:58   ` Krzysztof Kozlowski
2026-01-09 11:31   ` Simon Glass
2026-01-08 17:53 ` [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml Rob Herring (Arm)
2026-01-09  9:22   ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes Rob Herring (Arm)
2026-01-09  9:26   ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas Rob Herring (Arm)
2026-01-09  9:31   ` Krzysztof Kozlowski
2026-01-12 15:50     ` Rob Herring
2026-01-08 17:53 ` [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml Rob Herring (Arm)
2026-01-09  9:34   ` Krzysztof Kozlowski
2026-01-12 22:57     ` Rob Herring
2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
2026-01-09  9:02   ` Miquel Raynal
2026-01-10  0:34     ` Rob Herring
2026-01-14 13:58       ` Miquel Raynal
2026-01-14 17:47         ` Rob Herring
2026-01-09  9:36   ` Krzysztof Kozlowski
2026-01-10  0:25     ` Rob Herring
2026-01-11  9:45       ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 08/10] dt-bindings: mtd: fixed-partitions: Restrict undefined properties Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 09/10] dt-bindings: mtd: partitions: Convert brcm,trx to DT schema Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 10/10] dt-bindings: mtd: partitions: Combine simple partition bindings Rob Herring (Arm)
2026-01-19 10:48 ` [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Miquel Raynal
2026-01-20  1:54   ` Rob Herring
2026-01-20 14:56     ` Miquel Raynal
2026-01-20 15:13       ` Krzysztof Kozlowski
2026-01-20 16:12       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox