Our customized board use cpsw2g ethernet with a SMSC LAN8720 phy(connected with RMII), it worked, but we found it had a lot of packet loss when we ping with large packet sizes:
root@am65xx-evm:~# ping 192.168.100.1 -s 1500 PING 192.168.100.1 (192.168.100.1): 1500 data bytes 1508 bytes from 192.168.100.1: seq=1 ttl=64 time=1.077 ms 1508 bytes from 192.168.100.1: seq=3 ttl=64 time=0.913 ms 1508 bytes from 192.168.100.1: seq=4 ttl=64 time=0.938 ms 1508 bytes from 192.168.100.1: seq=7 ttl=64 time=0.934 ms 1508 bytes from 192.168.100.1: seq=13 ttl=64 time=0.978 ms 1508 bytes from 192.168.100.1: seq=15 ttl=64 time=0.933 ms 1508 bytes from 192.168.100.1: seq=31 ttl=64 time=0.932 ms 1508 bytes from 192.168.100.1: seq=32 ttl=64 time=0.948 ms 1508 bytes from 192.168.100.1: seq=33 ttl=64 time=0.904 ms 1508 bytes from 192.168.100.1: seq=34 ttl=64 time=0.920 ms 1508 bytes from 192.168.100.1: seq=36 ttl=64 time=0.925 ms 1508 bytes from 192.168.100.1: seq=40 ttl=64 time=0.924 ms 1508 bytes from 192.168.100.1: seq=42 ttl=64 time=0.920 ms 1508 bytes from 192.168.100.1: seq=43 ttl=64 time=1.092 ms 1508 bytes from 192.168.100.1: seq=44 ttl=64 time=0.917 ms 1508 bytes from 192.168.100.1: seq=45 ttl=64 time=0.937 ms 1508 bytes from 192.168.100.1: seq=47 ttl=64 time=0.850 ms 1508 bytes from 192.168.100.1: seq=48 ttl=64 time=0.912 ms 1508 bytes from 192.168.100.1: seq=52 ttl=64 time=0.923 ms 1508 bytes from 192.168.100.1: seq=54 ttl=64 time=0.902 ms 1508 bytes from 192.168.100.1: seq=57 ttl=64 time=0.939 ms 1508 bytes from 192.168.100.1: seq=58 ttl=64 time=0.927 ms ^C --- 192.168.100.1 ping statistics --- 62 packets transmitted, 22 packets received, 64% packet loss round-trip min/avg/max = 0.850/0.938/1.092 ms
Its related setting in DTS list as follow:
...... mcu_cpsw1_pins_default: mcu_cpsw1_pins_default { pinctrl-single,pins = < AM65X_WKUP_IOPAD(0x0058, PIN_INPUT, 1) /* (N4) MCU_RGMII1_TX_CTL.MCU_RMII1_CRS_DV */ AM65X_WKUP_IOPAD(0x005c, PIN_INPUT, 1) /* (N5) MCU_RGMII1_RX_CTL.MCU_RMII1_RX_ER */ AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 1) /* (M4) MCU_RGMII1_TD1.MCU_RMII1_TXD1 */ AM65X_WKUP_IOPAD(0x006c, PIN_OUTPUT, 1) /* (M5) MCU_RGMII1_TD0.MCU_RMII1_TXD0 */ AM65X_WKUP_IOPAD(0x0080, PIN_INPUT, 1) /* (M6) MCU_RGMII1_RD1.MCU_RMII1_RXD1 */ AM65X_WKUP_IOPAD(0x0084, PIN_INPUT, 1) /* (L6) MCU_RGMII1_RD0.MCU_RMII1_RXD0 */ AM65X_WKUP_IOPAD(0x0070, PIN_OUTPUT, 1) /* (N1) MCU_RGMII1_TXC.MCU_RMII1_TX_EN */ AM65X_WKUP_IOPAD(0x0074, PIN_INPUT, 1) /* (M1) MCU_RGMII1_RXC.MCU_RMII1_REF_CLK */ >; }; mcu_mdio_pins_default: mcu-mdio1-pins-default { pinctrl-single,pins = < AM65X_WKUP_IOPAD(0x008c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */ AM65X_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */ >; }; ...... &mcu_cpsw { pinctrl-names = "default"; pinctrl-0 = <&mcu_cpsw1_pins_default &mcu_mdio_pins_default>; }; &davinci_mdio { phy0: ethernet-phy@0 { reg = <0>; smsc,disable-energy-detect; }; }; &cpsw_port1 { phy-mode = "rmii"; phy-handle = <&phy0>; };
the boot info from DMESG lists as follow:
[ 2.388115] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 2.395790] libphy: 46000f00.mdio: probed
[ 2.401841] davinci_mdio 46000f00.mdio: phy[0]: device 46000f00.mdio:00, driver SMSC LAN8710/LAN8720
[ 2.411120] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00102, cpsw version 0x6BA80102 Ports: 2 quirks:00000000
[ 2.425132] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
[ 2.432478] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[ 2.439729] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[ 2.446702] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0
Any suggestion about this loss?
Thanks
Kenn