summaryrefslogtreecommitdiff
path: root/board/schneider
diff options
context:
space:
mode:
authorRalph Siemsen <[email protected]>2023-05-12 21:36:56 -0400
committerMarek Vasut <[email protected]>2023-05-13 04:01:30 +0200
commite87c869db3620c9b03b4364e144c19387d7bfd7a (patch)
tree2120eb02e55e5ddc1c84ba24c45eecbc10e4c4ec /board/schneider
parent2156327846d64ab200e904387623cd9d7bbfc84f (diff)
board: schneider: add RZN1 board support
Add support for Schneider Electric RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices. The intention is to support both boards using a single defconfig, and to handle the differences at runtime. Signed-off-by: Ralph Siemsen <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
Diffstat (limited to 'board/schneider')
-rw-r--r--board/schneider/rzn1-snarc/Kconfig18
-rw-r--r--board/schneider/rzn1-snarc/Makefile3
-rw-r--r--board/schneider/rzn1-snarc/rzn1.c31
3 files changed, 52 insertions, 0 deletions
diff --git a/board/schneider/rzn1-snarc/Kconfig b/board/schneider/rzn1-snarc/Kconfig
new file mode 100644
index 00000000000..1c1c235f002
--- /dev/null
+++ b/board/schneider/rzn1-snarc/Kconfig
@@ -0,0 +1,18 @@
+if TARGET_SCHNEIDER_RZN1
+
+config TEXT_BASE
+ default 0x20040000
+
+config SYS_MONITOR_LEN
+ default 524288
+
+config SYS_BOARD
+ default "rzn1-snarc"
+
+config SYS_VENDOR
+ default "schneider"
+
+config SYS_CONFIG_NAME
+ default "rzn1-snarc"
+
+endif
diff --git a/board/schneider/rzn1-snarc/Makefile b/board/schneider/rzn1-snarc/Makefile
new file mode 100644
index 00000000000..e197ca8cb47
--- /dev/null
+++ b/board/schneider/rzn1-snarc/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y := rzn1.o
diff --git a/board/schneider/rzn1-snarc/rzn1.c b/board/schneider/rzn1-snarc/rzn1.c
new file mode 100644
index 00000000000..09241c3a954
--- /dev/null
+++ b/board/schneider/rzn1-snarc/rzn1.c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <common.h>
+#include <dm.h>
+#include <ram.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = gd->ram_base + 0x100;
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ struct udevice *dev;
+ int err;
+
+ /*
+ * This will end up calling cadence_ddr_probe(),
+ * and will also update gd->ram_size.
+ */
+ err = uclass_get_device(UCLASS_RAM, 0, &dev);
+ if (err)
+ debug("DRAM init failed: %d\n", err);
+
+ return err;
+}