cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 boot from EMMC

bimorqt
Associate III

Hello everyone,

I have a custom board based on STM32MP157A (rev. Z) and I am trying to boot from emmc; I am able to boot sucessfully from SD card; I flashed the same image to the emmc with the ST MX Cube Programmer and, if get into u-boot from SD card, I am able to inspect the partitions and information of the emmc (see below), but whenever I set the boot pins to 010 I get no messages on the serial UART, while the emmc seems to be powered.

STM32MP> mmc list
STM32 SD/MMC: 0 (SD)
STM32 SD/MMC: 1 (eMMC)
STM32MP> mmc info
Device: STM32 SD/MMC
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
STM32MP> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
STM32MP> mmc info
Device: STM32 SD/MMC
Manufacturer ID: 45
OEM: 100
Name: DG400
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
STM32MP> mmc part
 
Partition Map for MMC device 1  --   Partition Type: EFI
 
Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000400      0x000007ff      "metadata1"
        attrs:  0x0000000000000000
        type:   8da63339-0007-60c0-c436-083ac8230908
        guid:   1d916f8f-dbf8-4dd4-b00b-03114253c37c
  2     0x00000800      0x00000bff      "metadata2"
        attrs:  0x0000000000000000
        type:   8da63339-0007-60c0-c436-083ac8230908
        guid:   4c35e57c-2ad5-4793-b393-2647bf924f3e
  3     0x00000c00      0x00002bff      "fip-a"
        attrs:  0x0000000000000000
        type:   19d5df83-11b0-457b-be2c-7559c13142a5
        guid:   4fd84c93-54ef-463f-a7ef-ae25ff887087
  4     0x00002c00      0x00004bff      "fip-b"
        attrs:  0x0000000000000000
        type:   19d5df83-11b0-457b-be2c-7559c13142a5
        guid:   09c54952-d5bf-45af-acee-335303766fb3
  5     0x00004c00      0x00004fff      "u-boot-env"
        attrs:  0x0000000000000000
        type:   8da63339-0007-60c0-c436-083ac8230908
        guid:   5a80ceb4-38b5-4bfc-96fa-42d15ece1f4c
  6     0x00005000      0x00024fff      "bootfs"
        attrs:  0x0000000000000004
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   d6a61178-d356-43d5-8f44-54504dd57cc0
  7     0x00025000      0x0002cfff      "vendorfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   6c954dc8-9c2b-4526-b7a0-4bf13941fd2e
  8     0x0002d000      0x0019cfff      "rootfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   491f6117-415d-4f53-88c9-6e0de54deac6
  9     0x0019d000      0x00e90a7f      "userfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   98857284-f810-4c4c-a986-8d12250746e9

Moreover, I tried to force the boot over mmc1 from u-boot and the GUID matches the one above; my suspsect is that I am missing something in the <my-board>-u-boot-mx.dtsi file. Can you confirm this?

STM32MP> setenv boot_prefixes /mmc1_
STM32MP> setenv boot_devnum 1
STM32MP> setenv boot_instance 1
STM32MP> run bootcmd_mmc1
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:6...
Found /mmc1_extlinux/extlinux.conf
Retrieving file: /mmc1_extlinux/extlinux.conf
291 bytes read in 86 ms (2.9 KiB/s)
Retrieving file: /splash_landscape.bmp
Failed to load '/splash_landscape.bmp'
There is no valid bmp file at the given address
1:      OpenSTLinux
Retrieving file: /st-image-resize-initrd
29791031 bytes read in 731 ms (38.9 MiB/s)
Retrieving file: /uImage
7880688 bytes read in 259 ms (29 MiB/s)
append: root=PARTUUID=491f6117-415d-4f53-88c9-6e0de54deac6 rootwait rw   console=ttySTM0,115200

1 ACCEPTED SOLUTION

Accepted Solutions
bimorqt
Associate III

We went through an HW revision and we found out the boot switch resistors were wrong. After fixing this, the boot from emmc worked flawlessly. Topic closed!

View solution in original post

1 REPLY 1
bimorqt
Associate III

We went through an HW revision and we found out the boot switch resistors were wrong. After fixing this, the boot from emmc worked flawlessly. Topic closed!