[PATCH] arm: kirkwood: Enable uart0 dm-pre-reloc for Kirkwood boards

Stefan Roese sr at denx.de
Fri Feb 10 07:32:32 CET 2023

Hi Tony,
Hi Pali,

On 2/10/23 02:37, Tony Dinh wrote:


>>>> Could you please check if Pogo V4 boots with
>>> Indeed, you're right! unset CONFIG_REQUIRE_SERIAL_CONSOLE allows the
>>> Pogo V4 to boot OK, without dm-pre-reloc needed. And it booted
>>> normally with kwboot, all serial input/outputs are OK.
>>>>> Also, note that just enabling DEBUG_UART would always make the board
>>>>> frozen when u-boot starts.
>>>> This should not be the case of course. Are you sure you've correctly
>>>> configured the DEBUG UART?
>>> I think I did that correctly (we've used that to debug the orion_timer
>>> issue previously). Here is how I've configured it:
>>> +CONFIG_DEBUG_UART_BASE=0xf1012000
>> Maybe you hit same issue in mach-kirkwood as me in the past for
>> mach-mvebu? U-Boot code was trying to initialize UART at the _new_ base
>> register address (0xf1012000) when U-Boot was still using the _old_ base
>> register address (0xd0012000).
>> I fixed it by moving code which changes base register address from
>> arch_cpu_init() function to arch_very_early_init() function in commit:
>> https://source.denx.de/u-boot/u-boot/-/commit/5bb2c550b11eb087437740b2a0d1fe780be5aec3

Thanks Pali, this is very likely the root cause here.

> Thanks for the info! Looking at that patch, I think I'm out of my
> depth :)

Here the line for Kirkwood, re-configuring the base address of the
internal registers:


You need to make sure, that this configuration is done before you use
the DEBUG UART with base address 0xf1xx.xxxx. If you use the DEBUG
UART before this, which is very likely, then you could also test if
this works for you:


> For now I will fix this Pogo V4 with the -u-boot.dtsi, so as
> not to mess up anybody who might try UART booting with kwboot.

Sure, please go ahead this way for now.

BTW: Many years ago my intention was to include the Kirkwood support
into the "common" Marvell MVEBU support in mach-mvebu. So that
mach-kirkwood and it's special handling could be dropped. It's great
to see that Kirkwood is getting attention now. Perhaps this move into
mach-mvebu could be addressed at some point.


> Thanks,
> Tony
>>>>> So this was another factor why it took me
>>>>> so long to figure this out :) I've just restored everything and
>>>>> removed the uart0 node from the Pogo V4 DTS like above and it is
>>>>> working.
>>>>> But of course, we don't want to change the Pogo V4 DTS, so I will
>>>>> submit another patch just for the Pogo V4 to add -u-boot.dtsi for this
>>>>> box to enable the dm-pre-reloc tag for uart0.
>>>> Understood.
>>> Thanks,
>>> Tony
>>>> Thanks,
>>>> Stefan

Viele Grüße,
Stefan Roese

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

More information about the U-Boot mailing list