Skip to contentSkip to conversation

ARM: mvebu: Fix ranges entry on XP GP board

PATCH New Ezequiel Garcia 3 participants 8 messages May 17, 2013 – May 19, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: mvebu: Fix ranges entry on XP GP board

With the latest device tree reorganization which introduced the 'internal-reg' node, now the only region translated is the internal register's. This makes the description of the hardware incomplete, for it lacks the Device Bus childs address space.

In order to fix this, it's required to add a 'ranges' entry with a suitable address space to map Device Bus childs, on a per-board basis. This patch fixes the ranges property on the Armada XP GP board.

---
This should be included in v3.10.

 arch/arm/boot/dts/armada-xp-gp.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/armada-xp-gp.dts +3 -0
index 26ad06f..3ee63d1 100644
@@ -39,6 +39,9 @@
 	};
 
 	soc {
+		ranges = <0          0 0xd0000000 0x100000
+			  0xf0000000 0 0xf0000000 0x1000000>;
+
 		internal-regs {
 			serial at 12000 {
 				clock-frequency = <250000000>;
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

The Armada XP Development Board (DB-78460-BP) has a NOR flash device connected to the Device Bus. This commit adds the device tree node to support this device.

This SoC supports a flexible and dynamic decoding window allocation scheme; but since this feature is still not implemented we need to specify the window base address in the device tree node itself.

This base address has been selected in a completely arbitrary fashion.

---
 arch/arm/boot/dts/armada-xp-db.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm/boot/dts/armada-xp-db.dts +32 -0
index d6cc8bf..864831a 100644
@@ -30,6 +30,9 @@
 	};
 
 	soc {
+		ranges = <0          0 0xd0000000 0x100000	/* Internal registers 1MiB */
+			  0xf0000000 0 0xf0000000 0x1000000>;	/* Device Bus, NOR 16MiB   */
+
 		internal-regs {
 			serial at 12000 {
 				clock-frequency = <250000000>;
@@ -155,6 +158,35 @@
 					status = "okay";
 				};
 			};
+
+			devbus-bootcs at 10400 {
+				status = "okay";
+				ranges = <0 0xf0000000 0x1000000>;
+
+				/* Device Bus parameters are required */
+
+				/* Read parameters */
+				devbus,bus-width    = <8>;
+				devbus,turn-off-ps  = <60000>;
+				devbus,badr-skew-ps = <0>;
+				devbus,acc-first-ps = <124000>;
+				devbus,acc-next-ps  = <248000>;
+				devbus,rd-setup-ps  = <0>;
+				devbus,rd-hold-ps   = <0>;
+
+				/* Write parameters */
+				devbus,sync-enable = <0>;
+				devbus,wr-high-ps  = <60000>;
+				devbus,wr-low-ps   = <60000>;
+				devbus,ale-wr-ps   = <60000>;
+
+				/* NOR 16 MiB */
+				nor at 0 {
+					compatible = "cfi-flash";
+					reg = <0 0x1000000>;
+					bank-width = <2>;
+				};
+			};
 		};
 	};
 };
Signature · 1 line
1.8.1.5
Applied
#2 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

Quoted 8 lines · Ezequiel Garcia

The Armada XP Development Board (DB-78460-BP) has a NOR flash device connected to the Device Bus. This commit adds the device tree node to support this device.

This SoC supports a flexible and dynamic decoding window allocation scheme; but since this feature is still not implemented we need to specify the window base address in the device tree node itself.

Quoted 7 lines

This base address has been selected in a completely arbitrary fashion.

---
 arch/arm/boot/dts/armada-xp-db.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Applied to mvebu/fixes

thx,

Jason.

#3 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

Dear Jason Cooper,

Quoted 11 lines · Jason Cooper
Quoted 10 lines · Ezequiel Garcia

The Armada XP Development Board (DB-78460-BP) has a NOR flash device connected to the Device Bus. This commit adds the device tree node to support this device.

This SoC supports a flexible and dynamic decoding window allocation scheme; but since this feature is still not implemented we need to specify the window base address in the device tree node itself.

This base address has been selected in a completely arbitrary fashion.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/boot/dts/armada-xp-db.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Applied to mvebu/fixes

