diff options
6 files changed, 52 insertions, 23 deletions
diff --git a/Documentation/devicetree/bindings/mtd/arm-versatile.txt b/Documentation/devicetree/bindings/mtd/arm-versatile.txt index 476845db94d0..beace4b89daa 100644 --- a/Documentation/devicetree/bindings/mtd/arm-versatile.txt +++ b/Documentation/devicetree/bindings/mtd/arm-versatile.txt | |||
@@ -4,5 +4,5 @@ Required properties: | |||
4 | - compatible : must be "arm,versatile-flash"; | 4 | - compatible : must be "arm,versatile-flash"; |
5 | - bank-width : width in bytes of flash interface. | 5 | - bank-width : width in bytes of flash interface. |
6 | 6 | ||
7 | Optional properties: | 7 | The device tree may optionally contain sub-nodes describing partitions of the |
8 | - Subnode partition map from mtd flash binding | 8 | address space. See partition.txt for more detail. |
diff --git a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt index ef66ddd01da0..1889a4db5b7c 100644 --- a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt +++ b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt | |||
@@ -3,6 +3,9 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash". | 4 | - compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash". |
5 | 5 | ||
6 | The device tree may optionally contain sub-nodes describing partitions of the | ||
7 | address space. See partition.txt for more detail. | ||
8 | |||
6 | Example: | 9 | Example: |
7 | 10 | ||
8 | flash@1 { | 11 | flash@1 { |
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt index 00f1f546b32e..fce4894f5a98 100644 --- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt | |||
@@ -19,6 +19,10 @@ Optional properties: | |||
19 | read registers (tR). Required if property "gpios" is not used | 19 | read registers (tR). Required if property "gpios" is not used |
20 | (R/B# pins not connected). | 20 | (R/B# pins not connected). |
21 | 21 | ||
22 | Each flash chip described may optionally contain additional sub-nodes | ||
23 | describing partitions of the address space. See partition.txt for more | ||
24 | detail. | ||
25 | |||
22 | Examples: | 26 | Examples: |
23 | 27 | ||
24 | upm@1,0 { | 28 | upm@1,0 { |
diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt index 719f4dc58df7..36ef07d3c90f 100644 --- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt | |||
@@ -25,6 +25,9 @@ Optional properties: | |||
25 | GPIO state and before and after command byte writes, this register will be | 25 | GPIO state and before and after command byte writes, this register will be |
26 | read to ensure that the GPIO accesses have completed. | 26 | read to ensure that the GPIO accesses have completed. |
27 | 27 | ||
28 | The device tree may optionally contain sub-nodes describing partitions of the | ||
29 | address space. See partition.txt for more detail. | ||
30 | |||
28 | Examples: | 31 | Examples: |
29 | 32 | ||
30 | gpio-nand@1,0 { | 33 | gpio-nand@1,0 { |
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 80152cb567d9..a63c2bd7de2b 100644 --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt | |||
@@ -23,27 +23,8 @@ are defined: | |||
23 | - vendor-id : Contains the flash chip's vendor id (1 byte). | 23 | - vendor-id : Contains the flash chip's vendor id (1 byte). |
24 | - device-id : Contains the flash chip's device id (1 byte). | 24 | - device-id : Contains the flash chip's device id (1 byte). |
25 | 25 | ||
26 | In addition to the information on the mtd bank itself, the | 26 | The device tree may optionally contain sub-nodes describing partitions of the |
27 | device tree may optionally contain additional information | 27 | address space. See partition.txt for more detail. |
28 | describing partitions of the address space. This can be | ||
29 | used on platforms which have strong conventions about which | ||
30 | portions of a flash are used for what purposes, but which don't | ||
31 | use an on-flash partition table such as RedBoot. | ||
32 | |||
33 | Each partition is represented as a sub-node of the mtd device. | ||
34 | Each node's name represents the name of the corresponding | ||
35 | partition of the mtd device. | ||
36 | |||
37 | Flash partitions | ||
38 | - reg : The partition's offset and size within the mtd bank. | ||
39 | - label : (optional) The label / name for this partition. | ||
40 | If omitted, the label is taken from the node name (excluding | ||
41 | the unit address). | ||
42 | - read-only : (optional) This parameter, if present, is a hint to | ||
43 | Linux that this partition should only be mounted | ||
44 | read-only. This is usually used for flash partitions | ||
45 | containing early-boot firmware images or data which should not | ||
46 | be clobbered. | ||
47 | 28 | ||
48 | Example: | 29 | Example: |
49 | 30 | ||
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt new file mode 100644 index 000000000000..f114ce1657c2 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partition.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Representing flash partitions in devicetree | ||
2 | |||
3 | Partitions can be represented by sub-nodes of an mtd device. This can be used | ||
4 | on platforms which have strong conventions about which portions of a flash are | ||
5 | used for what purposes, but which don't use an on-flash partition table such | ||
6 | as RedBoot. | ||
7 | |||
8 | #address-cells & #size-cells must both be present in the mtd device and be | ||
9 | equal to 1. | ||
10 | |||
11 | Required properties: | ||
12 | - reg : The partition's offset and size within the mtd bank. | ||
13 | |||
14 | Optional properties: | ||
15 | - label : The label / name for this partition. If omitted, the label is taken | ||
16 | from the node name (excluding the unit address). | ||
17 | - read-only : This parameter, if present, is a hint to Linux that this | ||
18 | partition should only be mounted read-only. This is usually used for flash | ||
19 | partitions containing early-boot firmware images or data which should not be | ||
20 | clobbered. | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | |||
25 | flash@0 { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <1>; | ||
28 | |||
29 | partition@0 { | ||
30 | label = "u-boot"; | ||
31 | reg = <0x0000000 0x100000>; | ||
32 | read-only; | ||
33 | }; | ||
34 | |||
35 | uimage@100000 { | ||
36 | reg = <0x0100000 0x200000>; | ||
37 | }; | ||
38 | ]; | ||