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.

AM6442: Ethernet Internal loop back test failed betweenAM6442 Processor Ehternet phy Interfaced with DP83867IRRGZT.

Part Number: AM6442

We are observing an issue during Ethernet validation. The internal loopback test is failing on the interface between the AM6442 processor and the DP83867IRRGZT Ethernet PHY.

Kindly review this issue and advise on the possible root cause or additional debugging steps. If required, I can share the test logs, and configuration for further analysis.

Please let me know how we should proceed.

Thank you,
Chittibabu

 

Log Details:

root@am64xx-evm:~# 
root@am64xx-evm:~# 
root@am64xx-evm:~# dmesg | grep -i mdio
[    0.945086] mdio-mux-multiplexer mdio-mux-1: /mdio-mux-1: failed to get mux-control (0)
[    0.945120] mdio-mux-multiplexer mdio-mux-1: error -ENOENT: Failed to get mux
[    0.945129] mdio-mux-multiplexer: probe of mdio-mux-1 failed with error -2
[    1.492119] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
[    1.526103] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.527855] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
[    5.785529] davinci_mdio 300b2400.mdio: Configuring MDIO in manual mode
[    5.834154] davinci_mdio 300b2400.mdio: davinci mdio revision 1.7, bus freq 1000000
[    5.871651] davinci_mdio 300b2400.mdio: phy[15]: device 300b2400.mdio:0f, driver unknown
[   12.455158] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
root@am64xx-evm:~# 
root@am64xx-evm:~# 
root@am64xx-evm:~# ethtool --phy-statistics eth0
no stats available
root@am64xx-evm:~# 
root@am64xx-evm:~# mii_mgr -d 0 -w 0 -v 0x4140
-sh: mii_mgr: command not found
root@am64xx-evm:~# ethtool -s eth0 speed 1000 duplex full autoneg off
root@am64xx-evm:~# 
root@am64xx-evm:~# ethtool -t eth0 online
Cannot test: Operation not supported
root@am64xx-evm:~# 
root@am64xx-evm:~# ethtool --set-phy-loopback eth0 on
ethtool: bad command line argument(s)
For more information run ethtool -h
root@am64xx-evm:~# 
root@am64xx-evm:~# 
root@am64xx-evm:~# ip link set eth0 up

