cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135 ST PMIC Driver panic

efancier
Associate II

We designed a STM32MP135 based SOM, without using the ST I2C PMIC,  I was able to disable the PMIC driver in TF-A by removing the i2c 4 node in TF-A's dts file, while I could not get the same result for optee-os,  even I removed the i2c-4 node in optee-os' dts file, I still got message saying panic, following is the full log:

 

NOTICE: CPU: STM32MP135D Rev.Y
NOTICE: Model: STMicroelectronics STM32MP135F-DK Discovery Board
WARNING: VDD unknown
INFO: Reset reason (0x4):
INFO: Pad Reset from NRST
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe0000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):2021.05-5963-ga40218f3c9(a40218f3)
NOTICE: BL2: Built : 09:55:01, Jul 5 2023
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-1066 bin F 1x4Gb 533MHz v1.53
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2: Loading image id 1
INFO: Loading image id=1 at address 0x30006000
INFO: Image id=1 loaded: 0x30006000 - 0x30006246
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 0xde200000
INFO: Image id=4 loaded: 0xde200000 - 0xde20001c
INFO: OPTEE ep=0xde200000
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 0xde200000
INFO: Image id=8 loaded: 0xde200000 - 0xde27e250
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0xc0400000
INFO: Image id=2 loaded: 0xc0400000 - 0xc040f750
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 - 0xc00e4444
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0xde200000
INFO: SPSR = 0x1d3
E/TC:0 0 Panic at core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c:218 <initialize_pmic_i2c>
E/TC:0 0 TEE load address @ 0xde200000
E/TC:0 0 Call stack:
E/TC:0 0 0xde203f19
E/TC:0 0 0xde21da13
E/TC:0 0 0xde20910f
E/TC:0 0 0xde21c4b3
E/TC:0 0 0xde21c57d
E/TC:0 0 0xde21cd03
E/TC:0 0 0xde21e6f9
E/TC:0 0 0xde203dff
E/TC:0 0 0xde200198

Any one have suggestion on this?

 

22 REPLIES 22
Macdog
Associate III

You will most likely need to take STMicro's OPTEE reference software and make some changes.    It may be possible to remove the power management features using a build configuration flag, but it may require some code changes as well.   I ran into a similar issue when removing secure storage support from OPTEE.     Looking at this file for the version you are using might help with some configurations to search for.

core/arch/arm/plat-stm32mp1/conf.mk

 

lebeer
Associate II

Hello, Mr. efancier, I have the same problem as you, the same panic. Have you modified it now? Ask for your advice

lebeer
Associate II

NOTICE: CPU: STM32MP135F 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.6-stm32mp1-r2.0(debug):()
NOTICE: BL2: Built : 05:53:17, Jul 6 2023
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000kHz
DDR expected freq 533000 kHz, current is 533000 kHz
INFO: Memory size = 0x40000000 (1024 MB)
INFO: DFU USB START...
INFO: handle USB : Suspend int
INFO: USB Suspend mode
INFO: handle USB : Reset
INFO: handle USB : Reset
INFO: handle USB : Reset
INFO: handle USB : Reset
INFO: handle USB : Reset
INFO: phase ID :3, Manifestation 0 at c716c4fe
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 - 0x30006246
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 0xfe200000
INFO: Image id=4 loaded: 0xfe200000 - 0xfe20001c
INFO: OPTEE ep=0xfe200000
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 0xfe200000
INFO: Image id=8 loaded: 0xfe200000 - 0xfe2792e8
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0xc0400000
INFO: Image id=2 loaded: 0xc0400000 - 0xc040e958
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 - 0xc00e4534
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0xfe200000
INFO: SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Non-secure external DT found
I/TC: Embedded DTB found
I/TC: OP-TEE version: Unknown_3.16 (gcc version 11.3.0 (GCC)) #75 Thu Jul 6 05:57:21 UTC 2023 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 Panic at core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c:218 <initialize_pmic_i2c>
E/TC:0 0 TEE load address @ 0xfe200000
E/TC:0 0 Call stack:
E/TC:0 0 0xfe203cd5
E/TC:0 0 0xfe21bced
E/TC:0 0 0xfe208cdb
E/TC:0 0 0xfe21a8d3
E/TC:0 0 0xfe21a99d
E/TC:0 0 0xfe21b093
E/TC:0 0 0xfe21c8b5
E/TC:0 0 0xfe203b17
E/TC:0 0 0xfe200198

Dear Mr. Macdog, following your prompt, I found the conf.mk file and modified it to add my own device tree. My board uses STPMIC1D, and I still have the same problem as this post.

lebeer
Associate II

I hope the great God in the forum can help me, point out my mistakes or need to be modified, thank you!!

Thank you, Macdog !    seems not only the conf.mk file, but also the device tree need to be updated

Hi lebeer, I am still working on it, will let you know if there's any progress.

Hello @lebeer@efancier ,
Did you manage to solve your issue ? If not let me know it ASAP to solve it together.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Erwan SZYMANSKI , Hi Erwan, thank you for asking, unfortunately the problem still exists.