Skip to contentSkip to conversation

ARM: dts: sun8i: Specify memblock for Nano Pi M1

PATCH In review Milo Kim 2 participants 6 messages Dec 5, 2016 – Dec 6, 2016

Subsystems (2)
lore
Share & tools
lore

Milo Kim

author
#0 lore raw

PATCH 1/2 ARM: dts: sun8i: Specify memblock for Nano Pi M1

The board has DDR3 512MB. This patch helps scanning the memory and adding memblock through the DT.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts +5 -0
index ec63d10..be3668f 100644
@@ -45,6 +45,11 @@
 / {
 	model = "FriendlyArm NanoPi M1";
 	compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x20000000>;
+	};
 };
 
 &ehci1 {
Signature · 1 line
2.9.3
author
#1 lore raw

PATCH 2/2 ARM: dts: sun8i: Specify memblock for Nano Pi Neo

The board has DDR3 256MB. This patch helps scanning the memory and adding memblock through the DT.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +5 -0
index 8d2cc6e..433f55d 100644
@@ -45,4 +45,9 @@
 / {
 	model = "FriendlyARM NanoPi NEO";
 	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x10000000>;
+	};
 };
Signature · 1 line
2.9.3
#2 lore raw
In reply to Milo Kim
Quoted 13 lines · Milo Kim

The board has DDR3 512MB. This patch helps scanning the memory and adding memblock through the DT.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts +0 -0
index ec63d10..be3668f 100644

arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts line 52

Quoted 8 lines
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts +5 -0
@@ -45,6 +45,11 @@
 / {
 	model = "FriendlyArm NanoPi M1";
 	compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x20000000>;
+	};

U-boot will fill that up, so there's no need to put it there.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161205/a219cc4b/attachment.sig>
author
#3 lore raw
Quoted 9 lines · Maxime Ripard
Quoted 8 lines · Milo Kim

The board has DDR3 512MB. This patch helps scanning the memory and adding memblock through the DT.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines

arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts line 52

Quoted 13 lines
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts +5 -0
index ec63d10..be3668f 100644
@@ -45,6 +45,11 @@
 / {
 	model = "FriendlyArm NanoPi M1";
 	compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x20000000>;
+	};

U-boot will fill that up, so there's no need to put it there.

Right, my intention was adding memblock through the DT whether the bootload does or not. However I'm not sure the situation (missing memblock in u-boot) could really happen.

Best regards,
Milo

#4 lore raw
Quoted 26 lines · Milo Kim
Quoted 9 lines · Maxime Ripard
Quoted 8 lines · Milo Kim

The board has DDR3 512MB. This patch helps scanning the memory and adding memblock through the DT.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines

arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts line 52

Quoted 13 lines
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts +5 -0
index ec63d10..be3668f 100644
@@ -45,6 +45,11 @@
 / {
 	model = "FriendlyArm NanoPi M1";
 	compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x20000000>;
+	};

U-boot will fill that up, so there's no need to put it there.

Quoted 3 lines

Right, my intention was adding memblock through the DT whether the bootload does or not. However I'm not sure the situation (missing memblock in u-boot) could really happen.

No, we need a recent U-Boot in order to boot, and such a uboot will setup the memory node anyway.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161206/c5db1b59/attachment.sig>
author
#5 lore raw
Quoted 2 lines · Maxime Ripard

No, we need a recent U-Boot in order to boot, and such a uboot will setup the memory node anyway.

Got it. Thanks! Please just ignore my patches.

Best regards,
Milo