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.

[FAQ] TDA4VM: How to boot from QSPI?

Part Number: TDA4VM

The default SDK supports booting from OSPI(OSPI0). How can we boot from QSPI aka OSPI1. What are the changes needed
in the u-boot?

  • Yes booting from QSPI is supported.

    1) By default U-Boot/SPL are configured to boot from OSPI(OSPI0). Hence we need do the following change in the U-Boot directory(This step is NOT needed for 8.5 SDK as latest SDK the dynamic detection of OSPI/QSPI is supported so NO need of the below patch jump to step 2):

    0001-configs-Enable-QSPI.patch.txt
    From fa016786d99db486f14c491927ad582eb940467b Mon Sep 17 00:00:00 2001
    From: Keerthy <j-keerthy@ti.com>
    Date: Thu, 2 Sep 2021 10:06:31 +0530
    Subject: [PATCH] configs: Enable QSPI
    
    Enable QSPI
    
    Signed-off-by: Keerthy <j-keerthy@ti.com>
    ---
     configs/j721e_evm_a72_defconfig | 1 +
     configs/j721e_evm_r5_defconfig  | 1 +
     2 files changed, 2 insertions(+)
    
    diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
    index 8f16ae354e..8c9631cd24 100644
    --- a/configs/j721e_evm_a72_defconfig
    +++ b/configs/j721e_evm_a72_defconfig
    @@ -72,6 +72,7 @@ CONFIG_CMD_UBI=y
     CONFIG_OF_CONTROL=y
     CONFIG_SPL_OF_CONTROL=y
     CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-common-proc-board"
    +CONFIG_SF_DEFAULT_BUS=1
     CONFIG_OF_LIST="k3-j721e-common-proc-board k3-j721e-tps65917-proc-board"
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
    diff --git a/configs/j721e_evm_r5_defconfig b/configs/j721e_evm_r5_defconfig
    index bb3d1a28c6..901d8b76ce 100644
    --- a/configs/j721e_evm_r5_defconfig
    +++ b/configs/j721e_evm_r5_defconfig
    @@ -60,6 +60,7 @@ CONFIG_CMD_FAT=y
     CONFIG_OF_CONTROL=y
     CONFIG_SPL_OF_CONTROL=y
     CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-r5-common-proc-board"
    +CONFIG_SF_DEFAULT_BUS=1
     CONFIG_ENV_IS_IN_MMC=y
     CONFIG_SYS_RELOC_GD_ENV_ADDR=y
     CONFIG_DM=y
    -- 
    2.17.1
    
    

    cd $PSDKLA_PATH/board-support/u-boot-2020.01+gitAUTOINC+2781231a33-g2781231a33
    git am 0001-configs-Enable-QSPI.patch.txt
    cd ../..
    make u-boot
    
    cp board-support/u-boot_build/a72/tispl.bin board-support/u-boot_build/a72/u-boot.img board-support/prebuilt-binaries/sysfw.itb board-support/u-boot_build/r5/tiboot3.bin /media/$USER/boot/


    Once the newly built binaries are copied to boot partition of SD card. Boot to u-boot prompt using SD Boot:

    2) Dip switch settings:

    SW8: 10000010
    SW9: 00000000

    Boot to U-Boot prompt:

    sf probe 1:0 /* this is for QSPI */
    
    fatload mmc 1 ${loadaddr} tiboot3.bin; sf update $loadaddr 0x0 $filesize;
    fatload mmc 1 ${loadaddr} tispl.bin; sf update $loadaddr 0x80000 $filesize;
    fatload mmc 1 ${loadaddr} u-boot.img; sf update $loadaddr 0x280000 $filesize;
    fatload mmc 1 ${loadaddr} sysfw.itb; sf update $loadaddr 0x6C0000 $filesize


    3) Once QSPI is flashed please switch off the board and change the dip switch settings as below:

    SW8: 00000000
    SW9: 00100000

    Turn on the board. You can observe the below traces booting from SPI:

    U-Boot SPL 2020.01-00002-g8903f0640e-dirty (Aug 09 2021 - 15:42:23 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.1.1--v2021.01a (Terrific Lla')
    Trying to boot from SPI
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.4(release):07.03.00.005-dirty
    NOTICE:  BL31: Built : 00:15:40, Apr 10 2021
    
    U-Boot SPL 2020.01-00002-g8903f0640e-dirty (Aug 09 2021 - 15:42:15 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.1.1--v2021.01a (Terrific Lla')
    Detected: J7X-BASE-CPB rev E2
    Detected: J7X-INFOTAN-EXP rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from SPI
    Can't get reset: -2
    Software reset enable failed: -524
    
    
    U-Boot 2020.01-00002-g8903f0640e-dirty (Aug 09 2021 - 15:42:15 +0530)
    
    SoC:   J721E SR1.0
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev E6
    DRAM:  4 GiB
    not found for dev hbmc-mux
    Flash: 0 Bytes
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Detected: J7X-BASE-CPB rev E2
    Detected: J7X-INFOTAN-EXP rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Net:   K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    
    Warning: ethernet@46000000 using MAC address from ROM
    eth0: ethernet@46000000
    Hit any key to stop autoboot:  0