Skip to contentSkip to conversation

board: atmel: sama5d2_wlsom1_ek: Fix spurious serial output

PATCH Superseded Fabio Estevam 2 participants 2 messages Apr 4, 2025 Arm/Microchip (AT91) SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: atmel: sama5d2_wlsom1_ek: Fix spurious serial output

From: Fabio Estevam <[email protected]>

Currently, there are always some spurious characters showing up right before SPL banner is shown:

RomBOOT
���=������
U-Boot SPL 2025.04-rc5-00023-g9ed4e2c45f25 (Apr 03 2025 - 23:23:17 -0300) Trying to boot from MMC1

<debug_uart>
...

Fix this problem by removing the redundant UART iomux and clock initialization from the board code, as they are handled by DM code.

---
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 9 ---------
 1 file changed, 9 deletions(-)
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +0 -9
index 04de1257eca0..a0ecc4f42a90 100644
@@ -41,17 +41,8 @@ int board_late_init(void)
 #endif
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
-static void board_uart0_hw_init(void)
-{
-	atmel_pio4_set_c_periph(AT91_PIO_PORTB, 26, ATMEL_PIO_PUEN_MASK);	/* URXD0 */
-	atmel_pio4_set_c_periph(AT91_PIO_PORTB, 27, 0);				/* UTXD0 */
-
-	at91_periph_clk_enable(ATMEL_ID_UART0);
-}
-
 void board_debug_uart_init(void)
 {
-	board_uart0_hw_init();
 }
 #endif
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Currently, there are always some spurious characters showing up right before SPL banner is shown:

RomBOOT
���=������
U-Boot SPL 2025.04-rc5-00023-g9ed4e2c45f25 (Apr 03 2025 - 23:23:17 -0300) Trying to boot from MMC1

Quoted 5 lines

<debug_uart>
...

Fix this problem by removing the redundant UART iomux and clock initialization from the board code, as they are handled by DM code.

If it's a redundant initialization, how does that lead to spurious characters ?
My take on this is that the UART is initialized too late, and the lines are floating for some time.
... or wrongly initialized vs baud, etc, for a certain amount of time.

Quoted 28 lines
---
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 9 ---------
 1 file changed, 9 deletions(-)
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +0 -9
index 04de1257eca0..a0ecc4f42a90 100644
@@ -41,17 +41,8 @@ int board_late_init(void)
 #endif
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
-static void board_uart0_hw_init(void)
-{
-	atmel_pio4_set_c_periph(AT91_PIO_PORTB, 26, ATMEL_PIO_PUEN_MASK);	/* URXD0 */
-	atmel_pio4_set_c_periph(AT91_PIO_PORTB, 27, 0);				/* UTXD0 */
-
-	at91_periph_clk_enable(ATMEL_ID_UART0);
-}
-
 void board_debug_uart_init(void)
 {
-	board_uart0_hw_init();
 }
 #endif