From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
devicetree@vger.kernel.org
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <michael@walle.cc>, <linux-mtd@lists.infradead.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
<linux-kernel@vger.kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Rob Herring <robh@kernel.org>
Subject: [PATCH v3 11/17] dt-bindings: mtd: partitions: Constrain the list of parsers
Date: Mon, 14 Nov 2022 10:03:09 +0100 [thread overview]
Message-ID: <20221114090315.848208-12-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20221114090315.848208-1-miquel.raynal@bootlin.com>
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>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/mtd/mtd.yaml | 3 +++
.../mtd/partitions/arm,arm-firmware-suite.yaml | 2 ++
.../mtd/partitions/brcm,bcm4908-partitions.yaml | 2 ++
.../mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml | 2 ++
.../mtd/partitions/linksys,ns-partitions.yaml | 2 ++
.../bindings/mtd/partitions/partitions.yaml | 12 ++++++++++--
.../bindings/mtd/partitions/qcom,smem-part.yaml | 2 ++
.../bindings/mtd/partitions/redboot-fis.yaml | 6 ++++++
8 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 2fbd0a2ff548..2494ec2d80e3 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -30,6 +30,9 @@ properties:
partitions:
$ref: /schemas/mtd/partitions/partitions.yaml
+ required:
+ - compatible
+
patternProperties:
"@[0-9a-f]+$":
$ref: partitions/partition.yaml
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 76c88027b6d2..97618847ee35 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.yaml
@@ -9,6 +9,8 @@ title: ARM Firmware Suite (AFS) Partitions
maintainers:
- Linus Walleij <linus.walleij@linaro.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 7b113e5e3421..5bbb1c01ddee 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -17,6 +17,8 @@ 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 3484e06d6bcb..939e7b50db22 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml
@@ -35,6 +35,8 @@ 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 99249cdfbfb3..213858f60375 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
@@ -18,6 +18,8 @@ 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
index ff65795de285..9aca4e6c6047 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
@@ -13,6 +13,15 @@ description: |
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
+
properties:
compatible: true
@@ -29,5 +38,4 @@ patternProperties:
required:
- compatible
-# Temporary value, should be set to false when constraining the parsers list
-additionalProperties: true
+unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml b/Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml
index dc07909af023..805eabece7c8 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml
@@ -15,6 +15,8 @@ description: |
varies between partition table revisions. V3 supports maximum 16 partitions
and V4 supports 48 partitions.
+select: false
+
properties:
compatible:
const: qcom,smem-part
diff --git a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
index fee8d81b5276..ba7445cd69e8 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/redboot-fis.yaml
@@ -16,6 +16,8 @@ description: The FLASH Image System (FIS) directory is a flash description
maintainers:
- Linus Walleij <linus.walleij@linaro.org>
+select: false
+
properties:
compatible:
const: redboot-fis
@@ -26,6 +28,10 @@ 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.34.1
next prev parent reply other threads:[~2022-11-14 9:04 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 9:02 [PATCH v3 00/17] Improve MTD bindings Miquel Raynal
2022-11-14 9:02 ` [PATCH v3 01/17] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 02/17] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 03/17] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 04/17] dt-bindings: mtd: nand: Drop common properties already defined in generic files Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 05/17] dt-bindings: mtd: nand: Standardize the child node name Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 06/17] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 07/17] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 08/17] dt-bindings: mtd: sunxi-nand: Add an example to validate the bindings Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 09/17] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 10/17] dt-bindings: mtd: physmap: Reuse the generic definitions Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` Miquel Raynal [this message]
2022-11-17 21:15 ` [PATCH v3 11/17] dt-bindings: mtd: partitions: Constrain the list of parsers Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 12/17] dt-bindings: mtd: partitions: Change qcom,smem-part partition type Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 13/17] dt-bindings: mtd: nvmem-cells: Drop range property from example Miquel Raynal
2022-11-16 20:56 ` Rob Herring
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 14/17] dt-bindings: mtd: nvmem-cells: Inherit from MTD partitions Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 15/17] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 16/17] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 17/17] dt-bindings: mtd: Standardize the style in the examples Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221114090315.848208-12-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®