summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-06-19 11:29:10 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-06-22 23:08:26 +0200
commit129a70a17cfc4140fd4f1dd6e1f5e767248c8c74 (patch)
tree2ac7993e247380eeacfc00c7fb91ce887ff3b8a0
parent74b7e3bd289b02b80abcfc71f03dfac1f4fc937e (diff)
downloadlinux-stable-129a70a17cfc4140fd4f1dd6e1f5e767248c8c74.tar.gz
linux-stable-129a70a17cfc4140fd4f1dd6e1f5e767248c8c74.tar.bz2
linux-stable-129a70a17cfc4140fd4f1dd6e1f5e767248c8c74.zip
dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
Ensure all raw NAND chip properties are valid by referencing the relevant schema and set unevaluatedProperties to false in the NAND chip section to avoid spurious additions of random properties. Doing this in one location also saves us from dupplicating the description of the NAND chip object. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/linux-mtd/20230619092916.3028470-12-miquel.raynal@bootlin.com
-rw-r--r--Documentation/devicetree/bindings/mtd/denali,nand.yaml9
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/mtd/denali,nand.yaml b/Documentation/devicetree/bindings/mtd/denali,nand.yaml
index 0be83ad42970..81f95538d415 100644
--- a/Documentation/devicetree/bindings/mtd/denali,nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/denali,nand.yaml
@@ -63,6 +63,12 @@ properties:
minItems: 1
maxItems: 2
+patternProperties:
+ "^nand@[a-f0-9]$":
+ type: object
+ $ref: raw-nand-chip.yaml
+ unevaluatedProperties: false
+
allOf:
- $ref: nand-controller.yaml
@@ -74,7 +80,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum:
@@ -92,7 +97,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum:
@@ -111,7 +115,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum: