[PATCH v3 8/9] ARM: renesas: Add RZ/A2 GR-Mango board support
Magnus Damm
damm at opensource.se
Sun Jul 6 13:29:37 CEST 2025
From: Magnus Damm <damm at opensource.se>
Add initial RZ/A2 GR-Peach board support. Serial console and Ethernet
are known to work however on-board SDRAM is not yet enabled.
Signed-off-by: Magnus Damm <damm at opensource.se>
---
Changes since v2:
- new patch
Please pick DT board file from the following patch in series:
[PATCH 5/6] ARM: dts: renesas: gr-mango: initial board support
https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=979368
arch/arm/dts/Makefile | 3 ++
arch/arm/dts/r7s9210-gr-mango-u-boot.dtsi | 28 ++++++++++++++++++++
arch/arm/mach-renesas/Kconfig.rza2 | 13 +++++++++
board/renesas/grmango/Kconfig | 12 ++++++++
board/renesas/grmango/MAINTAINERS | 5 +++
board/renesas/grmango/Makefile | 7 +++++
board/renesas/grmango/grmango.c | 40 +++++++++++++++++++++++++++++
configs/grmango_defconfig | 10 +++++++
include/configs/grmango.h | 15 ++++++++++
9 files changed, 133 insertions(+)
--- 0020/arch/arm/dts/Makefile
+++ work/arch/arm/dts/Makefile 2025-07-05 18:10:31.000000000 +0900
@@ -927,6 +927,9 @@ dtb-$(CONFIG_RZA1) += \
r7s72100-genmai.dtb \
r7s72100-gr-peach.dtb
+dtb-$(CONFIG_RZA2) += \
+ r7s9210-gr-mango.dtb
+
dtb-$(CONFIG_TARGET_AT91SAM9261EK) += at91sam9261ek.dtb
dtb-$(CONFIG_TARGET_PM9261) += at91sam9261ek.dtb
--- /dev/null
+++ work/arch/arm/dts/r7s9210-gr-mango-u-boot.dtsi 2025-07-05 18:10:32.845452021 +0900
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source extras for U-Boot for the GR Mango board
+ * Based on GR Peach, Copyright (C) 2019 Marek Vasut <marek.vasut at gmail.com>
+ */
+
+/ {
+ soc {
+ bootph-all;
+ };
+};
+
+&ostm0 {
+ bootph-all;
+};
+
+&pinctrl {
+ bootph-all;
+};
+
+&scif0 {
+ bootph-all;
+ clock = <66666666>; /* ToDo: Replace by DM clock driver */
+};
+
+&scif0_pins {
+ bootph-all;
+};
--- 0020/arch/arm/mach-renesas/Kconfig.rza2
+++ work/arch/arm/mach-renesas/Kconfig.rza2 2025-07-05 18:10:31.000000000 +0900
@@ -4,4 +4,17 @@ config CPU_RZA2
bool
default y
+choice
+ prompt "Renesas RZ/A2 board select"
+
+# Renesas Supported Boards
+config TARGET_GRMANGO
+ bool "GR-MANGO board"
+
+endchoice
+
+# Renesas Supported Boards
+source "board/renesas/grmango/Kconfig"
+
+
endif
--- /dev/null
+++ work/board/renesas/grmango/Kconfig 2025-07-05 18:10:32.859452100 +0900
@@ -0,0 +1,12 @@
+if TARGET_GRMANGO
+
+config SYS_BOARD
+ default "grmango"
+
+config SYS_VENDOR
+ default "renesas"
+
+config SYS_CONFIG_NAME
+ default "grmango"
+
+endif
--- /dev/null
+++ work/board/renesas/grmango/MAINTAINERS 2025-07-05 18:10:32.867452146 +0900
@@ -0,0 +1,5 @@
+GRMANGO BOARD
+M: Magnus Damm <damm at opensource.se>
+F: arch/arm/dts/r7s9210*
+F: board/renesas/grmango/
+N: grmango
--- /dev/null
+++ work/board/renesas/grmango/Makefile 2025-07-05 18:10:32.874452185 +0900
@@ -0,0 +1,7 @@
+#
+# Copyright (C) 2018 Renesas Electronics
+# Copyright (C) 2018 Chris Brandt
+#
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y := grmango.o
--- /dev/null
+++ work/board/renesas/grmango/grmango.c 2025-07-05 19:42:53.297553497 +0900
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017 Renesas Electronics
+ * Copyright (C) Chris Brandt
+ */
+
+#include <init.h>
+#include <linux/io.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
+
+ /* configure PFENET register to use MII for Ethernet */
+ writeb(0x00, 0xfcffe2ff);
+ writeb(0x40, 0xfcffe2ff);
+ writeb(0x02, 0xfcffe820);
+ return 0;
+}
+
+/*
+ * Make use of the RZ/A2M on-chip memory which is 4 MiB at CFG_SYS_SDRAM_BASE.
+ */
+
+int dram_init(void)
+{
+ gd->ram_base = CFG_SYS_SDRAM_BASE;
+ gd->ram_size = 4 << 20;
+ return 0;
+}
+
+int dram_init_banksize(void)
+{
+ gd->bd->bi_dram[0].start = gd->ram_base;
+ gd->bd->bi_dram[0].size = gd->ram_size;
+ return 0;
+}
--- /dev/null
+++ work/configs/grmango_defconfig 2025-07-05 18:10:32.888452265 +0900
@@ -0,0 +1,10 @@
+#include <configs/renesas_rza2.config>
+
+CONFIG_ARM=y
+CONFIG_ARCH_RENESAS=y
+CONFIG_TEXT_BASE=0x00000000
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_DEFAULT_DEVICE_TREE="renesas/r7s9210-gr-mango"
+CONFIG_TARGET_GRMANGO=y
+
+CONFIG_ENV_IS_NOWHERE=y
--- /dev/null
+++ work/include/configs/grmango.h 2025-07-05 18:10:32.894452299 +0900
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration settings for the Renesas GRMANGO board
+ *
+ * Copyright (C) 2017-2019 Renesas Electronics
+ */
+
+#ifndef __GRMANGO_H
+#define __GRMANGO_H
+
+/* Internal RAM Size: RZ/A2M = 4MB */
+#define CFG_SYS_SDRAM_BASE 0x80000000
+#define CFG_SYS_SDRAM_SIZE (4 * 1024 * 1024)
+
+#endif /* __GRMANGO_H */
More information about the U-Boot
mailing list