[openwrt/openwrt] realtek: ethernet: relocate ethernet below switchcore in DTS

LEDE Commits lede-commits at lists.infradead.org
Tue Dec 23 09:00:20 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20a25b9ffac228c05ba0b5fb0d524a8b013897c9

commit 20a25b9ffac228c05ba0b5fb0d524a8b013897c9
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Dec 16 10:03:03 2025 +0100

    realtek: ethernet: relocate ethernet below switchcore in DTS
    
    The ethernet driver uses registers in the switchcore range.
    Rearrange the DTS nodes accordingly. This allows to make use
    of regmap with syscon_node_to_regmap(np->parent) later.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/21183
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/dts/rtl838x.dtsi | 27 +++++++++++++--------------
 target/linux/realtek/dts/rtl839x.dtsi | 28 +++++++++++++---------------
 target/linux/realtek/dts/rtl930x.dtsi | 28 +++++++++++++---------------
 target/linux/realtek/dts/rtl931x.dtsi | 34 ++++++++++++++++------------------
 4 files changed, 55 insertions(+), 62 deletions(-)

diff --git a/target/linux/realtek/dts/rtl838x.dtsi b/target/linux/realtek/dts/rtl838x.dtsi
index 7af572aefc..8930476d9e 100644
--- a/target/linux/realtek/dts/rtl838x.dtsi
+++ b/target/linux/realtek/dts/rtl838x.dtsi
@@ -205,6 +205,19 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		ethernet0: ethernet {
+			compatible = "realtek,rtl8380-eth";
+			interrupt-parent = <&intc>;
+			interrupts = <24 3>;
+			#interrupt-cells = <1>;
+			phy-mode = "internal";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
 		mdio_ctrl: mdio-controller {
 			compatible = "realtek,rtl8380-mdio", "realtek,otto-mdio";
 			#address-cells = <1>;
@@ -333,20 +346,6 @@
 		};
 	};
 
-	ethernet0: ethernet at 1b00a300 {
-		compatible = "realtek,rtl8380-eth";
-		reg = <0x1b00a300 0x100>;
-		interrupt-parent = <&intc>;
-		interrupts = <24 3>;
-		#interrupt-cells = <1>;
-		phy-mode = "internal";
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-		};
-	};
-
 	sram0: sram at 9f000000 {
 		compatible = "mmio-sram";
 		reg = <0x9f000000 0x10000>;
diff --git a/target/linux/realtek/dts/rtl839x.dtsi b/target/linux/realtek/dts/rtl839x.dtsi
index 7b6eeae1b1..c1acf66f60 100644
--- a/target/linux/realtek/dts/rtl839x.dtsi
+++ b/target/linux/realtek/dts/rtl839x.dtsi
@@ -213,6 +213,19 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		ethernet0: ethernet {
+			compatible = "realtek,rtl8392-eth";
+			interrupt-parent = <&intc>;
+			interrupts = <24 3>;
+			#interrupt-cells = <1>;
+			phy-mode = "internal";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
 		mdio_ctrl: mdio-controller {
 			compatible = "realtek,rtl8392-mdio", "realtek,otto-mdio";
 			#address-cells = <1>;
@@ -334,21 +347,6 @@
 		};
 	};
 
-	ethernet0: ethernet at 1b00a300 {
-		compatible = "realtek,rtl8392-eth";
-		reg = <0x1b00a300 0x100>;
-
-		interrupt-parent = <&intc>;
-		interrupts = <24 3>;
-
-		phy-mode = "internal";
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-		};
-	};
-
 	sram0: sram at 9f000000 {
 		compatible = "mmio-sram";
 		reg = <0x9f000000 0x18000>;
diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi
index 4a5dd2e17a..e8e61c287f 100644
--- a/target/linux/realtek/dts/rtl930x.dtsi
+++ b/target/linux/realtek/dts/rtl930x.dtsi
@@ -170,6 +170,19 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		ethernet0: ethernet {
+			compatible = "realtek,rtl9301-eth";
+			interrupt-parent = <&intc>;
+			interrupts = <24 3>;
+			#interrupt-cells = <1>;
+			phy-mode = "internal";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
 		i2c_mst1: i2c at 36c {
 			compatible = "realtek,rtl9301-i2c";
 			reg = <0x36c 0x18>;
@@ -330,21 +343,6 @@
 		};
 	};
 
-	ethernet0: ethernet at 1b00a300 {
-		compatible = "realtek,rtl9301-eth";
-		reg = <0x1b00a300 0x100>;
-
-		interrupt-parent = <&intc>;
-		interrupts = <24 3>;
-
-		phy-mode = "internal";
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-		};
-	};
-
 	switch0: switch at 1b000000 {
 		compatible = "realtek,rtl83xx-switch";
 		status = "okay";
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index 6173f912b9..6655879524 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -200,6 +200,22 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		ethernet0: ethernet {
+			compatible = "realtek,rtl9311-eth";
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>;
+			#interrupt-cells = <3>;
+			phy-mode = "internal";
+
+			pinctrl-0 = <&pinmux_disable_ext_cpu>;
+			pinctrl-names = "default";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
 		i2c_mst1: i2c at 100c {
 			compatible = "realtek,rtl9310-i2c";
 			reg = <0x100c 0x18>;
@@ -389,24 +405,6 @@
 		};
 	};
 
-	ethernet0: ethernet at 1b00a300 {
-		status = "okay";
-		compatible = "realtek,rtl9311-eth";
-		reg = <0x1b00a300 0x100>;
-		interrupt-parent = <&gic>;
-		#interrupt-cells = <3>;
-		interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>;
-		phy-mode = "internal";
-
-		pinctrl-0 = <&pinmux_disable_ext_cpu>;
-		pinctrl-names = "default";
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-		};
-	};
-
 	switch0: switch at 1b000000 {
 		compatible = "realtek,rtl83xx-switch";
 		status = "okay";




More information about the lede-commits mailing list