[openwrt/openwrt] realtek: fix/add switchcore syscon nodes for RTL838x/RTL839x/RTL931x

LEDE Commits lede-commits at lists.infradead.org
Thu Jun 19 11:29:33 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/22854586c631a081929a06e55a991aa5ffb94f66

commit 22854586c631a081929a06e55a991aa5ffb94f66
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Apr 30 04:24:27 2025 -0400

    realtek: fix/add switchcore syscon nodes for RTL838x/RTL839x/RTL931x
    
    The switchcore node is the central location that describes the Realtek switch
    register addresses starting at 0x1b000000. It will be used by current and
    future regmap enabled device drivers. The upstream MDIO driver already makes
    use of it by calling syscon_node_to_regmap(dev->parent->of_node);
    
    In the current DTS base we have 3 issues that should be fixed:
    
    - rtl838x.dtsi has a length of 0x20000 instead of 0x10000
    - rtl839x.dtsi has a length of 0x20000 instead of 0x10000
    - rtl931x.dtsi has no switchcore node at all
    
    Align these mismatches with the "good" RTL930x template.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/18642
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/dts/rtl838x.dtsi | 2 +-
 target/linux/realtek/dts/rtl839x.dtsi | 2 +-
 target/linux/realtek/dts/rtl931x.dtsi | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/dts/rtl838x.dtsi b/target/linux/realtek/dts/rtl838x.dtsi
index abce9500fe..8f44de8bdc 100644
--- a/target/linux/realtek/dts/rtl838x.dtsi
+++ b/target/linux/realtek/dts/rtl838x.dtsi
@@ -252,7 +252,7 @@
 
 	switchcore at 1b000000 {
 		compatible = "syscon", "simple-mfd";
-		reg = <0x1b000000 0x20000>;
+		reg = <0x1b000000 0x10000>;
 
 		mdio_aux: mdio-aux {
 			compatible = "realtek,rtl8380-aux-mdio";
diff --git a/target/linux/realtek/dts/rtl839x.dtsi b/target/linux/realtek/dts/rtl839x.dtsi
index 84473fa2c3..98c69a5d34 100644
--- a/target/linux/realtek/dts/rtl839x.dtsi
+++ b/target/linux/realtek/dts/rtl839x.dtsi
@@ -260,7 +260,7 @@
 
 	switchcore at 1b000000 {
 		compatible = "syscon", "simple-mfd";
-		reg = <0x1b000000 0x20000>;
+		reg = <0x1b000000 0x10000>;
 
 		mdio_aux: mdio-aux {
 			compatible = "realtek,rtl8390-aux-mdio";
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index 61599e89b5..ad10272d7a 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -161,6 +161,11 @@
 		};
 	};
 
+	switchcore at 1b000000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x1b000000 0x10000>;
+	};
+
 	pinmux: pinmux at 1b001358 {
 		compatible = "pinctrl-single";
 		reg = <0x1b001358 0x4>;




More information about the lede-commits mailing list