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: CPSW0 is unable to ping to the external network.

Part Number: TDA4VM

Hello, we are developing a custom platform with a main TDA4 SoC.

Processor SDK version: ti-processor-sdk-linux-j7-evm-08_06_01_02

On our platform we have connected several Marvell 88E1512 Ethernet PHY to Ethernet switch CPSW0 on main domain.

We encountered the following problem: CPSW0 is unable to ping to the external network.

arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts

dts:

    mdio_pins_default: mdio-pins-default {
        pinctrl-single,pins = <
            J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
            J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
        >;
    };

    rgmii3_pins_default: rgmii3-pins-default {
        pinctrl-single,pins = <
            J721E_IOPAD(0xb0, PIN_INPUT, 4) /* (AF28) PRG0_PRU0_GPO0.RGMII3_RD0 */
            J721E_IOPAD(0xb4, PIN_INPUT, 4) /* (AE28) PRG0_PRU0_GPO1.RGMII3_RD1 */
            J721E_IOPAD(0xb8, PIN_INPUT, 4) /* (AE27) PRG0_PRU0_GPO2.RGMII3_RD2 */
            J721E_IOPAD(0xbc, PIN_INPUT, 4) /* (AD26) PRG0_PRU0_GPO3.RGMII3_RD3 */
            J721E_IOPAD(0xc8, PIN_INPUT, 4) /* (AE26) PRG0_PRU0_GPO6.RGMII3_RXC */
            J721E_IOPAD(0xc0, PIN_INPUT, 4) /* (AD25) PRG0_PRU0_GPO4.RGMII3_RX_CTL */
            J721E_IOPAD(0xdc, PIN_OUTPUT, 4) /* (AJ28) PRG0_PRU0_GPO11.RGMII3_TD0 */
            J721E_IOPAD(0xe0, PIN_OUTPUT, 4) /* (AH27) PRG0_PRU0_GPO12.RGMII3_TD1 */
            J721E_IOPAD(0xe4, PIN_OUTPUT, 4) /* (AH29) PRG0_PRU0_GPO13.RGMII3_TD2 */
            J721E_IOPAD(0xe8, PIN_OUTPUT, 4) /* (AG28) PRG0_PRU0_GPO14.RGMII3_TD3 */
            J721E_IOPAD(0xf0, PIN_OUTPUT, 4) /* (AH28) PRG0_PRU0_GPO16.RGMII3_TXC */
            J721E_IOPAD(0xec, PIN_OUTPUT, 4) /* (AG27) PRG0_PRU0_GPO15.RGMII3_TX_CTL */
        >;
    };


&cpsw0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&mdio_pins_default
             &rgmii3_pins_default>;
};

&cpsw0_port1 {
    phy-handle = <&cpsw9g_phy0>;
    phy-mode = "rgmii-rxid";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 1>;
};

&cpsw0_port2 {
    phy-handle = <&cpsw9g_phy1>;
    phy-mode = "rgmii-rxid";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 2>;
};


&cpsw0_port3 {
    status = "disabled";
};

&cpsw0_port4 {
    status = "disabled";
};


&cpsw0_port5 {
    status = "disabled";
};

&cpsw0_port6 {
    status = "disabled";
};

&cpsw0_port7 {
    status = "disabled";
};

&cpsw0_port8 {
    status = "disabled";
};

&cpsw9g_mdio {
    bus_freq = <1000000>;
    #address-cells = <1>;
    #size-cells = <0>;

    cpsw9g_phy0: ethernet-phy@0 {
        reg = <0>;
        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
        ti,min-output-impedance;
    };
    cpsw9g_phy1: ethernet-phy@1 {
        reg = <1>;
        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
        ti,min-output-impedance;
    };
};

&cpsw9g_virt_mac {
    status = "disabled";
};

Boot Log:

~# dmesg | grep mdio

[    1.771713] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
[    1.821697] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.836679] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
[    1.908006] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
[    1.957696] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.972807] mdio_bus c000f00.mdio: MDIO device at address 1 is missing.
[    1.979408] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510
[    2.706869] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
[    2.757701] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    2.772630] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
[    2.857831] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
[    2.905695] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    2.920836] mdio_bus c000f00.mdio: MDIO device at address 1 is missing.
[    2.927438] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510

~# dmesg | grep ethernet
[    1.850529] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
[    1.863391] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[    1.870597] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[    1.876912] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
[    1.993080] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
[    2.005846] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[    2.012160] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[    2.018431] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[    2.025550] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[    2.031878] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
[    2.786479] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
[    2.799337] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[    2.806542] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[    2.812819] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
[    2.823190] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
[    2.941111] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
[    2.953874] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[    2.960187] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[    2.966455] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[    2.973573] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[    2.979874] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
[    2.991379] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 140
[   13.911248] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [Marvell 88E1510] (irq=POLL)
[   13.949749] am65-cpsw-nuss c000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
[   13.993459] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)
[   14.006013] am65-cpsw-nuss c000000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[   14.018410] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[   14.062528] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

