[PATCH v2 1/2] board: atmel: sama5d2_wlsom1_ek: Fix spurious serial output

Eugen Hristev eugen.hristev at linaro.org
Tue Apr 8 09:55:38 CEST 2025



On 4/8/25 02:52, Fabio Estevam wrote:
> On Mon, Apr 7, 2025 at 3:39 AM Eugen Hristev <eugen.hristev at linaro.org> wrote:
> 
>> I am not convinced.
>> The purpose of this early UART would be to get output *before* the DM
>> code would enable clocks, pins, etc, for exactly that purpose, early
>> debug output.
>> So to remove all this and make the initialization rely on the SPL DM
>> code would defeat the purpose.
> 
> Ok, but if we have CONFIG_DEBUG_UART enabled, shouldn't we then
> disable CONFIG_SPL_SERIAL?
> 
> The change below fixes the serial garbage shown in SPL:
> 
> --- a/configs/sama5d27_wlsom1_ek_mmc_defconfig
> +++ b/configs/sama5d27_wlsom1_ek_mmc_defconfig
> @@ -16,7 +16,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
>  CONFIG_DM_RESET=y
>  CONFIG_SYS_MONITOR_LEN=524288
>  CONFIG_SPL_MMC=y
> -CONFIG_SPL_SERIAL=y
>  CONFIG_SPL_DRIVERS_MISC=y
>  CONFIG_SPL_STACK=0x218000
>  CONFIG_SPL_TEXT_BASE=0x200000
> 
> I suspect CONFIG_DEBUG_UART and CONFIG_SPL_SERIAL conflict with each other.

If they conflict, it means one of them is wrongly configured, since it's
the same hardware serial used for both.
So my feeling is that there is a wrong clock config in one of the
serials that causes the bad characters. Wrong clock config because it
appears to have a wrong computed divider to get to the desired baud.
So , disabling one of them is not really fixing the problem.

> 
> Is the change above acceptable? If not, what would you suggest?



More information about the U-Boot mailing list