aboutsummaryrefslogtreecommitdiff
path: root/board/renesas
diff options
context:
space:
mode:
authorMarek Vasut2019-07-29 19:59:44 +0200
committerMarek Vasut2019-08-09 23:15:01 +0200
commit3ebb91914f4831df4db42675c4dd1f9a0b7548c7 (patch)
treee9f4ecadbb24bc0b3485e636780ffe731a7f30c5 /board/renesas
parent57ede1a3d430544ecde2f3e08fb8d19586d00cc1 (diff)
ARM: renesas: Add R8A77980 V3H Condor board code
Add board code for the R8A77980 V3H Condor board. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'board/renesas')
-rw-r--r--board/renesas/condor/Kconfig15
-rw-r--r--board/renesas/condor/MAINTAINERS6
-rw-r--r--board/renesas/condor/Makefile13
-rw-r--r--board/renesas/condor/condor.c55
4 files changed, 89 insertions, 0 deletions
diff --git a/board/renesas/condor/Kconfig b/board/renesas/condor/Kconfig
new file mode 100644
index 00000000000..2286d88de7f
--- /dev/null
+++ b/board/renesas/condor/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_CONDOR
+
+config SYS_SOC
+ default "rmobile"
+
+config SYS_BOARD
+ default "condor"
+
+config SYS_VENDOR
+ default "renesas"
+
+config SYS_CONFIG_NAME
+ default "condor"
+
+endif
diff --git a/board/renesas/condor/MAINTAINERS b/board/renesas/condor/MAINTAINERS
new file mode 100644
index 00000000000..73b010b9e71
--- /dev/null
+++ b/board/renesas/condor/MAINTAINERS
@@ -0,0 +1,6 @@
+CONDOR BOARD
+M: Marek Vasut <marek.vasut+renesas@gmail.com>
+S: Maintained
+F: board/renesas/condor/
+F: include/configs/condor.h
+F: configs/r8a77980_condor_defconfig
diff --git a/board/renesas/condor/Makefile b/board/renesas/condor/Makefile
new file mode 100644
index 00000000000..cf6d566a9bb
--- /dev/null
+++ b/board/renesas/condor/Makefile
@@ -0,0 +1,13 @@
+#
+# board/renesas/condor/Makefile
+#
+# Copyright (C) 2019 Renesas Electronics Corporation
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifdef CONFIG_SPL_BUILD
+obj-y := ../rcar-common/gen3-spl.o
+else
+obj-y := condor.o ../rcar-common/common.o
+endif
diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c
new file mode 100644
index 00000000000..d1cbbc33399
--- /dev/null
+++ b/board/renesas/condor/condor.c
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * board/renesas/condor/condor.c
+ * This file is Condor board support.
+ *
+ * Copyright (C) 2019 Marek Vasut <marek.vasut+renesas@gmail.com>
+ */
+
+#include <common.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void s_init(void)
+{
+}
+
+int board_early_init_f(void)
+{
+ return 0;
+}
+
+int board_init(void)
+{
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
+
+ return 0;
+}
+
+#define RST_BASE 0xE6160000
+#define RST_CA57RESCNT (RST_BASE + 0x40)
+#define RST_CA53RESCNT (RST_BASE + 0x44)
+#define RST_RSTOUTCR (RST_BASE + 0x58)
+#define RST_CA57_CODE 0xA5A5000F
+#define RST_CA53_CODE 0x5A5A000F
+
+void reset_cpu(ulong addr)
+{
+ unsigned long midr, cputype;
+
+ asm volatile("mrs %0, midr_el1" : "=r" (midr));
+ cputype = (midr >> 4) & 0xfff;
+
+ if (cputype == 0xd03)
+ writel(RST_CA53_CODE, RST_CA53RESCNT);
+ else if (cputype == 0xd07)
+ writel(RST_CA57_CODE, RST_CA57RESCNT);
+ else
+ hang();
+}