I bought a Rock Pi 4B+ a few days ago (Version 1.72)
When using ethernet (with DietPi), the speeds are soooo slow.
I could connect the board using wifi, to get all the apt packages updated, but when I try to do this on ethernet: Timeouts, disconnects, all sorts of problems… (I couldn’t get APT updated, which is why I switched over to using Wifi)
When I try to to a speedtest with the ethernet, I get a download speed of 0.09 Mbps
The ethernet phy is changed from RTL8211E to RTL8211F, I believe the tx/rx delay change will cause the mainline kernel ethernet issue. We will check this.
@igorp - I understand your frustration, and appreciate what you guys are doing at armbian. I also read your post there, and I understand that the manufacturers for hardware don’t update their drivers in linux kernels. -> Kudos to you for trying to support all that “old” stuff.
But: I’m looking to get my board up and running. (Since this board is still being sold (I bought it a week ago) - I assume there must be some kind of (older) image version that I can use that does simply just work and that is stable - I assume Radxa tested their board with some kernel/image)
This is my first SBC, and I don’t feel like paying someone to fix the bugs in the “latest” kernel versions. I feel like getting my board up and running (with an older kernel, if need be)
If there is no way to get it running (on an older kernel/image) I will just send the board back and switch to one that is more “openly” supported (You know which one).
At this point, I’m not sure if it’s a kernel problem - or a hardware problem. That’s what I’m trying to figure out here. (By trying an “old” kernel and go from there)
That’s strange, I also bought the 4B+ v1.72 a couple of weeks ago and had no problem with the eth port, iperf gave me over 200Mb/s.
On the other hand wifi is pretty bad, i’m looking to buy an external antenna.
I’m using the official Debian Buster from radxa by the way.
Did some more digging: I flashed an old (known-working) image that uses U-Boot 2017.09-00022-gf18abd08ab-dirty (Aug 29 2022 - 14:20:35 +0200) and simply replaced both boot and root partitions with my own Kernel (v5.15.88) / Bullseye rootfs. In this configuration ethernet works as expected.
So this seems to be an U-Boot issue and not a mainline kernel issue.
That’s the cause for the issue. I set rx_delay = <0x20> in arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi (taken from [1]). With this change applied the Ethernet issues are gone.
Since upstream U-Boot uses almost the same rk3399-rock-pi-4.dtsi I think the patch could also have been applied there. My theory is that in the old Radxa-Images the U-Boot dts got patched. During the boot process U-Boot writes the correct delays to the MAC registers and thus correctly initializes the MAC. So even with an incorrect Kernel dts the problem is gone. I didn’t do any further testing in this regard, so this might not be the correct explanation for my observations I made earlier.
@jack@igorp I’m wondering where this particular value of 0x20 for the RX delay comes from. I was not able to get my hands on any datasheet/documentation that further describes this value. Furthermore I’m curious if this change can be upstreamed in a way that works for all rock-4b boards.
In case this is useful for someone: if the dtc binary is present (e.g. on armbian), then this is fixable without compiling code. The following converts the device tree blob to source, applies the correction, then converts it back to blob: