How to debug HW startup?
Mauro Condarelli
mc5686 at mclink.it
Sun Jan 12 01:22:25 CET 2020
Many thanks.
It appears I had completely misinterpreted the meaning of
CONFIG_DEBUG_UART_CLOCK.
I see now a correct output and a new warning message:
pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
right after "<debug_uart>" notification.
Tomorrow I'll try to understand what it means.
I don't think I would have found it without You pointing in the right
direction.
MANY Thanks!
Best regards
Mauro Condarelli
On 1/12/20 12:58 AM, Sean Anderson wrote:
> On 1/11/20 4:38 PM, Mauro Condarelli wrote:
>> Thanks Joel,
>> unfortunately I already have that defined, even if I forgot to copy it.
>> I attach my full .config for reference as I have no idea what I'm
>> still missing.
>>
>> On 1/11/20 9:42 PM, Sean Anderson wrote:
>>>> Could You share a Linkit _defconfig with early serial debug enabled?
>>>> I'm decidedly missing something as, even enabling
>>>>
>>>> CONFIG_DEBUG_UART=y
>>>> CONFIG_DEBUG_UART_BASE=0x10000e00
>>>> CONFIG_DEBUG_UART_CLOCK=20
>>>> CONFIG_DEBUG_UART_SHIFT=2
>>>> CONFIG_DEBUG_UART_ANNOUNCE=y
> So it looks like your clock is way too low. The unit for the clock is
> Hz. From the device tree you sent, this board is based off
> arch/mips/dts/mt7628a.dtsi, using uart2. The clock controller for this
> board is compatible with "mediatek,mt7628-clk", and the driver is
> located in "drivers/clk/mtmips/clk-mt7628.c". From that file, the uart2
> clock gets its frequency from CLK_SRC_PERI. Under mt7628_clk_get_rate,
> the peripheral clock source depends on the value of
> PERI_CLK_FROM_XTAL_SEL, which is initialized to 0 (as documented in the
> data sheet). Therefore, the else clause is taken (unless configured
> otherwise), so you should use 40000000 for your clock.
>
>>> You need to pick a debug uart driver, e.g. CONFIG_DEBUG_UART_NS16550.
>> As said I have it, but I'm not sure about the other parameters.
>> Maybe a better choice would be CONFIG_DEBUG_UART_MTK.
>> Having a "known good" configuration would help a lot.
>>
>> Regards
>> Mauro
>>
>
More information about the U-Boot
mailing list