Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mtd: make partitions doc a bit more generic

Currently the only documented partitioning is "fixed-partitions" but
there are more methods in use that we may want to support in the future.
Mention them and make it clear Fixed Partitions are just a single case.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Rob Herring <robh@kernel.org>

+26 -6
+26 -6
Documentation/devicetree/bindings/mtd/partition.txt
··· 1 - Representing flash partitions in devicetree 1 + Flash partitions in device tree 2 + =============================== 2 3 3 - Partitions can be represented by sub-nodes of an mtd device. This can be used 4 + Flash devices can be partitioned into one or more functional ranges (e.g. "boot 5 + code", "nvram", "kernel"). 6 + 7 + Different devices may be partitioned in a different ways. Some may use a fixed 8 + flash layout set at production time. Some may use on-flash table that describes 9 + the geometry and naming/purpose of each functional region. It is also possible 10 + to see these methods mixed. 11 + 12 + To assist system software in locating partitions, we allow describing which 13 + method is used for a given flash device. To describe the method there should be 14 + a 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. 16 + 17 + We currently only document a binding for fixed layouts. 18 + 19 + 20 + Fixed Partitions 21 + ================ 22 + 23 + Partitions can be represented by sub-nodes of a flash device. This can be used 4 24 on platforms which have strong conventions about which portions of a flash are 5 25 used for what purposes, but which don't use an on-flash partition table such 6 26 as RedBoot. 7 27 8 - The partition table should be a subnode of the mtd node and should be named 28 + The partition table should be a subnode of the flash node and should be named 9 29 'partitions'. This node should have the following property: 10 30 - compatible : (required) must be "fixed-partitions" 11 31 Partitions are then defined in subnodes of the partitions node. 12 32 13 - For backwards compatibility partitions as direct subnodes of the mtd device are 33 + For backwards compatibility partitions as direct subnodes of the flash device are 14 34 supported. This use is discouraged. 15 35 NOTE: also for backwards compatibility, direct subnodes that have a compatible 16 36 string are not considered partitions, as they may be used for other bindings. 17 37 18 38 #address-cells & #size-cells must both be present in the partitions subnode of the 19 - mtd device. There are two valid values for both: 39 + flash device. There are two valid values for both: 20 40 <1>: for partitions that require a single 32-bit cell to represent their 21 41 size/address (aka the value is below 4 GiB) 22 42 <2>: for partitions that require two 32-bit cells to represent their 23 43 size/address (aka the value is 4 GiB or greater). 24 44 25 45 Required properties: 26 - - reg : The partition's offset and size within the mtd bank. 46 + - reg : The partition's offset and size within the flash 27 47 28 48 Optional properties: 29 49 - label : The label / name for this partition. If omitted, the label is taken