[U-Boot] [PATCH u-boot-marvell v2 12/12] arch/arm/mvebu: Support 1 GB version of Turris Mox

Marek BehĂșn marek.behun at nic.cz
Fri Aug 17 10:59:02 UTC 2018


Add configuration variables to differentiate between the 512 MB and 1 GB
versions of Turris Mox and change the RAM size in U-Boot's device tree
accordingly.

Signed-off-by: Marek Behun <marek.behun at nic.cz>
---
 MAINTAINERS                                     |  7 +++++++
 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi | 16 ++++++++++++++++
 arch/arm/mach-mvebu/Kconfig                     | 15 +++++++++++++++
 configs/turris_mox_defconfig                    |  1 +
 4 files changed, 39 insertions(+)
 create mode 100644 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi

diff --git a/MAINTAINERS b/MAINTAINERS
index 1893090b8f..1a55d80c13 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -360,6 +360,13 @@ S:	Maintained
 T:	git git://git.denx.de/u-boot-coldfire.git
 F:	arch/m68k/
 
+CZ.NIC TURRIS
+M:	Marek Behun <marek.behun at nic.cz>
+S:	Maintained
+F:	arch/arm/dts/armada-3720-turris-mox.dts
+F:	arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
+F:	board/CZ.NIC/
+
 DFU
 M:	Lukasz Majewski <lukma at denx.de>
 S:	Maintained
diff --git a/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi b/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
new file mode 100644
index 0000000000..122f5c8ae1
--- /dev/null
+++ b/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * 2018 by Marek Behun <marek.behun at nic.cz>
+ */
+
+#include <config.h>
+
+/ {
+	memory {
+#ifdef CONFIG_TARGET_TURRIS_MOX_1GB
+		reg = <0x00000000 0x00000000 0x00000000 0x40000000>;
+#else
+		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
+#endif
+	};
+};
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index d1f71338ac..3e88b3757b 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -198,6 +198,21 @@ config MVEBU_SPL_BOOT_DEVICE_UART
 
 endchoice
 
+if TARGET_TURRIS_MOX
+
+choice
+	prompt "Turris Mox RAM size"
+
+config TARGET_TURRIS_MOX_512MB
+	bool "512 MB"
+
+config TARGET_TURRIS_MOX_1GB
+	bool "1 GB"
+
+endchoice
+
+endif
+
 config MVEBU_EFUSE
 	bool "Enable eFuse support"
 	default n
diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
index cc28a1fe95..2bcbdd8133 100644
--- a/configs/turris_mox_defconfig
+++ b/configs/turris_mox_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00000000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_TURRIS_MOX=y
+CONFIG_TARGET_TURRIS_MOX_512MB=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=25804800
 CONFIG_DEFAULT_DEVICE_TREE="armada-3720-turris-mox"
-- 
2.16.4



More information about the U-Boot mailing list