aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Suchanek <hramrach@gmail.com>2015-10-28 18:48:06 -0400
committerBrian Norris <computersforpeace@gmail.com>2015-10-30 17:00:42 -0400
commitfe2585e9c29a650af26824684e5033757fd6bc0c (patch)
tree8ed82ec6be92b9aaa9f4bc98a4cda25aa8be7757
parent4d1ea982a9beb4e47bba41131973329e2a012b38 (diff)
doc: dt: mtd: support partitions in a special 'partitions' subnode
To avoid conflict with other drivers using subnodes of the mtd device create only one ofpart-specific node rather than any number of arbitrary partition subnodes. Signed-off-by: Michal Suchanek <hramrach@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt71
1 files changed, 42 insertions, 29 deletions
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index 8e5557da1955..f1e2a02381a4 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -4,10 +4,17 @@ Partitions can be represented by sub-nodes of an mtd device. This can be used
4on platforms which have strong conventions about which portions of a flash are 4on platforms which have strong conventions about which portions of a flash are
5used for what purposes, but which don't use an on-flash partition table such 5used for what purposes, but which don't use an on-flash partition table such
6as RedBoot. 6as RedBoot.
7NOTE: if the sub-node has a compatible string, then it is not a partition.
8 7
9#address-cells & #size-cells must both be present in the mtd device. There are 8The partition table should be a subnode of the mtd node and should be named
10two valid values for both: 9'partitions'. Partitions are defined in subnodes of the partitions node.
10
11For backwards compatibility partitions as direct subnodes of the mtd device are
12supported. This use is discouraged.
13NOTE: also for backwards compatibility, direct subnodes that have a compatible
14string are not considered partitions, as they may be used for other bindings.
15
16#address-cells & #size-cells must both be present in the partitions subnode of the
17mtd device. There are two valid values for both:
11<1>: for partitions that require a single 32-bit cell to represent their 18<1>: for partitions that require a single 32-bit cell to represent their
12 size/address (aka the value is below 4 GiB) 19 size/address (aka the value is below 4 GiB)
13<2>: for partitions that require two 32-bit cells to represent their 20<2>: for partitions that require two 32-bit cells to represent their
@@ -28,44 +35,50 @@ Examples:
28 35
29 36
30flash@0 { 37flash@0 {
31 #address-cells = <1>; 38 partitions {
32 #size-cells = <1>; 39 #address-cells = <1>;
40 #size-cells = <1>;
33 41
34 partition@0 { 42 partition@0 {
35 label = "u-boot"; 43 label = "u-boot";
36 reg = <0x0000000 0x100000>; 44 reg = <0x0000000 0x100000>;
37 read-only; 45 read-only;
38 }; 46 };
39 47
40 uimage@100000 { 48 uimage@100000 {
41 reg = <0x0100000 0x200000>; 49 reg = <0x0100000 0x200000>;
50 };
42 }; 51 };
43}; 52};
44 53
45flash@1 { 54flash@1 {
46 #address-cells = <1>; 55 partitions {
47 #size-cells = <2>; 56 #address-cells = <1>;
57 #size-cells = <2>;
48 58
49 /* a 4 GiB partition */ 59 /* a 4 GiB partition */
50 partition@0 { 60 partition@0 {
51 label = "filesystem"; 61 label = "filesystem";
52 reg = <0x00000000 0x1 0x00000000>; 62 reg = <0x00000000 0x1 0x00000000>;
63 };
53 }; 64 };
54}; 65};
55 66
56flash@2 { 67flash@2 {
57 #address-cells = <2>; 68 partitions {
58 #size-cells = <2>; 69 #address-cells = <2>;
70 #size-cells = <2>;
59 71
60 /* an 8 GiB partition */ 72 /* an 8 GiB partition */
61 partition@0 { 73 partition@0 {
62 label = "filesystem #1"; 74 label = "filesystem #1";
63 reg = <0x0 0x00000000 0x2 0x00000000>; 75 reg = <0x0 0x00000000 0x2 0x00000000>;
64 }; 76 };
65 77
66 /* a 4 GiB partition */ 78 /* a 4 GiB partition */
67 partition@200000000 { 79 partition@200000000 {
68 label = "filesystem #2"; 80 label = "filesystem #2";
69 reg = <0x2 0x00000000 0x1 0x00000000>; 81 reg = <0x2 0x00000000 0x1 0x00000000>;
82 };
70 }; 83 };
71}; 84};