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: vision_apps: disable ethfw on MCU2_1

Part Number: TDA4VM

Hi,TI

      When we enable cpsw9g in vision_apps and run the demo(linux + RTOS), there will generate two eth device(i.e. eth0 and eth1) in linux.  Now we found eth0 is the server for ethfw in most cases. Occasionally eth1 is the server. So we want to disable ethfw on MCU2_1 to remove the client eth devices, only using server of ethfw. Is that possible? if so, what should we do about it?

Best Regards,

Zhang

  • Hi Zhang,

    Do you mean running EthFw from Linux? You can easily remove EthFw from mcu2-1, but including it on Linux might require additional changes in Linux dtb file. 

    Regards,

    Brijesh

  • Hi,Brijesh

         Thanks for your support. We using ethfw in vision_apps, so I  think ethfw running on MCU2_0 and MCU2_1. We have some questions:

         1.In dts of linux, we can found two macs and a port, as follow:

    	cpsw9g_virt_mac: main_r5fss_cpsw9g_virt_mac0 {
    		compatible = "ti,j721e-cpsw-virt-mac";
    		dma-coherent;
    		ti,psil-base = <0x4a00>;
    		ti,remote-name = "mpu_1_0_ethswitch-device-0";
    
    		dmas = <&main_udmap 0xca00>,
    		       <&main_udmap 0xca01>,
    		       <&main_udmap 0xca02>,
    		       <&main_udmap 0xca03>,
    		       <&main_udmap 0xca04>,
    		       <&main_udmap 0xca05>,
    		       <&main_udmap 0xca06>,
    		       <&main_udmap 0xca07>,
    		       <&main_udmap 0x4a00>;
    		dma-names = "tx0", "tx1", "tx2", "tx3",
    			    "tx4", "tx5", "tx6", "tx7",
    			    "rx";
    
    		virt_emac_port {
    			ti,label = "virt-port";
    			/* local-mac-address = [0 0 0 0 0 0]; */
    		};
    	};
    
    	cpsw9g_virt_maconly: main-r5fss-cpsw9g-virt-mac1 {
    		compatible = "ti,j721e-cpsw-virt-mac";
    		dma-coherent;
    		ti,psil-base = <0x4a00>;
    		ti,remote-name = "mpu_1_0_ethmac-device-1";
    
    		dmas = <&main_udmap 0xca00>,
    		       <&main_udmap 0xca01>,
    		       <&main_udmap 0xca02>,
    		       <&main_udmap 0xca03>,
    		       <&main_udmap 0xca04>,
    		       <&main_udmap 0xca05>,
    		       <&main_udmap 0xca06>,
    		       <&main_udmap 0xca07>,
    		       <&main_udmap 0x4a00>;
    		dma-names = "tx0", "tx1", "tx2", "tx3",
    			    "tx4", "tx5", "tx6", "tx7",
    			    "rx";
    
    		virt_emac_port {
    			ti,label = "virt-port";
    			/* local-mac-address = [0 0 0 0 0 0]; */
    		};
    	};

    &cpsw_port1 {
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&phy0>;
    };

         MPU1_0(linux) is only a client of CPSW9G. Why are there two MACs but only one port?

        2. Ethfw server runing on MCU2_0 and Ethfw client running on MCU2_1 in vision_apps.  And MPU1_0(linux) is a client of CPSW9G. Is it right?

    Best Regards,

    Zhang

         

  • Hi Zhang,

    For this specific question, i would request to help you.

    Regards,

    Brijesh

  • Hi,

    We using ethfw in vision_apps, so I  think ethfw running on MCU2_0 and MCU2_1

    EthFw is running on MCU2_0.

       1.In dts of linux, we can found two macs and a port, as follow:

    These device tree configuration for Virtual Switch interface (for switch Ports access) and Virtual MAC interface (MAC Port-1).
    EthFw is Server and A72 Linux is client.

        2. Ethfw server runing on MCU2_0 and Ethfw client running on MCU2_1 in vision_apps.  And MPU1_0(linux) is a client of CPSW9G. Is it right?

    Yes.
    Default EthFw configures Port-1, Port-4 as MAC Only Ports and map to A72 client  & MCU2_1 RTOS client.
    Along with MAC Only Port, EthFw map Virtual Switch interface for A72 client and MCU2_1 client.


    Default A72 Linux will show 3 network interfaces.
    1. eth0: CPSW2G (Native Linux Driver)
    2. eth1: CPSW9G Virtual Switch interface
    3. eth2: CPSW9G Virtual MAC interface (MAC Port-1)


    If you disable "cpsw9g_virt_mac" and "cpsw9g_virt_maconly" from device tree files, and build the device tree files and copy to "rootfs/boot/dtb/" as per SDK you are using, it will bringup the eth1, eth2 on A72 Linux (A72 can't communicate to external network via CPSW9G data).

    If you want to disable the EthFw, you need to build visionapps by disabling the following from "vision_apps_build_flags.mak" file.
    BUILD_ENABLE_ETHFW?=no

    Best Regards,
    Sudheer

  • HI,Sudheer

          Thanks for your support. We got it. Now we don't use MAC-ONLY port, so we will disable it. such as:

    	
    	
    	/**cpsw9g_virt_maconly: main-r5fss-cpsw9g-virt-mac6 {
    		compatible = "ti,j721e-cpsw-virt-mac";
    		dma-coherent;
    		ti,psil-base = <0x4a00>;
    		ti,remote-name = "mpu_1_0_ethmac-device-6";
    
    		dmas = <&main_udmap 0xca00>,
    		       <&main_udmap 0xca01>,
    		       <&main_udmap 0xca02>,
    		       <&main_udmap 0xca03>,
    		       <&main_udmap 0xca04>,
    		       <&main_udmap 0xca05>,
    		       <&main_udmap 0xca06>,
    		       <&main_udmap 0xca07>,
    		       <&main_udmap 0x4a00>;
    		dma-names = "tx0", "tx1", "tx2", "tx3",
    			    "tx4", "tx5", "tx6", "tx7",
    			    "rx";
    
    		virt_emac_port {
    			ti,label = "virt-port";
    		};
    	};***/
    	
    //&cpsw_port1 {
    //	phy-mode = "rgmii-rxid";
    //	phy-handle = <&phy0>;
    //};

        Why does MAC-ONLY PORT use PHY in GESI board? Can we delete this PHY, if we use it on mac-only?

    Best Regards,

    Zhang

          

  • Hi,

    Thanks for your support. We got it. Now we don't use MAC-ONLY port, so we will disable it. such as:

    It is fine, to disable eth1 from A72 Linux, but from EthFw still Port-1 is MAC only Port. Can't use under switch Port.
    If you want to use MAC Port-1 as switch port you need to remove MAC Only Port mapping in EthFW, Please refer to user guide for the details about MAC only Port.

    Why does MAC-ONLY PORT use PHY in GESI board? Can we delete this PHY, if we use it on mac-only?

    cpsw_port1 is for CPSW2G not for CPSW9G.
    CPSW9G PHYs will be configured from EthFw, Client can't access any of CPSW, MDIO registers.

    Best Regards,
    Sudheer