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.

TDA4AL-Q1: [TDA4AL ] remoteproc load on linux question

Part Number: TDA4AL-Q1


Tool/software:

Hi:

    I used the TDA4AL chipset for my project. Use the SDK 10.00.00.08. As I know, the TDA4AL have multiple core inside.

      In Main domain:

           2 DSP C71

           1 R5FSS (2 core)

     MCU domain: 

            1 R5FSS (2 core)

     I have setup the lib/firmware/ firmware file to link /lib/firmware/ti-ipc/j721s2/ test firmware. After reboot device, I only find the remoteproc create Main domain core. But can't see MCU domain core processor information.

     In the below shown the remoteproc1 and remoteproc3 is for the Main domain R5FSS. The remoteproc0 and remoteproc2 were for the 2 DSP C71. Where is the MCU domain?

     I have use the rpmsg_char_simple to test the IPC communicate with remote processor. But I can't IPC to MCU domain R5F. 

      rpmsg_char_simple -r8 -n5: OK for DSP_C71_0

      rpmsg_char_simple -r10 -n5: OK for DSP_C71_1

      rpmsg_char_simple -r2 -n5: OK for R5F_MAIN0_0

      rpmsg_char_simple -r3 -n5: OK for R5F_MAIN0_1

     

       Below show rpmsg_char_simple test IPC to MCU domain R5F core0 and core1 fail. How can I doing IPC from linux to MCU domain R5F subsystem?

root@j721s2-evm:/sys/class/remoteproc# rpmsg_char_simple -r0 -n5
file_deref_link: readlink failed for /sys/bus/platform/devices/41000000.r5f
_rpmsg_char_find_rproc: 41000000.r5f device is mostly yet to be created!
Can't create an endpoint device: Bad address
TEST STATUS: FAILED
root@j721s2-evm:/sys/class/remoteproc# rpmsg_char_simple -r1 -n5
file_deref_link: readlink failed for /sys/bus/platform/devices/41400000.r5f
_rpmsg_char_find_rproc: 41400000.r5f device is mostly yet to be created!
Can't create an endpoint device: Bad address
TEST STATUS: FAILED

enum rproc_id {
	R5F_MCU0_0 = 0,
	R5F_MCU0_1 = 1,
	R5F_MAIN0_0 = 2,
	R5F_MAIN0_1 = 3,
	R5F_MAIN1_0 = 4,
	R5F_MAIN1_1 = 5,
	DSP_C66_0 = 6,
	DSP_C66_1 = 7,
	DSP_C71_0 = 8,
	M4F_MCU0_0 = 9,
	DSP_C71_1 = 10,
	R5F_MAIN2_0 = 11,
	R5F_MAIN2_1 = 12,
	DSP_C71_2 = 13,
	DSP_C71_3 = 14,
	R5F_WKUP0_0 = 15,
	RPROC_ID_MAX,
};

root@j721s2-evm:/sys/class/remoteproc# ls -al
drwxr-xr-x 2 root root 0 Feb 27 17:26 .
drwxr-xr-x 71 root root 0 Feb 27 17:26 ..
lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc0 -> ../../devices/platform/bus@100000/64800000.dsp/remoteproc/remoteproc0
lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc1 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5c00000.r5f/remoteproc/remoteproc1
lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc2 -> ../../devices/platform/bus@100000/65800000.dsp/remoteproc/remoteproc2
lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc3 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5d00000.r5f/remoteproc/remoteproc3

