Skip to main content
M.Assuncao
Associate II
June 1, 2023
Question

what do I need to adapt for the stm32mp157f-ev1 device tree to work for the stm32mp151 SoC?

  • June 1, 2023
  • 3 replies
  • 4174 views

Since stm32mp157 node descriptions are inherited from stm32mp153 and stm32mp151.

This topic has been closed for replies.

3 replies

Erwan SZYMANSKI
Technical Moderator
June 2, 2023

Hello @Matheus Assunção​ ,

As you well said, stm32mp157 SoC device tree inherit from stm32mp153, then on stm32mp151.

Why ? Because the very base SoC is the stm32mp151. Other ones are just adding features based on this first SoC.

So for you, how to process ?

Your board level device tree will just target directly the SoC you have. If your custom board have a stm32mp151 SoC, you will include directly stm32mp151.dtsi, because you will not need properties of the 2 upper level SoC device tree.

I hope this information will help you to go forward.

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.
M.Assuncao
Associate II
June 2, 2023

Hello @Erwan SZYMANSKI​ , thanks for your response!

My custom board can use SoC stm32mp157 or stm32mp151, to create the custom device tree I used stm32mp157f-ev1 as a base. My custom board using the SoC stm32mp157 worked correctly, however using the stm32mp151, it did not work. Note: When using device tree for stm32mp151, removed CAN, DSI, GPU, CPU1 related nodes. The same was done in the TFA code.

Below is a demonstration of initializing stm32mp157 and then stm32mp151.

NOTICE: CPU: STM32MP157FAC Rev.Z

NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board

INFO: PMIC version = 0x21

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

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-DDR3L 16bits 533000kHz

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 - 0xc051c668

INFO: BL2: Loading image id 26

INFO: Loading image id=26 at address 0x2ffc0000

INFO: Image id=26 loaded: 0x2ffc0000 - 0x2ffc4612

INFO: BL2: Loading image id 5

INFO: Loading image id=5 at address 0xc0100000

INFO: Image id=5 loaded: 0xc0100000 - 0xc01e8888

NOTICE: BL2: Booting BL32

INFO: Entry point address = 0x2ffc5000

INFO: SPSR = 0x1d3

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: SP_MIN: Initializing runtime services

INFO: SP_MIN: Preparing exit to normal world

U-Boot 2021.10-stm32mp-r2-00014-g3becdd498f (Mar 01 2023 - 17:29:27 -0400)

----------------------------------------------------------------------------------------------------------

NOTICE: CPU: STM32MP151CAC Rev.Z

NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board

INFO: PMIC version = 0x21

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

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-DDR3L 16bits 533000kHz

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 - 0xc051c668

INFO: BL2: Loading image id 26

INFO: Loading image id=26 at address 0x2ffc0000

INFO: Image id=26 loaded: 0x2ffc0000 - 0x2ffc4612

INFO: BL2: Loading image id 5

INFO: Loading image id=5 at address 0xc0100000

INFO: Image id=5 loaded: 0xc0100000 - 0xc01e8888

NOTICE: BL2: Booting BL32

INFO: Entry point address = 0x2ffc5000

INFO: SPSR = 0x1d3

PANIC at PC : 0x2ffc9929

Exception mode=0x00000016 at: 0x2ffc9929

PatrickF
Technical Moderator
June 2, 2023

Hi @Matheus Assunção​ 

Is your 2nd board DDR ok ?

Maybe try to use MP151 image on a working MP157 board (not tested on my side, I guess it should work).

Maybe something in your DT somewhere regarding the presence of 2nd Cortex-A7 core (single core on MP151).

Regards.

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.NEW ! Sidekick STM32 AI agent, see here
M.Assuncao
Associate II
June 2, 2023

Hi @PatrickF​ , thanks for your response!

Yes, the device tree for the single core SoC (MP151) worked for the dual core SoC (MP157). It is also possible to verify that the cpu core 1 is disabled through the "/sys/devices/system/cpu/" directory. In the device tree I disabled all the features added in the MP153 and MP157 but it still didn't work for MP151.

Erwan SZYMANSKI
Technical Moderator
June 5, 2023

Hello @Matheus Assunção​ ,

Do you think you can share the device tree used for TF-A compilation in attachment ?

Just to well understand the context, you made a custom board with a stm32mp151 SoC, and you are also trying your custom device tree with a stm32mp157f-ev1 (in a test context) that is a native ST board right ?

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.
PatrickF
Technical Moderator
June 5, 2023

Maybe you have an HW issue on your board with MP151 (bad solder join somewhere which make DDR not working). Maybe look at DDRFW-UTIL to confirm.

Regards.

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.NEW ! Sidekick STM32 AI agent, see here