@@ -652,6 +652,10 @@ config ARCH_MX5
select CPU_V7
select BOARD_EARLY_INIT_F
+config ARCH_NEXELL
+ bool "Nexell S5P support"
+ select ARM64
+
config ARCH_QEMU
bool "QEMU Virtual Platform"
select CPU_V7
@@ -1197,6 +1201,8 @@ source "arch/arm/mach-imx/mx6/Kconfig"
source "arch/arm/mach-imx/mx5/Kconfig"
+source "arch/arm/mach-nexell/Kconfig"
+
source "arch/arm/mach-omap2/Kconfig"
source "arch/arm/cpu/armv8/fsl-layerscape/Kconfig"
@@ -61,6 +61,7 @@ machine-$(CONFIG_ARCH_KEYSTONE) += keystone
machine-$(CONFIG_KIRKWOOD) += kirkwood
machine-$(CONFIG_ARCH_MESON) += meson
machine-$(CONFIG_ARCH_MVEBU) += mvebu
+machine-$(CONFIG_ARCH_NEXELL) += nexell
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
machine-$(CONFIG_ORION5X) += orion5x
new file mode 100644
@@ -0,0 +1,9 @@
+if ARCH_NEXELL
+
+config SYS_SOC
+ default "nexell"
+
+config SYS_CONFIG_NAME
+ default "s5p6818"
+
+endif
new file mode 100644
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2017 Andre Przywara <andre.przywara@arm.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y := board.o
new file mode 100644
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2017 Andre Przywara <andre.przywara@arm.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* TODO: dummy implementation for now, add proper reset code */
+void reset_cpu(ulong addr)
+{
+}
+
+/* TODO: enhance when multiple SoCs are supported (S5P4418) */
+int print_cpuinfo(void)
+{
+ puts("CPU: Nexell S5P6818\n");
+
+ return 0;
+}
+
+/* TODO: dummy for now, either implement DRAM init or rely on vendor code */
+int dram_init(void)
+{
+ /* TODO: hard coded for now, read from DT? */
+ gd->ram_size = 0x40000000;
+
+ return 0;
+}
+
+ulong get_tbclk(void)
+{
+ return CONFIG_SYS_HZ;
+}
+
+int board_init(void)
+{
+ return 0;
+}
new file mode 100644
@@ -0,0 +1,33 @@
+#ifndef __CONFIG_S5P6818_H
+#define __CONFIG_S5P6818_H
+
+#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_CBSIZE 1024
+#define CONFIG_ENV_SIZE (128 << 10)
+#define CONFIG_SYS_MAX_FLASH_BANKS 0
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+
+#define CONFIG_EXTRA_ENV_SETTINGS "fdt_high=0xffffffffffffffff"
+
+/* using SRAM for SPL init here */
+#define CONFIG_SYS_INIT_RAM_ADDR 0xffff0000
+#define CONFIG_SYS_INIT_RAM_SIZE 0x10000 /* 64 KiB */
+
+#define CONFIG_SYS_INIT_SP_OFFSET \
+ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+#define CONFIG_NR_DRAM_BANKS 1
+#define CONFIG_SYS_SDRAM_BASE 0x40000000
+#define PHYS_SDRAM_0 CONFIG_SYS_SDRAM_BASE
+#define PHYS_SDRAM_0_SIZE 0x80000000 /* 2 GiB */
+
+#define CONFIG_SYS_TEXT_BASE 0x42c00000
+#define CONFIG_SYS_LOAD_ADDR 0x41000000
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (64 << 20))
+
+#define CONFIG_SYS_TIMER_COUNTER 0xc0017040 /* TCNTO4 */
+
+#endif /* __CONFIG_H */
The Nexell S5P6818 is a typical SoC with ARM Cortex-A53 cores. It has many peripherals derived from Samsung SoCs (MMC, serial, I2C, Ethernet, ...). Add the required files to introduce this new SoC (family?) to U-Boot. Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- arch/arm/Kconfig | 6 ++++++ arch/arm/Makefile | 1 + arch/arm/mach-nexell/Kconfig | 9 +++++++++ arch/arm/mach-nexell/Makefile | 7 +++++++ arch/arm/mach-nexell/board.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/configs/s5p6818.h | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 97 insertions(+) create mode 100644 arch/arm/mach-nexell/Kconfig create mode 100644 arch/arm/mach-nexell/Makefile create mode 100644 arch/arm/mach-nexell/board.c create mode 100644 include/configs/s5p6818.h