Skip to contentSkip to conversation

mtd/powerpc: Describe multiple "reg" tuples usage

PATCH In review Stefan Roese 2 participants 2 messages Apr 7, 2009 – Apr 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 4/4 mtd/powerpc: Describe multiple "reg" tuples usage

---
 Documentation/powerpc/dts-bindings/mtd-physmap.txt |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
Documentation/powerpc/dts-bindings/mtd-physmap.txt +19 -1
index ab1115e..a3fa9e0 100644
@@ -5,7 +5,10 @@ file systems on embedded devices.
 
  - compatible : should contain the specific model of flash chip(s)
    used, if known, followed by either "cfi-flash" or "jedec-flash"
- - reg : Address range of the flash chip
+ - reg : Address range(s) of the flash chip(s)
+   It's possible to (optionally) define multiple "reg" tuples so that the
+   Intel P30 48F4400 chip which consists internally of 2 non-identical
+   NOR chips on one die can also be supported.
  - bank-width : Width (in bytes) of the flash bank.  Equal to the
    device width times the number of interleaved chips.
  - #address-cells, #size-cells : Must be present if the flash has
@@ -58,3 +61,18 @@ Example:
 			read-only;
 		};
 	};
+
+Here an example with multiple "reg" tuples (e.g. Intel P30):
+
+	flash@f0000000,0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "cfi-flash";
+		reg = <0 0x00000000 0x02000000
+		       0 0x02000000 0x02000000>;
+		bank-width = <2>;
+		partition@0 {
+			label = "test-part1";
+			reg = <0 0x04000000>;
+		};
+	};
Signature · 6 lines
1.6.2.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#1 lore raw
Quoted 13 lines · Stefan Roese

---
 Documentation/powerpc/dts-bindings/mtd-physmap.txt |   20 +++++++++++++++++++-

 1 files changed, 19 insertions(+), 1 deletions(-)
Documentation/powerpc/dts-bindings/mtd-physmap.txt +0 -0
index ab1115e..a3fa9e0 100644
@@ -5,7 +5,10 @@ file systems on embedded devices.
 
  - compatible : should contain the specific model of flash chip(s)
Quoted 6 lines

   used, if known, followed by either "cfi-flash" or "jedec-flash"
- - reg : Address range of the flash chip
+ - reg : Address range(s) of the flash chip(s)
+   It's possible to (optionally) define multiple "reg" tuples so that the
+   Intel P30 48F4400 chip which consists internally of 2 non-identical
+   NOR chips on one die can also be supported.

This isn't a P30 48F4400 specific feature, even if it is the only current user. This description works for any arrangement of multiple NOR chips. I isn't really appropriate to mention the P30 in this way and it should be more generic.

Documentation/powerpc/dts-bindings/mtd-physmap.txt Example: · line 65

Quoted 9 lines

 - bank-width : Width (in bytes) of the flash bank.  Equal to the device width times the number of interleaved chips.
 - #address-cells, #size-cells : Must be present if the flash has

Documentation/powerpc/dts-bindings/mtd-physmap.txt +2 -0
@@ -58,3 +61,18 @@ Example:
                        read-only;
                };
        };
+
+Here an example with multiple "reg" tuples (e.g. Intel P30):

However, it is completely appropriate to mention P30 here because it is in the context of an example.

Documentation/powerpc/dts-bindings/mtd-physmap.txt Example: · line 70

Quoted 5 lines
Documentation/powerpc/dts-bindings/mtd-physmap.txt +5 -0
+
+       flash@f0000000,0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "cfi-flash";

For best practice, compatible should also specify the exact chip in this case.

g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.