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.

AM6548: Load R5F firmware in u-boot or even earlier

Part Number: AM6548

Hi Support,

Currently, we use remoteproc to load the R5F firmware during Linux boot. That's, we copied the firmware file to the /lib/firmware/ Linux folder, and it's loaded during Linux boot. 

The R5F runs bare-metal application. Our BSP is based on TI SDK 07.01.

I wonder if there is a way to load the R5F MCU firmware earlier, for example, in u-boot or even earlier?

We want the R5F MCU to start execution as early as possible after power up

Thanks

  • Hello Kevin,

    1) Is both your Linux SDK & RTOS SDK based on 7.1? Please keep in mind that SDK release is old enough that we will not be able to provide software support for it.

    2) Please be aware that we can no longer support the PROCESSOR-SDK-RTOS-AM65X releases in general. Refer to https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1358029/notice-regarding-am65x-rtos-sdk-processor-sdk-rtos-am65x , I am working with the team to get the SDK website updated as well.

    3) What boot flow are you using?

    Regards,

    Nick

  • Hi Nick,

    Thanks for your reply.

    1. The Linux is based on TI SDK 7.01.  The R5F runs bare-metal C/C++ application. We do not use RTOS. 

    2. We want to change to boot R5F and execute the bare-metal C/C++ application as soon as possible after power up

    3. I am not quite sure why you mean by "boot flow".  I think it's u-boot -> Linux kernel. During Linux boot, it uses remoteproc to load the R5F firmware.

    You can view the following console output during system boot. 

    The beginning of the current boot output is as follows:

    U-Boot SPL 2020.01-g6eecb83-BSP-Yocto-TISDK-AM65xx-ALPHA4-dirty (Oct 04 2023 - 03:44:33 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...
    
    
    U-Boot SPL 2020.01-g6eecb83-BSP-Yocto-TISDK-AM65xx-ALPHA4-dirty (Jan 16 2024 - 05:02:48 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Trying to boot from MMC2
    
    
    U-Boot 2020.01-g6eecb83-BSP-Yocto-TISDK-AM65xx-ALPHA4-dirty (Jan 16 2024 - 05:02:48 +0000)
    
    SoC:   AM65X SR2.0
    Model: PHYTEC phyCORE-AM65x Carrier Board
    DRAM:  2 GiB
    MMC:   sdhci@4f80000: 0, sdhci@4fa0000: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment
    
    Loading Environment from MMC... OK
    In:    serial
    Out:   serial
    Err:   serial
    Net:
    Warning: ethernet@46000000 using MAC address from ROM
    eth0: ethernet@46000000
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    16965640 bytes read in 706 ms (22.9 MiB/s)
    67312 bytes read in 7 ms (9.2 MiB/s)
    1771 bytes read in 5 ms (345.7 KiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 000000008feec000, end 000000008fffffff ... OK
    
    Starting kernel ...
    
    [    0.000000] 000: printk: bootconsole [ns16550a0] enabled
    [    0.000000] 000: Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
    [    0.000000] 000: OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
    

    During Linux boot, it uses remoteproc to load R5F firmware:

    [   12.004635] platform 41000000.r5f: configured R5F for remoteproc mode
    [   12.063004] remoteproc remoteproc0: 41000000.r5f is available
    [   12.095078] remoteproc remoteproc0: powering up 41000000.r5f
    [   12.095108] remoteproc remoteproc0: Booting fw image am65x-mcu-r5f0_0-fw, size 2190660
    [   12.185307]  remoteproc0#vdev0buffer: assigned reserved memory node r5f-dma-memory@a0000000
    [   12.274545]  remoteproc0#vdev0buffer: registered virtio0 (type 7)
    [   12.274557] remoteproc remoteproc0: remote processor 41000000.r5f is now up
    

    Kind regards

  • Hello Kevin,

    Ok, if you are using the standard boot flow in the Linux SDK, then you are using the "SPL" boot flow.

    Probably the easiest option for you: Booting R5F in uboot 

    There is a uboot rproc driver that can be used to initialize remote cores. It looks like AM65x SDK 7.1 does have support for that driver:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM65X/07_01_00_17/exports/docs/linux/Foundational_Components_U-Boot.html#remoteproc

    SBL boot flow & R5F early boot

    There is a different boot flow available in the RTOS SDK 7.1 called "SBL" boot flow. SPL vs SBL happens before uboot - either way, once that earlier bootloader runs, it would kick off uboot, and then Linux.

    If you were using SBL boot flow, that would be the quickest way to boot the R5F cores early. SBL could initialize the R5F cores even before uboot started running: https://software-dl.ti.com/processor-sdk-rtos/esd/AM65X/07_01_00_14/exports/docs/pdk_am65xx_07_01_00_55/docs/userguide/am65xx/boot/boot_k3.html

    Future readers,

    Keep in mind that SBL boot is NOT supported in the AM65x MCU+ 9.1 SDK (so the standard Linux SDK SPL bootflow is the only supported boot flow). SBL boot might get added in a later AM65x MCU+ SDK release, but you should NOT expect any other features to be added.

    Regards,

    Nick