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.

TDA4 + Ethernet

Hi, experts

we find ethernet driver development is available in uboot and kernel.

We want to know the difference between the Ethernet driver development in the uboot stage and the driver development in the kernel stage.

Thanks

  • we find  "initr_net"  is called in  the bord_init_r  function.  it will configure some configurations related to Ethernet PHY and MAC.

    and in the kernel,  ethernet is also need config.   

    so, we want to know the differnce config between uboot stage  and kernel  stage。

    Thanks

  • Hi,

    the main difference would be the stacks available on u-boot and kernel. You have limited support on u-boot while with kernel, you can do much extensive network architecture. 

    From CPSW view point, Theoretically whatever configuration is possible on kernel could be carried out with u-boot. But the current driver in u-boot doesn't have the capability to use few of the features of CPSW. This includes complex features like CBS, IET, TSN and even some basic features like vlan.

    If you require more clarity on this, can you please specify what are your requirements so that we can answer better. Some feature can be possibly enabled after a little modification.

    Regards,
    Tanmay

  • Hi, expert

    Now we want to learn and develop Ethernet switch like  cpsw2G ,cpsw9G。And Ethernet drivers,like dp83867 .  

    ① Are these functions  developed in the uboot stage or the kernel stage?
    ② Can you tell me the corresponding source code reference path?
     
    ③  Are there any responsive reference  files?
    Thanks
  • Hi,

    Now we want to learn and develop Ethernet switch like  cpsw2G ,cpsw9G。And Ethernet drivers,like dp83867 .

    The CPSW2G and CPSW9G uses the same driver. The driver is located at "[PSDK-Linux-Install-Dir]/board-support/linux-[commit-hash]/net/ethernet/ti/am65-cpsw-nuss.c". For DP83867, you are looking at phy drivers, which are located at "PSDK-Linux-Install-Dir]/board-support/linux-[commit-hash]/net/phy/dp83867.c".

    Are these functions  developed in the uboot stage or the kernel stage?

    They are available at both u-boot and kernel. The features available in them would be different in u-boot and kernel.

    Can you let me know your use-case so that I can suggest you the development direction.

    Regards,
    Tanmay

  • Hi, Tanmay

     

    Can you let me know your use-case so that I can suggest you the development direction.

    Yes, we want to  develop MAC2MAC function based on TDA4.  So we want to get familiar with the code first, and then verify it.

    Now We have burned the firmware to evm board. we want to know whether the function is normal and how to verify it

    ① What tools or command can be used ? 

    ② Simple verification process : such as whether each module is normal ?  whether data is received ?

     

    Thanks 

  • The case is the Ethfw  (CPSW9G).

    Now We have burned the firmware to evm board. we want to know whether the function is normal and how to verify it on A72 and MIAN_R5F

    ① What tools or command can be used ? 

    ② Simple verification process : such as whether each module is normal ?  whether data is received ?

  • Hi,

    From linux user space, you can use tools like `ping` and `iperf3` to check and profile connections. For more details you can see ethfw user guide and virtual mac driver documentation.

    Regards,
    Tanmay

  • Hi , 

    Thanks for your reply.

    we have a new question to ask:  When Linux uses the j721-cpsw-virt-mac/IPC  to communicatewith Ethfw, whether the MAC port used by Linux and Ethfw is the same port: CPSW9G host port?

    Thanks

  • Hi,

    So ethfw is basically an ethernet controller. From SDK 8.1 onwards, there are two types of virtual-ports which can be created using ethfw on remote cores, MAC-only ports and Switch ports. What ethfw configures is the data path for these ports. So unicast frames directly reach the virtual ports on remote cores without ever interacting with ethfw. While, the broadcast frames are captured by ethfw and are forwarded to the virtual cores as needed.

    Regards,
    Tanmay

  • Hi,

    So ethfw is basically an ethernet controller.

    To sum up:

        Linux(remote cores) does not allow to directly control the CPSW ports, Linux(remote cores) uses Ethfw to control the CPSW ports to send/receive data,so when Linux receives data from the CPSW port, Ethfw is a part of this function.

        Not ethfw and remote cores are two independent modules, sharing CPSW port& DMA for data transmission to each other.

    Is this correct?

    Thanks

  • Hi,

    so when Linux receives data from the CPSW port, Ethfw is a part of this function.

    Not entirely. Linux registers its mac address and DMA flow id with Ethfw. Ethfw configures the ALE classifiers and policers to map the unicast frames for the mac to corresponding DMA flow id. Once this setup is completed, CPSW will forward all such unicast frames to A72 using DMA directly. Ethfw will not be involved in this.

    Not ethfw and remote cores are two independent modules, sharing CPSW port& DMA for data transmission to each other.

    Ethfw is the one which controls CPSW, remote cores only communicate with Ethfw to register themselves. The DMA is used for transferring data from CPSW host port to any remote cores. As I mentioned above, the control path goes through Ethfw and configures data path. The data then flows independently of Ethfw.

    Regards,
    Tanmay

  • Hi,

    Thank you for your detailed answer for  this  question.

    Thanks