dt-bindings: mtd: physmap: Reuse the generic definitions
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 14 Nov 2022 09:03:08 +0000 (10:03 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 17 Nov 2022 20:59:20 +0000 (21:59 +0100)
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>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-11-miquel.raynal@bootlin.com
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
Documentation/devicetree/bindings/mtd/mtd.yaml
Documentation/devicetree/bindings/mtd/nand-controller.yaml

index 82eb4e0f453b92a2941d17dbb8fcf333f35c6c9b..5df94953c34ee51fe23d33cd9afb94ea3c12b815 100644 (file)
@@ -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
index a6b498bbdbb6beca8fc62fcf499342a15c75b6df..2fbd0a2ff5488957b413860c039c7463c6f9569e 100644 (file)
@@ -12,7 +12,7 @@ maintainers:
 
 properties:
   $nodename:
-    pattern: "^flash(@.*)?$"
+    pattern: "^(flash|.*sram)(@.*)?$"
 
   label:
     description:
index 359a015d4e5ad601e86771e0593254b6d2334950..3f2a1480e1ebccb318680f1b1b46bd09aa120cc6 100644 (file)
@@ -51,7 +51,6 @@ properties:
 
 patternProperties:
   "^nand@[a-f0-9]$":
-    type: object
     $ref: "nand-chip.yaml#"
 
     properties: