cancel
Showing results for 
Search instead for 
Did you mean: 

Board Bringup - uboot cannot init console - uart clock not found

dave4444
Associate II

I'm doing board bringup on my board with a stm32mp135dae.

I've succesfully gotten through TF-A and OP-TEE OS and on to UBOOT, however I'm stuck in uboot with no clear way forward.

Device trees are based on those generated by STMCubeMX.  TF-A DTS worked as is, OP-TEE DTS needed board data added (mostly regulators).

The STMCubeMX generated u-boot DTS needed these changes (so far):

* add optee range to reserved-memory

* add an aliases main section defining serial0 = &uart4;

* add a chosen main section defining stdout-path = "serial0:115200n8";

uboot defconfig is in-tree "stm32mp13_defconfig", no changes

 

The DTS for uart4 is as defined in stm32mp131.dtsi has the standard:

clocks = <&rcc UART4_K>;

&rcc is enabled with a status = "okay"; and is using &scmi_clk as this is in uboot and uboot must go through optee via SCMI interface to get clock information.

 

On startup of uboot,

clk_get_by_index() fails with -ENODEV from stm32_serial_probe().

call into stm32_serial_probe() looks good:

(gdb) bt
#0 stm32_serial_probe (dev=0xc02804a4) at drivers/serial/serial_stm32.c:199
#1 0xc00300dc in device_probe (dev=0xc02804a4) at drivers/core/device.c:583
#2 0xc00535b8 in serial_check_stdout (devp=0xc027feac, blob=0xc0400000) at drivers/serial/serial-uclass.c:66
#3 serial_find_console_or_panic () at drivers/serial/serial-uclass.c:98
#4 serial_init () at drivers/serial/serial-uclass.c:161
#5 0xc0023590 in initcall_run_list (init_sequence=0xc00a436c <init_sequence_f>) at include/initcall.h:46
#6 board_init_f (boot_flags=<optimized out>) at common/board_f.c:992
#7 0xc0001310 in _main () at arch/arm/lib/crt0.S:128
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) p *dev
$1 = {driver = 0xc00f2588 <_u_boot_list_2_driver_2_serial_stm32>, name = 0xc0401f94 "serial@40010000", plat_ = 0xc02804f4, parent_plat_ = 0x0,
uclass_plat_ = 0x0, driver_data = 3222197260, parent = 0xc0280290, priv_ = 0x0, uclass = 0xc028048c, uclass_priv_ = 0xc0280500,
parent_priv_ = 0x0, uclass_node = {next = 0xc0280494, prev = 0xc0280494}, child_head = {next = 0xc02804d8, prev = 0xc02804d8}, sibling_node = {
next = 0xc02802c4, prev = 0xc028046c}, flags_ = 4163, seq_ = 0, node_ = {np = 0x1f58, of_offset = 8024}}
(gdb)

 

Note that at this point, neither stm32_rcc_bind() or scmi_clk_probe() are ever called.

 

Software versions:

TF-A: https://github.com/STMicroelectronics/arm-trusted-firmware.git at tag v2.10-stm32mp-r1.2

OPTEE: https://github.com/STMicroelectronics/optee_os.git at tag 4.0.0-stm32mp-r1.2

UBOOT: https://github.com/STMicroelectronics/u-boot.git at tag v2023.10-stm32mp-r1.2

STMCubeMX 6.14.0

 

 

0 REPLIES 0