xref: /linux/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Unsorted Block Images
8
9description: |
10  UBI ("Unsorted Block Images") is a volume management system for raw
11  flash devices which manages multiple logical volumes on a single
12  physical flash device and spreads the I/O load (i.e wear-leveling)
13  across the whole flash chip.
14
15maintainers:
16  - Daniel Golle <daniel@makrotopia.org>
17
18allOf:
19  - $ref: partition.yaml#
20
21properties:
22  compatible:
23    const: linux,ubi
24
25  volumes:
26    type: object
27    description: UBI Volumes
28
29    patternProperties:
30      "^ubi-volume-.*$":
31        $ref: /schemas/mtd/partitions/ubi-volume.yaml#
32
33    unevaluatedProperties: false
34
35required:
36  - compatible
37
38unevaluatedProperties: false
39
40examples:
41  - |
42    partitions {
43        compatible = "fixed-partitions";
44        #address-cells = <1>;
45        #size-cells = <1>;
46
47        partition@0 {
48            reg = <0x0 0x100000>;
49            label = "bootloader";
50            read-only;
51        };
52
53        partition@100000 {
54            reg = <0x100000 0x1ff00000>;
55            label = "ubi";
56            compatible = "linux,ubi";
57
58            volumes {
59                ubi-volume-caldata {
60                    volid = <2>;
61                    volname = "rf";
62
63                    nvmem-layout {
64                        compatible = "fixed-layout";
65                        #address-cells = <1>;
66                        #size-cells = <1>;
67
68                        eeprom@0 {
69                            reg = <0x0 0x1000>;
70                        };
71                    };
72                };
73            };
74        };
75    };
76