root@j721s2-evm:/lib/firmware# ls -al
drwxr-xr-x 8 root root 4096 Feb 27 19:35 .
drwxr-xr-x 68 root root 57344 Mar 9 2018 ..
-rw-r--r-- 1 root root 2040 Mar 9 2018 LICENCE.ibt_firmware
-rw-r--r-- 1 root root 2046 Mar 9 2018 LICENCE.iwlwifi_firmware
-rw-r--r-- 1 root root 482664 Mar 9 2018 bl32.bin
-rw-r--r-- 1 root root 4433152 Mar 9 2018 bl32.elf
drwxr-xr-x 2 root root 4096 Mar 9 2018 cadence
drwxr-xr-x 2 root root 4096 Mar 9 2018 cnm
drwxr-xr-x 2 root root 4096 Mar 9 2018 intel
-rw-r--r-- 1 root root 918268 Mar 9 2018 iwlwifi-3160-17.ucode
-rw-r--r-- 1 root root 2448976 Mar 9 2018 iwlwifi-8000C-34.ucode
-rw-r--r-- 1 root root 2428004 Mar 9 2018 iwlwifi-8000C-36.ucode
-rw-r--r-- 1 root root 2440780 Mar 9 2018 iwlwifi-8265-34.ucode
-rw-r--r-- 1 root root 2436632 Mar 9 2018 iwlwifi-8265-36.ucode
-rw-r--r-- 1 root root 2678092 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-34.ucode
-rw-r--r-- 1 root root 2521412 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-38.ucode
-rw-r--r-- 1 root root 1490508 Mar 9 2018 iwlwifi-9260-th-b0-jf-b0-46.ucode
lrwxrwxrwx 1 root root 66 Feb 27 17:46 j721s2-c71_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_1_release_strip.xe71
lrwxrwxrwx 1 root root 73 Feb 27 17:46 j721s2-c71_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_1_release_strip.xe71.signed
lrwxrwxrwx 1 root root 66 Feb 27 17:48 j721s2-c71_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_2_release_strip.xe71
lrwxrwxrwx 1 root root 73 Feb 27 17:48 j721s2-c71_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_c7x_2_release_strip.xe71.signed
lrwxrwxrwx 1 root root 68 Feb 27 17:49 j721s2-main-r5f0_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_0_release_strip.xer5f
lrwxrwxrwx 1 root root 75 Feb 27 17:49 j721s2-main-r5f0_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_0_release_strip.xer5f.signed
lrwxrwxrwx 1 root root 68 Feb 27 19:35 j721s2-main-r5f0_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_1_release_strip.xer5f
lrwxrwxrwx 1 root root 75 Feb 27 19:35 j721s2-main-r5f0_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu2_1_release_strip.xer5f.signed
lrwxrwxrwx 1 root root 68 Feb 27 19:35 j721s2-main-r5f1_0-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_0_release_strip.xer5f
lrwxrwxrwx 1 root root 75 Feb 27 19:35 j721s2-main-r5f1_0-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_0_release_strip.xer5f.signed
lrwxrwxrwx 1 root root 68 Feb 27 19:35 j721s2-main-r5f1_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_1_release_strip.xer5f
lrwxrwxrwx 1 root root 75 Feb 27 19:35 j721s2-main-r5f1_1-fw-sec -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu3_1_release_strip.xer5f.signed
lrwxrwxrwx 1 root root 68 Feb 27 19:35 j721s2-mcu-r5f0_1-fw -> /lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu1_1_release_strip.xer5f
lrwxrwxrwx 1 root root 79 Mar 9 2018 j721s2-mcu-r5f0_1-fw-sec -> /usr/lib/firmware/ti-ipc/j721s2/ipc_echo_test_mcu1_1_release_strip.xer5f.signed

