Re: [PATCH 3/4] board: amlogic: add Khadas VIM4 support
Ferass El Hafidi <[email protected]>
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 06 Aug 2026 10:18, "Lucas Tanure via groups.io" <[email protected]> wrote: >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 <[email protected]> >--- > .../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 <[email protected]> >+ */ >+ >+/ { >+ chosen { >+ stdout-path = "serial0:921600n8"; >+ }; >+ >+ soc { >+ bootph-all; >+ }; >+}; >+ >+&uart_a { >+ bootph-all; >+}; >+ >+&xtal { >+ bootph-all; >+}; Maybe this should go in a common amlogic-t7-u-boot dts instead of something board-specific? >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 <[email protected]> >+S: Maintained >+L: [email protected] >+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 <[email protected]> >+ >+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 <[email protected]> >+ */ >+ >+#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> " Leave this unset >+# 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 Best regards, Ferass