I have had the same issue and have been working through this the past few days.
The issue is that there are some differences between timing of the rtl8211e and rtl8211f chips. In the official debian buster release from radxa, there is a overlay which can be applied to support the newer rtl8211f chip, but this has been built using a slightly older format for the device tree.
Armbian, using a newer kernel, also has some changes and improvements to the device tree structure. There are some hints on what we need to modify here:
Based on this, I ran the following commands prior to building armbian for the Rock Pi E in order to patch the device tree file:
./compile.sh BOARD=rockpi-e BRANCH=current kernel-patch
./compile.sh BOARD=rockpi-e BRANCH=current uboot-patch
During guided patching, you can find the required files using find:
find . -name "rk3328-rock-pi-e.dts"
We need to patch the files for both the kernel and uboot to:
- Set the tx_delay
- Set the rx_delay
- Rename phy-handle from rtl8211e to rtl8211f
- Add an entry to identify the rtl8211f PHY (which has a device ID of
0x001cc916) - Set a max speed parameter for 1GbE
I have below for an example of the patch files that I found to work in my instance (armbian 23.05.0, debian bullseye current, kernel 5.15.110). Do note you have to make similar changes to both u-boot and kernel sources. I haven’t fully stress tested this however:
--- arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 14 ++++++---- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts index 018a3a507..257a3cdbc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts @@ -144,36 +144,38 @@ &emmc { &gmac2io { assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; clock_in_out = "input"; - phy-handle = <&rtl8211e>; + phy-handle = <&rtl8211f>; phy-mode = "rgmii"; phy-supply = <&vcc_io>; pinctrl-names = "default"; pinctrl-0 = <&rgmiim1_pins>; snps,aal; snps,rxpbl = <0x4>; snps,txpbl = <0x4>; - tx_delay = <0x26>; - rx_delay = <0x11>; + tx_delay = <0x1a>; + rx_delay = <0x14>; status = "okay"; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <1>; #size-cells = <0>; - rtl8211e: ethernet-phy@1 { + rtl8211f: ethernet-phy@1 { + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22"; reg = <1>; pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; pinctrl-names = "default"; interrupt-parent = <&gpio1>; interrupts = <24 IRQ_TYPE_LEVEL_LOW>; - reset-assert-us = <10000>; - reset-deassert-us = <50000>; + reset-assert-us = <20000>; + reset-deassert-us = <100000>; reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + max-speed = <1000>; }; }; }; &gmac2phy { --
For more information on providing userpatches to armbian, see here:
Finally, you can build your image as follows:
./compile.sh BOARD=rockpi-e BRANCH=current RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no BUILD_ONLY=default KERNEL_CONFIGURE=no
Note that this solution may change with newer kernel, distribution, or armbian versions.