AM625: How to boot by MMCSD (eMMC using UDA) boot mode

Part Number: AM625

Tool/software:

Hi TI Teams:

       Our custom boards, based on AM6254ATGFHIAMCRQ1, are equiqed with eMMC by the interface of MMC 0 and do not have SD card.  We want to boot from eMMC and use USB DFU to fixed the uboot and Linux Image to eMMC. So we will fix the boot mode switch where the Primary Boot Mode is selected to USB DFU and the Backup Mode is selected to MMCSD BOOT finally, according to the documents "AM62x Processors Silicon Revision 1.0-Texas Instruments Families of Products-Technical Reference Manual" .  So we test our idea on AM62x-SK-EVM board right now because it can change the boot mode.

       According to the reference manual, the primary mode of usb dfu will switch to backup mode MMCSD after 1 min without any dfu operations. It works well according to our tests.

       But the question is that the MMCSD boot mode (eMMC iusing UDA) as backup mode need to be fat filesystem mode. So we firstly test that the EVM board boot from primary mode of MMCSD (eMMC using UDA) mode, including Fs or RAW mode, now it does not work well. Our question is how to boot by primary MMCSD (eMMC using UDA) mode and with Filesystem mode.  

       The following is out test record, we use ti sdk 10 (ti-processor-sdk-linux-rt-am62xx-evm-10.00.07.04-Linux-x86-Install).

       1. The boot mode switch B15 ~ B0 is set to be "0000 0000 1100 1010", and using dfu-util to excute dfu uboot

 

$ sudo dfu-util -l
sudo dfu-util -l
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [0451:6165] ver=0200, devnum=109, cfg=1, intf=0, path="1-1", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=109, cfg=1, intf=0, path="1-1", alt=0, name="bootloader", serial="01.00.00.00"

$ sudo dfu-util -R -a bootloader -D tiboot3.bin
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download	[=========================] 100%       310782 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_IO)


$  sudo dfu-util -R -a tispl.bin -D tispl.bin
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%      1111383 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode

$  sudo dfu-util -R -a u-boot.img -D u-boot.img
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%      1011643 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode

        2. After DFU uboot, the board can excute u-boot, then we set the eMMC partitions on host pc by terminal serial. The log is shown as following.

 

U-Boot SPL 2024.04-dirty (Dec 18 2024 - 08:25:16 +0800)                                                 
SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')                                    
SPL initial stack usage: 13392 bytes                                                                    
Trying to boot from DFU                                                                                 
#######################################################DOWNLOAD ... OK                                  
Ctrl+C to exit ...                                                                                      
Authentication passed                                                                                   
Authentication passed                                                                                   
Authentication passed                                                                                   
Loading Environment from nowhere... OK                                                                  
init_env from device 10 not supported!                                                                  
Authentication passed                                                                                   
Authentication passed                                                                                   
Starting ATF on ARM64 core...                                                                           
                                                                                                        
NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty                                           
NOTICE:  BL31: Built : 16:09:05, Feb  9 2024                                                            
                                                                                                        
U-Boot SPL 2024.04-dirty (Dec 18 2024 - 08:25:40 +0800)                                                 
SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')                                    
SPL initial stack usage: 1904 bytes                                                                     
MMC: no card present                                                                                    
** Bad device specification mmc 1 **                                                                    
Couldn't find partition mmc 1:1                                                                         
Error: could not access storage.                                                                        
Trying to boot from DFU                                                                                 
####DOWNLOAD ... OK                                                                                     
Ctrl+C to exit ...                                                                                      
Authentication passed                                                                                   
Authentication passed                                                                                   
                                                                                                        
                                                                                                        
U-Boot 2024.04-dirty (Dec 18 2024 - 08:25:40 +0800)                                                     
                                                                                                        
SoC:   AM62X SR1.0 HS-FS                                                                                
Model: Texas Instruments AM625 SK                                                                       
EEPROM not available at 0x50, trying to read at 0x51                                                    
Reading on-board EEPROM at 0x51 failed -121                                                             
DRAM:  2 GiB                                                                                            
Core:  81 devices, 31 uclasses, devicetree: separate                                                    
MMC:   mmc@fa10000: 0, mmc@fa00000: 1                                                                   
Loading Environment from nowhere... OK                                                                  
In:    serial                                                                                           
Out:   serial                                                                                           
Err:   serial                                                                                           
EEPROM not available at 0x50, trying to read at 0x51                                                    
Net:   eth0: ethernet@8000000port@1                                                                     
Hit any key to stop autoboot:  0                                                                        
=> mmc erase 0 31080414                                                                                 
                                                                                                        
MMC erase: dev # 0, block # 0, count 822608916 ... 822608916 blocks erased: OK                          
=> mmc part                                                                                             
                                                                                                        
