2025-04-29 6:34 AM
Hi,
We have a custom carrier board based on STM32MP157DAC. We have built a custom yocto image.
I was able to get a EMMC binaries by adding below line in my local.conf
STM32MP_DT_FILES_EMMC += "stm32mp157f-dk2"
I have also attached the modified flashlayout for EMMC.
I came across a post here saying if default pins are changes we will have to do otp for emmc to be detected.
below are the pins we are using:-
PB14 | SDMMC2_D0 |
PB15 | SDMMC2_D1 |
PB3 | SDMMC2_D2 |
PB4 | SDMMC2_D3 |
PA8 | SDMMC2_D4 |
PA15 | SDMMC2_D5 |
PC6 | SDMMC2_D6 |
PC7 | SDMMC2_D7 |
PE3 | SDMMC2_CLK |
PG6 | SDMMC2_CMD |
Do we need to do otp for these pins or what can be done for EMMC to be detected during dfu(0,0,0) mode for flashing to emmc.
below is my flash layout file for emmc:-
#Opt | Id | Name | Type | IP | Offset | Binary |
- | 0x01 | fsbl-boot | Binary | none | 0x0 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-usb.stm32 |
- | 0x03 | fip-boot | FIP | none | 0x0 | fip/fip-stm32mp157f-dk2-optee-emmc.bin |
P | 0x04 | fsbl1 | Binary | mmc1 | boot1 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-emmc.stm32 |
P | 0x05 | fsbl2 | Binary | mmc1 | boot2 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-emmc.stm32 |
P | 0x06 | metadata1 | FWU_MDATA | mmc1 | 0x00084000 | arm-trusted-firmware/metadata.bin |
P | 0x07 | metadata2 | FWU_MDATA | mmc1 | 0x00100000 | arm-trusted-firmware/metadata.bin |
P | 0x08 | fip-a | FIP | mmc1 | 0x00180000 | fip/fip-stm32mp157f-dk2-optee-emmc.bin |
PED | 0x09 | fip-b | FIP | mmc1 | 0x00580000 | none |
PED | 0x0A | u-boot-env | ENV | mmc1 | 0x00980000 | none |
P | 0x10 | bootfs | System | mmc1 | 0x00A00000 | st-image-bootfs-openstlinux-weston-stm32mp15-disco.ext4 |
P | 0x11 | vendorfs | FileSystem | mmc1 | 0x04A00000 | st-image-vendorfs-openstlinux-weston-stm32mp15-disco.ext4 |
P | 0x12 | rootfs | FileSystem | mmc1 | 0x05A00000 | st-image-qt-openstlinux-weston-stm32mp15-disco.ext4 |
Thanks.
Solved! Go to Solution.
2025-05-01 5:37 AM
Hi @PatrickF
I was able to generate patch files for the Linux kernel, U-Boot, and TF-A sources using the devtool command shown below:
devtool modify virtual/kernel
I followed the steps provided in the link below, which I found to be extremely helpful:
https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_Package
I'm sharing this here in case someone else encounters the same issue—this guide proved to be a valuable resource for me.
now I am trying to modify device tree files and try to flash emmc will let you know if i'm facing any issue or if it get resolved.
Thanks,
2025-05-01 11:05 PM
Hi @PatrickF
Below is the log i am getting while trying to update os image to emmc
Core: 368 devices, 44 uclasses, devicetree: board
WDT: Started watchdog with servicing (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
invalid MAC address 0 in OTP 00:00:00:00:00:00
Net:
Error: ethernet@5800a000 address not set.
No ethernet found.
Card did not respond to voltage select! : -110
No EFI system partition
Error: ethernet@5800a000 address not set.
Error: ethernet@5800a000 address not set.
Hit any key to stop autoboot: 0
Boot over usb0!
DFU alt info setting: done
dwc2-udc-otg usb-otg@49000000: Type-C won't probe (ret=-5)
#
UPLOAD ... done
Ctrl+C to exit ...
#
FlashLayout received, size = 695
DOWNLOAD ... OK
Ctrl+C to exit ...
#
UPLOAD ... done
Ctrl+C to exit ...
Card did not respond to voltage select! : -110
Error: mmc device 1 not found
DFU alt info setting: done
dwc2-udc-otg usb-otg@49000000: Type-C won't probe (ret=-5)
Reset requested
#
UPLOAD ... done
Ctrl+C to exit ...
I have attached my patches please have a look
2025-05-02 2:23 AM
Hi @PatrickF ,
2025-05-02 4:54 AM
Hi @PatrickF
We are using EMMC04G-MT32-FBGA153 EMMC .
I had seen in few posts that certain EMMC's are not supported.
I wanted to know if our EMMC device is compatible with the STM32MP157DAC som.
Thanks
2025-05-05 3:41 AM
Hi,
I was able to resolve this issue and the device to boot using EMMC By changing the MMC_DEFAULT_MAX_RETRIES in TFA_source/driver/mmc/mmc.c file from 5 to 10.
Below is the link to my other post where I was able to resolve it.
https://community.st.com/t5/stm32-mpus-embedded-software-and/not-able-to-boot-from-emmc-on-stm32mp157dac-panic-at-pc/m-p/799044#M4744
Thanks.