diff mbox series

[v6,2/7] dt-bindings: mtd: ubi-volume: allow UBI volumes to provide NVMEM

Message ID 778eaad045dbf9e10448dc5db7c0ef468191488e.1702850093.git.daniel@makrotopia.org
State Superseded
Headers show
Series mtd: ubi: allow UBI volumes to provide NVMEM | expand

Commit Message

Daniel Golle Dec. 17, 2023, 10:19 p.m. UTC
UBI volumes may be used to contain NVMEM bits, typically device MAC
addresses or wireless radio calibration data.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/mtd/partitions/linux,ubi.yaml          | 10 ++++++++++
 .../bindings/mtd/partitions/ubi-volume.yaml         | 13 +++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

Comments

Miquel Raynal Dec. 18, 2023, 7:05 a.m. UTC | #1
Hi Daniel,

> --- a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
> @@ -15,21 +15,26 @@ maintainers:
>  
>  properties:
>    volid:
> -    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    $ref: /schemas/types.yaml#/definitions/uint32
>      description:
>        Match UBI volume ID
>  
>    volname:
> -    $ref: "/schemas/types.yaml#/definitions/string"
> +    $ref: /schemas/types.yaml#/definitions/string
>      description:
>        Match UBI volume ID
>  
> +  nvmem-layout:
> +    $ref: /schemas/nvmem/layouts/nvmem-layout.yaml#
> +    description:
> +      This container may reference an NVMEM layout parser.
> +
>  anyOf:
>    - required:
> -    - volid
> +      - volid
>  
>    - required:
> -    - volname
> +      - volname

This should be squashed in patch 1.

Thanks,
Miquèl
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
index 7084a1945b310..27e1ac1f252e4 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
@@ -59,6 +59,16 @@  examples:
                 ubi-volume-caldata {
                     volid = <2>;
                     volname = "rf";
+
+                    nvmem-layout {
+                        compatible = "fixed-layout";
+                        #address-cells = <1>;
+                        #size-cells = <1>;
+
+                        eeprom@0 {
+                            reg = <0x0 0x1000>;
+                        };
+                    };
                 };
             };
         };
diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
index c17d0caf07d97..19736b26056b2 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
@@ -15,21 +15,26 @@  maintainers:
 
 properties:
   volid:
-    $ref: "/schemas/types.yaml#/definitions/uint32"
+    $ref: /schemas/types.yaml#/definitions/uint32
     description:
       Match UBI volume ID
 
   volname:
-    $ref: "/schemas/types.yaml#/definitions/string"
+    $ref: /schemas/types.yaml#/definitions/string
     description:
       Match UBI volume ID
 
+  nvmem-layout:
+    $ref: /schemas/nvmem/layouts/nvmem-layout.yaml#
+    description:
+      This container may reference an NVMEM layout parser.
+
 anyOf:
   - required:
-    - volid
+      - volid
 
   - required:
-    - volname
+      - volname
 
 # This is a generic file other binding inherit from and extend
 additionalProperties: true