cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C U-Boot hangs after board information?

jhi
Senior

I'm using a custom board (it is not DK1 even tho it says on boot log) with STM32MP157AAC. The boot hangs on u-boot without proper error message. Where should I start to search the failure?

NOTICE:  CPU: STM32MP157AAC Rev.Z
NOTICE:  Model: STMicroelectronics STM32MP157A-DK1 STM32CubeMX board - openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
WARNING: regulator_get_by_phandle: phandle 9 not found
WARNING: VDD unknown
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
WARNING: regulator_get_by_phandle: phandle 12 not found
NOTICE:  BL2: v2.6-stm32mp1-r1.0(debug):v2.6-dirty
NOTICE:  BL2: Built : 13:14:26, Nov 23 2021
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-1066/888 bin G 2x2Gb 533MHz v1.44
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    BL2: Loading image id 31
INFO:    Loading image id=31 at address 0x2ffff000
INFO:    Image id=31 loaded: 0x2ffff000 - 0x2ffff226
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x2ffc5000
INFO:    Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820
INFO:    BL2: Skip loading image id 21
INFO:    BL2: Skip loading image id 22
INFO:    BL2: Loading image id 23
INFO:    Loading image id=23 at address 0xc0500000
INFO:    Image id=23 loaded: 0xc0500000 - 0xc0511570
INFO:    BL2: Loading image id 26
INFO:    Loading image id=26 at address 0x2ffc0000
INFO:    Image id=26 loaded: 0x2ffc0000 - 0x2ffc3869
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01ece98
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffc5000
INFO:    SPSR = 0x1d3
ERROR:   fixedregulator@3 can not set any flag
WARNING: fixed_regulator_register:81 failed to register fixedregulator@3
NOTICE:  SP_MIN: v2.6-stm32mp1-r1.0(debug):v2.6-dirty
NOTICE:  SP_MIN: Built : 13:14:26, Nov 23 2021
INFO:    ARM GICv2 driver initialized
INFO:    Set calibration timer to 60 sec
INFO:    stm32mp1 IWDG1 is secure
INFO:    ETZPC: CRYP1 (9) could be non secure
INFO:    SP_MIN: Initializing runtime services
INFO:    SP_MIN: Preparing exit to normal world
 
 
U-Boot 2021.10-stm32mp-r1 (Oct 04 2021 - 15:09:26 +0000)
 
CPU: STM32MP157AAC Rev.Z
Model: STMicroelectronics STM32MP157A-DK1 STM32CubeMX board - openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
Board: stm32mp1 in trusted mode (st,stm32mp157a-tc1-is-mx)
DRAM:  INFO:    CPU 0 IT Watchdog 2
INFO:    CPU : 0
INFO:    sp_usr   : 0x0
INFO:    lr_usr   : 0x0
INFO:    spsr_irq : 0x0
INFO:    sp_irq   : 0x0
INFO:    lr_irq   : 0x0
INFO:    spsr_fiq : 0x0
INFO:    sp_fiq   : 0x0
INFO:    lr_fiq   : 0x0
INFO:    spsr_svc : 0x0
INFO:    sp_svc   : 0xc007fe40
INFO:    lr_svc   : 0xc0144fcd
INFO:    spsr_abt : 0x200001d7
INFO:    sp_abt   : 0xbadc0de
INFO:    lr_abt   : 0xc010018c
INFO:    spsr_und : 0x0
INFO:    sp_und   : 0x0
INFO:    lr_und   : 0x0
INFO:    spsr_mon : 0x200001d7
INFO:    sp_mon : 0x2ffd9e40
INFO:    lr_mon : 0xc0100184
INFO:    scr : 0x225
INFO:    pmcr : 0x41072000
 

13 REPLIES 13
jhi
Senior

@Community member​ any ideas why the probe fails?

PatrickD
ST Employee

no, my only idea was the security configuration

and it seens OK in you test with "DECPROT_NS_R_S_W"

we are using in the STMicroelectronic boards:

DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)

and it is enought...

are you sure that the the modified device tree is used in the BL31 SP-MIN on the board ?

I made several timer this error....

no other ideas.

Patrick

jhi
Senior

Yes I'm pretty sure, because this was also my original device tree. I did test it also with buildroot and had the same problem.

UVV
Associate II

Wow, I've spent several days debugging it, but this patch has just saved my week!

int dram_init(void)
{
#if 0
...
#else
    gd->ram_size = 0x40000000; /* hardcode your DDR size here */
#endif
 
    return 0;
}

FTR, I'm upgrading my U-Boot-2020.10-stm32mp-r2 (dunfell) to U-Boot 2021.10-stm32mp-r2 (kirkstone). Without it I was getting following error on DRAM init by u-boot:

ERROR:   Illegal access to 0xfdf65fb0:
ERROR:          FAIL_ID = 0x4a0
ERROR:          Non-Secure
ERROR:          Privilege
ERROR:          Read

Even though I've got etzpc configured as follows in my tf-a DTS:

DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_UNLOCK)

And memory firewall as default.

@Community member​ if you have any ideas how to fix that properly, that would be great. I could give a test run on my board if you have any suggestions to test.

Thanks,

Vyacheslav