2026-01-27 6:24 PM
Hi ST community,
We are bringing up a brand-new custom board based on STM32MP131C (Rev.Y) and are facing an issue while flashing SPI-NAND over USB DFU.
TF-A (BL2/BL31) boots correctly
OP-TEE OS boots and hands off to normal world
U-Boot starts normally and detects SPI-NAND
So the full boot chain up to U-Boot looks healthy.
Part: GigaDevice GD5F4GM8UExxG
Size: 512 MiB
Block size: 128 KiB
Page size: 2048
OOB: 128
Detected correctly by U-Boot.
When flashing over USB DFU from U-Boot, erase/write operations fail due to many bad blocks at very low addresses, including block 0.
Example output:
Marking bad block at 0x00000000 (-5)
Skipping bad block at 0x00020000
Skipping bad block at 0x00040000
Skipping bad block at 0x00060000
Limit reached 0x80000 while erasing at offset 0x80000
Error: DFU write error
Because of this, DFU flashing fails consistently.
Are there specific U-Boot or TF-A configurations recommended for SPI-NAND on STM32MP13?
Please find the attached patches which all for the spi-nand configuration done in the yocto (scarthgap).
TF-A: v2.10-stm32mp1-r2.0
OP-TEE: 4.0.0-dev
U-Boot: 2023.10-stm32mp-r.
Please do let me know if you need more information.
Thanks & Regards
Ganesh.K
2026-01-27 6:29 PM