From: Lucas Tanure <tanure@linux.com>
To: u-boot@lists.u-boot-project.org
Cc: neil.armstrong@linaro.org, trini@konsulko.com,
ilias.apalodimas@linaro.org, funderscore@postmasteros.org,
u-boot-amlogic@groups.io, Lucas Tanure <tanure@linux.com>
Subject: [PATCH 3/4] board: amlogic: add Khadas VIM4 support
Date: Thu, 6 Aug 2026 11:18:08 +0100 [thread overview]
Message-ID: <20260806101809.72526-4-tanure@linux.com> (raw)
In-Reply-To: <20260806101809.72526-1-tanure@linux.com>
Add initial support for the Khadas VIM4 board (Amlogic A311D2, T7
family): UART console, DRAM (first bank), PSCI reset through BL31 and
the secure monitor. Storage, network and USB support come later.
The image is position independent with TEXT_BASE=0, so the same
u-boot.bin can be chainloaded from the vendor U-Boot for development
or packaged as BL33 into the vendor boot image.
The console runs at 921600 baud, the serial console convention on the
VIM4 (this is also how BL2 configures uart_a).
Assisted-by: Claude:claude-fable-5
Signed-off-by: Lucas Tanure <tanure@linux.com>
---
.../amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi | 22 +++++++++++++++
board/amlogic/vim4/MAINTAINERS | 7 +++++
board/amlogic/vim4/Makefile | 4 +++
board/amlogic/vim4/vim4.c | 14 ++++++++++
configs/khadas-vim4_defconfig | 27 +++++++++++++++++++
5 files changed, 74 insertions(+)
create mode 100644 arch/arm/dts/amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi
create mode 100644 board/amlogic/vim4/MAINTAINERS
create mode 100644 board/amlogic/vim4/Makefile
create mode 100644 board/amlogic/vim4/vim4.c
create mode 100644 configs/khadas-vim4_defconfig
diff --git a/arch/arm/dts/amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi b/arch/arm/dts/amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi
new file mode 100644
index 00000000000..dde2cd804e3
--- /dev/null
+++ b/arch/arm/dts/amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2026 Lucas Tanure <tanure@linux.com>
+ */
+
+/ {
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ soc {
+ bootph-all;
+ };
+};
+
+&uart_a {
+ bootph-all;
+};
+
+&xtal {
+ bootph-all;
+};
diff --git a/board/amlogic/vim4/MAINTAINERS b/board/amlogic/vim4/MAINTAINERS
new file mode 100644
index 00000000000..5e1ec98b571
--- /dev/null
+++ b/board/amlogic/vim4/MAINTAINERS
@@ -0,0 +1,7 @@
+VIM4
+M: Lucas Tanure <tanure@linux.com>
+S: Maintained
+L: u-boot-amlogic@groups.io
+F: board/amlogic/vim4/
+F: configs/khadas-vim4_defconfig
+F: arch/arm/dts/amlogic-t7-a311d2-khadas-vim4-u-boot.dtsi
diff --git a/board/amlogic/vim4/Makefile b/board/amlogic/vim4/Makefile
new file mode 100644
index 00000000000..0cc4078c549
--- /dev/null
+++ b/board/amlogic/vim4/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0+
+# (C) Copyright 2026 Lucas Tanure <tanure@linux.com>
+
+obj-y := vim4.o
diff --git a/board/amlogic/vim4/vim4.c b/board/amlogic/vim4/vim4.c
new file mode 100644
index 00000000000..5db3deefe0e
--- /dev/null
+++ b/board/amlogic/vim4/vim4.c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2026 Lucas Tanure <tanure@linux.com>
+ */
+
+#include <init.h>
+#include <asm/arch/eth.h>
+
+int misc_init_r(void)
+{
+ meson_generate_serial_ethaddr();
+
+ return 0;
+}
diff --git a/configs/khadas-vim4_defconfig b/configs/khadas-vim4_defconfig
new file mode 100644
index 00000000000..10a64c07a88
--- /dev/null
+++ b/configs/khadas-vim4_defconfig
@@ -0,0 +1,27 @@
+CONFIG_ARM=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MESON=y
+CONFIG_TEXT_BASE=0x00000000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SIZE=0x2000
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/amlogic-t7-a311d2-khadas-vim4"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_MESON_T7=y
+CONFIG_SYS_LOAD_ADDR=0x10000000
+CONFIG_DEBUG_UART_BASE=0xfe078000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_IDENT_STRING=" khadas-vim4"
+CONFIG_DEBUG_UART=y
+CONFIG_OF_BOARD_SETUP=y
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_SYS_PROMPT="kvim4> "
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_IMI is not set
+CONFIG_CMD_CACHE=y
+CONFIG_OF_CONTROL=y
+CONFIG_BAUDRATE=921600
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_DEBUG_UART_SKIP_INIT=y
+CONFIG_MESON_SERIAL=y
--
2.55.0
next prev parent reply other threads:[~2026-08-06 11:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 10:18 [PATCH 0/4] Add Amlogic T7 (A311D2) and Khadas VIM4 support Lucas Tanure
2026-08-06 10:18 ` [PATCH 1/4] serial: meson: add Amlogic S4 UART support Lucas Tanure
2026-08-10 14:01 ` Ferass El Hafidi
2026-08-06 10:18 ` [PATCH 2/4] arm: meson: add Amlogic T7 SoC family support Lucas Tanure
2026-08-10 14:15 ` Ferass El Hafidi
2026-08-06 10:18 ` Lucas Tanure [this message]
2026-08-10 14:30 ` [PATCH 3/4] board: amlogic: add Khadas VIM4 support Ferass El Hafidi
2026-08-06 10:18 ` [PATCH 4/4] doc: board: amlogic: add Khadas VIM4 documentation Lucas Tanure
2026-08-10 8:13 ` [PATCH 0/4] Add Amlogic T7 (A311D2) and Khadas VIM4 support neil.armstrong
2026-08-10 14:12 ` Ferass El Hafidi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806101809.72526-4-tanure@linux.com \
--to=tanure@linux.com \
--cc=funderscore@postmasteros.org \
--cc=ilias.apalodimas@linaro.org \
--cc=neil.armstrong@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot-amlogic@groups.io \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox