Skip to content

Commit f85d017

Browse files
nordicjmkartben
authored andcommitted
dts: bindings: mtd: Add fixed-subpartitions binding
Adds a new binding which allows for sub-partitioning defined flash areas Signed-off-by: Jamie McCrae <[email protected]>
1 parent 21f71df commit f85d017

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
description: |
2+
Fixed subpartitions of a flash (or other nonvolatile storage) memory.
3+
4+
Here is an example:
5+
6+
&flash0 {
7+
partitions {
8+
compatible = "fixed-partitions";
9+
#address-cells = <1>;
10+
#size-cells = <1>;
11+
12+
slot0_partition: partition@10000 {
13+
compatible = "fixed-subpartitions";
14+
label = "image-0";
15+
reg = <0x00010000 0x70000>;
16+
ranges = <0x0 0x10000 0x70000>;
17+
#address-cells = <1>;
18+
#size-cells = <1>;
19+
20+
slot0_s_partition: partition@0 {
21+
label = "image-0-secure";
22+
reg = <0x00000000 0x40000>;
23+
};
24+
25+
slot0_ns_partition: partition@40000 {
26+
label = "image-0-nonsecure";
27+
reg = <0x00040000 0x30000>;
28+
};
29+
};
30+
};
31+
};
32+
33+
compatible: "fixed-subpartitions"
34+
35+
properties:
36+
label:
37+
type: string
38+
description: |
39+
Human readable string describing the flash partition.
40+
read-only:
41+
type: boolean
42+
description: set this property if the partition is read-only
43+
reg:
44+
type: array
45+
description: |
46+
This should be in the format <OFFSET SIZE>, where OFFSET
47+
is the offset of the flash partition relative to the base
48+
address of the parent memory, and SIZE is the size of
49+
the partition in bytes.
50+
required: true
51+
"#address-cells":
52+
type: int
53+
description: |
54+
Number of cells required to represent a child node's
55+
reg property address. This must be large enough to
56+
represent the start offset of each partition.
57+
"#size-cells":
58+
type: int
59+
description: |
60+
Number of cells required to represent a child node's
61+
reg property address. This must be large enough to
62+
represent the size of each partition in bytes.
63+
64+
child-binding:
65+
description: |
66+
Each child node of the fixed-partitions node represents
67+
an individual flash partition. These should usually
68+
look like this:
69+
70+
partition_nodelabel: partition@START_OFFSET {
71+
label = "human-readable-name";
72+
reg = <0xSTART_OFFSET 0xSIZE>;
73+
};
74+
properties:
75+
label:
76+
type: string
77+
description: |
78+
Human readable string describing the flash partition.
79+
read-only:
80+
type: boolean
81+
description: set this property if the partition is read-only
82+
reg:
83+
type: array
84+
description: |
85+
This should be in the format <OFFSET SIZE>, where OFFSET
86+
is the offset of the flash partition relative to the base
87+
address of the parent memory, and SIZE is the size of
88+
the partition in bytes.
89+
required: true

0 commit comments

Comments
 (0)