enum rproc_id {
	R5F_MCU0_0 = 0,
	R5F_MCU0_1 = 1,
	R5F_MAIN0_0 = 2,
	R5F_MAIN0_1 = 3,
	R5F_MAIN1_0 = 4,
	R5F_MAIN1_1 = 5,
	DSP_C66_0 = 6,
	DSP_C66_1 = 7,
	DSP_C71_0 = 8,
	M4F_MCU0_0 = 9,
	DSP_C71_1 = 10,
	R5F_MAIN2_0 = 11,
	R5F_MAIN2_1 = 12,
	DSP_C71_2 = 13,
	DSP_C71_3 = 14,
	R5F_WKUP0_0 = 15,
	RPROC_ID_MAX,
};
  • Hello,

    Please don't get confused here,

    For rpmsg_char_simple the list is as below mentioned.

    enum rproc_id { R5F_MCU0_0 = 0, R5F_MCU0_1 = 1, R5F_MAIN0_0 = 2, R5F_MAIN0_1 = 3, R5F_MAIN1_0 = 4, R5F_MAIN1_1 = 5, DSP_C66_0 = 6, DSP_C66_1 = 7, DSP_C71_0 = 8, M4F_MCU0_0 = 9, DSP_C71_1 = 10, R5F_MAIN2_0 = 11, R5F_MAIN2_1 = 12, DSP_C71_2 = 13, DSP_C71_3 = 14, R5F_WKUP0_0 = 15, RPROC_ID_MAX, };
       I have use the rpmsg_char_simple to test the IPC communicate with remote processor. But I can't IPC to MCU domain R5F. 

    This is strange , it should work and i gave the command 

    root@j721s2-evm:rpmsg_char_simple -r0 -n5 it is running successfully.

    By default inside ti-dm ,ipc_echo_testb will be running on MCU1_0 core if you did not change then it will work for sure.

    Based on your result from ls -l/lib/firmware/ you have modified the sd card. 

    For MCU1_0 and MCU1_1 , we have to link ipc_echo_testb but not ipc_echo_test if you would have modified please correct it.

    Regards

    Tarun Mukesh

  • Hi Tarun Mukesh:

           My first question that the remoteproc list under /sys/class/remoteproc, I can't saw the MCU domain R5F sysfs. 

           I know the MCU domain R5F core 0 should be load in booting stage. But I can't find the remoteproc at /sys/class/remoteproc.

           How can I check that? I don't change the firmware. I check my build codebase that use the ti-rtos-firmware. Build and put in /lib/firmware/ti-ipc/j721s2/

            For the command "rpmsg_char_simple -r0 -n5", that was error cause by no file /sys/bus/platform/devices/41000000.r5f. 

    root@j721s2-evm:/sys/class/remoteproc# rpmsg_char_simple -r0 -n5
    file_deref_link: readlink failed for /sys/bus/platform/devices/41000000.r5f
    _rpmsg_char_find_rproc: 41000000.r5f device is mostly yet to be created!
    Can't create an endpoint device: Bad address
    TEST STATUS: FAILED

    root@j721s2-evm:/sys/bus/platform/devices# ls -al 41*
    lrwxrwxrwx 1 root root 0 Feb 27 17:26 4104000.cdns-usb -> ../../../devices/platform/bus@100000/4104000.cdns-usb
    lrwxrwxrwx 1 root root 0 Feb 27 17:26 41c00000.sram -> ../../../devices/platform/bus@100000/bus@100000:bus@28380000/41c00000.sram

    root@j721s2-evm:/sys/class/remoteproc# ls -al
    drwxr-xr-x 2 root root 0 Feb 27 17:26 .
    drwxr-xr-x 71 root root 0 Feb 27 17:26 ..
    lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc0 -> ../../devices/platform/bus@100000/64800000.dsp/remoteproc/remoteproc0
    lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc1 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5c00000.r5f/remoteproc/remoteproc1
    lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc2 -> ../../devices/platform/bus@100000/65800000.dsp/remoteproc/remoteproc2
    lrwxrwxrwx 1 root root 0 Feb 27 19:57 remoteproc3 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5d00000.r5f/remoteproc/remoteproc3

    (EAG)simon@simon-System-Product-Name:/media/data2_4T/Workspaces/Simon/TI/3_0304_adas_build/yocto-build/build/arago-tmp-default-glibc/work/j721s
    2_evm-oe-linux/ti-rtos-firmware/08.02.00.04/git/ti-ipc/j721s2$ ls -al
    total 21804
    drwxr-xr-x 2 simon simon 4096 Mar 4 10:37 .
    drwxr-xr-x 13 simon simon 4096 Mar 4 09:54 ..
    -rw-r--r-- 1 simon simon 10488944 Mar 4 09:54 ipc_echo_test_c7x_1_release_strip.xe71
    -rw-r--r-- 1 simon simon 10490625 Mar 4 10:37 ipc_echo_test_c7x_1_release_strip.xe71.signed
    -rw-r--r-- 1 simon simon 10488944 Mar 4 09:54 ipc_echo_test_c7x_2_release_strip.xe71
    -rw-r--r-- 1 simon simon 10490625 Mar 4 10:37 ipc_echo_test_c7x_2_release_strip.xe71.signed
    -rw-r--r-- 1 simon simon 78040 Mar 4 09:54 ipc_echo_test_mcu1_1_release_strip.xer5f
    -rw-r--r-- 1 simon simon 79720 Mar 4 10:37 ipc_echo_test_mcu1_1_release_strip.xer5f.signed
    -rw-r--r-- 1 simon simon 78040 Mar 4 09:54 ipc_echo_test_mcu2_0_release_strip.xer5f
    -rw-r--r-- 1 simon simon 79720 Mar 4 10:37 ipc_echo_test_mcu2_0_release_strip.xer5f.signed
    -rw-r--r-- 1 simon simon 78040 Mar 4 09:54 ipc_echo_test_mcu2_1_release_strip.xer5f
    -rw-r--r-- 1 simon simon 79720 Mar 4 10:37 ipc_echo_test_mcu2_1_release_strip.xer5f.signed
    -rw-r--r-- 1 simon simon 78040 Mar 4 09:54 ipc_echo_test_mcu3_0_release_strip.xer5f
    -rw-r--r-- 1 simon simon 79720 Mar 4 10:37 ipc_echo_test_mcu3_0_release_strip.xer5f.signed
    -rw-r--r-- 1 simon simon 78040 Mar 4 09:54 ipc_echo_test_mcu3_1_release_strip.xer5f
    -rw-r--r-- 1 simon simon 79720 Mar 4 10:37 ipc_echo_test_mcu3_1_release_strip.xer5f.signed

      

  • Hi Tarun Mukesh:

         The r5fss@41000000 node was find at /sys/bus/platform/devices/bus@100000:bus@28380000:r5fss@41000000

    root@j721s2-evm:/sys/bus/platform/devices# find . | grep -s r5f
    ./5d00000.r5f
    ./bus@100000:bus@28380000:r5fss@41000000
    ./bus@100000:r5fss@5c00000
    ./5c00000.r5f

  • Hi Tarun Mukesh:

         After confirm that MCU domain DM FW have been change. So I can't doing the IPC test.

         Below remoteproc file node, I saw the remoteproc1 is for the MCU domain R5F.

         I have last question about RF5 lockstep and split mode. As I know the MCU domain R5F was set as lockstep. So the MCU domain RF5 dual core was run the same firmware (dm firmware), right? That's why I only saw the remoteproc1. But the Main domain R5F use the split node, so I could saw the remoteproc3 and remoteproc4 right?

    root@j721s2-evm:/sys/class/remoteproc#
    ls -la
    drwxr-xr-x 2 root root 0 Feb 27 17:26 .
    drwxr-xr-x 71 root root 0 Feb 27 17:26 ..
    lrwxrwxrwx 1 root root 0 Feb 27 17:32 remoteproc0 -> ../../devices/platform/bus@100000/64800000.dsp/remoteproc/remoteproc0
    lrwxrwxrwx 1 root root 0 Feb 27 17:32 remoteproc1 -> ../../devices/platform/bus@100000/bus@100000:bus@28380000/bus@100000:bus@28380000:r5fss@41000000/41000000.r5f/remoteproc/remoteproc1
    lrwxrwxrwx 1 root root 0 Feb 27 17:32 remoteproc2 -> ../../devices/platform/bus@100000/65800000.dsp/remoteproc/remoteproc2
    lrwxrwxrwx 1 root root 0 Feb 27 17:32 remoteproc3 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5c00000.r5f/remoteproc/remoteproc3
    lrwxrwxrwx 1 root root 0 Feb 27 17:32 remoteproc4 -> ../../devices/platform/bus@100000/bus@100000:r5fss@5c00000/5d00000.r5f/remoteproc/remoteproc4

  • Thanks for your confirmation.

         I have last question about RF5 lockstep and split mode. As I know the MCU domain R5F was set as lockstep. So the MCU domain RF5 dual core was run the same firmware (dm firmware), right? That's why I only saw the remoteproc1. But the Main domain R5F use the split node, so I could saw the remoteproc3 and remoteproc4 right?

    If you run in lockstep mode only one firmware will be running on the core,other core we cannot access. Whereas if you run in split mode the both core are treated as separate core and can run different firmwares.

    Regards

    Tarun Mukesh

  • Hi Tarun Mukesh:

         Thanks you help! Close case