Commit d2ad00eb authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Boris Brezillon

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: default avatarRafał Miłecki <rafal@milecki.pl>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent 1d25e3ee
...@@ -14,6 +14,13 @@ method is used for a given flash device. To describe the method there should be ...@@ -14,6 +14,13 @@ method is used for a given flash device. To describe the method there should be
a subnode of the flash device that is named 'partitions'. It must have a a subnode of the flash device that is named 'partitions'. It must have a
'compatible' property, which is used to identify the method to use. 'compatible' property, which is used to identify the method to use.
When a single partition is represented with a DT node (it depends on a used
format) it may also be described using above rules ('compatible' and optionally
some extra properties / subnodes). It allows describing more complex,
hierarchical (multi-level) layouts and should be used if there is some
significant relation between partitions or some partition internally uses
another partitioning method.
Available bindings are listed in the "partitions" subdirectory. Available bindings are listed in the "partitions" subdirectory.
...@@ -109,3 +116,42 @@ flash@2 { ...@@ -109,3 +116,42 @@ flash@2 {
}; };
}; };
}; };
flash@3 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bootloader";
reg = <0x000000 0x100000>;
read-only;
};
firmware@100000 {
label = "firmware";
reg = <0x100000 0xe00000>;
compatible = "brcm,trx";
};
calibration@f00000 {
label = "calibration";
reg = <0xf00000 0x100000>;
compatible = "fixed-partitions";
ranges = <0 0xf00000 0x100000>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "wifi0";
reg = <0x000000 0x080000>;
};
partition@80000 {
label = "wifi1";
reg = <0x080000 0x080000>;
};
};
};
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment