SNLA443 December 2023 DP83869HM
The following section is intended to provide common terminal commands that can be used to debug driver related issues.
$ dmesg | grep "mdio"
One of the possible outputs is as follows:
$ mdio_bus xxx.ethernet-x: MDIO device at address 8 is missing
This message indicates that the PHY is not found on the MDIO bus, which can be caused by several issues. The most common one being a missing or incorrect device tree, but can also be due to a non-functional PHY or a bad SMI connection.
Once the PHY can be detected on the MDIO bus, another common error message is as follows:
$ Generic PHY xxx.ethernet-x: attached PHY driver [Generic PHY]
This message indicates that the driver file for the corresponding PHY is not loaded correctly or not present at all, and Linux loaded in a generic driver that most likely won't work with the PHY. In that case, verify that the driver successfully compiled, was added when building Linux, and that the driver matches with the model of PHY used.
Finally, a message like this can display:
am65-cpsw-nuss 8000000.ethernet eth1: PHY [mdio_mux-0.1:03] driver [TI DP83869] (irq=POLL)
This message shows that the PHY has the correct driver loaded and is detected successfully. Run ifconfig to verify the network interface is present. Example ifconfig output when the PHYs are successfully recognized as network adapters:
root@am64xx-evm:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 34:08:e1:80:b5:f8 txqueuelen 1000 (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
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 70:ff:76:1e:9e:a6 txqueuelen 1000 (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
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 90 bytes 6824 (6.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 90 bytes 6824 (6.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0