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.

TDA4VM: Boot through MMC Port 0

Part Number: TDA4VM

Tool/software:

I have connected an eMMC to MMC0 in my custom TDA4VM board.

I noticed in U-Boot device tree that MMC0 is not there. 

What are all the changes I have to do to boot through MMC port0?

Note: I am using SDK 9.2. I can able to get mmc0 in linux kernel with few kerenel device tree modifications.

  • Sathiya,

    I see the sdhci0 node that corresponds to MMC0 aka eMMC. What is your question? Can you elaborate what you mean by MMC0 is not there?

    - Keerthy

  • Hi Keerthy,

    Can you check k3-j721e-sk.dts and k3-j721e-sk-u-boot.dtsi?

    There it is mentioned status = "disabled"

  • Sathiya,

    That is because the SK board does not have the eMMC. It only has the SD card slot.

    EVM on the other hand has the eMMC. So if your custom board has the eMMC you can set status = "okay";

    - Keerthy

  • Hi Keerthy,

    Here are the changes I made in dts files related to mmc0:

    diff --git a/arch/arm/dts/k3-j721e-sk.dts b/arch/arm/dts/k3-j721e-sk.dts
    index 34b762cd0e..38a3523eb0 100644
    --- a/arch/arm/dts/k3-j721e-sk.dts
    +++ b/arch/arm/dts/k3-j721e-sk.dts
     &main_sdhci0 {
    -       /* Unused */
    -       status = "disabled";
    +       /* eMMC */
    +       non-removable;
    +       ti,driver-strength-ohm = <50>;
    +       disable-wp;
     };
     
    diff --git a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
    index 9731094af2..082fd7bdd5 100644
    --- a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
    @@ -27,6 +27,7 @@
                    i2c0 = &wkup_i2c0;
                    i2c1 = &mcu_i2c0;
                    i2c2 = &main_i2c0;
    +               mmc0 = &main_sdhci0;  /* eMMC */
                    mmc1 = &main_sdhci1;  /* SD Card */
            };
     };
    @@ -122,7 +123,7 @@
     };
     
     &main_sdhci0 {
    -       status = "disabled";
    +       bootph-pre-ram;
     };
     
     &main_sdhci1 {

    And here is the u-boot log:

    U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    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 nowhere... OK
    init_env from device 17 not supported!
    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
    I/TC:
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 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: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    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 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC1
    MMC Device 0 not found
    spl: could not find mmc device 0. error: -19
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    So anywhere else I need to define mmc0?

  • Hi Sathiya,

    Do you still have the sd card connected? 

    Still shows trying to boot from mmc1.

    Also have you changed the dip switch settings to eMMC,? Or still in sd card mode? 

    Regards, 

    Keerthy 

  • Hi Keerthy,

    SD Card is not connected.

    If SD Card is there, then it will show boot from mmc2

    I changed the bootmode pins to MMC Port 0. Pls refer TRM of TDA4VM for bootmode pins.

    Here is my settings.

    MCU_BOOTMODE [9:0] = 00 0000 0000
    SYS_BOOTMODE [7:0] = 0100 1011

  • Hi Sathiya,

    Share the ones coming with SD card and the one without.

    - Keerthy

  • Hi keerthy,

    Here is the U-Boot log for the one without SD card.

    U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    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 nowhere... OK
    init_env from device 17 not supported!
    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
    I/TC:
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 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: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    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 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC1
    MMC Device 0 not found
    spl: could not find mmc device 0. error: -19
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Here is the one with SD card.

    U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC2
    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 nowhere... OK
    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
    I/TC:
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 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: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    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 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Trying to boot from MMC2
    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
     
     
    U-Boot 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
     
    SoC:   J721E SR1.1 GP
    Model: Texas Instruments J721E SK A72
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Board: J721EX-PM1-SOM rev E2
    DRAM:  2 GiB (effective 4 GiB)
    Core:  96 devices, 34 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Net:   eth0: ethernet@46000000port@1
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    1493 bytes read in 21 ms (69.3 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    Running uenvcmd ...
    1 bytes read in 21 ms (0 Bytes/s)
    Already setup.
    GPIO: 'gpio@22_17' not found
    Command 'gpio' failed: Error -22
    GPIO: 'gpio@22_16' not found
    Command 'gpio' failed: Error -22
    k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work
    Failed to load '/lib/firmware/j7-mcu-r5f0_1-fw'
    450240 bytes read in 33 ms (13 MiB/s)
    Load Remote Processor 2 with data@addr=0x82000000 450240 bytes: Success!
    322804 bytes read in 31 ms (9.9 MiB/s)
    Load Remote Processor 3 with data@addr=0x82000000 322804 bytes: Success!
    Failed to load '/lib/firmware/j7-main-r5f1_0-fw'
    Failed to load '/lib/firmware/j7-main-r5f1_1-fw'
    998192 bytes read in 45 ms (21.2 MiB/s)
    Load Remote Processor 6 with data@addr=0x82000000 998192 bytes: Success!
    998192 bytes read in 44 ms (21.6 MiB/s)
    Load Remote Processor 7 with data@addr=0x82000000 998192 bytes: Success!
    13504656 bytes read in 134 ms (96.1 MiB/s)
    Load Remote Processor 8 with data@addr=0x82000000 13504656 bytes: Success!
    19376640 bytes read in 408 ms (45.3 MiB/s)
    100343 bytes read in 26 ms (3.7 MiB/s)
    Working FDT set to 88000000
    10434 bytes read in 24 ms (423.8 KiB/s)
    3381 bytes read in 24 ms (136.7 KiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
    ERROR: reserving fdt memory region failed (addr=880000000 size=27000000 flags=4)
       Loading Device Tree to 000000008fee4000, end 000000008fffffff ... OK
    Working FDT set to 8fee4000
     
    Starting kernel ...
    
    .... KERNEL BOOTED SUCCESSFULLY ....

  • Hi Sathiya,

    A72 SPL is failing to get MMC0. Can you double check if the A72 SPL dts is having that node enabled?

    - Keerthy

  • Hi Keerthy,
    Where exactly I can check that?

    A72 SPL is failing to get MMC0. Can you double check if the A72 SPL dts is having that node enabled?
  • Hi Sathiya,

    Can you share the below file in your build setup:

    $SDK_PATH/board-support/ti-u-boot*/build/a72/spl/dts/k3-j721e-common-proc-board.dtb 

    If you are using the sk version then:

    $SDK_PATH/board-support/ti-u-boot*/build/a72/spl/dts/k3-j721e-sk.dtb

    We can reverse compile and check if this has the MMC nodes correctly enabled.

    - Keerthy

  • Hi Keerthy,

    I can able to upload dtb file in this website.

  • Yes. You can zip it up and upload here. 

    Best Regards,

    Keerthy 

  • Hi Keerthy,

    Currently I am not working in the board.

    So I am closing this thread for now.