This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: eMMC boot not working

Part Number: AM625


Hi TI Team,

We are facing booting issue in AM6254 module from eMMC device.

We have check boot mode in EVM board as well (Version E3) and observed that, eMMC boot is working if B7 bit set to 1. If we keep B7 bit to 0 then boot from eMMC does not work in EVM as well.

As per the table below from TRM, B7 is defined as reserved. In our design we have set B7 to 0 and B6:B3 [1001] to define alternate eMMC boot mode.

Can you please re-validate the TRM document and advise the setting of B7 bit weather it is needed to keep 1 by force instead reserved?

We have configured eMMC boot partition as per filesystem mode (FAT32).

Is there any other modification required in code if need to boot eMMC with keeping B7 to 0? Please advise.

  • Kalpesh, i'm not aware of this requirement on BOOTMODE 7.  I will have to ask the ROM team to investigate.

    Regards,

    James

  • kalpesh, i have confirmed with the ROM team that setting bootmode7 should not be necessary for eMMC boot mode (B6:3 = 1001b)

    You said that you are using filesystem mode, which means that you would be using "eMMC Boot using UDA" mode which is B6:3 = 1000b.  This does require setting bootmode7.  

    The eMMC boot mode (B6:3 = 1001b) uses the special eMMC boot partition, and this mode ignores bootmode7.

    Please double check which boot mode setting that is being used.

    Regards,

    James

  • Hi James,

    We are using (B6:3 = 1001b) boot mode setting only.

    We have validated below two test case in EVM as well with (B6:3 = 1001b). We still found dependency of boot mode setting on B7 bit.

    Test case:1 Boot Mode Setting (B6:3 = 1001b) and B7 set to 1. EVM is perfectly booting from eMMC. Boot from BOOT0 partition. Refer below image.

            

    Test case:2 Boot Mode Setting (B6:3 = 1001b) and B7 change to 0. eMMC stop booting. No any log is coming on console.

             

    If (B6:3 = 1001b) eMMC mode ignore the B7 then it should boot from eMMC in both above test case. We are not doing any other change apart from fliping B7 bit in above test cases. Please advise your view to address the issue further.

  • Ok, let me check with ROM team.

    James

  • We have configured eMMC boot partition as per filesystem mode (FAT32).

    Kalpesh, technically this is not supported.  The eMMC boot partition is only allow to be programmed in raw mode, not filesystem mode.  If you are using filesystem mode, you must use "eMMC boot using UDA" B6:3 = 1000b.  The UDA can be programmed in filesystem mode.

    Regards,

    James

  • Hi James,

    There is some understanding issues at our end. we did try to make filesystem mode earlier but somehow it does not set to filesystem mode. Sorry for confusion.

    We did cross check again : We have set boot0 partition as RAW only and we are able to boot from eMMC successfully. By setting it to VFAT filesystem we are not able to boot. (B6:3 = 1001b) kept same in both case.

    We did re-verified above two test cases (Mentioned in yesterday's comment) with keeping boot0 partition as RAW mode but still we must need to set B7 pin high. by setting B7 to 0 not able to boot even with RAW partition when boot mode setting is eMMC (B6:3 = 1001b) itself.

    We are validating on AM625x E3 EVM as of now. 

  • Hello Kalpesh,
    Thanks for your updated clarifications on your test case.
    I'm colleague of James, and mainly from SW side.
    As James mentioned earlier (also in TRM):
    - BOOTMODE[6:3] = 1001 => eMMC boot partition (raw): boot0 or boot1 depending on eMMC EXTCSD[179] setting
    - BOOTMODE[7] is NOT used by RBL to load the very first r5-sw from eMMC boot partition


    We've few questions on your test case:
    1/. any r5-sw boot log from test#1 (working case)?
    2/. any indication of r5-sw loaded by RBL from eMMC, and started running... in test#2?
    3/. what is r5-sw used? r5-spl from u-boot, r5-sbl from MCU+SDK, or something else?

    Best,
    -Hong

  • Hello Hong,

    Sorry for late reply.
    I am working with kalpesh from SW side.

    On EVM E3 board, we have impact of B7 (BOOT MODE 7) pin impact. And we have to set B7 pin HIGH (ON) for successful emmc boot even in emmc boot mode (1001b setting)

    We are using boot part BOOT0 for booting in RAW mode. It works fine when we set HIGH B7. 

    Below are the WORKING UBOOT Logs

    U-Boot SPL 2021.01-g3983bffabc (Dec 14 2022 - 11:53:21 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.5.3--v08.05.03 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was 
    also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was 
    also encrypted
    Loading Environment from MMC... OK
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.7(release):v2.7.0-359-g1309c6c805-dirty
    NOTICE:  BL31: Built : 11:48:12, Dec 14 2022
    I/TC: 
    I/TC: OP-TEE version: 3.19.0-15-gd6c5d0037 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.
    10))) #1 Wed Dec 14 11:52:03 UTC 2022 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: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.5.3--v08.05.03 (Chill Capybar')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2021.01-g3983bffabc (Dec 14 2022 - 11:52:19 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.5.3--v08.05.03 (Chill Capybar')
    Trying to boot from MMC1
    
    
    U-Boot 2021.01-g3983bffabc (Dec 14 2022 - 11:52:19 +0000)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Failed to load 'boot.scr'
    ** Unrecognized filesystem type **
    18608640 bytes read in 106 ms (167.4 MiB/s)
    55468 bytes read in 3 ms (17.6 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 000000008feef000, end 000000008fffffff ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 5.10.153-g3eee621d16 (oe-user@oe-host) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Archite
    cture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.201912
    09) #1 SMP PREEMPT Tue Dec 20 10:54:04 UTC 2022
    [    0.000000] Machine model: Texas Instruments AM625 SK
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled

    but when we set B7 to LOW, we got the following FAILED LOG: (We haven't change anything apart form B7 pin status)

    U-Boot SPL 2021.01-g3983bffabc (Dec 14 2022 - 11:53:21 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.5.3--v08.05.03 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat: error reading image tispl.bin, err - -1
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###
    


    We are using the pre-built image without any change. (As you can see on UBOOT log)

    So, our exercise shows that B7 has significant impact even on EMMC boot mode (1001b) which is contradict to TRM and your mention.

    Please guide us on the same.

    Thanks,

    Anil

  • Hello Anil,
    thanks for capuring the log files.
    Please review the FAQ for the workaound for the issue.
    e2e.ti.com/.../faq-a53-boot-binary-tispl-bin-loading-error-when-bootmode-7-0-in-emmc-boot-mode-on-am62x
    Best,
    -Hong

  • Thanks, Hong.

  • Hello Anil,
    Please keep us posted with your test with the WA.
    Best,
    -Hong

  • Hello Hong,

    Thanks. 

    Your patch is not working.

    However, I got the idea from it and make the following patch which is WORKING.

    Now, I am able to boot from EMMC in EMMC boot mode (1001b) irrespective of B7 pin status.
    Kindly review the patch.

    diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
    index 03572cf84e..ff429c148c 100644
    --- a/arch/arm/mach-k3/am625_init.c
    +++ b/arch/arm/mach-k3/am625_init.c
    @@ -245,10 +245,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
     
     	switch (boot_device) {
     	case BOOT_DEVICE_MMC1:
    -		if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >>
    -		     MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT)
    -			return MMCSD_MODE_EMMCBOOT;
    -		return MMCSD_MODE_FS;
    +		return MMCSD_MODE_EMMCBOOT;
     
     	case BOOT_DEVICE_MMC2:
     		return MMCSD_MODE_FS;
    

    Thanks,

    Anil Patel

  • Hello Anil,
    I'm attaching the two working eMMC boot logs I captured on AM62x-SK after applying the patch from the FAQ.
    I added "#define DEBUG" in "am625_init.c"
    - am62x_8.6_eMMC_CB.log: BOOTMODE[15:0]=00CB
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    - am62x_8.6_eMMC_4B.log: BOOTMODE[15:0]=004B
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0

    FYI: another user verified eMMC boot working on AM62A platform (similar issue).
    e2e.ti.com/.../4551419

    Best,
    -Hong

    �
    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:52 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    Trying to boot from MMC1
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... OK
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 05:06:58, Feb 24 2023
    
    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:46 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    am625_init: spl_boot_device: devstat = 0xcb bootmedia = 0x9 bootindex = 0
    Trying to boot from MMC1
    
    
    U-Boot 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:46 -0500)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E2
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  2  0 
    => 

    �
    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:52 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    Trying to boot from MMC1
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... OK
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 05:06:58, Feb 24 2023
    
    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:46 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    am625_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    Trying to boot from MMC1
    
    
    U-Boot 2021.01-00001-g45cb7e4-dirty (Mar 17 2023 - 14:05:46 -0500)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E2
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  2  0 
    =>