Rock5b gmac (no ethernet)

Hi there,
When I bring up the rock5b with the following kernel :

I don’t get any ethernet. I can’t see any gmac mentions.
I’m loading in the following dtb :

Any suggestions or pointers ?


1, check device node from /sys/firmware/devicetree/base/ to see if you have the gmac device.
2, check the driver status from /sys/devices/platform/.

They are present in the device tree :


Both are disabled :

# cat /sys/firmware/devicetree/base/ethernet@fe1c0000/status
# cat /sys/firmware/devicetree/base/ethernet@fe1b0000/status

I force enable them by altering the device tree :

&gmac0 {
	status = "okay";
&gmac1 {
	status = "okay";

But I still don’t see them on boot. Whilst the device tree says they are stats=okay
Here is the Linux boot detail :

[    4.303512] rk_gmac-dwmac fe1c0000.ethernet: IRQ eth_lpi not found
[    4.304090] rk_gmac-dwmac: probe of fe1c0000.ethernet failed with error -22
[    4.304852] rk_gmac-dwmac fe1b0000.ethernet: IRQ eth_lpi not found
[    4.305410] rk_gmac-dwmac: probe of fe1b0000.ethernet failed with error -22

Maybe you have a wrong kernel config. I don’t have your error in the kernel log serval days ago:
The gmac driver is enabled by option CONFIG_GMAC_ROCKCHIP=y.

Interesting, thanks for the dmesg printout.

I can’t see CONFIG_GMAC_ROCKCHIP anywhere in this linux repo I have.

Is it posisble to let me know your linux repo, branch and or version ?
Also which config file is in use (rockchip_linux_defconfig I assume).

Ahhh I got it.

modprobe r8125.ko

Does the trick !

# modprobe r8125.ko
[  327.003482] r8125 2.5Gigabit Ethernet driver 9.009.00-NAPI-RSS loaded
[  327.004098] r8125 0004:41:00.0: enabling device (0000 -> 0003)
[  327.022730] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[  327.025880] r8125  Copyright (C) 2022 Realtek NIC software team <> 
[  327.025880]  This program comes with ABSOLUTELY NO WARRANTY; for details, please see <>. 
[  327.025880]  This is free software, and you are welcome to redistribute it under certain conditions; see <>. 
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:E1:4C:68:00:14  
          BROADCAST MULTICAST  MTU:1500  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:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Lol glad to see it works. FYI I’m using kernel config from armbian, which is based on rockchip_linux_deconfig: There is no CONFIG_GMAC_ROCKCHIP either but I can see CONFIG_GMAC_ROCKCHIP=y from the generated file .config.

1 Like