UART pinctrl for serial is typically applied multiple times:
- in external TPL
- in SPL for DEBUG_UART in board_debug_uart_init()
- in SPL using pinctrl from DT
- in pre-reloc phase using pinctrl from DT
- after relocation using pinctrl from DT

Skip including UART pinctrl for the pre-reloc phase to save time during
boot. On a Radxa ROCK 5B this reduce boot time by ~150 ms.

After this a warning may be shown with LOGLEVEL=5 (or higher), it is
safe to ignore this warning as device probe is successful even when
pinctrl cannot be applied:

  ns16550_serial serial@feb50000: pinctrl_select_state_full: 
uclass_get_device_by_phandle_id: err=-19

Signed-off-by: Jonas Karlman <jo...@kwiboo.se>
---
 arch/arm/dts/rk3588-tiger-haikou-u-boot.dtsi | 3 ++-
 arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi   | 3 ++-
 arch/arm/dts/rk3588s-u-boot.dtsi             | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/rk3588-tiger-haikou-u-boot.dtsi 
b/arch/arm/dts/rk3588-tiger-haikou-u-boot.dtsi
index 275ae6fdaead..08ebb0af4482 100644
--- a/arch/arm/dts/rk3588-tiger-haikou-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-tiger-haikou-u-boot.dtsi
@@ -33,5 +33,6 @@
 };
 
 &uart2m2_xfer {
-       bootph-all;
+       bootph-pre-sram;
+       bootph-pre-ram;
 };
diff --git a/arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi 
b/arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi
index a50bcc45f216..59886b9828a4 100644
--- a/arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi
@@ -17,5 +17,6 @@
 };
 
 &uart9m0_xfer {
-       bootph-all;
+       bootph-pre-sram;
+       bootph-pre-ram;
 };
diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi
index 09d8b311cec5..df7e93d19c52 100644
--- a/arch/arm/dts/rk3588s-u-boot.dtsi
+++ b/arch/arm/dts/rk3588s-u-boot.dtsi
@@ -154,7 +154,8 @@
 };
 
 &uart2m0_xfer {
-       bootph-all;
+       bootph-pre-sram;
+       bootph-pre-ram;
 };
 
 &xin24m {
-- 
2.45.2

Reply via email to