diff mbox series

[3/4] dt-bindings: mtd: partitions: add linux,ubi compatible

Message ID faa0ceb4470f7160b05e892932d20b4a540c5955.1683043928.git.daniel@makrotopia.org
State New
Headers show
Series mtd: ubi: behave like a good MTD citizen | expand

Commit Message

Daniel Golle May 2, 2023, 4:48 p.m. UTC
Add bindings for MTD partitions to be attached as UBI devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 .../bindings/mtd/partitions/ubi.yaml          | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi.yaml

Comments

Rob Herring May 5, 2023, 9:56 p.m. UTC | #1
On Tue, May 02, 2023 at 05:48:39PM +0100, Daniel Golle wrote:
> Add bindings for MTD partitions to be attached as UBI devices.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  .../bindings/mtd/partitions/ubi.yaml          | 49 +++++++++++++++++++

linux,ubi.yaml

>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml
> new file mode 100644
> index 0000000000000..aa02fbbd50716
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/partitions/ubi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Unsorted Block Images (UBI)
> +
> +description: |
> + Unsorted Block Images (UBI) is a volume management system typically
> + used on NAND flash providing bad block management as well as
> + wear-leveling.
> + Any partition containing the compatible "linux,ubi" will be attached
> + as UBI device.
> +
> +maintainers:
> +  - Daniel Golle <daniel@makrotopia.org>
> +
> +allOf:
> +  - $ref: /schemas/mtd/partitions/partition.yaml#
> +
> +properties:
> +  compatible:
> +    const: linux,ubi
> +
> +required:
> +  - compatible
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    partitions {
> +        compatible = "fixed-partitions";
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        partition@0 {
> +            label = "bootloader";
> +            reg = <0x000000 0x100000>;
> +            read-only;
> +        };
> +
> +        ubi@100000 {
> +            compatible = "linux,ubi";
> +            label = "ubi";
> +            reg = <0x100000 0x7f00000>;
> +        };
> +    };
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml
new file mode 100644
index 0000000000000..aa02fbbd50716
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/ubi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Unsorted Block Images (UBI)
+
+description: |
+ Unsorted Block Images (UBI) is a volume management system typically
+ used on NAND flash providing bad block management as well as
+ wear-leveling.
+ Any partition containing the compatible "linux,ubi" will be attached
+ as UBI device.
+
+maintainers:
+  - Daniel Golle <daniel@makrotopia.org>
+
+allOf:
+  - $ref: /schemas/mtd/partitions/partition.yaml#
+
+properties:
+  compatible:
+    const: linux,ubi
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    partitions {
+        compatible = "fixed-partitions";
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        partition@0 {
+            label = "bootloader";
+            reg = <0x000000 0x100000>;
+            read-only;
+        };
+
+        ubi@100000 {
+            compatible = "linux,ubi";
+            label = "ubi";
+            reg = <0x100000 0x7f00000>;
+        };
+    };