From: Ricardo Pardini <redacted>
The FriendlyElec CM3588-NAS carrier carries an on-board Realtek
RTL8125 NIC behind pcie2x1l2.
Describe the fixed function node and attach an ethernet0 alias in the
NAS carrier .dts (not the SoM dtsi, as the RTL8125 sits on the
carrier), so that U-Boot's fdt_fixup_ethernet() can inject a
mac-address from its ethaddr env, for a stable MAC across boots that
both U-Boot and the kernel agree on.
Signed-off-by: Ricardo Pardini <redacted>
---
.../dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
index f4c34da61c4df..96b3b245e0866 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
@@ -20,6 +20,10 @@ / {
model = "FriendlyElec CM3588 NAS";
compatible = "friendlyarm,cm3588-nas", "friendlyarm,cm3588", "rockchip,rk3588";
+ aliases {
+ ethernet0 = &rtl_eth0;
+ };
+
adc_key_recovery: adc-key-recovery {
compatible = "adc-keys";
io-channels = <&saradc 1>;@@ -512,6 +516,23 @@ &pcie2x1l1 {
status = "okay";
};
+&pcie2x1l2 {
+ /* on-board RTL8125 2.5GbE NIC */
+ pcie@0,0 {
+ reg = <0x400000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ device_type = "pci";
+ bus-range = <0x40 0x4f>;
+
+ rtl_eth0: ethernet@0,0 {
+ compatible = "pci10ec,8125";
+ reg = <0x410000 0 0 0 0>;
+ };
+ };
+};
+
&pcie30phy {
/*
* Data lane mapping <1 3 2 4> = x1x1 x1x1 (bifurcation of both ports)
--
2.55.0