arm-trusted-firmware-rockchip: support rk3588

ATF supports rk3588 since version 2.12, so let's enable it in
arm-trusted-firmware-rockchip.

We still need the TPL to initialize RAM, but keeping rk3588 in rkbin
would cause a duplicate package name, so rename rk3588 to rk3588-tpl in
rkbin.

Finally, point uboot-rockchip for rk3588 to bl31 built by this package,
and add a dependency on the new trusted-firmware-a-rk3588-tpl pacakge.

While this doesn't necessarily add features, we now no longer rely on
the rk3588_bl31_v1.45.elf blob provided by Rockchip, which is always a
good thing.

Tested on Radxa ROCK 5B+.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
Stijn Tintel 2025-03-18 10:56:25 +02:00
parent b1a2ebbd43
commit c891ad99f8
3 changed files with 15 additions and 6 deletions
package/boot
arm-trusted-firmware-rockchip
rkbin
uboot-rockchip

@ -34,9 +34,15 @@ define Trusted-Firmware-A/rk3399
PLAT:=rk3399
endef
define Trusted-Firmware-A/rk3588
BUILD_SUBTARGET:=armv8
PLAT:=rk3588
endef
TFA_TARGETS:= \
rk3328 \
rk3399
rk3399 \
rk3588
ifeq ($(BUILD_VARIANT),rk3399)
M0_GCC_NAME:=gcc-arm

@ -57,9 +57,8 @@ define Trusted-Firmware-A/rk3568-e25
TPL:=rk35/rk3568_ddr_1560MHz_uart2_m0_115200_v1.21.bin
endef
define Trusted-Firmware-A/rk3588
define Trusted-Firmware-A/rk3588-tpl
BUILD_SUBTARGET:=armv8
ATF:=rk35/rk3588_bl31_v1.45.elf
TPL:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin
endef
@ -69,7 +68,7 @@ TFA_TARGETS:= \
rk3566 \
rk3568 \
rk3568-e25 \
rk3588
rk3588-tpl
ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s)
TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin
@ -109,7 +108,9 @@ endef
define Package/trusted-firmware-a/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
ifneq ($(ATF),)
$(CP) $(PKG_BUILD_DIR)/bin/$(ATF) $(STAGING_DIR_IMAGE)/
endif
$(CP) $(PKG_BUILD_DIR)/bin/$(TPL) $(STAGING_DIR_IMAGE)/
endef

@ -247,8 +247,10 @@ endef
define U-Boot/rk3588/Default
BUILD_SUBTARGET:=armv8
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588
ATF:=rk3588_bl31_v1.45.elf
DEPENDS:= \
+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588 \
+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588-tpl
ATF:=rk3588_bl31.elf
TPL:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin
endef