aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-07-13 10:32:20 -0400
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-07-24 17:04:24 -0400
commitd2ad00eb78792b396a6d012f15d6297a1701b8bc (patch)
treeda658eaabec5938760b2d372bdd6366fa467d5db
parent1d25e3eeed1d987404e2d2e451eebac8c15cecc1 (diff)
dt-bindings: mtd: explicitly document nesting partitions descriptions
Documentation was already saying that fixed and dynamic partitioning can be mixed but was missing a clear description and examples. This commit adds a proper documentation of how descriptions can be nested and how layouts can be mixed. This addition is important for partitions that contain subpartitions. In such cases partitions have to be properly described in order to let system handle them correctly. Depending on situation, nesting descriptions may provide more accurate logic/structure and/or allow mixing partitioning types (various "compatible" values). Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index a8f382642ba9..afbbd870496d 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -14,6 +14,13 @@ method is used for a given flash device. To describe the method there should be
14a subnode of the flash device that is named 'partitions'. It must have a 14a subnode of the flash device that is named 'partitions'. It must have a
15'compatible' property, which is used to identify the method to use. 15'compatible' property, which is used to identify the method to use.
16 16
17When a single partition is represented with a DT node (it depends on a used
18format) it may also be described using above rules ('compatible' and optionally
19some extra properties / subnodes). It allows describing more complex,
20hierarchical (multi-level) layouts and should be used if there is some
21significant relation between partitions or some partition internally uses
22another partitioning method.
23
17Available bindings are listed in the "partitions" subdirectory. 24Available bindings are listed in the "partitions" subdirectory.
18 25
19 26
@@ -109,3 +116,42 @@ flash@2 {
109 }; 116 };
110 }; 117 };
111}; 118};
119
120flash@3 {
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 partition@0 {
127 label = "bootloader";
128 reg = <0x000000 0x100000>;
129 read-only;
130 };
131
132 firmware@100000 {
133 label = "firmware";
134 reg = <0x100000 0xe00000>;
135 compatible = "brcm,trx";
136 };
137
138 calibration@f00000 {
139 label = "calibration";
140 reg = <0xf00000 0x100000>;
141 compatible = "fixed-partitions";
142 ranges = <0 0xf00000 0x100000>;
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 partition@0 {
147 label = "wifi0";
148 reg = <0x000000 0x080000>;
149 };
150
151 partition@80000 {
152 label = "wifi1";
153 reg = <0x080000 0x080000>;
154 };
155 };
156 };
157};