This series adds support for the BeagleBoard.org BeagleV-Ahead, a single
board computer built around the T-Head TH1520 SoC (4x Xuantie C910) with
4 GB of LPDDR4X and 16 GB of eMMC.

Most of the work is already upstream: the TH1520 SoC support added for the
Lichee Pi 4A (SPL, DDR controller, clock and pinctrl drivers, binman FIT
generation) and the BeagleV-Ahead devicetree, which is available through
OF_UPSTREAM. The board therefore only needs a small board directory, a
U-Boot specific devicetree include and a defconfig.

The one missing piece is in the DDR controller driver, which only accepts
the dual rank firmware and fails with -EINVAL on the BeagleV-Ahead. The
first patch makes it program the rank configuration and the address map
from the number of ranks described by the firmware.

As on the Lichee Pi 4A, u-boot-with-spl.bin contains the SPL, the DDR
firmware, OpenSBI and U-Boot proper, and is loaded into SRAM through
fastboot.

The BeagleV-Ahead has a single rank of LPDDR4X, so the DDR firmware has to
be generated from lpddr4x-3733-singlerank.lua, which is already provided by
https://github.com/ziyao233/th1520-firmware, instead of the dual rank
configuration used by the Lichee Pi 4A. This is described in the
documentation added by the third patch.

Testing: the series builds with the Bootlin riscv64 glibc toolchain
(2026.08-1) together with OpenSBI v1.9, and produces a u-boot-with-spl.bin
holding the SPL, the DDR firmware and the FIT image.

The image was loaded into SRAM through the BROM fastboot interface on a
BeagleV-Ahead. Without the first patch the SPL stops with "failed to
initialize DDR controller: -22". With it, the DDR is initialized with the
single rank firmware, OpenSBI and U-Boot proper start, and the console
reports "Model: BeagleV Ahead", "DRAM:  4 GiB", both MMC controllers and
the Ethernet device. The Ethernet link, the eMMC and microSD accesses and
writing U-Boot to the eMMC were not tested. The dual rank behavior is
unchanged by the first patch, but I could not test it on a Lichee Pi 4A.

Signed-off-by: Thomas Perrot <[email protected]>

>

---
Thomas Perrot (3):
      ram: thead: th1520: Add single rank support
      board: beagle: Add BeagleV-Ahead board support
      doc: board: beagle: Add BeagleV-Ahead documentation

 arch/riscv/Kconfig                              |   9 ++
 arch/riscv/dts/th1520-beaglev-ahead-u-boot.dtsi |  32 +++++++
 board/beagle/beaglev_ahead/Kconfig              |  43 +++++++++
 board/beagle/beaglev_ahead/MAINTAINERS          |   8 ++
 board/beagle/beaglev_ahead/Makefile             |   7 ++
 board/beagle/beaglev_ahead/board.c              |  14 +++
 board/beagle/beaglev_ahead/spl.c                |  51 +++++++++++
 configs/beaglev_ahead_defconfig                 | 110 ++++++++++++++++++++++++
 doc/board/beagle/beaglev_ahead.rst              | 102 ++++++++++++++++++++++
 doc/board/beagle/index.rst                      |   9 ++
 drivers/ram/thead/th1520_ddr.c                  |  13 ++-
 include/configs/beaglev_ahead.h                 |  20 +++++
 12 files changed, 415 insertions(+), 3 deletions(-)
---
base-commit: ece349ade2973e220f524ce59e59711cc919263f
change-id: 20261014-dev-tprrt-beaglev-ahead-spl-7dc2a4fc0a28

Best regards,
-- 
Thomas Perrot <[email protected]>

Reply via email to