[PATCH v5 5/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPi R5S
Diederik de Haas
diederik at cknow-tech.com
Wed Sep 23 10:15:13 PDT 2026
Hi,
On Thu Sep 10, 2026 at 10:07 PM CEST, Ricardo Pardini via B4 Relay wrote:
> From: Ricardo Pardini <ricardo at pardini.net>
>
> The FriendlyElec NanoPi R5S (rk3568) carries two on-board Realtek
> RTL8125 NICs behind pcie2x1 and pcie3x1, alongside the existing gmac0
> RGMII PHY.
>
> Describe the fixed function nodes and attach ethernet1/ethernet2
> aliases (ethernet0 stays mapped to gmac0), so that U-Boot's
> fdt_fixup_ethernet() can inject mac-address properties from its
> eth1addr/eth2addr env, for stable MACs across boots that both U-Boot
> and the kernel agree on.
>
> Signed-off-by: Ricardo Pardini <ricardo at pardini.net>
> ---
> arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 30 ++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> index 90ce6f0e1dcff..9ed11663c31c9 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> @@ -15,6 +15,8 @@ / {
>
> aliases {
> ethernet0 = &gmac0;
> + ethernet1 = &rtl_eth1;
> + ethernet2 = &rtl_eth2;
> };
With my NanoPi-R5S I'm still getting the following warning:
r8169 0001:11:00.0: can't read MAC address, setting random one
```
root at nanopi-r5s:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: end1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 4e:52:85:9e:22:f9 brd ff:ff:ff:ff:ff:ff
altname enp1s0
altname enx4e52859e22f9
3: end2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 12:e5:47:9e:e2:f1 brd ff:ff:ff:ff:ff:ff
altname enP1p17s0
4: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 4e:52:85:9e:22:f8 brd ff:ff:ff:ff:ff:ff
altname enx4e52859e22f8
```
I did not do anything (explicitly) in U-Boot, but it seems it created a
non-random MAC address for end0 and end1 ... and then stopped.
AFAIK gmac0=end0 already had a non-random MAC address and I hoped/expected
it would create non-random addresses for end1 and end2, which would've made
the above warning go away too.
Is this an issue with this patch, with U-Boot or me?
Full details:
https://paste.sr.ht/~diederik/8ae7d354985afcd1c3464e3a4ad81da1b4442364
Side note:
I wonder how 'random' those addresses are as during testing ``ssh rock5b``
landed me on another device (NanoPC-T6 Plus), f.e. My router has DHCP
reservations based on MAC addresses and it looks like it got confused ;-)
Cheers,
Diederik
> gpio-keys {
> @@ -107,6 +109,20 @@ &pcie2x1 {
> num-lanes = <1>;
> reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
> status = "okay";
> +
> + pcie at 0,0 {
> + reg = <0x000000 0 0 0 0>;
> + #address-cells = <3>;
> + #size-cells = <2>;
> + ranges;
> + device_type = "pci";
> + bus-range = <0x00 0x0f>;
> +
> + rtl_eth1: ethernet at 0,0 {
> + compatible = "pci10ec,8125";
> + reg = <0x010000 0 0 0 0>;
> + };
> + };
> };
>
> &pcie30phy {
> @@ -119,6 +135,20 @@ &pcie3x1 {
> reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
> vpcie3v3-supply = <&vcc3v3_pcie>;
> status = "okay";
> +
> + pcie at 0,0 {
> + reg = <0x100000 0 0 0 0>;
> + #address-cells = <3>;
> + #size-cells = <2>;
> + ranges;
> + device_type = "pci";
> + bus-range = <0x10 0x1f>;
> +
> + rtl_eth2: ethernet at 0,0 {
> + compatible = "pci10ec,8125";
> + reg = <0x110000 0 0 0 0>;
> + };
> + };
> };
>
> &pcie3x2 {
More information about the linux-arm-kernel
mailing list