[PATCH] arm64: dts: rockchip: rk356x: add ethernet aliases

Philipp Puschmann p.puschmann at pironex.com
Tue Jul 2 05:46:26 PDT 2024


Providing ethernet aliases solves a subtle problem for the rk3568. The
bus_id used for the sysfs directory name of the mdio. Without ethernet
alias the bus_id is always 0 and so creating the sysfs directory for the
second mdio fails with a duplicate filename error and by this the setup
of the second ethernet port fails too.

Note: The alias numbering is inverted as gmac1 comes from more generic
rk356x.dtsi but gmac0 comes from specialised rk3568.

Signed-off-by: Philipp Puschmann <p.puschmann at pironex.com>
---
 arch/arm64/boot/dts/rockchip/rk3568.dtsi | 4 ++++
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
index f1be76a54ceb..42018c8666e0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
@@ -8,6 +8,10 @@
 / {
 	compatible = "rockchip,rk3568";
 
+	aliases {
+		ethernet1 = &gmac0;
+	};
+
 	sata0: sata at fc000000 {
 		compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
 		reg = <0 0xfc000000 0 0x1000>;
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index d8543b5557ee..e13bd7b24752 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -43,6 +43,7 @@ aliases {
 		spi1 = &spi1;
 		spi2 = &spi2;
 		spi3 = &spi3;
+		ethernet0 = &gmac1;
 	};
 
 	cpus {
-- 
2.45.2




More information about the Linux-rockchip mailing list