From f895d0c1e2a42cad0cb372d24ec522f16c8cd1e8 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Fri, 27 Sep 2024 14:59:04 +0200 Subject: [PATCH] rk3588(s): add support for upstream TF-A Upstream TF-A > 2.11 (no release available yet) has initial support for the RK3588 (and thus RK3588S). This was boot tested on an RK3588 Jaguar, the modified baudrate is taken into account as well. Signed-off-by: Quentin Schulz --- conf/machine/include/rk3588s.inc | 3 +++ recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/conf/machine/include/rk3588s.inc b/conf/machine/include/rk3588s.inc index 7ea944c..6ec344a 100644 --- a/conf/machine/include/rk3588s.inc +++ b/conf/machine/include/rk3588s.inc @@ -19,4 +19,7 @@ PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os" UBOOT_SUFFIX ?= "itb" UBOOT_ENTRYPOINT ?= "0x06000000" +TFA_PLATFORM = "rk3588" +TFA_BUILD_TARGET = "bl31" + ENABLE_STATELESS_VPU_GST ?= "1" diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index 7e155d7..ecd6cb3 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -7,6 +7,7 @@ COMPATIBLE_MACHINE:append:rk3328 = "|rk3328" COMPATIBLE_MACHINE:append:px30 = "|px30" COMPATIBLE_MACHINE:append:rk3566 = "|rk3566" COMPATIBLE_MACHINE:append:rk3568 = "|rk3568" +COMPATIBLE_MACHINE:append:rk3588s = "|rk3588s" FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "\ @@ -42,6 +43,10 @@ fixup_baudrate:rk3568() { sed -i "s/#define FPGA_BAUDRATE\s\+.*/#define FPGA_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3568/rk3568_def.h } +fixup_baudrate:rk3588s() { + sed -i "s/#define RK_DBG_UART_BAUDRATE\s\+.*/#define RK_DBG_UART_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3588/rk3588_def.h +} + # Only required for U-Boot configuration for which SPL_ATF_NO_PLATFORM_PARAM # symbol is enabled. This symbol is required for TF-A < 2.4-rc0, which is # unfortunately what Rockchip is using for their blob.