[PATCH 0/5] stm32mp2: Add SPI flashes support
Patrice CHOTARD
patrice.chotard at foss.st.com
Wed Aug 13 10:53:25 CEST 2025
On 8/8/25 17:24, Marek Vasut wrote:
> On 8/8/25 5:11 PM, Patrice Chotard wrote:
>> This series introduces 2 new drivers:
>> _ STM32 Octo Memory Manager driver
>> _ STM32 OSPI driver
>>
>> It adds resource check helpers which are used by OMM driver.
>> It adds and enables OMM and OSPI driver support for stm32mp257f-ev1 board
> Can I test this with mainline TFA and mainline OpTee-OS ?
Hi Marek
Currently, it misses regulator support in OPTEE.
But you can enable "manually" VDDIO3 and VDDIO4 in U-Boot console
by using the following mw command:
mw 44210000 300
There is also a dependency with this series https://patchwork.ozlabs.org/project/uboot/list/?series=468436
you must applied first.
Here is a boot log on stm32mp257f-ev1 board :
NOTICE: CPU: STM32MP257FAI Rev.Y
NOTICE: Model: STMicroelectronics STM32MP257F-EV1 Evaluation Board
NOTICE: Board: MB1936 Var1.0 Rev.D-01
INFO: Reset reason: System reset (SYSRST) (0x2074)
INFO: PMIC2 version = 0x11
INFO: PMIC2 product ID = 0x20
INFO: FCONF: Reading TB_FW firmware configuration file from: 0xe011000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.13.0(debug):v2.13.0-304-g000fe221b8
NOTICE: BL2: Built : 15:57:18, Jul 11 2025
INFO: BL2: Loading image id 26
INFO: Loading image id=26 at address 0xe040000
INFO: Image id=26 loaded: 0xe040000 - 0xe047524
INFO: BL2: Doing platform setup
INFO: RAM: DDR4 2x16Gbits 2x16bits 1200MHz
INFO: Memory size = 0x100000000 (4096 MB)
INFO: BL2: Loading image id 1
INFO: Loading image id=1 at address 0xe000000
INFO: Image id=1 loaded: 0xe000000 - 0xe00020c
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0xe000000
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: BL2: Loading image id 3
INFO: Loading image id=3 at address 0xe000000
INFO: Image id=3 loaded: 0xe000000 - 0xe00f44e
INFO: BL2: Loading image id 19
INFO: Loading image id=19 at address 0x81ff0000
INFO: Image id=19 loaded: 0x81ff0000 - 0x81ff2fb9
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x82000000
INFO: Image id=4 loaded: 0x82000000 - 0x8200001c
INFO: OPTEE ep=0x82000000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x1
INFO: flags=0x0
INFO: nb_images=0x1
INFO: BL2: Loading image id 8
INFO: Loading image id=8 at address 0x82000000
INFO: Image id=8 loaded: 0x82000000 - 0x82095980
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0x84400000
INFO: Image id=2 loaded: 0x84400000 - 0x8440cef8
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0x84000000
INFO: Image id=5 loaded: 0x84000000 - 0x840faa48
NOTICE: BL2: Booting BL31
INFO: Entry point address = 0xe000000
INFO: SPSR = 0x3cd
INFO: ARM GICv2 driver initialized
NOTICE: BL31: v2.13.0(debug):v2.13.0-304-g000fe221b8
NOTICE: BL31: Built : 15:57:18, Jul 11 2025
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC: Early console on UART#2
I/TC:
I/TC: Embedded DTB found
I/TC: OP-TEE version: 4.7.0-26-g847ee2932 (gcc version 14.3.0 (GCC)) #1 Fri Jul 18 13:59:24 UTC 2025 aarch64
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: Platform stm32mp2: flavor 257F_EV1 - DT stm32mp257f-ev1.dts
I/TC: DTB enables console
[ 0.000000] SCP-firmware v2.16.0-95-gea048ebd
[ 0.000000]
[ 0.000000] [FWK] Module initialization complete!
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x84000000
INFO: SPSR = 0x3c5
I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are enabled
U-Boot 2025.10-rc2-00007-g488461f36e40 (Aug 13 2025 - 10:47:54 +0200)
I/TC: WARNING (insecure configuration): Failed to get monotonic counter for REE FS, using 0
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
optee optee: PTA_BSEC invoke failed TEE err: ffff0006, err:0
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
optee optee: PTA_BSEC invoke failed TEE err: ffff0006, err:0
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
optee optee: PTA_BSEC invoke failed TEE err: ffff0006, err:0
CPU: STM32MP25??XX Rev.?
Model: STMicroelectronics STM32MP257F-EV1 Evaluation Board
Board: stm32mp2 (st,stm32mp257f-ev1)
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
optee optee: PTA_BSEC invoke failed TEE err: ffff0006, err:0
DRAM: 4 GiB
optee optee: OP-TEE: revision 4.7 (847ee2932c85f07e)
I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are enabled
Core: 330 devices, 27 uclasses, devicetree: board
smcwd watchdog: Init failed -5
MMC: STM32 SD/MMC: 0
Loading Environment from MMC... Reading from MMC(0)... OK
In: serial at 400e0000
Out: serial at 400e0000
Err: serial at 400e0000
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
E/LD: init_elf:493 sys_open_ta_bin(94cf71ad-80e6-40b5-a7c6-3dc501eb2803)
E/TC:? 0 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0009
optee optee: PTA_BSEC invoke failed TEE err: ffff0006, err:0
Hit any key to stop autoboot: 0
STM32MP>
STM32MP>
STM32MP>
STM32MP>
STM32MP>
STM32MP> mw 44210000 300
STM32MP> mtd list
SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, total 64 MiB
List of MTD devices:
* nor0
- device: flash at 0
- parent: spi at 0
- driver: jedec_spi_nor
- path: /soc at 0/ommanager at 40500000/spi at 0/flash at 0
- type: NOR flash
- block size: 0x10000 bytes
- min I/O: 0x1 bytes
- 0x000000000000-0x000004000000 : "nor0"
- 0x000000000000-0x000000040000 : "fsbla1"
- 0x000000040000-0x000000080000 : "fsbla2"
- 0x000000080000-0x0000000c0000 : "metadata1"
- 0x0000000c0000-0x000000100000 : "metadata2"
- 0x000000100000-0x000000500000 : "fip-a"
- 0x000000500000-0x000000900000 : "fip-b"
- 0x000000900000-0x000000980000 : "u-boot-env"
- 0x000000980000-0x000004000000 : "nor-user"
STM32MP>
Patrice
More information about the U-Boot
mailing list