cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP133D optee issue.

ritoseo
Associate

Hello.

I am on porting STM32MP135F-DK Discovery Board source to STM32MP133D based customizing board.

With bitbake build, the firmwares work well with STM32MP135F-DK.

But with our developing board, it stuck on BL2 boot with panic.

 

The main difference is like below.

1. PMIC is connected to i2c5 not i2c4

2. DDR ram size is changed from 512MB to 256MB

3. There is no display controller. (LCD).

4. SDCard is changed to eMMC.

 

I changed tf-a-stm32mp/fdts/stm32mp135f-dk.dts file to match difference.

And followed the instruction of the link below.

https://wiki.st.com/stm32mpu/wiki/How_to_configure_a_256MB_DDR_mapping_from_STM32_MPU_Distribution_Package#Purpose_of_article

 

When I build after some changes, build commands are like below.

bitbake -C compile tf-a-stm32mp optee-os-stm32mp

bitbake tf-a-stm32mp optee-os-stm32mp -c deploy

 

I used STM32CubeProgrammer to download the firmware.

Boot log was like below.

 

NOTICE: CPU: STM32MP133D Rev.Y
NOTICE: Model: STMicroelectronics STM32MP135F-DK Discovery Board
INFO: PMIC version = 0x21
INFO: Reset reason (0x35):
INFO: Power-on Reset (rst_por)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe0000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.8-stm32mp1-r1.0(debug):devtool-patched-dirty(f5c908b6)
NOTICE: BL2: Built : 10:17:58, Jan 17 2024
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-1066 bin F 1x2Gb 933MHz v1.0
INFO: Memory size = 0x10000000 (256 MB)
INFO: DFU USB START...
INFO: handle USB : Suspend int
INFO: USB Suspend mode
INFO: handle USB : Reset
INFO: phase ID :3, Manifestation 0 at c7174666
INFO: Send detach request
INFO: Receive DFU Detach
INFO: DFU USB STOP...
INFO: BL2: Loading image id 1
INFO: Loading image id=1 at address 0x30006000
INFO: Image id=1 loaded: 0x30006000 - 0x30006236
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x30006000
INFO: FCONF: Reading firmware configuration information for: mce_config
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 0xce000000
INFO: Image id=4 loaded: 0xce000000 - 0xce00001c
INFO: OPTEE ep=0xce000000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x0
INFO: flags=0x0
INFO: nb_images=0x1
INFO: BL2: Loading image id 8
INFO: Loading image id=8 at address 0xce000000
INFO: Image id=8 loaded: 0xce000000 - 0xce07c390
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0xc0400000
INFO: Image id=2 loaded: 0xc0400000 - 0xc040f8f0
INFO: BL2: Skip loading image id 16
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0000000
INFO: Image id=5 loaded: 0xc0000000 - 0xc00e866c
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0xce000000
INFO: SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Embedded DTB found
I/TC: OP-TEE version: devtool-patched-dev (gcc version 12.2.0 (GCC)) #14 Tue Jan 23 02:26:49 UTC 2024 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: WARNING: All debug access are allowed
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32-adc-core
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts
I/TC: DTB enables console (non-secure)
E/TC:0 0 call_initcalls:43 Initcall __text_start + 0x00073e4c failed
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:533 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 probe_dt_drivers:751 Probe sequence result: 0x80000000
E/TC:0 0 Panic at /usr/src/debug/optee-os-stm32mp/3.19.0-stm32mp-r1-r0/core/kernel/dt_driver.c:755 <probe_dt_drivers>
E/TC:0 0 TEE load address @ 0xce000000
E/TC:0 0 Call stack:
E/TC:0 0 0xce0030f9
E/TC:0 0 0xce019af3
E/TC:0 0 0xce0188dd
E/TC:0 0 0xce01a7e1
E/TC:0 0 0xce002fbb
E/TC:0 0 0xce00019c

 

STM32CubeProgrammer's screenshot is like below.

capture.JPG

 

Would you give an advise?

Thanks for reading.

 

 

 

 

 

 

 

2 REPLIES 2
ritoseo
Associate

I compared with STM32MP135F-DK  board.

STM32MP135F-DK uses i2c4 to control pmic.

And the success log is like below.

 

I/TC: OP-TEE version: devtool-patched-dev (gcc version 12.2.0 (GCC)) #28 Tue Jan 23 02:26:49 UTC 2024 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: WARNING: All debug access are allowed
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : fixed-regulator
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : fixed-regulator
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : simple-bus
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-etzpc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_gpio
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-tamp
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-tzc400
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-rtc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-exti
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-regu
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp13_rcc_mco
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_rstctrl
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-pka64
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-saes
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-ltdc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-iwdg
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_rng
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-hash
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-lptimer
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-timer
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_i2c
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_pmic
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-adc-core
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-adc
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts
I/TC: DTB enables console (non-secure)
I/TC: Primary CPU switching to normal world boot
optee optee: OP-TEE: revision 3.19 (ef87fb82)

 

But our custom board's log is like below.

I/TC: Embedded DTB found
I/TC: OP-TEE version: devtool-patched-dev (gcc version 12.2.0 (GCC)) #30 Tue Jan 23 02:26:49 UTC 2024 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: WARNING: All debug access are allowed
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : fixed-regulator
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : fixed-regulator
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : simple-bus
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-etzpc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_gpio
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-tamp
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-tzc400
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-rtc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-exti
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-regu
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp13_rcc_mco
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_rstctrl
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32mp1-pwr-irq-user
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-pka64
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-saes
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-ltdc
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-iwdg
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32_rng
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-hash
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-lptimer
E/TC:0 0 process_probe_list:530 Probe SUCCESS At : stm32-timer
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32-adc-core
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts
I/TC: DTB enables console (non-secure)
E/TC:0 0 call_initcalls:43 Initcall __text_start + 0x00073e64 failed
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32-adc-core
E/TC:0 0 process_probe_list:534 Probe DEFERED At : stm32mp1-cpu-opp
E/TC:0 0 probe_dt_drivers:752 Probe sequence result: 0x80000000
E/TC:0 0 Panic at /usr/src/debug/optee-os-stm32mp/3.19.0-stm32mp-r1-r0/core/kernel/dt_driver.c:756 <probe_dt_drivers>
E/TC:0 0 TEE load address @ 0xce000000
E/TC:0 0 Call stack:
E/TC:0 0 0xce0030f9
E/TC:0 0 0xce019b13
E/TC:0 0 0xce0188fd
E/TC:0 0 0xce01a801
E/TC:0 0 0xce002fbb
E/TC:0 0 0xce00019c

 

The main difference is i2c4 and i2c5.

OPTEE doesn't probe i2c5 and pmic looks doesn't work.

Why isn't i2c5 probing happening?

 

Thanks for reading.

 

Hi @ritoseo ,

I'm having a similar issue, but with switching to i2c-3 instead of i2c-5. Did you made any progress?

 

Best regards

Ruben