Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[deliverable/linux.git] / Documentation / devicetree / bindings / mtd / partition.txt
CommitLineData
83619ea0
JL
1Representing flash partitions in devicetree
2
3Partitions 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
5used for what purposes, but which don't use an on-flash partition table such
6as RedBoot.
e79265ba 7NOTE: if the sub-node has a compatible string, then it is not a partition.
83619ea0 8
05ff8c25
JS
9#address-cells & #size-cells must both be present in the mtd device. There are
10two valid values for both:
11<1>: for partitions that require a single 32-bit cell to represent their
12 size/address (aka the value is below 4 GiB)
13<2>: for partitions that require two 32-bit cells to represent their
14 size/address (aka the value is 4 GiB or greater).
83619ea0
JL
15
16Required properties:
17- reg : The partition's offset and size within the mtd bank.
18
19Optional properties:
20- label : The label / name for this partition. If omitted, the label is taken
21 from the node name (excluding the unit address).
22- read-only : This parameter, if present, is a hint to Linux that this
23 partition should only be mounted read-only. This is usually used for flash
24 partitions containing early-boot firmware images or data which should not be
25 clobbered.
26
27Examples:
28
29
30flash@0 {
31 #address-cells = <1>;
32 #size-cells = <1>;
33
34 partition@0 {
35 label = "u-boot";
36 reg = <0x0000000 0x100000>;
37 read-only;
38 };
39
40 uimage@100000 {
41 reg = <0x0100000 0x200000>;
42 };
bf6c9734 43};
05ff8c25
JS
44
45flash@1 {
46 #address-cells = <1>;
47 #size-cells = <2>;
48
49 /* a 4 GiB partition */
50 partition@0 {
51 label = "filesystem";
52 reg = <0x00000000 0x1 0x00000000>;
53 };
54};
55
56flash@2 {
57 #address-cells = <2>;
58 #size-cells = <2>;
59
60 /* an 8 GiB partition */
61 partition@0 {
62 label = "filesystem #1";
63 reg = <0x0 0x00000000 0x2 0x00000000>;
64 };
65
66 /* a 4 GiB partition */
67 partition@200000000 {
68 label = "filesystem #2";
69 reg = <0x2 0x00000000 0x1 0x00000000>;
70 };
71};
This page took 0.263272 seconds and 5 git commands to generate.