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] How to add/map MAC-only port to A72 (Linux) client in Ethernet Firmware + Linux Use Case?

How to add/map MAC-only port to A72 (Linux) client along with default MAC Port-1 in Ethernet Firmware + Linux Use Case?

  • To add/map the MAC-only port to the A72, we need to make changes in the Ethernet Firmware and the Linux side because Ethernet Firmware is responsible for the configuration of MAC Ports and mapping the ports to remote clients as virtual MAC ports.

     

    Ethernet Firmware Side:

    By default, MAC Port-1 is configured as the MAC-only port and mapped to A72 (Linux), and MAC Port-4 is also configured as the MAC-only port and mapped to R5F Client (MCU2_1).

    Please refer to Ethernet Firmware User Guide for more details.

    To add/map the MAC-only port to A72 (Linux) client, add MAC port details corresponding to the hardware MAC port intended to map with A72 (Linux) client under "gEthApp_virtPortCfg". 

    Also, make sure that the port is enabled/added under "gEthAppPorts".

    Please refer to the below snapshot, where MAC Port-3 is mapping to the A72 client.


    In the above, MAC Port-4 mapping to the R5F client is disabled. It Is because we have limited resources like Tx channels, Rx Flows, and MAC addresses in Ethernet Firmware. Please refer to Ethernet Firmware User Guide for more details.

    After making the required changes, rebuild Ethernet Firmware as a clean build followed by the build.
    Please refer to User Guide for build options.

    After completion of the build, copy the Switch server binary from <SDKR>/ethfw/out/J721E/R5Ft/FREERTOS/release/ to rootfs/lib/firmware/ethfw/ directory in SD Card flashed with Linux SDK if boot mode is SD Boot Mode.

    A72 Side:

    Add the MAC-only node in the Linux device tree file, with the details of the hardware MAC port intended to map with A72, the same as in the Ethernet Firmware.

     

    Please refer to the below snapshot, where MAC-only node for MAC Port-3.


    After making the required changes in Linux device tree files, build the device tree file using the below command from <SDKL>/ directory.
    # make linux-dtbs

    After completion of the build, copy the dtb files from <SDKL>/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56/arch/arm64/boot/dts/ti/ to rootfs/boot/ directory in SD Card flashed with Linux SDK if boot mode is SD Boot Mode.

    Note: Linux version in the above path could be different as per the SDK version been using.

    After the successful completion of changes in Ethernet Firmware and Linux device tree and booting the SOC, you can see MAC Port-3 map to A72 from Ethernet Firmware log and three (3) network interfaces (ethx) in Linux using “# ifconfig” command.

    Ethernet Firmware Log:


    “# ifconfig” output:


    Best Regards,
    Sudheer

  • From SDK 9.1, remote client communication frame work is changed, EthFw only will allocate the configuration for Linux Client.

    So, Linux side no change required for changing or addition of MAC only Ports mapping.

    EthFw side we need to update as highlighted below  with the required MAC Port Numbers, along with  "gEthApp_virtPortCfg" update.


    Above we are mapping Port-1 & Port-3 to Linux client as MAC only Ports.


    Best Regards,
    Sudheer