[PATCH] rockchip: rk3399: pass platform parameter to TF-A by default
Jerome Forissier
jerome.forissier at linaro.org
Mon Nov 14 22:13:49 CET 2022
On 11/14/22 18:37, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz at theobroma-systems.com>
>
> Long are gone the times TF-A couldn't handle the FDT passed by U-Boot.
> Specifically, since commit e7b586987c0a ("rockchip: don't crash if we
> get an FDT we can't parse") in TF-A, failure to parse the FDT will use
> the fallback mechanism. This patch was merged in TF-A v2.4-rc0 from two
> years ago.
>
> Therefore, let's finally pass the FDT to TF-A so that it can get the
> serial configuration from U-Boot FDT instead of requiring the user to
> patch TF-A hardcoded fallback values.
>
> Cc: Quentin Schulz <foss+uboot at 0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
> ---
> rockchip: rk3399: pass platform parameter to TF-A
>
> Finally pass the FDT address to TF-A since it now gracefully fallbacks to
> hardcoded defaults if it cannot parse it. This allows us to avoid modifying
> hardcoded values in TF-A to enable the console.
Does this mean that with this patch TF-A will properly set the baudrate of
the console UART to 1.5MBd? I'm asking because I am about to send the
following patch to TF-A (if I can figure out the Gerrit stuff that is...):
=============
>From 51c1aa9277f6386b3a8055ad8ad582f894ab9230 Mon Sep 17 00:00:00 2001
From: Jerome Forissier <jerome.forissier at linaro.org>
Date: Thu, 10 Nov 2022 21:38:30 +0100
Subject: [PATCH] rk3399: set console baudrate to 1500000
The default speed for the console UART of the rk3399 SoC is 1.5 MBaud.
It is the value used by U-Boot so if TF-A has a different value there
is no output when the boot switches from TPL to TF-A BL31 (note that
OP-TEE which does not change the speed). The Rockchip loader aka flash
helper (rk3399_loader_v1.20.119.bin [1][2]) also uses the same speed.
Therefore set the default baudrate to 1500000.
Link: [1] https://dl.radxa.com/rockpi/images/loader/
Link: [2] https://wiki.radxa.com/Rockpi4/dev/usb-install
Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
---
plat/rockchip/rk3399/rk3399_def.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/rockchip/rk3399/rk3399_def.h b/plat/rockchip/rk3399/rk3399_def.h
index ba83242eb..8d6ecfbe6 100644
--- a/plat/rockchip/rk3399/rk3399_def.h
+++ b/plat/rockchip/rk3399/rk3399_def.h
@@ -17,7 +17,7 @@
/**************************************************************************
* UART related constants
**************************************************************************/
-#define RK3399_BAUDRATE 115200
+#define RK3399_BAUDRATE 1500000
#define RK3399_UART_CLOCK 24000000
/******************************************************************************
--
2.34.1
=============
Thanks,
--
Jerome
More information about the U-Boot
mailing list