[PATCH v6 4/6] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPi R5S
Ricardo Pardini via B4 Relay
devnull+ricardo.pardini.net at kernel.org
Mon Nov 9 04:32:19 PST 2026
From: Ricardo Pardini <ricardo at pardini.net>
The FriendlyElec NanoPi R5S carries two on-board Realtek RTL8125
NICs behind pcie2x1 and pcie3x1.
Describe the PCI function nodes and attach ethernet1/ethernet2
aliases, so that U-Boot's fdt_fixup_ethernet() can fill in their MAC
addresses from its eth1addr/eth2addr environment.
ethernet0 stays mapped to the on-SoC gmac0.
Note that mainline U-Boot's rockchip_setup_macaddr() derives only
ethaddr and eth1addr from the CPU ID, so ethernet2 only gets a stable
MAC if eth2addr is set in the U-Boot environment.
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 90ce6f0e1dcf..e588ee7fadc5 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;
};
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 = <0x01 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 = <0x11 0x1f>;
+
+ rtl_eth2: ethernet at 0,0 {
+ compatible = "pci10ec,8125";
+ reg = <0x110000 0 0 0 0>;
+ };
+ };
};
&pcie3x2 {
--
2.47.3
More information about the Linux-rockchip
mailing list