diff mbox series

[meta-rockchip,2/2] rk3588(s): add support for upstream TF-A

Message ID 20240927-rk35-upstream-tf-a-v1-2-e3911342113f@cherry.de
State New
Headers show
Series rk35xx: add support for upstream TF-A | expand

Commit Message

Quentin Schulz Sept. 27, 2024, 12:59 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

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 <quentin.schulz@cherry.de>
---
 conf/machine/include/rk3588s.inc                             | 3 +++
 recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend | 5 +++++
 2 files changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/conf/machine/include/rk3588s.inc b/conf/machine/include/rk3588s.inc
index d349108..07cde03 100644
--- a/conf/machine/include/rk3588s.inc
+++ b/conf/machine/include/rk3588s.inc
@@ -19,4 +19,7 @@  PREFERRED_PROVIDER_optee-os = "rockchip-rkbin"
 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.