Partition Map for MMC device 0  --   Partition Type: EFI                                                
                                                                                                        
=> setenv uuid_gpt_disk d0d46e06-a5cd-4b8b-86a8-fde73e615209                                            
=> setenv uuid_gpt_boot 3933c871-f89a-4814-8ca8-6185f8a84ed2                                            
=> setenv uuid_gpt_rootfs 3833cc7a-73fe-4d04-b850-b01cb832fcbb                                          
=> setenv partitions "uuid_disk=${uuid_gpt_disk};name=boot,start=2MiB,size=128MiB,uuid=${uuid_gpt_boot}"
=> gpt write mmc 0 ${partitions}                                                                        
Writing GPT: success!                                                                                   
=> setenv mmcdev 0                                                                                      
=> setenv dfu_alt_info "boot part 0 1;rootfs part 0 2;MLO fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1"  
=> setenv bootpart 0                                                                                    
=> dfu 0 mmc 0 list                                                                                     
DFU alt settings list:                                                                                  
dev: eMMC alt: 0 name: boot layout: RAW_ADDR                                                            
dev: eMMC alt: 1 name: rootfs layout: RAW_ADDR                                                          
dev: eMMC alt: 2 name: MLO layout: FAT                                                                  
dev: eMMC alt: 3 name: u-boot.img layout: FAT                                                           
dev: eMMC alt: 4 name: uEnv.txt layout: FAT                                                             
=> ls mmc 0:1                                                                                           
=> ls mmc 0:2                                                                                           
=> dfu 0 mmc 0                                                                                          
generic_phy_get_bulk : no phys property                                                                 
=> mmc part                                                                                             
                                                                                                        
Partition Map for MMC device 0  --   Partition Type: EFI                                                
                                                                                                        
Part    Start LBA       End LBA         Name                                                            
        Attributes                                                                                      
        Type GUID                                                                                       
        Partition GUID                                                                                  
  1     0x00001000      0x00040fff      "boot"                                                          
        attrs:  0x0000000000000000                                                                      
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7                                                    
        guid:   3933c871-f89a-4814-8ca8-6185f8a84ed2                                                    
  2     0x00041000      0x00240fff      "rootfs"                                                        
        attrs:  0x0000000000000000                                                                      
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7                                                    
        guid:   3833cc7a-73fe-4d04-b850-b01cb832fcbb                                                    
=> mmc list                                                                                             
mmc@fa10000: 0 (eMMC)                                                                                   
mmc@fa00000: 1                                                                                          
=> dfu 0 mmc 0                                                                                          
generic_phy_get_bulk : no phys property                                                                 
##dfu: fs_set_blk_dev error!                                                                            
Deferred dfu_flush() failed!dfu - Device Firmware Upgrade                                               
                                                                                                        
Usage:                                                                                                  
dfu <USB_controller> [<interface> <dev>] [list]                                                         
  - device firmware upgrade via <USB_controller>                                                        
    on device <dev>, attached to interface                                                              
    <interface>                                                                                         
    [list] - list available alt settings                                                                
                                                                                                        
=> dfu 0 mmc 0                                                                                          
generic_phy_get_bulk : no phys property  

        3. After setting eMMC partitions, we download the tiboot3.bin, tispl.bin, u-boot.img to eMMC through the dfu-utils.

  

$ sudo dfu-util -a boot -D tiboot3.bin
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%       292202 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!

$udo dfu-util -a boot -D tispl.bin
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%      1102375 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!

$sudo dfu-util -a boot -D u-boot.img
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%       994723 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!

$sudo dfu-util -a rootfs -D tisdk-base.ext4
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%    536870912 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!

       The u-boot log of the board is shown ' download ok' and we set mmc settings of partconf and boot bus width as following shown.

##DOWNLOAD ... OK                                                                                       
Ctrl+C to exit ...                                                                                      
#####DOWNLOAD ... OK                                                   |                                
Ctrl+C to exit ...                                                                                      
####DOWNLOAD ... OK                                                                                     
Ctrl+C to exit ...                                                                                      
#######################################################################################################K
Ctrl+C to exit ...                                                                                      
=> mmc partconf 0 1 1 1                                                                                 
=> mmc partconf 0 1 7 1                                                                                 
=> mmc bootbus 0 2 0 0                                                                                  
Set to BOOT_BUS_WIDTH = 0x2, RESET = 0x0, BOOT_MODE = 0x0

       4. Then we reset the boot mode switch of B15 ~ B0 to MMCSD primary mode, "0000 0000 1100 0010"  or another try "0000 0000 1100 0011". The borad startup without any log outputing.

     We are in a hurry about this project, please reply as soon as possible.