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: Is it possible to place mcu1_0 and uboot in OSPI

Part Number: TDA4VM

Hi,

Considering for safety, mcu1_0 firmware and uboot are placed in OSPI,while other firmwares,kernel and filesystem are placed in eMMC.The mcu1_0 is loaded from OSPI from Uboot and others are loaded from eMMC from Uboot.If so,the muc1_0 ,with safefy function,can still run even if there is something wrong in eMMC .Is it possible to do that?

Regards!

HJ

  • Hi HJ,

    Are you planning to use R5-SPL or u-boot to load the firmware from SPI. Reading firmware from SPI
    is not supported on the SDK. By default we load from MMC-SD. You need an additional patch to enable
    firmware loading from eMMC. No support for loading firmware from OSPI.

    Hope you can resolve the issue.

    Regards,
    Keerthy

  • Hi Keerthy,

    The FAQ-

    [FAQ] TDA4VM: How can I load remote core firmware from OSPI - Processors forum - Processors - TI E2E...

    e2e.ti.com
    Part Number: TDA4VM I want to load a remote core firmware from OSPI. I see that in the SDK 7.0 the firmwares are picked up from the SD card by default. I have
     provide a way to load firmware from OSPI.Can uboot load all the firmwares and A72 if I place uboot in OSPI as well?

  • Hi JH,

    R5-SPL is currently loading the firmware for MCU R5F and MAIN1 R5F. So SPL does not support loading of firmware from SPI.

    Now FAQ talks about loading from u-boot and that is possible. You can boot to u-boot prompt from OSPI
    and as the FAQ mentions you can load the firmware from OSPI flash. That is definitely possible.

    Note: This will hit the boot time of MCUs. If that is not a constraint then yes FAQ way is definitely fine.

    Please resolve this if no additional questions.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    As is mentioned in last sentence in the FAQ,I have to use the u-boot commands manually.Is there a way to easily automate these steps from using u-boot environment variables?Can you give some advices?

    Regards!

    HJ

  • Jian Huang2 said:
    Is there a way to easily automate these steps from using u-boot environment variables?Can you give some advices?

    Hi HJ,

    Check the below link Page 15: https://www.digi.com/resources/documentation/digidocs/PDFs/90000852.pdf

    Nicely describes how to write a script to run your commands.

    Please resolve this if no additional questions.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    For the SDK 7.0,it boots from SD card or eMMC.What needs to do if the uboot is located in OSPI while the filesystem is located in eMMC?

    Regards!

    HJ

  • Hi HJ,

    I believe you are already booting to u-boot prompt from OSPI. To boot Linux with file system in eMMC please follow the below
    thread:

    https://e2e.ti.com/support/processors/f/791/t/887773

    Best Regards,
    Keerthy

  • Hi,

    I think I have loaded uboot from OSPI and loaded filesystem from eMMC.But I'm not sure if I have made it.Would you please help me check about it?The boot log and environment variables are posted below.

    Regards!

    HJ

    5432.boot log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    U-Boot SPL 2020.01-gf9b0d030d3 (Jun 17 2020 - 15:08:08 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Trying to boot from SPI
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    Loading rproc fw image from device 3 not supported!
    Loading rproc fw image from device 3 not supported!
    Starting ATF on ARM64 core...
    NOTICE: BL31: v2.3():07.00.00.005-dirty
    NOTICE: BL31: Built : 14:33:55, Jun 17 2020
    U-Boot SPL 2020.01-gf9b0d030d3 (Jun 17 2020 - 14:34:25 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Detected: J7X-BASE-CPB rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from SPI
    U-Boot 2020.01-gf9b0d030d3 (Jun 17 2020 - 14:34:25 +0000)
    SoC: J721E SR1.0
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev E7
    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 E3
    Detected: J7X-VSC8514-ETH rev E2
    Net:
    Warning: ethernet@046000000 using MAC address from ROM
    eth0: ethernet@046000000
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    ## Error: "check_android" not defined
    ## Error: "emmc_android_boot" not defined
    215396 bytes read in 5 ms (41.1 MiB/s)
    Load Remote Processor 2 with data@addr=0x80080000 215396 bytes: Success!
    141164 bytes read in 4 ms (33.7 MiB/s)
    Load Remote Processor 3 with data@addr=0x80080000 141164 bytes: Success!
    141164 bytes read in 4 ms (33.7 MiB/s)
    Load Remote Processor 4 with data@addr=0x80080000 141164 bytes: Success!
    6598528 bytes read in 23 ms (273.6 MiB/s)
    Load Remote Processor 8 with data@addr=0x80080000 6598528 bytes: Success!
    16654344 bytes read in 53 ms (299.7 MiB/s)
    89857 bytes read in 3 ms (28.6 MiB/s)
    ## Flattened Device Tree blob at 82000000
    Booting using the fdt blob at 0x82000000
    Loading Device Tree to 00000000fdda1000, end 00000000fdeb9fff ... OK
    Starting kernel ...
    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [ 0.000000] Linux version 5.4.40-g66cf445b76 (oe-user@oe-host) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 SMP PREEMPT Wed Jun 17 14:28:47 UTC 2020
    [ 0.000000] Machine model: Texas Instruments K3 J721E SoC
    [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [ 0.000000] printk: bootconsole [ns16550a0] enabled
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    4237.printenv.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    => printenv
    addr_fit=0x90000000
    arch=arm
    args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    args_ufs=setenv devtype scsi;setenv bootpart 1:1;run ufs_finduuid;setenv bootargs console = ${console} ${optargs}root=PARTUUID=${uuid} rw rootfstype=${scsirootfstype};setenv devtype scsi;setenv bootpart 1:1
    baudrate=115200
    board=j721e
    board_name=j721e
    board_rev=E7
    board_serial=0249
    board_software_revision=01
    boot=mmc
    boot_fit=0
    boot_rprocs=if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then rproc init;run boot_rprocs_mmc;fi;
    boot_rprocs_mmc=env set rproc_id;env set rproc_fw;for i in ${rproc_fw_binaries} ; do if test -z "${rproc_id}" ; then env set rproc_id $i;else env set rproc_fw $i;run rproc_load_and_boot_one;env set rproc_id;env set rproc_fw;fi;done
    bootcmd=run findfdt; setenv mmcdev 0; run envboot; run check_android; if test $is_android -eq 1; then run emmc_android_boot; fi; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootpart=0:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyS2,115200n8
    cpu=armv8
    default_device_tree=k3-j721e-common-proc-board.dtb
    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
    dfu_alt_info_mmc=boot part 1 1;rootfs part 1 2;tiboot3.bin fat 1 1;tispl.bin fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1;sysfw.itb fat 1 1
    dfu_alt_info_ospi=tiboot3.bin raw 0x0 0x080000;tispl.bin raw 0x080000 0x200000;u-boot.img raw 0x280000 0x400000;u-boot-env raw 0x680000 0x020000;sysfw.itb raw 0x6c0000 0x100000;rootfs raw 0x800000 0x3800000
    dfu_alt_info_ram=tispl.bin ram 0x80080000 0x100000;u-boot.img ram 0x81000000 0x100000
    dfu_bufsiz=0x20000
    dorprocboot=1
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
    eth1addr=70:ff:76:1d:9a:8a
    eth2addr=70:ff:76:1d:9a:8b
    eth3addr=70:ff:76:1d:9a:8c
    eth4addr=70:ff:76:1d:9a:8d
    ethaddr=50:51:a9:fc:ed:cc
    fdtaddr=0x82000000
    fdtcontroladdr=fdebbca8
    findfdt=setenv name_fdt ${default_device_tree};setenv fdtfile ${name_fdt}
    finduuid=part uuid mmc ${bootpart} uuid
    get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
    get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit}
    get_kern_mmc=load mmc ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
    get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
    get_overlay_mmc=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load mmc ${bootpart} ${overlayaddr} ${bootdir}/${overlay} && fdt apply ${overlayaddr};done;
    get_overlay_ufs=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load scsi ${bootpart} ${overlayaddr} ${bootdir}/${overlay} && fdt apply ${overlayaddr};done;
    get_overlaystring=for overlay in $name_overlays;do;setenv overlaystring ${overlaystring}'#'${overlay};done;
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    init_mmc=run args_all args_mmc
    init_ufs=ufs init; scsi scan; run args_ufs
    loadaddr=0x80080000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    mainr5f0_0fwname=/lib/firmware/j7-main-r5f0_0-fw
    mainr5f0_0loadaddr=88000000
    mcur5f0_0fwname=/lib/firmware/j7-mcu-r5f0_0-fw
    mcur5f0_0loadaddr=89000000
    mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run args_mmc; if test ${boot_fit} -eq 1; then run run_fit; else run mmcloados;fi;fi;fi;
    mmcdev=0
    mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    mmcrootfstype=ext4 rootwait
    mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus
    mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi HJ,

    Trying to boot from SPI

    This clearly tells that you are booting from OSPI & your boot args are clearly confirming
    that you are booting from eMMC.

    [ 5.442312] mmc0: Command Queue Engine enabled
    [ 5.446760] mmc0: new HS400 MMC card at address 0001
    [ 5.451999] mmcblk0: mmc0:0001 S0J56X 14.8 GiB
    [ 5.457065] mmcblk0boot0: mmc0:0001 S0J56X partition 1 31.5 MiB
    [ 5.463081] mmcblk0boot1: mmc0:0001 S0J56X partition 2 31.5 MiB
    [ 5.469047] mmcblk0rpmb: mmc0:0001 S0J56X partition 3 4.00 MiB, chardev (240:0)
    [ 5.481327] mmcblk0: p1 p2

    So i confirm that you are booting u-boot from SPI and loading file system from eMMC.

    Please resolve the issue if no further questions.

    Best Regards,
    Keerthy