linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] Improve MTD bindings
@ 2022-10-28 23:59 Miquel Raynal
  2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

Hello,

During a yaml conversion review, Krzysztof opened the discussion about
the links and references made between the different files in the mtd
bindings. I figured out some minimal changes might be needed to properly
reference everything correctly and ensure we constrain as much as
possible the existing bindings. That is what I tried to do here.

The idea is:
* partition.yaml defines one MTD partition
* parsers/*.yaml define partition parsers (mainly compatibles)
* mtd.yaml contains the generic definition of any mtd device (nand,
  spi-nand, spi-nor, nor, sram, etc), in particular, it defines the
  various partition formats (legacy and current) and references
  partition.yaml as well as a list of all the possible parsers within a
  "partitions" node.
* nand-chip.yaml, jedec,spi-nor, mtd-physmap.yaml all describe real
  instances of mtd device, each of them with a different underlying
  technology, they reference mtd.yaml 
* nand-controller.yaml has subnodes which reference nand-chip.yaml.
* Specific NAND controller bindings reference nand-controller.yaml.

I've tested with the following command and it worked okay:
$ make dt_binding_check -j10 DT_CHECKER_FLAG=-m DT_SCHEMA_FILES=mtd/

Comments welcome of course :-)

Cheers,
Miquèl

Miquel Raynal (12):
  dt-bindings: mtd: Clarify all partition subnodes
  dt-bindings: mtd: Mention basic properties
  dt-bindings: mtd: Remove useless file about partitions
  dt-bindings: mtd: ingenic: Mark partitions in the controller node as
    deprecated
  dt-bindings: mtd: onenand: Mention the expected node name
  dt-bindings: mtd: nand-chip: Reference mtd.yaml
  dt-bindings: mtd: Drop common properties from NAND controllers
  dt-bindings: mtd: spi-nor: Drop common properties
  dt-bindings: mtd: phymap: Reuse the generic definitions
  dt-bindings: mtd: Drop object types when referencing other files
  dt-bindings: mtd: Argue in favor of keeping additionalProperties set
    to true
  dt-bindings: mtd: Constrain the list of parsers

 .../mtd/allwinner,sun4i-a10-nand.yaml         |  3 --
 .../bindings/mtd/arasan,nand-controller.yaml  |  3 --
 .../devicetree/bindings/mtd/ingenic,nand.yaml | 13 +-----
 .../bindings/mtd/intel,lgm-ebunand.yaml       | 10 +----
 .../bindings/mtd/jedec,spi-nor.yaml           | 14 -------
 .../devicetree/bindings/mtd/mtd-physmap.yaml  |  7 ++--
 .../devicetree/bindings/mtd/mtd.yaml          | 41 ++++++++++++++++++-
 .../devicetree/bindings/mtd/nand-chip.yaml    |  4 ++
 .../bindings/mtd/nand-controller.yaml         |  1 -
 .../devicetree/bindings/mtd/partition.txt     | 33 ---------------
 .../bindings/mtd/partitions/partition.yaml    |  1 +
 .../devicetree/bindings/mtd/qcom,nandc.yaml   |  3 --
 .../bindings/mtd/ti,gpmc-onenand.yaml         |  3 ++
 13 files changed, 52 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/partition.txt

-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 19:32   ` Rob Herring
  2022-10-31 19:43   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 02/12] dt-bindings: mtd: Mention basic properties Miquel Raynal
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

Over time the various ways to define MTD partitions has evolved. Most of
the controllers support several different bindings. Let's define all
possible choices in one file and mark the legacy ones deprecated. This
way, we can just reference this file and avoid dupplicating these
definitions.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 25b91f25fcf4..9fcaa61b046c 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -21,7 +21,25 @@ properties:
       based name) in order to ease flash device identification and/or
       describe what they are used for.
 
+  partitions:
+    type: object
+    properties:
+      '#address-cells': true
+      '#size-cells': true
+
+    patternProperties:
+      "partition@[0-9a-f]+":
+        $ref: partitions/partition.yaml
+
 patternProperties:
+  "@[0-9a-f]+$":
+    $ref: partitions/partition.yaml
+    deprecated: true
+
+  "^partition@[0-9a-f]+":
+    $ref: partitions/partition.yaml
+    deprecated: true
+
   "^otp(-[0-9]+)?$":
     type: object
     $ref: ../nvmem/nvmem.yaml#
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 02/12] dt-bindings: mtd: Mention basic properties
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
  2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 19:33   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

there to avoid the need to do it in each and every file.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 9fcaa61b046c..10684b233ae3 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -21,6 +21,9 @@ properties:
       based name) in order to ease flash device identification and/or
       describe what they are used for.
 
+  '#address-cells': true
+  '#size-cells': true
+
   partitions:
     type: object
     properties:
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
  2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
  2022-10-28 23:59 ` [PATCH 02/12] dt-bindings: mtd: Mention basic properties Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 19:35   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

There is already a real partitions.yaml file, nothing in this text file
is actually needed so drop it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 .../devicetree/bindings/mtd/partition.txt     | 33 -------------------
 1 file changed, 33 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/partition.txt

diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
deleted file mode 100644
index ead90e8274d6..000000000000
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Flash partitions in device tree
-===============================
-
-Flash devices can be partitioned into one or more functional ranges (e.g. "boot
-code", "nvram", "kernel").
-
-Different devices may be partitioned in a different ways. Some may use a fixed
-flash layout set at production time. Some may use on-flash table that describes
-the geometry and naming/purpose of each functional region. It is also possible
-to see these methods mixed.
-
-To assist system software in locating partitions, we allow describing which
-method is used for a given flash device. To describe the method there should be
-a subnode of the flash device that is named 'partitions'. It must have a
-'compatible' property, which is used to identify the method to use.
-
-When a single partition is represented with a DT node (it depends on a used
-format) it may also be described using above rules ('compatible' and optionally
-some extra properties / subnodes). It allows describing more complex,
-hierarchical (multi-level) layouts and should be used if there is some
-significant relation between partitions or some partition internally uses
-another partitioning method.
-
-Available bindings are listed in the "partitions" subdirectory.
-
-
-Deprecated: partitions defined in flash node
-============================================
-
-For backwards compatibility partitions as direct subnodes of the flash device are
-supported. This use is discouraged.
-NOTE: also for backwards compatibility, direct subnodes that have a compatible
-string are not considered partitions, as they may be used for other bindings.
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (2 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-30 13:50   ` Rob Herring
  2022-10-31 19:46   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

Defining partitions as subnodes of the controller has been deprecated
long time ago, but unlike having partitions within the controller node,
having an enveloppe named "partitions" (which is not itself within a
chip subnode) is not that common, so keep this deprecated definition in
this file.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
index 8c272c842bfd..484280dd35ab 100644
--- a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
@@ -32,6 +32,7 @@ properties:
 
   partitions:
     type: object
+    deprecated: true
     description:
       Node containing description of fixed partitions.
       See Documentation/devicetree/bindings/mtd/partition.txt
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (3 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 20:54   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

The chip node name in this driver is expected to be different and should
be prefixed with onenand instead of the regular "flash" string, so
mention it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
index a953f7397c40..8a79ad300216 100644
--- a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
@@ -15,6 +15,9 @@ description:
   as child nodes of the GPMC controller.
 
 properties:
+  $nodename:
+    pattern: "^onenand@[0-9],[0,9]$"
+
   compatible:
     const: ti,omap2-onenand
 
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (4 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 20:55   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers Miquel Raynal
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

A NAND chip is an MTD device. mtd.yaml already defines many useful and
relevant properties, let's reference this file here to get access to
these additional property definitions.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/nand-chip.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/nand-chip.yaml b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
index 97ac3a3fbb52..8d5d2d3ef56b 100644
--- a/Documentation/devicetree/bindings/mtd/nand-chip.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
@@ -9,6 +9,9 @@ title: NAND Chip and NAND Controller Generic Binding
 maintainers:
   - Miquel Raynal <miquel.raynal@bootlin.com>
 
+allOf:
+  - $ref: "mtd.yaml#"
+
 description: |
   This file covers the generic description of a NAND chip. It implies that the
   bus interface should not be taken into account: both raw NAND devices and
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (5 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 20:55   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

When redefining common properties does not bring any additional
information, just drop them from the controller bindings because these
properties already are definied in nand-controller.yaml.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 .../bindings/mtd/allwinner,sun4i-a10-nand.yaml       |  3 ---
 .../bindings/mtd/arasan,nand-controller.yaml         |  3 ---
 .../devicetree/bindings/mtd/ingenic,nand.yaml        | 12 ------------
 .../devicetree/bindings/mtd/intel,lgm-ebunand.yaml   | 10 +---------
 .../devicetree/bindings/mtd/qcom,nandc.yaml          |  3 ---
 5 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
index 4741864da48e..140594cc2215 100644
--- a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
@@ -14,9 +14,6 @@ maintainers:
   - Maxime Ripard <mripard@kernel.org>
 
 properties:
-  "#address-cells": true
-  "#size-cells": true
-
   compatible:
     enum:
       - allwinner,sun4i-a10-nand
diff --git a/Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
index f013fb976d95..ae0fc4546737 100644
--- a/Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
@@ -35,9 +35,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  "#address-cells": true
-  "#size-cells": true
-
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
index 484280dd35ab..28a08a6d1385 100644
--- a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
@@ -37,18 +37,6 @@ properties:
       Node containing description of fixed partitions.
       See Documentation/devicetree/bindings/mtd/partition.txt
 
-patternProperties:
-  "^nand@[a-f0-9]$":
-    type: object
-    properties:
-      rb-gpios:
-        description: GPIO specifier for the busy pin.
-        maxItems: 1
-
-      wp-gpios:
-        description: GPIO specifier for the write-protect pin.
-        maxItems: 1
-
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml b/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
index 741c66ee06c3..7c83a328845e 100644
--- a/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
+++ b/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
@@ -39,12 +39,6 @@ properties:
       - const: tx
       - const: rx
 
-  "#address-cells":
-    const: 1
-
-  "#size-cells":
-    const: 0
-
 patternProperties:
   "^nand@[a-f0-9]+$":
     type: object
@@ -67,10 +61,8 @@ required:
   - clocks
   - dmas
   - dma-names
-  - "#address-cells"
-  - "#size-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 482a2c068740..3cc90c64e974 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -31,9 +31,6 @@ properties:
       - const: core
       - const: aon
 
-  "#address-cells": true
-  "#size-cells": true
-
 patternProperties:
   "^nand@[a-f0-9]$":
     type: object
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (6 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 20:56   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions Miquel Raynal
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

When redefining common properties does not bring any additional
information, just drop them from the SPI-NOR bindings because these
properties already are definied in mtd.yaml.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 .../devicetree/bindings/mtd/jedec,spi-nor.yaml     | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
index 7149784a36ac..6cc491083650 100644
--- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
@@ -70,20 +70,6 @@ properties:
       be used on such systems, to denote the absence of a reliable reset
       mechanism.
 
-  partitions:
-    type: object
-
-  '#address-cells': true
-  '#size-cells': true
-
-patternProperties:
-  # Note: use 'partitions' node for new users
-  '^partition@':
-    type: object
-
-  "^otp(-[0-9]+)?$":
-    type: object
-
 unevaluatedProperties: false
 
 examples:
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (7 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-30 13:50   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

The memory mapped MTD devices also share a lot with all the other MTD
devices, so let's share the properties by referencing mtd.yaml. We can
then drop mentioning the properties, to the cost of mentioning the
possible "sram" node name prefix.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 7 +++----
 Documentation/devicetree/bindings/mtd/mtd.yaml         | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
index 82eb4e0f453b..5df94953c34e 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
@@ -13,6 +13,9 @@ description: |
   Flash chips (Memory Technology Devices) are often used for solid state
   file systems on embedded devices.
 
+allOf:
+  - $ref: "mtd.yaml#"
+
 properties:
   compatible:
     oneOf:
@@ -121,10 +124,6 @@ properties:
   big-endian: true
   little-endian: true
 
-patternProperties:
-  '@[0-9a-f]+$':
-    $ref: partitions/partition.yaml
-
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 10684b233ae3..4fdce7211b55 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -12,7 +12,7 @@ maintainers:
 
 properties:
   $nodename:
-    pattern: "^flash(@.*)?$"
+    pattern: "^(flash|sram)(@.*)?$"
 
   label:
     description:
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (8 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 20:59   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
  2022-10-28 23:59 ` [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers Miquel Raynal
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

Setting an object type is redundant when a reference is made, so drop
these useless lines.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml             | 1 -
 Documentation/devicetree/bindings/mtd/nand-controller.yaml | 1 -
 2 files changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 4fdce7211b55..64714fc8c852 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -44,7 +44,6 @@ patternProperties:
     deprecated: true
 
   "^otp(-[0-9]+)?$":
-    type: object
     $ref: ../nvmem/nvmem.yaml#
 
     description: |
diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index 359a015d4e5a..3f2a1480e1eb 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -51,7 +51,6 @@ properties:
 
 patternProperties:
   "^nand@[a-f0-9]$":
-    type: object
     $ref: "nand-chip.yaml#"
 
     properties:
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (9 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 21:01   ` Rob Herring
  2022-10-28 23:59 ` [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers Miquel Raynal
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

In most cases we try to avoidit but in some cases this is
needed. Clarify why by adding a small comment.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml                  | 1 +
 Documentation/devicetree/bindings/mtd/nand-chip.yaml            | 1 +
 Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 1 +
 3 files changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 64714fc8c852..bddb7bdf441b 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -61,6 +61,7 @@ patternProperties:
     required:
       - compatible
 
+# This is a generic file other binding inherit from
 additionalProperties: true
 
 examples:
diff --git a/Documentation/devicetree/bindings/mtd/nand-chip.yaml b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
index 8d5d2d3ef56b..6e2dc025d694 100644
--- a/Documentation/devicetree/bindings/mtd/nand-chip.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
@@ -70,4 +70,5 @@ properties:
 required:
   - reg
 
+# This file can be referenced by more specific devices (like spi-nands)
 additionalProperties: true
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index f1a02d840b12..1c97ca0f7f62 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -60,4 +60,5 @@ then:
     $nodename:
       pattern: '^partition-.*$'
 
+# This is a generic file other binding inherit from
 additionalProperties: true
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers
  2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
                   ` (10 preceding siblings ...)
  2022-10-28 23:59 ` [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
@ 2022-10-28 23:59 ` Miquel Raynal
  2022-10-31 21:10   ` Rob Herring
  11 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-10-28 23:59 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
	Krzysztof Kozlowski, devicetree
  Cc: Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni,
	Miquel Raynal

Parser compatibles cannot be used anywhere, and the list is limited. In
order to constrain this list, enumerate them all under the top
"partitions" subnode. New parsers will have to add their own compatible
here as well.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index bddb7bdf441b..29db0b5c115e 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -27,13 +27,29 @@ properties:
   partitions:
     type: object
     properties:
+      compatible:
+        contains:
+          enum:
+            - fixed-partitions
+            - arm,arm-firmware-suite
+            - brcm,bcm4908-partitions
+            - brcm,bcm947xx-cfe-partitions
+            - nksys,ns-partitions
+            - nvmem-cells
+            - qcom,smem-part
+            - redboot-fis
+
       '#address-cells': true
+
       '#size-cells': true
 
     patternProperties:
       "partition@[0-9a-f]+":
         $ref: partitions/partition.yaml
 
+    required:
+      - compatible
+
 patternProperties:
   "@[0-9a-f]+$":
     $ref: partitions/partition.yaml
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated
  2022-10-28 23:59 ` [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
@ 2022-10-30 13:50   ` Rob Herring
  2022-10-31 19:46   ` Rob Herring
  1 sibling, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-30 13:50 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Sureshkumar Relli, Krzysztof Kozlowski, Naga Sureshkumar Relli,
	Rob Herring, Richard Weinberger, Vignesh Raghavendra,
	Michael Walle, Thomas Petazzoni, devicetree, Tudor Ambarus,
	Maxime Ripard, Chen-Yu Tsai, linux-sunxi, Linus Walleij,
	linux-arm-kernel, Pratyush Yadav, linux-mtd, linux-arm-msm,
	Manivannan Sadhasivam


On Sat, 29 Oct 2022 01:59:25 +0200, Miquel Raynal wrote:
> Defining partitions as subnodes of the controller has been deprecated
> long time ago, but unlike having partitions within the controller node,
> having an enveloppe named "partitions" (which is not itself within a
> chip subnode) is not that common, so keep this deprecated definition in
> this file.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 



My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:


doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/mtd/atmel-nand.txt references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Warning: Documentation/devicetree/bindings/mtd/ingenic,nand.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Warning: Documentation/devicetree/bindings/mtd/lpc32xx-mlc.txt references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Warning: Documentation/devicetree/bindings/mtd/lpc32xx-slc.txt references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Warning: Documentation/devicetree/bindings/mtd/mtk-nand.txt references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Warning: drivers/mtd/parsers/Kconfig references a file that doesn't exist: Documentation/devicetree/bindings/mtd/partition.txt
Documentation/devicetree/bindings/mtd/atmel-nand.txt: Documentation/devicetree/bindings/mtd/partition.txt
Documentation/devicetree/bindings/mtd/ingenic,nand.yaml: Documentation/devicetree/bindings/mtd/partition.txt
Documentation/devicetree/bindings/mtd/lpc32xx-mlc.txt: Documentation/devicetree/bindings/mtd/partition.txt
Documentation/devicetree/bindings/mtd/lpc32xx-slc.txt: Documentation/devicetree/bindings/mtd/partition.txt
Documentation/devicetree/bindings/mtd/mtk-nand.txt: Documentation/devicetree/bindings/mtd/partition.txt
drivers/mtd/parsers/Kconfig: Documentation/devicetree/bindings/mtd/partition.txt

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions
  2022-10-28 23:59 ` [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions Miquel Raynal
@ 2022-10-30 13:50   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-30 13:50 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Maxime Ripard, Sureshkumar Relli, linux-sunxi, linux-mtd,
	Linus Walleij, Thomas Petazzoni, linux-arm-kernel,
	Krzysztof Kozlowski, Michael Walle, Manivannan Sadhasivam,
	Vignesh Raghavendra, Chen-Yu Tsai, Naga Sureshkumar Relli,
	linux-arm-msm, Tudor Ambarus, Pratyush Yadav, Richard Weinberger,
	Rob Herring, devicetree


On Sat, 29 Oct 2022 01:59:30 +0200, Miquel Raynal wrote:
> The memory mapped MTD devices also share a lot with all the other MTD
> devices, so let's share the properties by referencing mtd.yaml. We can
> then drop mentioning the properties, to the cost of mentioning the
> possible "sram" node name prefix.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 7 +++----
>  Documentation/devicetree/bindings/mtd/mtd.yaml         | 2 +-
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 



My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.example.dtb: psram@0,0: $nodename:0: 'psram@0,0' does not match '^(flash|sram)(@.*)?$'
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes
  2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
@ 2022-10-31 19:32   ` Rob Herring
  2022-10-31 19:43   ` Rob Herring
  1 sibling, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 19:32 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:22AM +0200, Miquel Raynal wrote:
> Over time the various ways to define MTD partitions has evolved. Most of
> the controllers support several different bindings. Let's define all
> possible choices in one file and mark the legacy ones deprecated. This
> way, we can just reference this file and avoid dupplicating these
> definitions.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index 25b91f25fcf4..9fcaa61b046c 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -21,7 +21,25 @@ properties:
>        based name) in order to ease flash device identification and/or
>        describe what they are used for.
>  
> +  partitions:
> +    type: object
> +    properties:
> +      '#address-cells': true
> +      '#size-cells': true

These should only be 1 or 2 which I don't think is defined anywhere 
else.

> +
> +    patternProperties:
> +      "partition@[0-9a-f]+":
> +        $ref: partitions/partition.yaml
> +
>  patternProperties:
> +  "@[0-9a-f]+$":
> +    $ref: partitions/partition.yaml
> +    deprecated: true
> +
> +  "^partition@[0-9a-f]+":
> +    $ref: partitions/partition.yaml
> +    deprecated: true
> +
>    "^otp(-[0-9]+)?$":
>      type: object
>      $ref: ../nvmem/nvmem.yaml#
> -- 
> 2.34.1
> 
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 02/12] dt-bindings: mtd: Mention basic properties
  2022-10-28 23:59 ` [PATCH 02/12] dt-bindings: mtd: Mention basic properties Miquel Raynal
@ 2022-10-31 19:33   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 19:33 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:23AM +0200, Miquel Raynal wrote:
> there to avoid the need to do it in each and every file.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index 9fcaa61b046c..10684b233ae3 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -21,6 +21,9 @@ properties:
>        based name) in order to ease flash device identification and/or
>        describe what they are used for.
>  
> +  '#address-cells': true
> +  '#size-cells': true
> +

These are only for 'partition' nodes, right? If so, they should be 
marked deprecated too.

>    partitions:
>      type: object
>      properties:
> -- 
> 2.34.1
> 
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions
  2022-10-28 23:59 ` [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
@ 2022-10-31 19:35   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 19:35 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:24AM +0200, Miquel Raynal wrote:
> There is already a real partitions.yaml file, nothing in this text file
> is actually needed so drop it.

There's a bunch of references to this file still. Run the doc ref check.

> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  .../devicetree/bindings/mtd/partition.txt     | 33 -------------------
>  1 file changed, 33 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mtd/partition.txt

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes
  2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
  2022-10-31 19:32   ` Rob Herring
@ 2022-10-31 19:43   ` Rob Herring
  1 sibling, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 19:43 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:22AM +0200, Miquel Raynal wrote:
> Over time the various ways to define MTD partitions has evolved. Most of
> the controllers support several different bindings. Let's define all
> possible choices in one file and mark the legacy ones deprecated. This
> way, we can just reference this file and avoid dupplicating these
> definitions.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index 25b91f25fcf4..9fcaa61b046c 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -21,7 +21,25 @@ properties:
>        based name) in order to ease flash device identification and/or
>        describe what they are used for.
>  
> +  partitions:
> +    type: object

Also, this node needs 'additionalProperties: false'. Unless there cases 
of custom properties here. If so, then it gets more complicated and 
we'll need a partitions.yaml schema instead so we can do:

$ref: partitions.yaml
properties:
  my-extra-custom-property: true

unevaluatedProperties: false

(Multiple node levels doesn't work for that as child nodes from 2 
different schemas can't 'see' each other.)

> +    properties:
> +      '#address-cells': true
> +      '#size-cells': true
> +
> +    patternProperties:
> +      "partition@[0-9a-f]+":
> +        $ref: partitions/partition.yaml
> +
>  patternProperties:
> +  "@[0-9a-f]+$":
> +    $ref: partitions/partition.yaml
> +    deprecated: true
> +
> +  "^partition@[0-9a-f]+":
> +    $ref: partitions/partition.yaml
> +    deprecated: true
> +
>    "^otp(-[0-9]+)?$":
>      type: object
>      $ref: ../nvmem/nvmem.yaml#
> -- 
> 2.34.1
> 
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated
  2022-10-28 23:59 ` [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
  2022-10-30 13:50   ` Rob Herring
@ 2022-10-31 19:46   ` Rob Herring
  1 sibling, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 19:46 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Tudor Ambarus, linux-arm-kernel, linux-arm-msm,
	Richard Weinberger, Thomas Petazzoni, Pratyush Yadav,
	linux-sunxi, Krzysztof Kozlowski, Rob Herring, Sureshkumar Relli,
	Linus Walleij, Naga Sureshkumar Relli, Manivannan Sadhasivam,
	Michael Walle, devicetree, linux-mtd, Maxime Ripard,
	Chen-Yu Tsai, Vignesh Raghavendra


On Sat, 29 Oct 2022 01:59:25 +0200, Miquel Raynal wrote:
> Defining partitions as subnodes of the controller has been deprecated
> long time ago, but unlike having partitions within the controller node,
> having an enveloppe named "partitions" (which is not itself within a
> chip subnode) is not that common, so keep this deprecated definition in
> this file.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name
  2022-10-28 23:59 ` [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
@ 2022-10-31 20:54   ` Rob Herring
  2022-11-02 16:50     ` Miquel Raynal
  0 siblings, 1 reply; 29+ messages in thread
From: Rob Herring @ 2022-10-31 20:54 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:26AM +0200, Miquel Raynal wrote:
> The chip node name in this driver is expected to be different and should
> be prefixed with onenand instead of the regular "flash" string, so
> mention it.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> index a953f7397c40..8a79ad300216 100644
> --- a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> @@ -15,6 +15,9 @@ description:
>    as child nodes of the GPMC controller.
>  
>  properties:
> +  $nodename:
> +    pattern: "^onenand@[0-9],[0,9]$"

I don't think it is worth enforcing node names that we 
haven't defined in the spec. Wouldn't 'nand-controller' be appropriate?

> +
>    compatible:
>      const: ti,omap2-onenand
>  
> -- 
> 2.34.1
> 
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml
  2022-10-28 23:59 ` [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
@ 2022-10-31 20:55   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 20:55 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: devicetree, Richard Weinberger, Naga Sureshkumar Relli,
	Thomas Petazzoni, linux-sunxi, Krzysztof Kozlowski,
	Michael Walle, Manivannan Sadhasivam, Maxime Ripard,
	Tudor Ambarus, linux-mtd, Linus Walleij, linux-arm-msm,
	Vignesh Raghavendra, Rob Herring, linux-arm-kernel, Chen-Yu Tsai,
	Sureshkumar Relli, Pratyush Yadav


On Sat, 29 Oct 2022 01:59:27 +0200, Miquel Raynal wrote:
> A NAND chip is an MTD device. mtd.yaml already defines many useful and
> relevant properties, let's reference this file here to get access to
> these additional property definitions.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/nand-chip.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers
  2022-10-28 23:59 ` [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers Miquel Raynal
@ 2022-10-31 20:55   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 20:55 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Linus Walleij, Rob Herring, Richard Weinberger,
	Manivannan Sadhasivam, Krzysztof Kozlowski, devicetree,
	Michael Walle, Thomas Petazzoni, Pratyush Yadav, Tudor Ambarus,
	Sureshkumar Relli, Naga Sureshkumar Relli, linux-mtd,
	Chen-Yu Tsai, linux-arm-msm, Vignesh Raghavendra,
	linux-arm-kernel, Maxime Ripard, linux-sunxi


On Sat, 29 Oct 2022 01:59:28 +0200, Miquel Raynal wrote:
> When redefining common properties does not bring any additional
> information, just drop them from the controller bindings because these
> properties already are definied in nand-controller.yaml.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  .../bindings/mtd/allwinner,sun4i-a10-nand.yaml       |  3 ---
>  .../bindings/mtd/arasan,nand-controller.yaml         |  3 ---
>  .../devicetree/bindings/mtd/ingenic,nand.yaml        | 12 ------------
>  .../devicetree/bindings/mtd/intel,lgm-ebunand.yaml   | 10 +---------
>  .../devicetree/bindings/mtd/qcom,nandc.yaml          |  3 ---
>  5 files changed, 1 insertion(+), 30 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties
  2022-10-28 23:59 ` [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
@ 2022-10-31 20:56   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 20:56 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Linus Walleij, Krzysztof Kozlowski, Maxime Ripard,
	Naga Sureshkumar Relli, Michael Walle, linux-sunxi,
	Vignesh Raghavendra, Richard Weinberger, Pratyush Yadav,
	Rob Herring, Manivannan Sadhasivam, Chen-Yu Tsai,
	Thomas Petazzoni, linux-arm-msm, devicetree, linux-arm-kernel,
	Sureshkumar Relli, linux-mtd, Tudor Ambarus


On Sat, 29 Oct 2022 01:59:29 +0200, Miquel Raynal wrote:
> When redefining common properties does not bring any additional
> information, just drop them from the SPI-NOR bindings because these
> properties already are definied in mtd.yaml.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  .../devicetree/bindings/mtd/jedec,spi-nor.yaml     | 14 --------------
>  1 file changed, 14 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files
  2022-10-28 23:59 ` [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
@ 2022-10-31 20:59   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 20:59 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: linux-arm-msm, Rob Herring, Pratyush Yadav, Michael Walle,
	devicetree, linux-arm-kernel, Tudor Ambarus, Krzysztof Kozlowski,
	Chen-Yu Tsai, Linus Walleij, Richard Weinberger, linux-mtd,
	Maxime Ripard, Sureshkumar Relli, Manivannan Sadhasivam,
	Thomas Petazzoni, Vignesh Raghavendra, linux-sunxi,
	Naga Sureshkumar Relli


On Sat, 29 Oct 2022 01:59:31 +0200, Miquel Raynal wrote:
> Setting an object type is redundant when a reference is made, so drop
> these useless lines.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml             | 1 -
>  Documentation/devicetree/bindings/mtd/nand-controller.yaml | 1 -
>  2 files changed, 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true
  2022-10-28 23:59 ` [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
@ 2022-10-31 21:01   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 21:01 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:32AM +0200, Miquel Raynal wrote:
> In most cases we try to avoidit but in some cases this is

avoid it

> needed. Clarify why by adding a small comment.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml                  | 1 +
>  Documentation/devicetree/bindings/mtd/nand-chip.yaml            | 1 +
>  Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 1 +
>  3 files changed, 3 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers
  2022-10-28 23:59 ` [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers Miquel Raynal
@ 2022-10-31 21:10   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-10-31 21:10 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Sat, Oct 29, 2022 at 01:59:33AM +0200, Miquel Raynal wrote:
> Parser compatibles cannot be used anywhere, and the list is limited. In
> order to constrain this list, enumerate them all under the top
> "partitions" subnode. New parsers will have to add their own compatible
> here as well.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  Documentation/devicetree/bindings/mtd/mtd.yaml | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
> index bddb7bdf441b..29db0b5c115e 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> @@ -27,13 +27,29 @@ properties:
>    partitions:
>      type: object
>      properties:
> +      compatible:
> +        contains:
> +          enum:
> +            - fixed-partitions
> +            - arm,arm-firmware-suite
> +            - brcm,bcm4908-partitions
> +            - brcm,bcm947xx-cfe-partitions
> +            - nksys,ns-partitions
> +            - nvmem-cells
> +            - qcom,smem-part
> +            - redboot-fis
> +
>        '#address-cells': true
> +
>        '#size-cells': true

Alternatively, you could add a 'oneOf' with $ref's to each partition 
type. Then we don't have the same compatible in 2 places. If you do, 
then the partition schemas should have a 'select: false' so we don't 
apply the schema twice.

Or keeping it like this is fine too.

Reviewed-by: Rob Herring <robh@kernel.org>

Rob

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name
  2022-10-31 20:54   ` Rob Herring
@ 2022-11-02 16:50     ` Miquel Raynal
  2022-11-02 21:46       ` Rob Herring
  0 siblings, 1 reply; 29+ messages in thread
From: Miquel Raynal @ 2022-11-02 16:50 UTC (permalink / raw)
  To: Rob Herring
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

Hi Rob,

robh@kernel.org wrote on Mon, 31 Oct 2022 15:54:42 -0500:

> On Sat, Oct 29, 2022 at 01:59:26AM +0200, Miquel Raynal wrote:
> > The chip node name in this driver is expected to be different and should
> > be prefixed with onenand instead of the regular "flash" string, so
> > mention it.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > index a953f7397c40..8a79ad300216 100644
> > --- a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > @@ -15,6 +15,9 @@ description:
> >    as child nodes of the GPMC controller.
> >  
> >  properties:
> > +  $nodename:
> > +    pattern: "^onenand@[0-9],[0,9]$"  
> 
> I don't think it is worth enforcing node names that we 
> haven't defined in the spec. Wouldn't 'nand-controller' be appropriate?

Actually I've added this pattern here because there are several users in
the arm/boot/dts/ directory which use it, and the example below in this
file also uses onenand@xxx.

I can either fix the example to use nand-controller or add this pattern
(I guess "deprecated: true" would not mean anything?). What do you
prefer?

If we decide to switch to the nand-controller@ name, shall I change the
DTS as well?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name
  2022-11-02 16:50     ` Miquel Raynal
@ 2022-11-02 21:46       ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-11-02 21:46 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
	devicetree, Chen-Yu Tsai, Naga Sureshkumar Relli, Linus Walleij,
	Manivannan Sadhasivam, Maxime Ripard, Sureshkumar Relli,
	linux-arm-kernel, linux-sunxi, linux-arm-msm, Thomas Petazzoni

On Wed, Nov 02, 2022 at 05:50:07PM +0100, Miquel Raynal wrote:
> Hi Rob,
> 
> robh@kernel.org wrote on Mon, 31 Oct 2022 15:54:42 -0500:
> 
> > On Sat, Oct 29, 2022 at 01:59:26AM +0200, Miquel Raynal wrote:
> > > The chip node name in this driver is expected to be different and should
> > > be prefixed with onenand instead of the regular "flash" string, so
> > > mention it.
> > > 
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > ---
> > >  Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > > index a953f7397c40..8a79ad300216 100644
> > > --- a/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > > +++ b/Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
> > > @@ -15,6 +15,9 @@ description:
> > >    as child nodes of the GPMC controller.
> > >  
> > >  properties:
> > > +  $nodename:
> > > +    pattern: "^onenand@[0-9],[0,9]$"  
> > 
> > I don't think it is worth enforcing node names that we 
> > haven't defined in the spec. Wouldn't 'nand-controller' be appropriate?
> 
> Actually I've added this pattern here because there are several users in
> the arm/boot/dts/ directory which use it, and the example below in this
> file also uses onenand@xxx.
> 
> I can either fix the example to use nand-controller or add this pattern
> (I guess "deprecated: true" would not mean anything?). What do you
> prefer?
> 
> If we decide to switch to the nand-controller@ name, shall I change the
> DTS as well?

I guess I'd just leave it as you have it.

Rob

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2022-11-02 21:47 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 23:59 [PATCH 00/12] Improve MTD bindings Miquel Raynal
2022-10-28 23:59 ` [PATCH 01/12] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
2022-10-31 19:32   ` Rob Herring
2022-10-31 19:43   ` Rob Herring
2022-10-28 23:59 ` [PATCH 02/12] dt-bindings: mtd: Mention basic properties Miquel Raynal
2022-10-31 19:33   ` Rob Herring
2022-10-28 23:59 ` [PATCH 03/12] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
2022-10-31 19:35   ` Rob Herring
2022-10-28 23:59 ` [PATCH 04/12] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
2022-10-30 13:50   ` Rob Herring
2022-10-31 19:46   ` Rob Herring
2022-10-28 23:59 ` [PATCH 05/12] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
2022-10-31 20:54   ` Rob Herring
2022-11-02 16:50     ` Miquel Raynal
2022-11-02 21:46       ` Rob Herring
2022-10-28 23:59 ` [PATCH 06/12] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
2022-10-31 20:55   ` Rob Herring
2022-10-28 23:59 ` [PATCH 07/12] dt-bindings: mtd: Drop common properties from NAND controllers Miquel Raynal
2022-10-31 20:55   ` Rob Herring
2022-10-28 23:59 ` [PATCH 08/12] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
2022-10-31 20:56   ` Rob Herring
2022-10-28 23:59 ` [PATCH 09/12] dt-bindings: mtd: phymap: Reuse the generic definitions Miquel Raynal
2022-10-30 13:50   ` Rob Herring
2022-10-28 23:59 ` [PATCH 10/12] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
2022-10-31 20:59   ` Rob Herring
2022-10-28 23:59 ` [PATCH 11/12] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
2022-10-31 21:01   ` Rob Herring
2022-10-28 23:59 ` [PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers Miquel Raynal
2022-10-31 21:10   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).