Hello, I’m having trouble with ethernet connection on my Rock 5C. It previously worked fine, but now the interface is getting disabled some time after boot (or even stays down after a reboot). When trying to bring the interface up again I get an error saying “no such device” and also “Cannot attach to PHY” on dmesg.
~$ sudo ip link set end1 up
RTNETLINK answers: No such device
~$ sudo ifconfig end1 up
SIOCSIFFLAGS: No such device
dmesg output:
sudo dmesg | grep rk_gmac
[ 21.136415] rk_gmac-dwmac fe1c0000.ethernet: IRQ eth_lpi not found
[ 21.136553] rk_gmac-dwmac fe1c0000.ethernet: Looking up phy-supply from device tree
[ 21.136564] rk_gmac-dwmac fe1c0000.ethernet: Looking up phy-supply property in node /ethernet@fe1c0000 failed
[ 21.136581] rk_gmac-dwmac fe1c0000.ethernet: supply phy not found, using dummy regulator
[ 21.136644] rk_gmac-dwmac fe1c0000.ethernet: clock input or output? (output).
[ 21.136650] rk_gmac-dwmac fe1c0000.ethernet: TX delay(0x3a).
[ 21.136656] rk_gmac-dwmac fe1c0000.ethernet: RX delay(0x3e).
[ 21.136673] rk_gmac-dwmac fe1c0000.ethernet: integrated PHY? (no).
[ 21.136680] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_rx
[ 21.136726] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_tx
[ 21.136771] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock clk_mac_speed
[ 21.137018] rk_gmac-dwmac fe1c0000.ethernet: init for RGMII
[ 21.137166] rk_gmac-dwmac fe1c0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
[ 21.137174] rk_gmac-dwmac fe1c0000.ethernet: DWMAC4/5
[ 21.137179] rk_gmac-dwmac fe1c0000.ethernet: DMA HW capability register supported
[ 21.137184] rk_gmac-dwmac fe1c0000.ethernet: RX Checksum Offload Engine supported
[ 21.137188] rk_gmac-dwmac fe1c0000.ethernet: TX Checksum insertion supported
[ 21.137192] rk_gmac-dwmac fe1c0000.ethernet: Wake-Up On Lan supported
[ 21.137224] rk_gmac-dwmac fe1c0000.ethernet: TSO supported
[ 21.137229] rk_gmac-dwmac fe1c0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 21.137234] rk_gmac-dwmac fe1c0000.ethernet: Enabled L3L4 Flow TC (entries=2)
[ 21.137238] rk_gmac-dwmac fe1c0000.ethernet: Enabled RFS Flow TC (entries=10)
[ 21.137243] rk_gmac-dwmac fe1c0000.ethernet: TSO feature enabled
[ 21.137248] rk_gmac-dwmac fe1c0000.ethernet: Using 32/32 bits DMA host/device width
[ 24.444041] rk_gmac-dwmac fe1c0000.ethernet end1: renamed from eth0
[ 28.932727] rk_gmac-dwmac fe1c0000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 28.933205] rk_gmac-dwmac fe1c0000.ethernet end1: __stmmac_open: Cannot attach to PHY (error: -19)
[ 239.285551] rk_gmac-dwmac fe1c0000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 239.285777] rk_gmac-dwmac fe1c0000.ethernet end1: __stmmac_open: Cannot attach to PHY (error: -19)
[ 427.109376] rk_gmac-dwmac fe1c0000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 427.110091] rk_gmac-dwmac fe1c0000.ethernet end1: __stmmac_open: Cannot attach to PHY (error: -19)
[ 427.157768] rk_gmac-dwmac fe1c0000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 427.158429] rk_gmac-dwmac fe1c0000.ethernet end1: __stmmac_open: Cannot attach to PHY (error: -19)
[ 1243.990019] rk_gmac-dwmac fe1c0000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 1243.990437] rk_gmac-dwmac fe1c0000.ethernet end1: __stmmac_open: Cannot attach to PHY (error: -19)
the later entries are from me trying to bring the interface up again with ip and ifconfig commands. Unplugging and replugging the cable does not seem to generate any new messages.
I don’t know if this is related but I only noticed this issue after trying unsuccessfully to use a 2.5 gbps USB adapter. Apparently the adapter is only working on usb 2.0 ports, not on the USB 3.0 ports which are placed close to the ethernet port.
I don’t know if this is a hardware failure or if there’s anything I can do to fix this