~# ifconfig
eth0      Link encap:Ethernet  HWaddr 24:76:25:a5:4d:1f  
          inet addr:192.168.17.188  Bcast:192.168.17.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1672083 (1.5 MiB)  TX bytes:11081 (10.8 KiB)

eth1      Link encap:Ethernet  HWaddr 1a:5e:a4:4d:53:cb  
          inet addr:192.168.17.199  Bcast:192.168.17.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:226 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:25255 (24.6 KiB)

ipsec0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:640 errors:0 dropped:0 overruns:0 frame:0
          TX packets:640 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43575 (42.5 KiB)  TX bytes:43575 (42.5 KiB)

ethtool eth1
Settings for eth1:
        Supported ports: [ TP MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x000020f7 (8439)
                               drv probe link ifdown ifup rx_err tx_err hw
        Link detected: yes

~# ping -I eth1 192.168.17.188
PING 192.168.17.188 (192.168.17.188) from 192.168.17.199 eth1: 56(84) bytes of data.


From 192.168.17.199 icmp_seq=1 Destination Host Unreachable
From 192.168.17.199 icmp_seq=5 Destination Host Unreachable
From 192.168.17.199 icmp_seq=8 Destination Host Unreachable

  • Hi,

    As per above you are trying to bring up CPSW9G in Native Linux driver.

    Can you please refer to FAQ[How to move to Native Linux driver for CPSW5G/CPSW9G].

    It could be due to EthFw binary is mapped to MCU2_0 by default, you have to unlink ethfw image and add link other binary for example IPC echo test binary on MCU2_0. Refer to above FAQ how to change also refer the device tree file add following node when dorprocboot from u-boot is not set.

    &main_r5fss0_core0 {
    firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };

    Best Regards,
    Sudheer

  • Hi Sudheer

        Add this modification to the device tree, but still unable to ping the external network.

    boot log:

    [    8.741258] platform 5c00000.r5f: assigned reserved memory node r5f-dma-memory@a2000000
    [    8.808149] remoteproc remoteproc4: 5c00000.r5f is available
    [    8.856822] remoteproc remoteproc4: powering up 5c00000.r5f
    [    8.862446] remoteproc remoteproc4: Booting fw image pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f, size 98828
    [    8.876734] platform 5d00000.r5f: configured R5F for remoteproc mode
    [    8.884541]  remoteproc4#vdev0buffer: assigned reserved memory node r5f-dma-memory@a2000000

    root@tda4vm-sk:~# ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
            inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:57:58:1a:e6  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.17.141  netmask 255.255.255.0  broadcast 192.168.17.255
            inet6 fe80::2676:25ff:fea5:4d1f  prefixlen 64  scopeid 0x20<link>
            ether 24:76:25:a5:4d:1f  txqueuelen 1000  (Ethernet)
            RX packets 2363  bytes 174041 (169.9 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 90  bytes 9300 (9.0 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.17.199  netmask 255.255.255.0  broadcast 192.168.17.255
            inet6 fe80::409:99ff:fe6f:f03d  prefixlen 64  scopeid 0x20<link>
            ether 06:09:99:6f:f0:3d  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 46  bytes 8251 (8.0 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536  metric 1
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 86  bytes 6556 (6.4 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 86  bytes 6556 (6.4 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    root@tda4vm-sk:~# ping -I eth1 192.168.17.141
    PING 192.168.17.141 (192.168.17.141): 56 data bytes

    From 192.168.17.199 icmp_seq=1 Destination Host Unreachable
    From 192.168.17.199 icmp_seq=5 Destination Host Unreachable

  • Hi, 

    root@tda4vm-sk:~# ping -I eth1 192.168.17.141

    Ping you are trying to do with IP 192.168.17.141 is on the same system from above ifconfig log.

    Can you please connect the port intended to ping with external pc and check once. 

    Also, I could see you have added pin mux only for rgmii3 and the ports you have enabled was port-1 and port-2 hiw you are getting linkup without proper pin muxing for the port-1, port-2. 

    Best Regards, 

    Sudheer

  • Hello

    Ok,Let me rephrase this issue in detail.

    mcu_cpsw--->eth0; CPSW0:port1--->eth1,port2--->eth2

    This is the hardware schematic:

    CPSW0:port1--->phy1:

    CPSW0:port1--->phy2:

    dts:

        mdio_pins_default: mdio-pins-default {
            pinctrl-single,pins = <
                J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
                J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
            >;
        };

        rgmii3_pins_default: rgmii3-pins-default {
            pinctrl-single,pins = <
                J721E_IOPAD(0xb0, PIN_INPUT, 4) /* (AF28) PRG0_PRU0_GPO0.RGMII3_RD0 */
                J721E_IOPAD(0xb4, PIN_INPUT, 4) /* (AE28) PRG0_PRU0_GPO1.RGMII3_RD1 */
                J721E_IOPAD(0xb8, PIN_INPUT, 4) /* (AE27) PRG0_PRU0_GPO2.RGMII3_RD2 */
                J721E_IOPAD(0xbc, PIN_INPUT, 4) /* (AD26) PRG0_PRU0_GPO3.RGMII3_RD3 */
                J721E_IOPAD(0xc8, PIN_INPUT, 4) /* (AE26) PRG0_PRU0_GPO6.RGMII3_RXC */
                J721E_IOPAD(0xc0, PIN_INPUT, 4) /* (AD25) PRG0_PRU0_GPO4.RGMII3_RX_CTL */
                J721E_IOPAD(0xdc, PIN_OUTPUT, 4) /* (AJ28) PRG0_PRU0_GPO11.RGMII3_TD0 */
                J721E_IOPAD(0xe0, PIN_OUTPUT, 4) /* (AH27) PRG0_PRU0_GPO12.RGMII3_TD1 */
                J721E_IOPAD(0xe4, PIN_OUTPUT, 4) /* (AH29) PRG0_PRU0_GPO13.RGMII3_TD2 */
                J721E_IOPAD(0xe8, PIN_OUTPUT, 4) /* (AG28) PRG0_PRU0_GPO14.RGMII3_TD3 */
                J721E_IOPAD(0xf0, PIN_OUTPUT, 4) /* (AH28) PRG0_PRU0_GPO16.RGMII3_TXC */
                J721E_IOPAD(0xec, PIN_OUTPUT, 4) /* (AG27) PRG0_PRU0_GPO15.RGMII3_TX_CTL */
            >;
        };

        rgmii8_pins_default: rgmii8-default-pins {
            pinctrl-single,pins = <
                J721E_IOPAD(0x58, PIN_INPUT, 8) /* (AE22) PRG1_PRU1_GPO0.RGMII8_RD0 */
                J721E_IOPAD(0x5c, PIN_INPUT, 8) /* (AG23) PRG1_PRU1_GPO1.RGMII8_RD1 */
                J721E_IOPAD(0x60, PIN_INPUT, 8) /* (AF23) PRG1_PRU1_GPO2.RGMII8_RD2 */
                J721E_IOPAD(0x64, PIN_INPUT, 8) /* (AD23) PRG1_PRU1_GPO3.RGMII8_RD3 */
                J721E_IOPAD(0x70, PIN_INPUT, 8) /* (AE23) PRG1_PRU1_GPO6.RGMII8_RXC */
                J721E_IOPAD(0x68, PIN_INPUT, 8) /* (AH24) PRG1_PRU1_GPO4.RGMII8_RX_CTL */
                J721E_IOPAD(0x84, PIN_OUTPUT, 8) /* (AJ25) PRG1_PRU1_GPO11.RGMII8_TD0 */
                J721E_IOPAD(0x88, PIN_OUTPUT, 8) /* (AH25) PRG1_PRU1_GPO12.RGMII8_TD1 */
                J721E_IOPAD(0x8c, PIN_OUTPUT, 8) /* (AG25) PRG1_PRU1_GPO13.RGMII8_TD2 */
                J721E_IOPAD(0x90, PIN_OUTPUT, 8) /* (AH26) PRG1_PRU1_GPO14.RGMII8_TD3 */
                J721E_IOPAD(0x98, PIN_OUTPUT, 8) /* (AJ26) PRG1_PRU1_GPO16.RGMII8_TXC */
                J721E_IOPAD(0x94, PIN_OUTPUT, 8) /* (AJ27) PRG1_PRU1_GPO15.RGMII8_TX_CTL */
            >;
        };


    &cpsw0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&mdio_pins_default
                 &rgmii3_pins_default
                 &rgmii8_pins_default>;
    };


    &cpsw0_port1 {
        phy-handle = <&cpsw9g_phy0>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&cpsw0_phy_gmii_sel 1>;
    };

    &cpsw0_port2 {
        phy-handle = <&cpsw9g_phy1>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&cpsw0_phy_gmii_sel 2>;
    };


    &cpsw0_port3 {
        status = "disabled";
    };

    &cpsw0_port4 {
        status = "disabled";
    };


    &cpsw0_port5 {
        status = "disabled";
    };

    &cpsw0_port6 {
        status = "disabled";
    };

    &cpsw0_port7 {
        status = "disabled";
    };

    &cpsw0_port8 {
        status = "disabled";
    };

    &cpsw9g_mdio {
        bus_freq = <1000000>;
        #address-cells = <1>;
        #size-cells = <0>;

        cpsw9g_phy0: ethernet-phy@0 {
            reg = <0>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
        };
        cpsw9g_phy1: ethernet-phy@1 {
            reg = <1>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
        };
    };

    &cpsw9g_virt_mac {
        status = "disabled";
    };

    &main_r5fss0_core0 {
    firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };

    boot log:

    root@tda4vm-sk:~# dmesg | grep mdio
    [    1.464710] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
    [    1.510825] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.525770] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
    [    1.571248] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [    1.614824] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.636764] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510
    [    1.645274] davinci_mdio c000f00.mdio: phy[1]: device c000f00.mdio:01, driver Marvell 88E1510
    [    4.242064] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
    [    4.286826] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    4.301742] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
    [    4.355649] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [    4.398833] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    4.420772] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510
    [    4.429283] davinci_mdio c000f00.mdio: phy[1]: device c000f00.mdio:01, driver Marvell 88E1510
    [   12.098281] am65-cpsw-nuss c000000.ethernet eth2: PHY [c000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)
    [   12.206606] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [Marvell 88E1510] (irq=POLL)
    [   12.341645] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)

    root@tda4vm-sk:~#  dmesg | grep ethernet
    [    1.534498] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
    [    1.547353] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
    [    1.554558] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
    [    1.560881] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
    [    1.653822] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [    1.666591] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    1.672907] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    1.679176] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [    1.686295] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [    1.692590] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [    4.310471] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
    [    4.323333] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
    [    4.330539] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
    [    4.336839] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
    [    4.347163] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
    [    4.437836] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [    4.450614] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    4.456930] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    4.463198] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [    4.470317] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [    4.476605] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [    4.488132] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 140
    [    4.496605] pinctrl-single 11c000.pinctrl: pin PIN22 already requested by c000000.ethernet; cannot claim for 4a00000.dss
    [   12.098281] am65-cpsw-nuss c000000.ethernet eth2: PHY [c000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)
    [   12.111703] am65-cpsw-nuss c000000.ethernet eth2: configuring for phy/rgmii-rxid link mode
    [   12.206606] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [Marvell 88E1510] (irq=POLL)
    [   12.263521] am65-cpsw-nuss c000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
    [   12.341645] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)
    [   12.386870] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [   14.420013] am65-cpsw-nuss c000000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
    [   14.519875] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [   15.252032] am65-cpsw-nuss c000000.ethernet eth2: Link is Up - 100Mbps/Full - flow control rx/tx

    My computer's IP:

    mcu_cpsw--->eth0; CPSW0:port1--->eth1,port2--->eth2

    eth0 can automatically obtain the IP, eth1/eth2 cannot obtain the IP.

    eth0 can ping to connect to the external network. eth1/eth2 cannot ping to connect to the external network.

    The PC cannot ping eth1/2.

    Please help me investigate what caused it? Thank you.

  • Hi,

    From Schematic it seems like you are using Port-3, Port-8. So, you need enable "cpsw0_port3 & cpsw0_port8".
    Your Port configuration should be as follows.

    &cpsw0_port1 {
        status = "disabled";
    };
    
    &cpsw0_port2 {
        status = "disabled";
    };
    
    
    &cpsw0_port3 {
        phy-handle = <&cpsw9g_phy0>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&cpsw0_phy_gmii_sel 3>;
    };
    
    &cpsw0_port4 {
        status = "disabled";
    };
    
    
    &cpsw0_port5 {
        status = "disabled";
    };
    
    &cpsw0_port6 {
        status = "disabled";
    };
    
    &cpsw0_port7 {
        status = "disabled";
    };
    
    &cpsw0_port8 {
        phy-handle = <&cpsw9g_phy1>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&cpsw0_phy_gmii_sel 8>;
    };


    Port number in device tree corresponding to physical H/W port, so you need to use same Port number as per H/W pins usage.

    Can you please check with above changes.

    Best Regards,
    Sudheer

  • Hi

    After making these modifications, it is still not possible to ping the external network.

    Please help me analyze it again, thank you.

  • Hi,

     ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;

    Above PHY configurations may not affect for Marvel PHYs, above is TI specific.
    Can you please check whether PHY side any delays are enabled or not. If not can you please enable Rx delay at PHY.
    Tx delay is configured at MAC as interface is specified as "rgmii-rxid".

    Also, can you please collect the CPSW Port Statistics (multiple instances) while running ping command using below ethtool command.
    # ethtool -S eth1

    If Tx good frame count is increasing then check packet on External Port (Port-3) using tcpdump, also collect the tcpdump on A72 at eth1 interface to see packet sent from A72 is same as what sent out from External Port and received on external PC.

    Best Regards,
    Sudheer

  • Hi

       After adding a delay, it was resolved. thanks!