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: TDA4VM EVM cannot boot through ospi flash

Part Number: TDA4VM

I am using the sdk of ti-processor-sdk-linux-j7-evm-07_02_00_07 to build the u-boot and put the sysfw.itb uboot3.bin u-boot.img tispl.bin into mmc card.

1. Change the boot mode to MMCSD boot mode.It boots OK.

2. Use the u-boot to boot the linux kernel and enter file-system and use dd command to put sysfw.itb uboot3.bin u-boot.img tispl.bin into OSPI flash, the dd command works fine.

root@j7-evm:~/uboot# dd if=tiboot3.bin of=/dev/mtdblock0

root@j7-evm:~/uboot# dd if=tispl.bin of=/dev/mtdblock1

root@j7-evm:~/uboot# dd if=u-boot.img of=/dev/mtdblock2

root@j7-evm:~/uboot# dd if=sysfw.itb of=/dev/mtdblock5

3. Change the boot mode into OSPI flash and I reset the board, It shows the following words and CANNOT enter the u-boot.


U-Boot SPL 2020.01-dirty (Oct 24 2021 - 23:56:00 -0700)
SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
Trying to boot from SPI
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
Mbox send fail -110
ti_sci_get_response: Message receive failed. ret = -110
RM_RA:Mbox config send fail -110
TISCI config ring fail (-110) ring_idx 0