root@am64xx-evm:~# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100): 56 data bytes
64 bytes from 192.168.1.100: seq=0 ttl=64 time=0.290 ms
64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.261 ms
64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.226 ms
64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.228 ms
^C
--- 192.168.1.100 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.226/0.251/0.290 ms
root@am64xx-evm:~#

  • Hi Chitti babu Cheedella,

    Thank you for your query ! 

    I will let our  CPSW MDIO / Ethernet PHY expert comment on the observed issue. I need his interpretation of the software status to comment on a possible hardware issue.

    Please kindly share the test logs, and configuration for further analysis. Please expect that some delay in his response is possible.

    Thank you

    Kind Regards

    Anastas Yordanov

  • Dear Team,

    Thanks for reply,

    Currently we are working on custom board.

    Our console commands support for ethtool and phytool. But "mdio-tool" was not available.

    Please suggest the correct steps for Ethernet internal loop-back test.

    Please find the DTS configuration details and available log details for Ethernet internal loop back test.

     transceiver1: can-phy0 {
        compatible = "ti,tcan1042";
        #phy-cells = <0>;
        max-bitrate = <5000000>;
        standby-gpios = <&exp1 8 GPIO_ACTIVE_HIGH>;
      };

     

      transceiver2: can-phy1 {
        compatible = "ti,tcan1042";
        #phy-cells = <0>;
        max-bitrate = <5000000>;
        standby-gpios = <&exp1 9 GPIO_ACTIVE_HIGH>;
      };

     

      icssg1_eth: icssg1-eth {
        compatible = "ti,am642-icssg-prueth";
        pinctrl-names = "default";
        pinctrl-0 = <&icssg1_rgmii1_pins_default>;

     

        sram = <&oc_sram>;
        ti,prus = <&pru1_0>, <&rtu1_0>, <&tx_pru1_0>, <&pru1_1>, <&rtu1_1>, <&tx_pru1_1>;
        firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
            "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
            "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
            "ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
            "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
            "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";

     

        ti,pruss-gp-mux-sel = <2>,  /* MII mode */

        ti,mii-g-rt = <&icssg1_mii_g_rt>;
        ti,mii-rt = <&icssg1_mii_rt>;
        ti,pa-stats = <&icssg1_pa_stats>;
        iep = <&icssg1_iep0>,  <&icssg1_iep1>;

        interrupt-parent = <&icssg1_intc>;
        interrupts = <24 0 2>, <25 1 3>;
        interrupt-names = "tx_ts0", "tx_ts1";

     

        dmas = <&main_pktdma 0xc200 15>, /* egress slice 0 */
    <&main_pktdma 0xc201 15>, /* egress slice 0 */
    <&main_pktdma 0xc202 15>, /* egress slice 0 */
    <&main_pktdma 0xc203 15>, /* egress slice 0 */
    <&main_pktdma 0xc204 15>, /* egress slice 1 */
    <&main_pktdma 0xc205 15>, /* egress slice 1 */
    <&main_pktdma 0xc206 15>, /* egress slice 1 */
    <&main_pktdma 0xc207 15>, /* egress slice 1 */
    <&main_pktdma 0x4200 15>, /* ingress slice 0 */
    <&main_pktdma 0x4201 15>, /* ingress slice 1 */
    <&main_pktdma 0x4202 0>, /* mgmnt rsp slice 0 */
    <&main_pktdma 0x4203 0>; /* mgmnt rsp slice 1 */
        dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
              "tx1-0", "tx1-1", "tx1-2", "tx1-3",
              "rx0", "rx1";

     

        ethernet-ports {
          #address-cells = <1>;
          #size-cells = <0>;
          icssg1_emac0: port@0 {
            reg = <0>;
            phy-handle = <&icssg1_phy1>;
            phy-mode = "rgmii-id";
            ti,syscon-rgmii-delay = <&main_conf 0x4110>;
            /* Filled in by bootloader */
            local-mac-address = [00 00 00 00 00 00];
          };
          icssg1_emac1: port@1 {
            reg = <1>;
            ti,syscon-rgmii-delay = <&main_conf 0x4114>;
            /* Filled in by bootloader */
            local-mac-address = [00 00 00 00 00 00];
            status = "disabled";
          };
        };
      };

    System log details as:


    root@am64xx-evm:~#
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet6 fe80::625:e8ff:fe34:1ce7 prefixlen 64 scopeid 0x20<link>
    ether 04:25:e8:34:1c:e7 txqueuelen 1000 (Ethernet)
    RX packets 45 bytes 2843 (2.7 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 26 bytes 4256 (4.1 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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

    root@am64xx-evm:~# ifconfigp link set eth0 up
    root@am64xx-evm:~# ping -I eth0 1.1.1.1 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    64 bytes from 192.168.1.100: seq=0 ttl=64 time=0.290 ms
    64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.265 ms
    64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.243 ms
    64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.254 ms
    64 bytes from 192.168.1.100: seq=4 ttl=64 time=0.236 ms
    ^C
    --- 192.168.1.100 ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max = 0.236/0.257/0.290 ms
    root@am64xx-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::625:e8ff:fe34:1ce7 prefixlen 64 scopeid 0x20<link>
    ether 04:25:e8:34:1c:e7 txqueuelen 1000 (Ethernet)
    RX packets 48 bytes 3289 (3.2 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 49 bytes 6888 (6.7 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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

    root@am64xx-evm:~# ip -s link show eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 04:25:e8:34:1c:e7 brd ff:ff:ff:ff:ff:ff
    RX: bytes packets errors dropped missed mcast
    4129 62 0 0 0 0
    TX: bytes packets errors dropped carrier collsns
    7476 63 0 0 0 0
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# dmesg | grep -i dp83867
    [ 1.527816] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [ 11.756539] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    root@am64xx-evm:~#
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -s eth0 autoneg off speed 1000 duplex full
    root@am64xx-evm:~# [ 179.350960] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down

    root@am64xx-evm:~#
    root@am64xx-evm:~# mdio-tool read eth0 0x0
    -sh: mdio-tool: command not found
    root@am64xx-evm:~#
    root@am64xx-evm:~# mdio-tool write eth0 0x0 0x4000
    -sh: mdio-tool: command not found
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool --show-priv-flags eth0
    Private flags for eth0:
    p0-rx-ptype-rrobin : off
    iet-frame-preemption: off
    iet-mac-verify : off
    cut-thru : off
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool --set-priv-flags eth0 internal-loopback on
    netlink error: bit name not found (offset 48)
    netlink error: Operation not supported
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool --show-priv-flags eth0
    Private flags for eth0:
    p0-rx-ptype-rrobin : off
    iet-frame-preemption: off
    iet-mac-verify : off
    cut-thru : off
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -t eth0 internal
    ethtool: bad command line argument(s)
    For more information run ethtool -h
    root@am64xx-evm:~#
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool --show-priv-flags eth0
    Private flags for eth0:
    p0-rx-ptype-rrobin : off
    iet-frame-preemption: off
    iet-mac-verify : off
    cut-thru : off
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# k3-conf dump mdio
    -sh: k3-conf: command not found
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# dmesg | grep -i "PHY"
    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [ 1.488647] 0x000003fc0000-0x000004000000 : "ospi.phypattern"
    [ 1.527816] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [ 5.564786] davinci_mdio 300b2400.mdio: phy[15]: device 300b2400.mdio:0f, driver unknown
    [ 11.756539] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [ 11.756577] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [ 20.453580] platform can-phy0: deferred probe pending
    [ 20.453584] platform can-phy1: deferred probe pending
    root@am64xx-evm:~# devmem2 --help
    /dev/mem opened.
    Memory mapped at address 0xffff9d7c0000.
    Read at address 0x00000000 (0xffff9d7c0000): 0xEDEA30C0
    root@am64xx-evm:~# devmem2 --help 0x08000F00
    /dev/mem opened.
    Memory mapped at address 0xffffa1b00000.
    Read at address 0x08000F00 (0xffffa1b00f00): 0x00070907
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~# ping 192.168.1.55
    PING 192.168.1.55 (192.168.1.55): 56 data bytes

    ^C
    --- 192.168.1.55 ping statistics ---
    21 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_packets|rx_packets"
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# devmem2 0x08000F80
    /dev/mem opened.
    Memory mapped at address 0xffff9337b000.
    Read at address 0x08000F80 (0xffff9337bf80): 0x00000000
    root@am64xx-evm:~# devmem2 0x08000F80 00
    /dev/mem opened.
    Memory mapped at address 0xffffa53c6000.
    Read at address 0x08000F00 (0xffffa53c6f00): 0x00070907
    root@am64xx-evm:~# devmem2 0x08000F00 04
    /dev/mem opened.
    Memory mapped at address 0xffff9487a000.
    Read at address 0x08000F04 (0xffff9487af04): 0x810400F9
    root@am64xx-evm:~# devmem2 0x08000F04 8
    /dev/mem opened.
    Memory mapped at address 0xffff846f1000.
    Read at address 0x08000F08 (0xffff846f1f08): 0x00000001
    root@am64xx-evm:~# devmem2 0x08000F08 c
    /dev/mem opened.
    Memory mapped at address 0xffff923c4000.
    Read at address 0x08000F0C (0xffff923c4f0c): 0x00000001
    root@am64xx-evm:~#
    root@am64xx-evm:~# devmem2 0x08000F80 w 0x80004140
    /dev/mem opened.
    Memory mapped at address 0xffff94b7b000.
    Read at address 0x08000F80 (0xffff94b7bf80): 0x00000000
    Write at address 0x08000F80 (0xffff94b7bf80): 0x80004140, readback 0x80004140
    root@am64xx-evm:~#
    root@am64xx-evm:~# devmem2 0x08000F80 w 0x80160004
    /dev/mem opened.
    Memory mapped at address 0xffff9bc2a000.
    Read at address 0x08000F80 (0xffff9bc2af80): 0x80004140
    Write at address 0x08000F80 (0xffff9bc2af80): 0x80160004, readback 0x80160004
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# devmem2 0x08000F80 w 0x84004140
    /dev/mem opened.
    Memory mapped at address 0xffffbaba2000.
    Read at address 0x08000F80 (0xffffbaba2f80): 0x80004140
    Write at address 0x08000F80 (0xffffbaba2f80): 0x84004140, readback 0x84004140
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~#
    root@am64xx-evm:~# ping -I eth0 192.168.1.55
    PING 192.168.1.55 (192.168.1.55): 56 data bytes
    ^C
    --- 192.168.1.55 ping statistics ---
    26 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -S eth0 | grep -iE "p0_rx_good_frames|p0_tx_good_frames"
    p0_rx_good_frames: 114
    p0_tx_good_frames: 68
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -S eth0 | grep -iE "error|crc|align|drop"
    p0_rx_crc_errors: 0
    p0_ale_drop: 0
    p0_ale_overrun_drop: 0
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0
    p0_ale_rate_limit_drop: 0
    p0_ale_vid_ingress_drop: 0
    p0_ale_da_eq_sa_drop: 0
    p0_ale_block_drop: 0
    p0_ale_secure_drop: 0
    p0_ale_auth_drop: 0
    p0_ale_mcast_sa_drop: 0
    p0_ale_dual_vlan_drop: 0
    p0_ale_len_err_drop: 0
    p0_ale_ip_next_hdr_drop: 0
    p0_ale_ipv4_frag_drop: 0
    p0_tx_pri0_drop: 0
    p0_tx_pri1_drop: 0
    p0_tx_pri2_drop: 0
    p0_tx_pri3_drop: 0
    p0_tx_pri4_drop: 0
    p0_tx_pri5_drop: 0
    p0_tx_pri6_drop: 0
    p0_tx_pri7_drop: 0
    p0_tx_pri0_drop_bcnt: 0
    p0_tx_pri1_drop_bcnt: 0
    p0_tx_pri2_drop_bcnt: 0
    p0_tx_pri3_drop_bcnt: 0
    p0_tx_pri4_drop_bcnt: 0
    p0_tx_pri5_drop_bcnt: 0
    p0_tx_pri6_drop_bcnt: 0
    p0_tx_pri7_drop_bcnt: 0
    rx_crc_errors: 0
    rx_align_code_errors: 0
    ale_drop: 18
    ale_overrun_drop: 0
    rx_ipg_error: 0
    tx_carrier_sense_errors: 0
    rx_bottom_fifo_drop: 0
    rx_port_mask_drop: 18
    rx_top_fifo_drop: 0
    ale_rate_limit_drop: 0
    ale_vid_ingress_drop: 0
    ale_da_eq_sa_drop: 0
    ale_block_drop: 0
    ale_secure_drop: 0
    ale_auth_drop: 0
    ale_mcast_sa_drop: 0
    ale_dual_vlan_drop: 0
    ale_len_err_drop: 0
    ale_ip_next_hdr_drop: 0
    ale_ipv4_frag_drop: 0
    tx_pri0_drop: 0
    tx_pri1_drop: 0
    tx_pri2_drop: 0
    tx_pri3_drop: 0
    tx_pri4_drop: 0
    tx_pri5_drop: 0
    tx_pri6_drop: 0
    tx_pri7_drop: 0
    tx_pri0_drop_bcnt: 0
    tx_pri1_drop_bcnt: 0
    tx_pri2_drop_bcnt: 0
    tx_pri3_drop_bcnt: 0
    tx_pri4_drop_bcnt: 0
    tx_pri5_drop_bcnt: 0
    tx_pri6_drop_bcnt: 0
    tx_pri7_drop_bcnt: 0
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# devmem2 0x08000F80 w 0x80160008
    /dev/mem opened.
    Memory mapped at address 0xffffbaab2000.
    Read at address 0x08000F80 (0xffffbaab2f80): 0x80004140
    Write at address 0x08000F80 (0xffffbaab2f80): 0x80160008, readback 0x80160008
    root@am64xx-evm:~# devmem2 0x08000F80 w 0x80160008
    root@am64xx-evm:~# ethtool -S eth0 | grep -iE "error|crc|align|drop"[15@p0_rx_good_frames|p0_tx_good_frames"
    root@am64xx-evm:~# [39Pping -I eth0 192.168.1.55
    PING 192.168.1.55 (192.168.1.55): 56 data bytes
    ^C
    --- 192.168.1.55 ping statistics ---
    145 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# mdio mdio-tool write eth0 0 0x0D 0x001F
    -sh: mdio-tool: command not found
    root@am64xx-evm:~#
    root@am64xx-evm:~# phytool eth0/phy_addr/reg_addr
    error: bad location format
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# phytool eth0/0/0
    ieee-phy: reg:BMCR(0x00) val:0x0140
    flags: -reset -loopback -aneg-enable -power-down -isolate -aneg-restart -collision-test
    speed: 1000-full
    root@am64xx-evm:~# phytool eth0/0/1
    ieee-phy: reg:BMSR(0x01) val:0x7949
    capabilities: -100-b4 [1m+100-f[0m [1m+100-h[0m [1m+10-f[0m [1m+10-h[0m -100-t2-f -100-t2-h
    flags: [1m+ext-status[0m -aneg-complete -remote-fault [1m+aneg-capable[0m -link -jabber [1m+ext-register[0m
    root@am64xx-evm:~# phytool eth0/0/1 2
    ieee-phy: reg:0x02 val:0x2000
    root@am64xx-evm:~#
    root@am64xx-evm:~# phytool write eth0/0/0 0x4140
    root@am64xx-evm:~# phytool print eth0/0
    ieee-phy: id:0x2000a231

    ieee-phy: reg:BMCR(0x00) val:0x4140
    flags: -reset [1m+loopback[0m -aneg-enable -power-down -isolate -aneg-restart -collision-test
    speed: 1000-full

    ieee-phy: reg:BMSR(0x01) val:0x7949
    capabilities: -100-b4 [1m+100-f[0m [1m+100-h[0m [1m+10-f[0m [1m+10-h[0m -100-t2-f -100-t2-h
    flags: [1m+ext-status[0m -aneg-complete -remote-fault [1m+aneg-capable[0m -link -jabber [1m+ext-register[0m
    root@am64xx-evm:~# phytool eth0/0/0x86
    ieee-phy: reg:0x86 val:0x0066
    root@am64xx-evm:~# cat /sys/kernel/debug/8000f00.mdio/0/phy_registers
    cat: /sys/kernel/debug/8000f00.mdio/0/phy_registers: No such file or directory
    root@am64xx-evm:~# cat /sys/kernel/debug/8000f00.mdio/0/phy_registers
    8000000.ethernet/ dma_pools/ memblock/ remoteproc/
    asoc/ dmaengine/ mmc0/ sleep_time
    bdi/ dri/ mmc1/ spi-nor/
    block/ extfrag/ mtd/ swiotlb/
    bluetooth/ fault_around_bytes opp/ ti_sci_debug@44043000.system-controller
    clear_warn_once gpio pinctrl/ ubi/
    clk/ hid/ pm_genpd/ ubifs/
    debug_enabled hsr/ psci ufshcd/
    devfreq/ ieee80211/ pwm ulpi/
    device_component/ iio/ ras/ usb/
    devices_deferred interconnect/ regmap/ virtio-ports/
    dma_buf/ megaraid_sas/ regulator/
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    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: No
    Advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Auto-negotiation: off
    master-slave cfg: preferred slave
    master-slave status: unknown
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: external
    MDI-X: Unknown
    Supports Wake-on: ubgs
    Wake-on: d
    SecureOn password: 00:00:00:00:00:00
    Current message level: 0x000020f7 (8439)
    drv probe link ifdown ifup rx_err tx_err hw
    Link detected: no
    root@am64xx-evm:~# ethtool -i eth0
    driver: am65-cpsw-nuss
    version: 6.1.83-rt28-ti-rt-g96b0ebd82722
    firmware-version:
    expansion-rom-version:
    bus-info: 8000000.ethernet
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: yes
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -S eth0
    NIC statistics:
    p0_rx_good_frames: 114
    p0_rx_broadcast_frames: 79
    p0_rx_multicast_frames: 35
    p0_rx_crc_errors: 0
    p0_rx_oversized_frames: 0
    p0_rx_undersized_frames: 0
    p0_ale_drop: 0
    p0_ale_overrun_drop: 0
    p0_rx_octets: 11702
    p0_tx_good_frames: 68
    p0_tx_broadcast_frames: 65
    p0_tx_multicast_frames: 3
    p0_tx_octets: 4761
    p0_tx_64B_frames: 139
    p0_tx_65_to_127B_frames: 20
    p0_tx_128_to_255B_frames: 13
    p0_tx_256_to_511B_frames: 10
    p0_tx_512_to_1023B_frames: 0
    p0_tx_1024B_frames: 0
    p0_net_octets: 16463
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0
    p0_ale_rate_limit_drop: 0
    p0_ale_vid_ingress_drop: 0
    p0_ale_da_eq_sa_drop: 0
    p0_ale_block_drop: 0
    p0_ale_secure_drop: 0
    p0_ale_auth_drop: 0
    p0_ale_unknown_ucast: 0
    p0_ale_unknown_ucast_bytes: 0
    p0_ale_unknown_mcast: 0
    p0_ale_unknown_mcast_bytes: 0
    p0_ale_unknown_bcast: 0
    p0_ale_unknown_bcast_bytes: 0
    p0_ale_pol_match: 0
    p0_ale_pol_match_red: 0
    p0_ale_pol_match_yellow: 0
    p0_ale_mcast_sa_drop: 0
    p0_ale_dual_vlan_drop: 0
    p0_ale_len_err_drop: 0
    p0_ale_ip_next_hdr_drop: 0
    p0_ale_ipv4_frag_drop: 0
    p0_tx_mem_protect_err: 0
    p0_tx_pri0: 68
    p0_tx_pri1: 0
    p0_tx_pri2: 0
    p0_tx_pri3: 0
    p0_tx_pri4: 0
    p0_tx_pri5: 0
    p0_tx_pri6: 0
    p0_tx_pri7: 0
    p0_tx_pri0_bcnt: 4761
    p0_tx_pri1_bcnt: 0
    p0_tx_pri2_bcnt: 0
    p0_tx_pri3_bcnt: 0
    p0_tx_pri4_bcnt: 0
    p0_tx_pri5_bcnt: 0
    p0_tx_pri6_bcnt: 0
    p0_tx_pri7_bcnt: 0
    p0_tx_pri0_drop: 0
    p0_tx_pri1_drop: 0
    p0_tx_pri2_drop: 0
    p0_tx_pri3_drop: 0
    p0_tx_pri4_drop: 0
    p0_tx_pri5_drop: 0
    p0_tx_pri6_drop: 0
    p0_tx_pri7_drop: 0
    p0_tx_pri0_drop_bcnt: 0
    p0_tx_pri1_drop_bcnt: 0
    p0_tx_pri2_drop_bcnt: 0
    p0_tx_pri3_drop_bcnt: 0
    p0_tx_pri4_drop_bcnt: 0
    p0_tx_pri5_drop_bcnt: 0
    p0_tx_pri6_drop_bcnt: 0
    p0_tx_pri7_drop_bcnt: 0
    rx_good_frames: 86
    rx_broadcast_frames: 65
    rx_multicast_frames: 21
    rx_pause_frames: 0
    rx_crc_errors: 0
    rx_align_code_errors: 0
    rx_oversized_frames: 0
    rx_jabber_frames: 0
    rx_undersized_frames: 0
    rx_fragments: 0
    ale_drop: 18
    ale_overrun_drop: 0
    rx_octets: 7462
    tx_good_frames: 114
    tx_broadcast_frames: 79
    tx_multicast_frames: 35
    tx_pause_frames: 0
    tx_deferred_frames: 0
    tx_collision_frames: 0
    tx_single_coll_frames: 0
    tx_mult_coll_frames: 0
    tx_excessive_collisions: 0
    tx_late_collisions: 0
    rx_ipg_error: 0
    tx_carrier_sense_errors: 0
    tx_octets: 11702
    tx_64B_frames: 139
    tx_65_to_127B_frames: 29
    tx_128_to_255B_frames: 22
    tx_256_to_511B_frames: 10
    tx_512_to_1023B_frames: 0
    tx_1024B_frames: 0
    net_octets: 19164
    rx_bottom_fifo_drop: 0
    rx_port_mask_drop: 18
    rx_top_fifo_drop: 0
    ale_rate_limit_drop: 0
    ale_vid_ingress_drop: 0
    ale_da_eq_sa_drop: 0
    ale_block_drop: 0
    ale_secure_drop: 0
    ale_auth_drop: 0
    ale_unknown_ucast: 0
    ale_unknown_ucast_bytes: 0
    ale_unknown_mcast: 21
    ale_unknown_mcast_bytes: 3302
    ale_unknown_bcast: 65
    ale_unknown_bcast_bytes: 4160
    ale_pol_match: 0
    ale_pol_match_red: 0
    ale_pol_match_yellow: 0
    ale_mcast_sa_drop: 0
    ale_dual_vlan_drop: 0
    ale_len_err_drop: 0
    ale_ip_next_hdr_drop: 0
    ale_ipv4_frag_drop: 0
    iet_rx_assembly_err: 0
    iet_rx_assembly_ok: 0
    iet_rx_smd_err: 0
    iet_rx_frag: 0
    iet_tx_hold: 0
    iet_tx_frag: 0
    tx_mem_protect_err: 0
    tx_pri0: 114
    tx_pri1: 0
    tx_pri2: 0
    tx_pri3: 0
    tx_pri4: 0
    tx_pri5: 0
    tx_pri6: 0
    tx_pri7: 0
    tx_pri0_bcnt: 11702
    tx_pri1_bcnt: 0
    tx_pri2_bcnt: 0
    tx_pri3_bcnt: 0
    tx_pri4_bcnt: 0
    tx_pri5_bcnt: 0
    tx_pri6_bcnt: 0
    tx_pri7_bcnt: 0
    tx_pri0_drop: 0
    tx_pri1_drop: 0
    tx_pri2_drop: 0
    tx_pri3_drop: 0
    tx_pri4_drop: 0
    tx_pri5_drop: 0
    tx_pri6_drop: 0
    tx_pri7_drop: 0
    tx_pri0_drop_bcnt: 0
    tx_pri1_drop_bcnt: 0
    tx_pri2_drop_bcnt: 0
    tx_pri3_drop_bcnt: 0
    tx_pri4_drop_bcnt: 0
    tx_pri5_drop_bcnt: 0
    tx_pri6_drop_bcnt: 0
    tx_pri7_drop_bcnt: 0
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -S eth0 | grep -iE "good_frames|errors|crc|drop"
    p0_rx_good_frames: 114
    p0_rx_crc_errors: 0
    p0_ale_drop: 0
    p0_ale_overrun_drop: 0
    p0_tx_good_frames: 68
    p0_rx_bottom_fifo_drop: 0
    p0_rx_port_mask_drop: 0
    p0_rx_top_fifo_drop: 0
    p0_ale_rate_limit_drop: 0
    p0_ale_vid_ingress_drop: 0
    p0_ale_da_eq_sa_drop: 0
    p0_ale_block_drop: 0
    p0_ale_secure_drop: 0
    p0_ale_auth_drop: 0
    p0_ale_mcast_sa_drop: 0
    p0_ale_dual_vlan_drop: 0
    p0_ale_len_err_drop: 0
    p0_ale_ip_next_hdr_drop: 0
    p0_ale_ipv4_frag_drop: 0
    p0_tx_pri0_drop: 0
    p0_tx_pri1_drop: 0
    p0_tx_pri2_drop: 0
    p0_tx_pri3_drop: 0
    p0_tx_pri4_drop: 0
    p0_tx_pri5_drop: 0
    p0_tx_pri6_drop: 0
    p0_tx_pri7_drop: 0
    p0_tx_pri0_drop_bcnt: 0
    p0_tx_pri1_drop_bcnt: 0
    p0_tx_pri2_drop_bcnt: 0
    p0_tx_pri3_drop_bcnt: 0
    p0_tx_pri4_drop_bcnt: 0
    p0_tx_pri5_drop_bcnt: 0
    p0_tx_pri6_drop_bcnt: 0
    p0_tx_pri7_drop_bcnt: 0
    rx_good_frames: 86
    rx_crc_errors: 0
    rx_align_code_errors: 0
    ale_drop: 18
    ale_overrun_drop: 0
    tx_good_frames: 114
    tx_carrier_sense_errors: 0
    rx_bottom_fifo_drop: 0
    rx_port_mask_drop: 18
    rx_top_fifo_drop: 0
    ale_rate_limit_drop: 0
    ale_vid_ingress_drop: 0
    ale_da_eq_sa_drop: 0
    ale_block_drop: 0
    ale_secure_drop: 0
    ale_auth_drop: 0
    ale_mcast_sa_drop: 0
    ale_dual_vlan_drop: 0
    ale_len_err_drop: 0
    ale_ip_next_hdr_drop: 0
    ale_ipv4_frag_drop: 0
    tx_pri0_drop: 0
    tx_pri1_drop: 0
    tx_pri2_drop: 0
    tx_pri3_drop: 0
    tx_pri4_drop: 0
    tx_pri5_drop: 0
    tx_pri6_drop: 0
    tx_pri7_drop: 0
    tx_pri0_drop_bcnt: 0
    tx_pri1_drop_bcnt: 0
    tx_pri2_drop_bcnt: 0
    tx_pri3_drop_bcnt: 0
    tx_pri4_drop_bcnt: 0
    tx_pri5_drop_bcnt: 0
    tx_pri6_drop_bcnt: 0
    tx_pri7_drop_bcnt: 0
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# ethtool -d eth0
    Offset Values
    ------ ------
    0x0000: 01 00 00 00 48 00 00 00 00 00 00 00 03 09 a0 6b
    0x0010: 04 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
    0x0020: 0c 00 00 00 00 00 00 00 10 00 00 00 03 00 00 00
    0x0030: 14 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00
    0x0040: 1c 00 00 00 00 00 00 00 02 00 00 00 48 00 00 00
    0x0050: 30 00 00 00 03 00 00 00 34 00 00 00 00 00 00 00
    0x0060: 38 00 00 00 00 00 00 00 3c 00 00 00 00 00 00 00
    0x0070: 40 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00
    0x0080: 48 00 00 00 00 00 00 00 4c 00 00 00 00 00 00 00
    0x0090: 03 00 00 00 08 02 00 00 00 0f 00 00 07 09 07 00
    0x00a0: 04 0f 00 00 f9 00 04 81 08 0f 00 00 01 00 00 00
    0x00b0: 0c 0f 00 00 01 00 00 00 10 0f 00 00 03 00 00 00
    0x00c0: 14 0f 00 00 00 00 00 00 18 0f 00 00 00 00 00 00
    0x00d0: 1c 0f 00 00 00 00 00 00 20 0f 00 00 00 00 00 00
    0x00e0: 24 0f 00 00 00 00 00 00 28 0f 00 00 00 00 00 00
    0x00f0: 2c 0f 00 00 00 00 00 00 30 0f 00 00 01 00 00 00
    0x0100: 34 0f 00 00 00 00 00 80 38 0f 00 00 ff ff ff ff
    0x0110: 3c 0f 00 00 00 00 00 00 40 0f 00 00 00 00 00 00
    0x0120: 44 0f 00 00 00 00 00 00 48 0f 00 00 00 00 00 00
    0x0130: 4c 0f 00 00 00 00 00 00 50 0f 00 00 00 00 00 00
    0x0140: 54 0f 00 00 00 00 00 00 58 0f 00 00 00 00 00 00
    0x0150: 5c 0f 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
    0x0160: 64 0f 00 00 00 00 00 00 68 0f 00 00 00 00 00 00
    0x0170: 6c 0f 00 00 00 00 00 00 70 0f 00 00 00 00 00 00
    0x0180: 74 0f 00 00 00 00 00 00 78 0f 00 00 00 00 00 00
    0x0190: 7c 0f 00 00 00 00 00 00 80 0f 00 00 40 41 00 80
    0x01a0: 84 0f 00 00 00 00 00 00 88 0f 00 00 00 00 00 00
    0x01b0: 8c 0f 00 00 00 00 00 00 90 0f 00 00 00 00 00 00
    0x01c0: 94 0f 00 00 00 00 00 00 98 0f 00 00 00 00 00 00
    0x01d0: 9c 0f 00 00 00 00 00 00 a0 0f 00 00 00 00 00 00
    0x01e0: a4 0f 00 00 00 00 00 00 a8 0f 00 00 00 00 00 00
    0x01f0: ac 0f 00 00 00 00 00 00 b0 0f 00 00 00 00 00 00
    0x0200: b4 0f 00 00 00 00 00 00 b8 0f 00 00 00 00 00 00
    0x0210: bc 0f 00 00 00 00 00 00 c0 0f 00 00 00 00 00 00
    0x0220: c4 0f 00 00 00 00 00 00 c8 0f 00 00 00 00 00 00
    0x0230: cc 0f 00 00 00 00 00 00 d0 0f 00 00 00 00 00 00
    0x0240: d4 0f 00 00 00 00 00 00 d8 0f 00 00 00 00 00 00
    0x0250: dc 0f 00 00 00 00 00 00 e0 0f 00 00 00 00 00 00
    0x0260: e4 0f 00 00 00 00 00 00 e8 0f 00 00 00 00 00 00
    0x0270: ec 0f 00 00 00 00 00 00 f0 0f 00 00 00 00 00 00
    0x0280: f4 0f 00 00 00 00 00 00 f8 0f 00 00 00 00 00 00
    0x0290: fc 0f 00 00 00 00 00 00 04 00 00 00 48 02 00 00
    0x02a0: 00 00 02 00 03 09 a8 6b 04 00 02 00 06 60 00 00
    0x02b0: 08 00 02 00 00 00 00 00 0c 00 02 00 00 00 00 00
    0x02c0: 10 00 02 00 00 00 00 00 14 00 02 00 07 00 00 00
    0x02d0: 18 00 02 00 00 00 00 00 1c 00 02 00 00 00 00 00
    0x02e0: 20 00 02 00 01 30 00 00 24 00 02 00 0b 00 00 00
    0x02f0: 28 00 02 00 00 00 00 00 2c 00 02 00 00 00 00 00
    0x0300: 30 00 02 00 ff ff ff ff 34 00 02 00 00 00 00 00
    0x0310: 38 00 02 00 ff ff ff ff 3c 00 02 00 ff ff ff ff
    0x0320: 40 00 02 00 00 00 00 00 44 00 02 00 00 00 00 00
    0x0330: 48 00 02 00 00 00 00 00 4c 00 02 00 00 00 00 00
    0x0340: 50 00 02 00 00 81 a8 88 54 00 02 00 00 00 00 00
    0x0350: 58 00 02 00 00 00 00 00 5c 00 02 00 00 00 00 00
    0x0360: 60 00 02 00 64 00 00 00 64 00 02 00 00 00 00 00
    0x0370: 68 00 02 00 00 00 00 00 6c 00 02 00 00 00 00 00
    0x0380: 70 00 02 00 00 00 00 00 74 00 02 00 00 00 00 00
    0x0390: 78 00 02 00 00 00 00 00 7c 00 02 00 00 00 00 00
    0x03a0: 80 00 02 00 00 00 00 00 84 00 02 00 00 00 00 00
    0x03b0: 88 00 02 00 00 00 00 00 8c 00 02 00 00 00 00 00
    0x03c0: 90 00 02 00 00 00 00 00 94 00 02 00 00 00 00 00
    0x03d0: 98 00 02 00 00 00 00 00 9c 00 02 00 00 00 00 00
    0x03e0: a0 00 02 00 00 00 00 00 a4 00 02 00 00 00 00 00
    0x03f0: a8 00 02 00 00 00 00 00 ac 00 02 00 00 00 00 00
    0x0400: b0 00 02 00 00 00 00 00 b4 00 02 00 00 00 00 00
    0x0410: b8 00 02 00 00 00 00 00 bc 00 02 00 00 00 00 00
    0x0420: c0 00 02 00 00 00 00 00 c4 00 02 00 00 00 00 00
    0x0430: c8 00 02 00 00 00 00 00 cc 00 02 00 00 00 00 00
    0x0440: d0 00 02 00 00 00 00 00 d4 00 02 00 00 00 00 00
    0x0450: d8 00 02 00 00 00 00 00 dc 00 02 00 00 00 00 00
    0x0460: e0 00 02 00 00 00 00 00 e4 00 02 00 00 00 00 00
    0x0470: e8 00 02 00 00 00 00 00 ec 00 02 00 00 00 00 00
    0x0480: f0 00 02 00 00 00 00 00 f4 00 02 00 00 00 00 00
    0x0490: f8 00 02 00 00 00 00 00 fc 00 02 00 00 00 00 00
    0x04a0: 00 01 02 00 e8 07 00 00 04 01 02 00 e8 07 00 00
    0x04b0: 08 01 02 00 e8 07 00 00 0c 01 02 00 e8 07 00 00
    0x04c0: 10 01 02 00 e8 07 00 00 14 01 02 00 e8 07 00 00
    0x04d0: 18 01 02 00 e8 07 00 00 1c 01 02 00 e8 07 00 00
    0x04e0: 05 00 00 00 50 06 00 00 00 10 02 00 00 00 00 00
    0x04f0: 04 10 02 00 01 00 01 00 08 10 02 00 10 00 00 00
    0x0500: 0c 10 02 00 00 00 00 00 10 10 02 00 02 00 00 00
    0x0510: 14 10 02 00 00 00 00 00 18 10 02 00 10 32 54 76
    0x0520: 1c 10 02 00 00 00 00 00 20 10 02 00 10 32 54 76
    0x0530: 24 10 02 00 e8 07 00 00 28 10 02 00 78 56 24 01
    0x0540: 2c 10 02 00 00 00 00 00 30 10 02 00 00 00 00 00
    0x0550: 34 10 02 00 00 00 00 00 38 10 02 00 60 00 00 00
    0x0560: 3c 10 02 00 00 00 00 00 40 10 02 00 00 00 00 00
    0x0570: 44 10 02 00 00 00 00 00 48 10 02 00 00 00 00 00
    0x0580: 4c 10 02 00 00 00 00 00 50 10 02 00 00 00 00 00
    0x0590: 54 10 02 00 00 00 00 00 58 10 02 00 00 00 00 00
    0x05a0: 5c 10 02 00 00 00 00 00 60 10 02 00 00 00 00 00
    0x05b0: 64 10 02 00 00 00 00 00 68 10 02 00 00 00 00 00
    0x05c0: 6c 10 02 00 00 00 00 00 70 10 02 00 00 00 00 00
    0x05d0: 74 10 02 00 00 00 00 00 78 10 02 00 00 00 00 00
    0x05e0: 7c 10 02 00 00 00 00 00 80 10 02 00 00 00 00 00
    0x05f0: 84 10 02 00 00 00 00 00 88 10 02 00 00 00 00 00
    0x0600: 8c 10 02 00 00 00 00 00 90 10 02 00 00 00 00 00
    0x0610: 94 10 02 00 00 00 00 00 98 10 02 00 00 00 00 00
    0x0620: 9c 10 02 00 00 00 00 00 a0 10 02 00 00 00 00 00
    0x0630: a4 10 02 00 00 00 00 00 a8 10 02 00 00 00 00 00
    0x0640: ac 10 02 00 00 00 00 00 b0 10 02 00 00 00 00 00
    0x0650: b4 10 02 00 00 00 00 00 b8 10 02 00 00 00 00 00
    0x0660: bc 10 02 00 00 00 00 00 c0 10 02 00 00 00 00 00
    0x0670: c4 10 02 00 00 00 00 00 c8 10 02 00 00 00 00 00
    0x0680: cc 10 02 00 00 00 00 00 d0 10 02 00 00 00 00 00
    0x0690: d4 10 02 00 00 00 00 00 d8 10 02 00 00 00 00 00
    0x06a0: dc 10 02 00 00 00 00 00 e0 10 02 00 00 00 00 00
    0x06b0: e4 10 02 00 00 00 00 00 e8 10 02 00 00 00 00 00
    0x06c0: ec 10 02 00 00 00 00 00 f0 10 02 00 00 00 00 00
    0x06d0: f4 10 02 00 00 00 00 00 f8 10 02 00 00 00 00 00
    0x06e0: fc 10 02 00 00 00 00 00 00 11 02 00 00 00 00 00
    0x06f0: 04 11 02 00 00 00 00 00 08 11 02 00 00 00 00 00
    0x0700: 0c 11 02 00 00 00 00 00 10 11 02 00 00 00 00 00
    0x0710: 14 11 02 00 00 00 00 00 18 11 02 00 00 00 00 00
    0x0720: 1c 11 02 00 00 00 00 00 20 11 02 00 00 00 00 00
    0x0730: 24 11 02 00 00 00 00 00 28 11 02 00 00 00 00 00
    0x0740: 2c 11 02 00 00 00 00 00 30 11 02 00 00 00 00 00
    0x0750: 34 11 02 00 00 00 00 00 38 11 02 00 00 00 00 00
    0x0760: 3c 11 02 00 00 00 00 00 40 11 02 00 00 00 00 00
    0x0770: 44 11 02 00 00 00 00 00 48 11 02 00 00 00 00 00
    0x0780: 4c 11 02 00 00 00 00 00 50 11 02 00 00 00 00 00
    0x0790: 54 11 02 00 00 00 00 00 58 11 02 00 00 00 00 00
    0x07a0: 5c 11 02 00 00 00 00 00 60 11 02 00 00 00 00 00
    0x07b0: 64 11 02 00 00 00 00 00 68 11 02 00 00 00 00 00
    0x07c0: 6c 11 02 00 00 00 00 00 70 11 02 00 00 00 00 00
    0x07d0: 74 11 02 00 00 00 00 00 78 11 02 00 00 00 00 00
    0x07e0: 7c 11 02 00 00 00 00 00 80 11 02 00 1f 1f 1f 1f
    0x07f0: 84 11 02 00 1f 1f 1f 1f 88 11 02 00 00 00 00 00
    0x0800: 8c 11 02 00 00 00 00 00 90 11 02 00 1f 1f 1f 1f
    0x0810: 94 11 02 00 1f 1f 1f 1f 98 11 02 00 00 00 00 00
    0x0820: 9c 11 02 00 00 00 00 00 a0 11 02 00 00 00 00 00
    0x0830: a4 11 02 00 00 00 00 00 a8 11 02 00 00 00 00 00
    0x0840: ac 11 02 00 00 00 00 00 b0 11 02 00 00 00 00 00
    0x0850: b4 11 02 00 00 00 00 00 b8 11 02 00 00 00 00 00
    0x0860: bc 11 02 00 00 00 00 00 c0 11 02 00 00 00 00 00
    0x0870: c4 11 02 00 00 00 00 00 c8 11 02 00 00 00 00 00
    0x0880: cc 11 02 00 00 00 00 00 d0 11 02 00 00 00 00 00
    0x0890: d4 11 02 00 00 00 00 00 d8 11 02 00 00 00 00 00
    0x08a0: dc 11 02 00 00 00 00 00 e0 11 02 00 00 00 00 00
    0x08b0: e4 11 02 00 00 00 00 00 e8 11 02 00 00 00 00 00
    0x08c0: ec 11 02 00 00 00 00 00 f0 11 02 00 00 00 00 00
    0x08d0: f4 11 02 00 00 00 00 00 f8 11 02 00 00 00 00 00
    0x08e0: fc 11 02 00 00 00 00 00 00 12 02 00 00 00 00 00
    0x08f0: 04 12 02 00 00 00 00 00 08 12 02 00 00 00 00 00
    0x0900: 0c 12 02 00 00 00 00 00 10 12 02 00 00 00 00 00
    0x0910: 14 12 02 00 00 00 00 00 18 12 02 00 00 00 00 00
    0x0920: 1c 12 02 00 00 00 00 00 20 12 02 00 00 00 00 00
    0x0930: 24 12 02 00 00 00 00 00 28 12 02 00 00 00 00 00
    0x0940: 2c 12 02 00 00 00 00 00 30 12 02 00 00 00 00 00
    0x0950: 34 12 02 00 00 00 00 00 38 12 02 00 00 00 00 00
    0x0960: 3c 12 02 00 00 00 00 00 40 12 02 00 00 00 00 00
    0x0970: 44 12 02 00 00 00 00 00 48 12 02 00 00 00 00 00
    0x0980: 4c 12 02 00 00 00 00 00 50 12 02 00 00 00 00 00
    0x0990: 54 12 02 00 00 00 00 00 58 12 02 00 00 00 00 00
    0x09a0: 5c 12 02 00 00 00 00 00 60 12 02 00 00 00 00 00
    0x09b0: 64 12 02 00 00 00 00 00 68 12 02 00 00 00 00 00
    0x09c0: 6c 12 02 00 00 00 00 00 70 12 02 00 00 00 00 00
    0x09d0: 74 12 02 00 00 00 00 00 78 12 02 00 00 00 00 00
    0x09e0: 7c 12 02 00 00 00 00 00 80 12 02 00 00 00 00 00
    0x09f0: 84 12 02 00 00 00 00 00 88 12 02 00 00 00 00 00
    0x0a00: 8c 12 02 00 00 00 00 00 90 12 02 00 00 00 00 00
    0x0a10: 94 12 02 00 00 00 00 00 98 12 02 00 00 00 00 00
    0x0a20: 9c 12 02 00 00 00 00 00 a0 12 02 00 00 00 00 00
    0x0a30: a4 12 02 00 00 00 00 00 a8 12 02 00 00 00 00 00
    0x0a40: ac 12 02 00 00 00 00 00 b0 12 02 00 00 00 00 00
    0x0a50: b4 12 02 00 00 00 00 00 b8 12 02 00 00 00 00 00
    0x0a60: bc 12 02 00 00 00 00 00 c0 12 02 00 00 00 00 00
    0x0a70: c4 12 02 00 00 00 00 00 c8 12 02 00 00 00 00 00
    0x0a80: cc 12 02 00 00 00 00 00 d0 12 02 00 00 00 00 00
    0x0a90: d4 12 02 00 00 00 00 00 d8 12 02 00 00 00 00 00
    0x0aa0: dc 12 02 00 00 00 00 00 e0 12 02 00 00 00 00 00
    0x0ab0: e4 12 02 00 00 00 00 00 e8 12 02 00 00 00 00 00
    0x0ac0: ec 12 02 00 00 00 00 00 f0 12 02 00 00 00 00 00
    0x0ad0: f4 12 02 00 00 00 00 00 f8 12 02 00 00 00 00 00
    0x0ae0: fc 12 02 00 00 00 00 00 00 13 02 00 01 02 03 04
    0x0af0: 04 13 02 00 05 06 07 08 08 13 02 00 00 00 00 00
    0x0b00: 0c 13 02 00 00 00 00 00 10 13 02 00 00 00 00 00
    0x0b10: 14 13 02 00 00 00 00 00 18 13 02 00 00 00 00 00
    0x0b20: 1c 13 02 00 00 00 00 00 20 13 02 00 00 00 00 00
    0x0b30: 06 00 00 00 58 07 00 00 00 20 02 00 00 00 00 00
    0x0b40: 04 20 02 00 00 00 00 00 08 20 02 00 04 10 00 00
    0x0b50: 0c 20 02 00 00 00 00 00 10 20 02 00 02 00 00 00
    0x0b60: 14 20 02 00 00 00 00 00 18 20 02 00 10 32 54 76
    0x0b70: 1c 20 02 00 00 90 00 00 20 20 02 00 10 32 54 76
    0x0b80: 24 20 02 00 e8 07 00 00 28 20 02 00 78 56 24 01
    0x0b90: 2c 20 02 00 00 00 00 00 30 20 02 00 00 00 00 00
    0x0ba0: 34 20 02 00 00 00 00 00 38 20 02 00 62 00 00 00
    0x0bb0: 3c 20 02 00 00 00 00 00 40 20 02 00 00 00 00 00
    0x0bc0: 44 20 02 00 00 00 00 00 48 20 02 00 d0 12 13 00
    0x0bd0: 4c 20 02 00 00 00 00 00 50 20 02 00 00 ff 00 00
    0x0be0: 54 20 02 00 00 00 00 00 58 20 02 00 00 00 00 00
    0x0bf0: 5c 20 02 00 00 00 00 00 60 20 02 00 00 00 00 00
    0x0c00: 64 20 02 00 00 00 00 00 68 20 02 00 00 00 00 00
    0x0c10: 6c 20 02 00 00 00 00 00 70 20 02 00 00 00 00 00
    0x0c20: 74 20 02 00 00 00 00 00 78 20 02 00 00 00 00 00
    0x0c30: 7c 20 02 00 00 00 00 00 80 20 02 00 00 00 00 00
    0x0c40: 84 20 02 00 00 00 00 00 88 20 02 00 00 00 00 00
    0x0c50: 8c 20 02 00 00 00 00 00 90 20 02 00 00 00 00 00
    0x0c60: 94 20 02 00 00 00 00 00 98 20 02 00 00 00 00 00
    0x0c70: 9c 20 02 00 00 00 00 00 a0 20 02 00 00 00 00 00
    0x0c80: a4 20 02 00 00 00 00 00 a8 20 02 00 00 00 00 00
    0x0c90: ac 20 02 00 00 00 00 00 b0 20 02 00 00 00 00 00
    0x0ca0: b4 20 02 00 00 00 00 00 b8 20 02 00 00 00 00 00
    0x0cb0: bc 20 02 00 00 00 00 00 c0 20 02 00 00 00 00 00
    0x0cc0: c4 20 02 00 00 00 00 00 c8 20 02 00 00 00 00 00
    0x0cd0: cc 20 02 00 00 00 00 00 d0 20 02 00 00 00 00 00
    0x0ce0: d4 20 02 00 00 00 00 00 d8 20 02 00 00 00 00 00
    0x0cf0: dc 20 02 00 00 00 00 00 e0 20 02 00 00 00 00 00
    0x0d00: e4 20 02 00 00 00 00 00 e8 20 02 00 00 00 00 00
    0x0d10: ec 20 02 00 00 00 00 00 f0 20 02 00 00 00 00 00
    0x0d20: f4 20 02 00 00 00 00 00 f8 20 02 00 00 00 00 00
    0x0d30: fc 20 02 00 00 00 00 00 00 21 02 00 00 00 00 00
    0x0d40: 04 21 02 00 00 00 00 00 08 21 02 00 00 00 00 00
    0x0d50: 0c 21 02 00 00 00 00 00 10 21 02 00 00 00 00 00
    0x0d60: 14 21 02 00 00 00 00 00 18 21 02 00 00 00 00 00
    0x0d70: 1c 21 02 00 00 00 00 00 20 21 02 00 00 00 00 00
    0x0d80: 24 21 02 00 00 00 00 00 28 21 02 00 00 00 00 00
    0x0d90: 2c 21 02 00 00 00 00 00 30 21 02 00 00 00 00 00
    0x0da0: 34 21 02 00 00 00 00 00 38 21 02 00 00 00 00 00
    0x0db0: 3c 21 02 00 00 00 00 00 40 21 02 00 00 00 00 00
    0x0dc0: 44 21 02 00 00 00 00 00 48 21 02 00 00 00 00 00
    0x0dd0: 4c 21 02 00 00 00 00 00 50 21 02 00 00 00 00 00
    0x0de0: 54 21 02 00 00 00 00 00 58 21 02 00 00 00 00 00
    0x0df0: 5c 21 02 00 00 00 00 00 60 21 02 00 00 00 00 00
    0x0e00: 64 21 02 00 00 00 00 00 68 21 02 00 00 00 00 00
    0x0e10: 6c 21 02 00 00 00 00 00 70 21 02 00 00 00 00 00
    0x0e20: 74 21 02 00 00 00 00 00 78 21 02 00 00 00 00 00
    0x0e30: 7c 21 02 00 00 00 00 00 80 21 02 00 1f 1f 1f 1f
    0x0e40: 84 21 02 00 1f 1f 1f 1f 88 21 02 00 00 00 00 00
    0x0e50: 8c 21 02 00 00 00 00 00 90 21 02 00 1f 1f 1f 1f
    0x0e60: 94 21 02 00 1f 1f 1f 1f 98 21 02 00 00 00 00 00
    0x0e70: 9c 21 02 00 00 00 00 00 a0 21 02 00 00 00 00 00
    0x0e80: a4 21 02 00 00 00 00 00 a8 21 02 00 00 00 00 00
    0x0e90: ac 21 02 00 00 00 00 00 b0 21 02 00 00 00 00 00
    0x0ea0: b4 21 02 00 00 00 00 00 b8 21 02 00 00 00 00 00
    0x0eb0: bc 21 02 00 00 00 00 00 c0 21 02 00 00 00 00 00
    0x0ec0: c4 21 02 00 00 00 00 00 c8 21 02 00 00 00 00 00
    0x0ed0: cc 21 02 00 00 00 00 00 d0 21 02 00 00 00 00 00
    0x0ee0: d4 21 02 00 00 00 00 00 d8 21 02 00 00 00 00 00
    0x0ef0: dc 21 02 00 00 00 00 00 e0 21 02 00 00 00 00 00
    0x0f00: e4 21 02 00 00 00 00 00 e8 21 02 00 00 00 00 00
    0x0f10: ec 21 02 00 00 00 00 00 f0 21 02 00 00 00 00 00
    0x0f20: f4 21 02 00 00 00 00 00 f8 21 02 00 00 00 00 00
    0x0f30: fc 21 02 00 00 00 00 00 00 22 02 00 00 00 00 00
    0x0f40: 04 22 02 00 00 00 00 00 08 22 02 00 00 00 00 00
    0x0f50: 0c 22 02 00 00 00 00 00 10 22 02 00 00 00 00 00
    0x0f60: 14 22 02 00 00 00 00 00 18 22 02 00 00 00 00 00
    0x0f70: 1c 22 02 00 00 00 00 00 20 22 02 00 00 00 00 00
    0x0f80: 24 22 02 00 00 00 00 00 28 22 02 00 00 00 00 00
    0x0f90: 2c 22 02 00 00 00 00 00 30 22 02 00 00 00 00 00
    0x0fa0: 34 22 02 00 00 00 00 00 38 22 02 00 00 00 00 00
    0x0fb0: 3c 22 02 00 00 00 00 00 40 22 02 00 00 00 00 00
    0x0fc0: 44 22 02 00 00 00 00 00 48 22 02 00 00 00 00 00
    0x0fd0: 4c 22 02 00 00 00 00 00 50 22 02 00 00 00 00 00
    0x0fe0: 54 22 02 00 00 00 00 00 58 22 02 00 00 00 00 00
    0x0ff0: 5c 22 02 00 00 00 00 00 60 22 02 00 00 00 00 00
    0x1000: 64 22 02 00 00 00 00 00 68 22 02 00 00 00 00 00
    0x1010: 6c 22 02 00 00 00 00 00 70 22 02 00 00 00 00 00
    0x1020: 74 22 02 00 00 00 00 00 78 22 02 00 00 00 00 00
    0x1030: 7c 22 02 00 00 00 00 00 80 22 02 00 00 00 00 00
    0x1040: 84 22 02 00 00 00 00 00 88 22 02 00 00 00 00 00
    0x1050: 8c 22 02 00 00 00 00 00 90 22 02 00 00 00 00 00
    0x1060: 94 22 02 00 00 00 00 00 98 22 02 00 00 00 00 00
    0x1070: 9c 22 02 00 00 00 00 00 a0 22 02 00 00 00 00 00
    0x1080: a4 22 02 00 00 00 00 00 a8 22 02 00 00 00 00 00
    0x1090: ac 22 02 00 00 00 00 00 b0 22 02 00 00 00 00 00
    0x10a0: b4 22 02 00 00 00 00 00 b8 22 02 00 00 00 00 00
    0x10b0: bc 22 02 00 00 00 00 00 c0 22 02 00 00 00 00 00
    0x10c0: c4 22 02 00 00 00 00 00 c8 22 02 00 00 00 00 00
    0x10d0: cc 22 02 00 00 00 00 00 d0 22 02 00 00 00 00 00
    0x10e0: d4 22 02 00 00 00 00 00 d8 22 02 00 00 00 00 00
    0x10f0: dc 22 02 00 00 00 00 00 e0 22 02 00 00 00 00 00
    0x1100: e4 22 02 00 00 00 00 00 e8 22 02 00 00 00 00 00
    0x1110: ec 22 02 00 00 00 00 00 f0 22 02 00 00 00 00 00
    0x1120: f4 22 02 00 00 00 00 00 f8 22 02 00 00 00 00 00
    0x1130: fc 22 02 00 00 00 00 00 00 23 02 00 00 00 00 00
    0x1140: 04 23 02 00 00 00 00 00 08 23 02 00 1c e7 00 00
    0x1150: 0c 23 02 00 04 25 e8 34 10 23 02 00 00 00 00 00
    0x1160: 14 23 02 00 00 00 1e 00 18 23 02 00 00 00 00 00
    0x1170: 1c 23 02 00 00 00 00 00 20 23 02 00 00 00 04 00
    0x1180: 24 23 02 00 00 00 00 00 28 23 02 00 00 00 00 00
    0x1190: 2c 23 02 00 00 00 00 00 30 23 02 00 00 08 00 00
    0x11a0: 34 23 02 00 00 00 00 f0 38 23 02 00 00 00 00 00
    0x11b0: 3c 23 02 00 00 00 64 02 40 23 02 00 00 00 00 00
    0x11c0: 44 23 02 00 00 00 00 00 48 23 02 00 00 00 00 00
    0x11d0: 4c 23 02 00 00 00 00 00 50 23 02 00 00 00 00 00
    0x11e0: 54 23 02 00 00 00 00 00 58 23 02 00 00 00 00 00
    0x11f0: 5c 23 02 00 00 00 00 00 60 23 02 00 00 00 00 00
    0x1200: 64 23 02 00 00 00 00 00 68 23 02 00 00 00 00 00
    0x1210: 6c 23 02 00 00 00 00 00 70 23 02 00 00 00 00 00
    0x1220: 74 23 02 00 00 00 00 00 78 23 02 00 00 00 00 00
    0x1230: 7c 23 02 00 00 00 00 00 80 23 02 00 00 00 00 00
    0x1240: 84 23 02 00 00 00 00 00 88 23 02 00 00 00 00 00
    0x1250: 8c 23 02 00 00 00 00 00 90 23 02 00 00 00 00 00
    0x1260: 94 23 02 00 00 00 00 00 98 23 02 00 00 00 00 00
    0x1270: 9c 23 02 00 00 00 00 00 a0 23 02 00 00 00 00 00
    0x1280: a4 23 02 00 0c 00 00 00 07 00 00 00 a0 00 00 00
    0x1290: 00 d0 03 00 0c 01 8a 4e 04 d0 03 00 21 00 02 00
    0x12a0: 08 d0 03 00 00 00 00 00 0c d0 03 00 00 00 00 00
    0x12b0: 10 d0 03 00 09 ee ee 5a 14 d0 03 00 00 00 00 00
    0x12c0: 18 d0 03 00 00 00 00 00 1c d0 03 00 00 00 00 00
    0x12d0: 20 d0 03 00 00 00 00 00 24 d0 03 00 00 00 00 00
    0x12e0: 28 d0 03 00 01 00 00 00 2c d0 03 00 00 00 00 00
    0x12f0: 30 d0 03 00 00 00 00 00 34 d0 03 00 00 00 00 00
    0x1300: 38 d0 03 00 00 00 00 00 3c d0 03 00 00 00 00 00
    0x1310: 40 d0 03 00 00 00 00 00 44 d0 03 00 00 00 00 00
    0x1320: 48 d0 03 00 00 00 00 00 08 00 00 00 88 02 00 00
    0x1330: 00 e0 03 00 04 41 29 00 04 e0 03 00 00 04 00 80
    0x1340: 08 e0 03 00 05 00 00 80 0c e0 03 00 00 00 00 00
    0x1350: 10 e0 03 00 90 d0 03 00 14 e0 03 00 4c 1d 00 00
    0x1360: 18 e0 03 00 00 00 00 00 1c e0 03 00 00 00 00 00
    0x1370: 20 e0 03 00 07 00 00 00 24 e0 03 00 00 00 00 00
    0x1380: 28 e0 03 00 00 00 00 00 2c e0 03 00 00 00 00 00
    0x1390: 30 e0 03 00 00 00 00 00 34 e0 03 00 04 00 00 00
    0x13a0: 38 e0 03 00 00 01 00 10 3c e0 03 00 fb 00 00 5e
    0x13b0: 40 e0 03 00 13 00 00 00 44 e0 03 00 10 08 00 00
    0x13c0: 48 e0 03 00 10 08 00 00 4c e0 03 00 00 00 00 00
    0x13d0: 50 e0 03 00 00 00 00 00 54 e0 03 00 00 00 00 00
    0x13e0: 58 e0 03 00 00 00 00 00 5c e0 03 00 00 00 00 00
    0x13f0: 60 e0 03 00 00 00 00 00 ^C
    root@am64xx-evm:~# ^C
    root@am64xx-evm:~# ethtool -s eth0 autoneg off speed 1000 duplex full
    root@am64xx-evm:~# ethtool -t eth0 offline
    Cannot test: Operation not supported
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~# dmesg | grep -i eth
    [ 0.000000] psci: probing for conduit method from DT.
    [ 0.951393] optee: probing for conduit method.
    [ 1.527883] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA00903, cpsw version 0x6BA80903 Ports: 3 quirks:00000006
    [ 1.528223] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
    [ 1.528238] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.4
    [ 1.528245] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [ 1.529438] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [ 1.545384] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 16
    [ 2.490642] systemd[1]: /lib/systemd/system/bt-enable.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [ 2.567125] systemd[1]: /etc/systemd/system/sync-clocks.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [ 11.756539] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [ 11.756577] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [ 15.843957] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    [ 15.844096] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 20.453547] platform icssg1-eth: deferred probe pending
    [ 179.350960] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#
    root@am64xx-evm:~#

  • Hi Chitti,

    Thank you for the provided artifacts.

    As promised, I have already added the CPSW MDIO/Ethernet PHY expert in our communication. But he seems to be out of office these days.

    I will contact another expert to support you. 

    Thanks for your patience !

    Best Regards,

    Anastas Yordanov

  • Hello Chitti,

    We are observing an issue during Ethernet validation. The internal loopback test is failing on the interface between the AM6442 processor and the DP83867IRRGZT Ethernet PHY.

    May I clarify what you mean by "internal loopback" test? Is the purpose of this test to test loopback at the PHY level? 

    What Linux SDK version are you using?

    If the intent is to test loopback from the PHY level, I may need to involve the experts for DP83867 PHY to give suggestion on what configuration is needed to enable loopback from the PHY.

    As a sanity check, can you try enabling promiscuous mode on the Ethernet interface you are testing loopback on and retest? (e.g ip link set eth0 promisc on)

    -Daolin

  • Hello Daolin,

    Thank you for your reply.

    We are using the TI SDK: ti-processor-sdk-linux-rt-am64xx-evm-09.02.01.10
    Processor: AM6442

    On our custom board, the TI processor is interfaced with the DP83867 Ethernet PHY.

    Could you please clarify how to properly validate the Internal Loopback Test for the Ethernet PHY?

    --------------------------------------------------------------------------------------------------------------------

    Below are the steps we are currently following to validate the internal loopback test:
    (Please let us know if any additional configuration or steps are required.)

    Command list:

    1. ip link show eth0

    2. ethtool eth0

    3. ethtool -s eth0 speed 1000 duplex full autoneg off

    4. ethtool -t eth0 offline

    5. phytool write eth0/0/0 0x4100

    6. ip addr add 192.168.1.10/24 dev eth0

    7. ip link set eth0 up

    8. ping -I eth0 192.168.1.10

    9. ethtool -S eth0 | grep -E "tx_packets|rx_packets|ierrors"

    10. ip addr add 192.168.1.10/24 dev eth0

    11. ip link set eth0 up

    12. ping -I eth0 192.168.1.10

    13. ethtool -S eth0 | grep -i error

    Log:

    root@am64xx-evm:~# 
    root@am64xx-evm:~# ip link show eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether 04:25:e8:34:1c:f7 brd ff:ff:ff:ff:ff:ff
    root@am64xx-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::625:e8ff:fe34:1cf7  prefixlen 64  scopeid 0x20<link>
            ether 04:25:e8:34:1c:f7  txqueuelen 1000  (Ethernet)
            RX packets 62  bytes 3915 (3.8 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 103  bytes 9156 (8.9 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 152  bytes 12934 (12.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 152  bytes 12934 (12.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    root@am64xx-evm:~# ethtool eth0
    Settings for eth0:
          Supported ports: [ TP    MII ]
          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
                                               1000baseT/Full
          Link partner advertised pause frame use: Symmetric Receive-only
          Link partner advertised auto-negotiation: Yes
          Link partner advertised FEC modes: Not reported
          Speed: 1000Mb/s
          Duplex: Full
          Auto-negotiation: on
          master-slave cfg: preferred slave
          master-slave status: master
          Port: Twisted Pair
          PHYAD: 0
          Transceiver: external
          MDI-X: Unknown
          Supports Wake-on: ubgs
          Wake-on: d
            SecureOn password: 00:00:00:00:00:00
            Current message level: 0x000020f7 (8439)
                                   drv probe link ifdown ifup rx_err tx_err hw
          Link detected: yes
    root@am64xx-evm:~# 
    root@am64xx-evm:~# 
    root@am64xx-evm:~# ethtool -s eth0 speed 1000 duplex full autoneg off
    root@am64xx-evm:~# [  160.225052] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    root@am64xx-evm:~# ethtool -t eth0 offline
    Cannot test: Operation not supported
    root@am64xx-evm:~# 
    root@am64xx-evm:~# 
    root@am64xx-evm:~# phytool write eth0/0/0 0x4100
    root@am64xx-evm:~# [  189.923579] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 10Mbps/Full - flow control off
    root@am64xx-evm:~# 
    root@am64xx-evm:~# 
    root@am64xx-evm:~# 
    root@am64xx-evm:~# ip addr add 192.168.1.10/24 dev eth0
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~# ping -I eth0 192.168.1.10
    PING 192.168.1.10 (192.168.1.10): 56 data bytes
    64 bytes from 192.168.1.10: seq=0 ttl=64 time=0.341 ms
    64 bytes from 192.168.1.10: seq=1 ttl=64 time=0.224 ms
    64 bytes from 192.168.1.10: seq=2 ttl=64 time=0.233 ms
    64 bytes from 192.168.1.10: seq=3 ttl=64 time=0.279 ms
    ^C
    --- 192.168.1.10 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max = 0.224/0.269/0.341 ms
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_packets|rx_packets|ierrors"
    root@am64xx-evm:~# 
    root@am64xx-evm:~# phytool read eth0/0 0
    error: bad location format
    root@am64xx-evm:~# 
    root@am64xx-evm:~# 
    root@am64xx-evm:~# ip addr add 192.168.1.10/24 dev eth0
    RTNETLINK answers: File exists
    root@am64xx-evm:~# ip link set eth0 up
    root@am64xx-evm:~# ping -I eth0 192.168.1.10
    PING 192.168.1.10 (192.168.1.10): 56 data bytes
    64 bytes from 192.168.1.10: seq=0 ttl=64 time=0.249 ms
    64 bytes from 192.168.1.10: seq=1 ttl=64 time=0.229 ms
    ^C
    --- 192.168.1.10 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 0.229/0.239/0.249 ms
    root@am64xx-evm:~# ethtool -S eth0 | grep -i error
         p0_rx_crc_errors: 0
         rx_crc_errors: 0
         rx_align_code_errors: 0
         rx_ipg_error: 0
         tx_carrier_sense_errors: 0
    root@am64xx-evm:~# 

    Regards,

    Chittibabu

  • Hi Chittibabu, 

    Thanks for sharing the details of your test. I'm contacting an Ethernet PHY expert for DP83867 to see if they might review your steps or provide correct steps to test loopback.

    Please kindly ping this thread if you don't hear something by tomorrow.

    -Daolin

  • Hi Chittibabu, 

    My name is J and I am the Ethernet PHY expert.

    What is the internal loopback test you are looking to do? The current loopback test you have done most likely looped back the packets via kernel, not electrically all the way to the PHY. 

    For the working loopback test that loops the packets from the SOC to the PHY and then come back to the SOC, I suggest the following method:
    1. Ensure the speed/duplex you want to test via phytool. This is important since RGMII signal speed is different for the different link speed:

    • Register 0x0000 = 0x0100 (10M), 0x2100 (100M), 0x0140 (1000M)

    2. Please set the PHY into analog or digital loopback mode so the PHY will loop the packets back to the MAC:

    • Register 0x0016 = 0x0008 (analog) or 0x0004 (digital)

    3. For CPSW port, you can create a separate network namespace to prevent the kernel looping the packets back from the kernel stack by

    • sudo ip netns <namespace name>
    • exec bash

    4. Ensure via ethtool that the link goes up. I suggest to use ethtool command to match the link speed/duplex that you set using the PHY registers earlier:

    • Ethtool –s <interface> speed <10/100/1000> duplex <full/half> autoneg off

    5. Then, please assign the ip address and enable promiscuous mode to the DUT interface to ensure the NIC accepts the packets that are being looped back.

    6. You can now ping broadcast and then read ethtool stats to see rx and tx_good_frames increasing or ping dummy ip address to see TX/RX packets increasing on ifconfig. 

    Please note that pinging will not give any response as the NIC will not reply to the looped back packets. 

    Please let me know if this works. 

    Best,
    J

  • Hello J,
    Thank you for your support in helping us validate the PHY Internal Loopback test all the way up to the PHY level.
    As per your suggestion, we followed all the steps for validating the Internal Loopback commands. However, we encountered an issue at Step 6 — pinging the broadcast IP is not working.
    Could you please advise on what might be causing this issue or suggest any additional checks we should perform?
    Log details are not able share due to facing error. Please find the commands list.
    root@am64xx-evm:~#  phytool write eth0/0/0 0x0140
    root@am64xx-evm:~# [   50.915639] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down

    root@am64xx-evm:~# phytool write eth0/0/22 0x0004
    root@am64xx-evm:~# ip netns add test
    root@am64xx-evm:~# ip link set eth0 netns test
    root@am64xx-evm:~#  ip netns exec test bash
    root@am64xx-evm:~# ethtool -s eth0 speed 1000 duplex full autoneg off
    root@am64xx-evm:~# ip link set eth0 up

    root@am64xx-evm:~# ip addr add 192.168.1.10/24 dev eth0
    root@am64xx-evm:~# ip link set eth0 promisc on
    root@am64xx-evm:~# ping -I eth0 192.168.1.10
    PING 192.168.1.10 (192.168.1.10): 56 data bytes

    ^C
    --- 192.168.1.10 ping statistics ---
    7 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 37
         p0_tx_good_frames: 103
         rx_good_frames: 130
         tx_good_frames: 37
    root@am64xx-evm:~#
    Thanks & Regards,
    Chittibabu
  • Hi Chittibabu, 

    Broadcast ping will not respond since the NIC will automatically drop the ICMP request. The NIC automatically drops packets that have the same source ip addresses. 

    I suggest to check ethtool stats before you run the ping and then re-check the ethtool stats so you can see if both tx and rx_good_frames increased. 

    Best,
    J

  • Hello J,

    Thanks for details help about broadcast ping during the test.

    I am observed the tx & rx_good_frames increased...

    Please review the below logs and suggest your inputs. Is can i conclude as Ethernet Internal loop back is working?

    root@am64xx-evm:~# phytool write eth0/0/0 0x0140
    root@am64xx-evm:~# [   25.059512] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    root@am64xx-evm:~# phytool write eth0/0/22 0x0004
    root@am64xx-evm:~# ip netns add test
    root@am64xx-evm:~# ip link set eth0 netns test
    root@am64xx-evm:~# ip netns exec test bash
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 22
         p0_tx_good_frames: 0
         rx_good_frames: 1
         tx_good_frames: 22
    root@am64xx-evm:~# ethtool -s eth0 speed 1000 duplex full autoneg off
    root@am64xx-evm:~# ip link set eth0 up
    [   97.998605] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [   97.998646] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    root@am64xx-evm:~# [  101.091571] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [  101.094987] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    root@am64xx-evm:~# ip addr add 192.168.1.100/24 dev eth0
    root@am64xx-evm:~# ip link set eth0 promisc on
    [  116.162663] device eth0 entered promiscuous mode
    [  116.162777] audit: type=1700 audit(1771355061.820:3): dev=eth0 prom=256 old_prom=0 auid=4294967295 uid=0 gid=0 ses=4294967295
    [  116.163556] audit: type=1300 audit(1771355061.820:3): arch=c00000b7 syscall=211 success=yes exit=32 a0=3 a1=ffffc9025ac8 a2=0 a3=ffff96e6d840 items=0 ppid=1127 pid=1133 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS2 ses=4294967295 comm="ip" exe="/sbin/ip.iproute2" key=(null)
    [  116.163597] audit: type=1327 audit(1771355061.820:3): proctitle=6970006C696E6B0073657400657468300070726F6D697363006F6E
    root@am64xx-evm:~# ping -c 10 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    --- 192.168.1.100 ping statistics ---
    10 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 31
         p0_tx_good_frames: 56
         rx_good_frames: 81
         tx_good_frames: 31
    root@am64xx-evm:~# ping -c 10 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    --- 192.168.1.100 ping statistics ---
    10 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 32
         p0_tx_good_frames: 78
         rx_good_frames: 103
         tx_good_frames: 32
    root@am64xx-evm:~# ping -c 10 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    --- 192.168.1.100 ping statistics ---
    10 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 33
         p0_tx_good_frames: 88
         rx_good_frames: 113
         tx_good_frames: 33
    root@am64xx-evm:~# ping -c 10 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    --- 192.168.1.100 ping statistics ---
    10 packets transmitted, 0 packets received, 100% packet loss
    root@am64xx-evm:~# ethtool -S eth0 | grep -E "tx_good_frames|rx_good_frames"
         p0_rx_good_frames: 33
         p0_tx_good_frames: 104
         rx_good_frames: 129
         tx_good_frames: 33
    root@am64xx-evm:~#

    Thanks & Regards,

    Chittibabu Ch

  • Hi Chittibabu, 

    I think the loopback test is working. However, because the number of packets transmitted/received do not match, I think there are additional packets coming in from the existing network and it seems like some packets are looping back at the kernel level. 

    Can you try pinging with -I flag so we force ping to happen from eth0? 

    Best,
    J

  • Hello J,

    Thanks for your help in reaching the conclusion. Please proceed to close the ticket.

    Regards,

    Chittibabu

  • Hello Chitti,

    I am glad that it is resolved now !

    Hello J, Daolin,

    Thank you very much for your support !

    Best Regards,

    Anastas Yordanov