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: Some questions about the IPC process for ethernet

Part Number: TDA4VM

Currently, I trace the source code for the network transmission of A72.

According to the teaching file EthernetSwitch.pdf, I learned that A72 needs to control R5 through IPC in order to control CPSW_9G.

Could you remind me, which part of the code do these IPC actions under cpsw driver (drivers/net/ethernet/ti)?

  • Hello AllenHsu,

    Below are relevant files in Linux repo used for using CPSW9G in Linux using Ethernet firmware running on R5.

    Please note that virtual mac driver uses, rpmsg-kdrv framework for communicating with EthFw.

    drivers\net\ethernet\ti\j721e-cpsw-virt-mac.c - virtual MAC implementation.

    drivers/rpmsg-kdrv/rpmsg_kdrv_switch.c - IPC abstraction layer 

    include/linux/rpmsg-remotedev/rpmsg-remotedev.h - header file containing required data structures.

    Let me know if any clarifications needed. Thanks.

  • Hi Prasad Jondhale,

    Thank you for your reply.

    File rpmsg_kdrv_switch.c defines a number of registration functions and is provided to File j721e-cpsw-virt-mac.c for use.
    Then communicate to R5. Such as the following structure.

    Another question is, where is the position of the R5 (Ethernet firmware) code?
    Give me a path, thanks.

    drivers/rpmsg-kdrv/rpmsg_kdrv_switch.c 
    struct rpmsg_remotedev_eth_switch_ops switch_ops = {
    .get_fw_ver = rpmsg_kdrv_switch_get_fw_ver,
    .attach = rpmsg_kdrv_switch_attach,
    .attach_ext = rpmsg_kdrv_switch_attach_ext,
    .detach = rpmsg_kdrv_switch_detach,
    .get_tx_info = rpmsg_kdrv_switch_get_tx_info,
    .get_rx_info = rpmsg_kdrv_switch_get_rx_info,
    .get_mac = rpmsg_kdrv_switch_get_mac,
    .register_mac = rpmsg_kdrv_switch_register_mac,
    .unregister_mac = rpmsg_kdrv_switch_unregister_mac,
    .register_ipv4 = rpmsg_kdrv_switch_reg_ipv4,
    .unregister_ipv4 = rpmsg_kdrv_switch_unreg_ipv4,
    .ping = rpmsg_kdrv_switch_ping,
    .read_reg = rpmsg_kdrv_switch_reg_read,
    .dbg_dump_stats = rpmsg_kdrv_switch_c2s_dbg_dump_stats,
    };

  • Hello AllenHsu,

    The EthFw is available in following path in Processor SDK RTOS AUTO (PSDKRA) package.

    psdk_rtos_auto_j7_06_01_01_06\ethfw

    The remote configuration code is in below folder - 

    psdk_rtos_auto_j7_06_01_01_06\ethfw\ethremotecfg\server\src