xref: /linux/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml (revision be1ca3ee8f97067fee87fda73ea5959d5ab75bbf)
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/fixed-partitions.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Fixed partitions
8
9description: |
10  This binding can be used on platforms which have strong conventions about
11  which portions of a flash are used for what purposes, but which don't use an
12  on-flash partition table such as RedBoot.
13
14  The partition table should be a node named "partitions". Partitions are then
15  defined as subnodes.
16
17maintainers:
18  - Rafał Miłecki <rafal@milecki.pl>
19
20properties:
21  compatible:
22    oneOf:
23      - const: fixed-partitions
24      - items:
25          - const: sercomm,sc-partitions
26          - const: fixed-partitions
27
28  "#address-cells":
29    enum: [ 1, 2 ]
30
31  "#size-cells":
32    enum: [ 1, 2 ]
33
34patternProperties:
35  "@[0-9a-f]+$":
36    $ref: partition.yaml#/$defs/partition-node
37
38required:
39  - "#address-cells"
40  - "#size-cells"
41
42# fixed-partitions can be nested
43allOf:
44  - $ref: partition.yaml#
45
46unevaluatedProperties: false
47
48examples:
49  - |
50    partitions {
51        compatible = "fixed-partitions";
52        #address-cells = <1>;
53        #size-cells = <1>;
54
55        partition@0 {
56            label = "u-boot";
57            reg = <0x0000000 0x100000>;
58            read-only;
59        };
60
61        uimage@100000 {
62            reg = <0x0100000 0x200000>;
63            compression = "lzma";
64        };
65    };
66
67  - |
68    partitions {
69        compatible = "fixed-partitions";
70        #address-cells = <1>;
71        #size-cells = <2>;
72
73        /* a 4 GiB partition */
74        partition@0 {
75            label = "filesystem";
76            reg = <0x00000000 0x1 0x00000000>;
77            linux,rootfs;
78        };
79    };
80
81  - |
82    partitions {
83        compatible = "fixed-partitions";
84        #address-cells = <2>;
85        #size-cells = <2>;
86
87        /* an 8 GiB partition */
88        partition@0 {
89            label = "filesystem #1";
90            reg = <0x0 0x00000000 0x2 0x00000000>;
91        };
92
93        /* a 4 GiB partition */
94        partition@200000000 {
95            label = "filesystem #2";
96            reg = <0x2 0x00000000 0x1 0x00000000>;
97        };
98    };
99
100  - |
101    partitions {
102        compatible = "fixed-partitions";
103        #address-cells = <1>;
104        #size-cells = <1>;
105
106        partition@0 {
107            label = "bootloader";
108            reg = <0x000000 0x100000>;
109            read-only;
110        };
111
112        firmware@100000 {
113            compatible = "brcm,trx";
114            label = "firmware";
115            reg = <0x100000 0xe00000>;
116        };
117
118        calibration@f00000 {
119            compatible = "fixed-partitions";
120            label = "calibration";
121            reg = <0xf00000 0x100000>;
122            #address-cells = <1>;
123            #size-cells = <1>;
124
125            partition@0 {
126                label = "wifi0";
127                reg = <0x000000 0x080000>;
128            };
129
130            partition@80000 {
131                label = "wifi1";
132                reg = <0x080000 0x080000>;
133            };
134        };
135    };
136
137  - |
138    partitions {
139        compatible = "sercomm,sc-partitions", "fixed-partitions";
140        #address-cells = <1>;
141        #size-cells = <1>;
142
143        partition@0 {
144            label = "u-boot";
145            reg = <0x0 0x100000>;
146            sercomm,scpart-id = <0>;
147            read-only;
148        };
149
150        partition@100000 {
151            label = "dynamic partition map";
152            reg = <0x100000 0x100000>;
153            sercomm,scpart-id = <1>;
154        };
155
156        partition@200000 {
157            label = "Factory";
158            reg = <0x200000 0x100000>;
159            sercomm,scpart-id = <2>;
160            read-only;
161        };
162    };
163