PS:how can I get nor_spi_pattern.bin and how can I build to genrate nor_spi_pattern.bin?

  • Hi,

    So I believe TDA4VM OSPI boot was broken in 7.2.

    Request you to migrate to 7.3 & follow this FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/995032/faq-tda4vm-ospi-boot-tisci-config-ring-fail-error-with-sdk-7-3

    The above removes a bunch of warnings & gets OSPI boot functional on 7.3.

    If no other question please click on verify answer.

    - Keerthy

  • Hi,

    migrated the SDK to 7.3, patched the file  

    From 3710b33012cec1ed4ddf9a666f1b14408ece8962 Mon Sep 17 00:00:00 2001
    From: Vignesh Raghavendra <vigneshr@ti.com>
    Date: Thu, 15 Apr 2021 21:23:58 +0530
    Subject: [PATCH] firmware: ti-sci: Use non secure host ID
     for RM requests in R5 SPL
    
    Post HSM Rearch, all messages sent via DM2TIFS channel would need to use
    a non secure host ID in hdr->host. Therefore switch to using non secure
    host ID of MCU R50 in R5 SPL.
    
    Fix DMA/ring related error seen during OSPI boot on J721e/J7200.
    
    Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
    ---
     arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 2 +-
     arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 2 +-
     drivers/firmware/ti_sci.c                      | 8 +++++---
     3 files changed, 7 insertions(+), 5 deletions(-)
    
    diff --git a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts
    index d452e94a7b..9e3ee42a6e 100644
    --- a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts
    +++ b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts
    @@ -93,7 +93,7 @@
     		<&mcu_secproxy 23>, <&mcu_secproxy 21>;
     	mbox-names = "tx", "rx", "notify", "dm-tx", "dm-rx";
     	ti,host-id = <4>;
    -	ti,dm-host-id = <250>;
    +	ti,dm-host-id = <3>;
     	ti,secure-host;
     };
     
    diff --git a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
    index a0c7268cf9..37654c9b20 100644
    --- a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
    +++ b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
    @@ -182,7 +182,7 @@
     		<&mcu_secproxy 23>, <&mcu_secproxy 21>;
     	mbox-names = "tx", "rx", "notify", "dm-tx", "dm-rx";
     	ti,host-id = <4>;
    -	ti,dm-host-id = <250>;
    +	ti,dm-host-id = <3>;
     	ti,secure-host;
     };
     
    diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
    index 1c29501309..55e2ebd83a 100644
    --- a/drivers/firmware/ti_sci.c
    +++ b/drivers/firmware/ti_sci.c
    @@ -158,11 +158,13 @@ static struct ti_sci_xfer *ti_sci_setup_one_xfer(struct ti_sci_info *info,
     
     	hdr = (struct ti_sci_msg_hdr *)buf;
     	hdr->type = msg_type;
    -	hdr->host = info->host_id;
    -	if (use_dm_queue)
    +	if (use_dm_queue) {
     		hdr->seq = info->dm_seq;
    -	else
    +		hdr->host = info->dm_host_id;
    +	} else {
     		hdr->seq = info->seq;
    +		hdr->host = info->host_id;
    +	}
     	hdr->flags = msg_flags;
     
     	return xfer;
    -- 
    2.31.1
    
    
      into u-boot and burned these 4 files tiboot3.bin, tispl.bin, u-boot.img,sysfw.itb(which are all built by patched sdk 7.3) into OSPI flash, but the EVM board was stuck in the following command line:

    U-Boot SPL 2020.01-00001-gddf59d04f1-dirty (Oct 26 2021 - 10:14:23 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.1.1--v2021.01a (Terrific Lla')

    The building step is 

    1. patched the u-boot

    (host pc command)

    $ cd {PATH_FOR_UBOOT}
    $ git am 0001-firmware-ti-sci-Use-non-secure-host-ID-for-RM-reques.patch.txt

    2. build u-boot, the build command is 

    (host pc command)

    $ cd {SDK_PATH}
    $ make u-boot
    $ make sysfw-image

    3. copy tiboot3.bin, tispl.bin, u-boot.img,sysfw.itb to mmc card.

    4. change boot mode for EVM board to mmc card boot mode.

    5. put the mmc card into card slot and power on the EVM board.(Then the EVM board boots OK and enter u-boot)

    6. stop the u-boot and use the following command to burn tiboot3.bin, tispl.bin, u-boot.img,sysfw.itb (which are stored in mmc card) into OSPI FLASH.

    => sf probe
    => fatload mmc 1:1 ${loadaddr} tiboot3.bin;sf update $loadaddr 0x0 $filesize;

    => fatload mmc 1:1 ${loadaddr} tispl.bin;sf update $loadaddr 0x80000 $filesize;
    => fatload mmc 1:1 ${loadaddr} u-boot.img;sf update $loadaddr 0x280000 $filesize;
    => fatload mmc 1:1 ${loadaddr} sysfw.itb;sf update $loadaddr 0x6C0000 $filesize;

    7. change boot mode for EVM board to OSPI boot mode and reset the EVM board.

    8. It shows

  • Hi,

    All the steps seem okay. Just try using the pre-built sysfw.itb Instead of what you built.

    So copy sysfw.itb from $PSDK_PATH/board-support/prebuilt-binaries to your Boot partition & burn that to OSPI and let me know
    if that solves your problem.

    - Keerthy

  • I used the prebuild sysfw.itb but it didn't work, but I changed another EVM board and used 8.0 SDK and it became OK. I don't know what is wrong with the board the first time I used to use.

    PS:

    The board which booted OK is PROC078E7A and the board which did not boot is PROC078E8A

  • I used the prebuild sysfw.itb but it didn't work, but I changed another EVM board and used 8.0 SDK and it became OK. I don't know what is wrong with the board the first time I used to use.

    PS:

    The board which booted OK is PROC078E7A and the board which did not boot is PROC078E8A

    According to the docs I found that the terminal was stuck in loading DDR config. Could you tell me how I can do to config the DDR and which register(s) I should config the DDR?Is there any guiding file for config DDR?

  • Hi,

    This could be due to 4266 MTS DDR configuration can you try lowering the DDR speed by following the FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1028163/faq-tda4vm-on-7-3-8-0-sdk-how-to-reduce-ddr-speed-to-3733-mts

    Let us know if you can boot on the failing board. Otherwise it might point to some issues on OSPI part on the failing board.

    Let me know.

    - Keerthy