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.

[FAQ] TDA4VM: How to configure ENET LLD and EthFW (CPSW) for MAC 2 MAC connection for TDA4 and DRA821

Part Number: TDA4VM
Other Parts Discussed in Thread: DRA829, DRA821

Hi,

How to configure ENET LLD and Ethernet Firmware for MAC 2 MAC (phy-less) connection ? Includes CPSW and ICSSG.

Regards

Vineet

  • MAC 2 MAC or phy-less connections are often used in Automotive reference designs to connect switches internal to the SoC to external switches.
    Since both TDA4/DRA829 and DRA821 EVM's have on board PHY's and don't support MAC 2 MAC connection, there is not out of the box support
    for this feature in SDK but this is quite easy to implement due to the modular nature of ENET LLD.

    Reference instructions are provided below to enable customers to enable this at their end using the RTOS SDK, Ethernet Firmware and ENET LLD.

    The main changes required are in the port open sequence which deals with getting port parameters and configuring the PHY. Please see the "Port Open Sequence" in the attached PDF which has a sub-section titled "MAC-to-MAC link".

    PDK API Guide for J721E_ Enet Integration Guide.pdf

    The changes described are from ENET LLD point of view however in the Ethernet Firmware context, the implementation of these steps is split between EthFw and Enet LLD utils library.

    Here is how EthFw and Enet LLD interact for the port configuration.

    When configuring a port in EthFw, the following sequence occurs:

    • EthFw_initLinkArgs() is called by Enet MCM (Multiclient Manager) to get the port configuration parameters to be used for a given port.
    • EthFw populates common parameters in EthFw_initLinkArgs() such as CPSW MAC port default config, and speed/duplexity.
      • Speed and duplexity are currently set to 1 Gbps full-duplex for MAC-to-MAC, you can change this if needed.
    • EthFw calls EnetBoard_setPhyConfig() to have the interface type and PHY configuration parameters set (such as PHY addres).
    • EnetBoard_setPhyConfig() is an Enet LLD board utils function.
      • This function is where one needs to make changes for MAC-to-MAC.
    • A reference patch is being provided with the changes in EnetBoard_setPhyConfig() where MAC port 4 is the desired port used for MAC 2 MAC connection.

    If using the CPSW port under Linux, then one must compile the EthFW application and replace it in under /lib/firmware so that the relevant changes are done.

    Regards

    Vineet