[PATCH 0/4] spl: Add support for Falcon mode with ARM Trusted Firmware
Alexey Charkov
alchark at flipper.net
Tue Jun 9 18:52:23 CEST 2026
Some of the modern SoCs such as Rockchip RK3576 require ATF to be running
to provide firmware services to the OS, and current ATF loading code in
SPL only supports loading ATF with U-boot as BL33.
Extend SPL to support loading ATF with Linux as BL33, and add necessary
hooks to enable this functionality with RK3576 booting from UFS flash.
This has been tested with an uncompressed ARM64 Image as the payload, with
a manually pre-patched DTB to include the kernel command line directly
into the /chosen node, on the Rockchip RK3576 based Flipper One board.
Booting this way lets me get from power-on to the kernel barking at me
for giving it a wrong rootfs argument in 3.5 seconds - without any extra
optimizations - which is pretty impressive. Full Linux userspace with
systemd and graphics in about 13 seconds (ext4 root on UFS, no initramfs).
Build command is along these lines (native ARM64 build):
$ make -j$(nproc) \
BL31=~/trusted-firmware-a/build/rk3576/release/bl31/bl31.elf \
ROCKCHIP_TPL=~/rkbin/bin/rk35/rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.13.bin \
LINUX_KERNEL=~/fit-artifacts/Image \
FALCON_FDT=~/fit-artifacts/falcon.dtb
Loading a Falcon-equipped usb472 payload via Maskrom directly to RAM is
also possible:
rockusb download-sram u-boot-rockchip-usb471.bin
rockusb download-ddr u-boot-rockchip-usb472-falcon.bin
The caveat though is that the boot ROM seems to take a very long time to
verify the payload (around 6 minutes with a 32MB kernel) when booting
directly to RAM, which might be due to CPU and memory clocks not being
set up in Maskrom. Once loaded though, the rest of the boot process is
blazing fast.
This may need to be revisited once/if we get opensource TPL support for
RK3576 to set the CPU and memory clocks consistently at boot.
Signed-off-by: Alexey Charkov <alchark at flipper.net>
---
Alexey Charkov (4):
spl: atf: support Linux as BL33 with ATF
spl: ufs: add Falcon mode load path
rockchip: spl: default to Falcon mode boot in SPL if enabled
rockchip: binman: Add support for Falcon mode FIT images with ATF+Linux
Makefile | 2 +
arch/arm/dts/rockchip-u-boot.dtsi | 109 +++++++++++++++++++++++++++++++++++++
arch/arm/mach-rockchip/spl.c | 12 ++++
common/spl/Kconfig | 18 ++++++
common/spl/spl_atf.c | 45 ++++++++++-----
common/spl/spl_ufs.c | 57 ++++++++++++++++++-
tools/binman/etype/falcon_fdt.py | 26 +++++++++
tools/binman/etype/linux_kernel.py | 22 ++++++++
8 files changed, 275 insertions(+), 16 deletions(-)
---
base-commit: e91911169bc737ee4a79963a1cba8db2aab7c1c0
change-id: 20260609-atf-falcon-e7eef54d16e5
Best regards,
--
Alexey Charkov <alchark at flipper.net>
More information about the U-Boot
mailing list