[PATCH RFC] dt-bindings: mtd: allow NVMEM cells in BCM4908 partitions

Rafał Miłecki zajec5 at gmail.com
Mon Mar 29 16:07:23 BST 2021


From: Rafał Miłecki <rafal at milecki.pl>

Every MTD partition can be NVMEM provider now. It's not handled by the
shared partition.yaml so add proper "compatible" to the BCM4908.

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
Ideally I'd like to have:
1. partition.yaml allowing "nvmem-cells" by using nvmem-cells.yaml
2. brcm,bcm4908-partitions.yaml using partition.yaml and extending the
   compatible list by "brcm,bcm4908-firmware"

I don't know if such a solution is possible to implement using YAML?

Proposed solution (RFC) isn't a really clean one:
1. It duplicates "nvmem-cells" which is already in the nvmem-cells.yaml
2. Generic "nvmem-cells" should be part of the partition.yaml

Rob? Help? :)
---
 .../bindings/mtd/partitions/brcm,bcm4908-partitions.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
index 7b113e5e3421..28aa3bdd1103 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -32,7 +32,9 @@ patternProperties:
     $ref: "partition.yaml#"
     properties:
       compatible:
-        const: brcm,bcm4908-firmware
+        enum:
+          - brcm,bcm4908-firmware
+          - nvmem-cells
     unevaluatedProperties: false
 
 required:
-- 
2.26.2




More information about the linux-mtd mailing list