Is mvebu/fixes the branch intended to be pushed to 3.10-rcX, or to 3.11 ?

I'm asking because you've applied both 1/2 and 2/2 on the same mvebu/fixes branch, while 1/2 is intended for 3.10-rcX (fixing existing DT data), and 2/2 is intended for 3.11 (adding support for a new device in the DT).

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

Quoted 22 lines · Thomas Petazzoni

Dear Jason Cooper,

Quoted 11 lines · Jason Cooper
Quoted 10 lines · Ezequiel Garcia

The Armada XP Development Board (DB-78460-BP) has a NOR flash device connected to the Device Bus. This commit adds the device tree node to support this device.

This SoC supports a flexible and dynamic decoding window allocation scheme; but since this feature is still not implemented we need to specify the window base address in the device tree node itself.

This base address has been selected in a completely arbitrary fashion.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/boot/dts/armada-xp-db.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Applied to mvebu/fixes

Quoted 7 lines

Is mvebu/fixes the branch intended to be pushed to 3.10-rcX, or to 3.11 ?

I'm asking because you've applied both 1/2 and 2/2 on the same mvebu/fixes branch, while 1/2 is intended for 3.10-rcX (fixing existing DT data), and 2/2 is intended for 3.11 (adding support for a new device in the DT).

I've added it to /fixes because it implements the same fix the other patch did for the change in DT parsing. I debated asking Ezequiel to split it into two patches, one for the ranges fix, the other for the new nodes. In the end, since it isn't C code, I elected for simplicity.

thx,

Jason.

#5 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

Dear Jason Cooper,

Quoted 8 lines · Jason Cooper
Quoted 7 lines

Is mvebu/fixes the branch intended to be pushed to 3.10-rcX, or to 3.11 ?

I'm asking because you've applied both 1/2 and 2/2 on the same mvebu/fixes branch, while 1/2 is intended for 3.10-rcX (fixing existing DT data), and 2/2 is intended for 3.11 (adding support for a new device in the DT).

Quoted 4 lines

I've added it to /fixes because it implements the same fix the other patch did for the change in DT parsing. I debated asking Ezequiel to split it into two patches, one for the ranges fix, the other for the new nodes. In the end, since it isn't C code, I elected for simplicity.

The addition to the range property is *only* needed because the NOR DT node is added. The two are needed together, so splitting them would make absolutely no sense.

The reason why for the other board is was done in two patches is because at the time Ezequiel sent the patch for the NOR, we were not using this common ranges = <...> property in the DT. The additional entry in the ranges = <...> property should have been added when the DT reorganization was merged with the NOR patch from Ezequiel, but it was not done. So Ezequiel sent a fixup patch to fix this.

There's no need to repeat the same story for the NOR flash of the Armada XP DB.

Again, PATCH 1/2 is a fix for something that exists in 3.10-rc, while PATCH 2/2 is enabling a new device, so presumably, it should go in 3.11.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH 2/2 ARM: mvebu: Add support for NOR flash device on Armada XP-DB board

Quoted 2 lines · Thomas Petazzoni

Again, PATCH 1/2 is a fix for something that exists in 3.10-rc, while PATCH 2/2 is enabling a new device, so presumably, it should go in 3.11.

Thanks, I'll moving it over to mvebu/dt.

thx,

Jason.

Applied
#7 lore raw

PATCH 1/2 ARM: mvebu: Fix ranges entry on XP GP board

In reply to Ezequiel Garcia
Quoted 9 lines · Ezequiel Garcia

With the latest device tree reorganization which introduced the 'internal-reg' node, now the only region translated is the internal register's. This makes the description of the hardware incomplete, for it lacks the Device Bus childs address space.

In order to fix this, it's required to add a 'ranges' entry with a suitable address space to map Device Bus childs, on a per-board basis. This patch fixes the ranges property on the Armada XP GP board.

Quoted 6 lines

---
This should be included in v3.10.

 arch/arm/boot/dts/armada-xp-gp.dts | 3 +++
 1 file changed, 3 insertions(+)

Applied to mvebu/fixes

thx,

Jason.