[openwrt/openwrt] realtek: dts: add mdio controller device nodes
LEDE Commits
lede-commits at lists.infradead.org
Fri Sep 12 11:59:10 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/13b6c62b758612256c5379c88a4171bcfe7049f3
commit 13b6c62b758612256c5379c88a4171bcfe7049f3
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Sep 8 01:51:21 2025 -0400
realtek: dts: add mdio controller device nodes
Until now the mdio bus is a subnode of the ethernet device. This
coupling is different from upstream and wrong. Ethernet and mdio
are different devices. Additionally differentiate between mdio
controller and mdio bus. To make it clear:
- There is one mdio controller
- With up to 4 busses (on RTL93xx)
Prepare new mdio controller and bus nodes with SoC specific compatibles.
These will be used later when refactoring the mdio driver probing.
Remark! For now only define the first bus for the RTL93xx targets.
So the driver still relies on "rtl9300,smi-address = <x y>;". It will
need much more refactoring to get totally aligned with upstream.
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19986
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/realtek/dts/rtl838x.dtsi | 12 ++++++++++++
target/linux/realtek/dts/rtl839x.dtsi | 12 ++++++++++++
target/linux/realtek/dts/rtl930x.dtsi | 12 ++++++++++++
target/linux/realtek/dts/rtl931x.dtsi | 12 ++++++++++++
4 files changed, 48 insertions(+)
diff --git a/target/linux/realtek/dts/rtl838x.dtsi b/target/linux/realtek/dts/rtl838x.dtsi
index 2b9938899b..f4b629033b 100644
--- a/target/linux/realtek/dts/rtl838x.dtsi
+++ b/target/linux/realtek/dts/rtl838x.dtsi
@@ -203,6 +203,18 @@
compatible = "syscon", "simple-mfd";
reg = <0x1b000000 0x10000>;
+ mdio_ctrl: mdio-controller {
+ compatible = "realtek,rtl8380-mdio", "realtek,otto-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_bus0: mdio-bus at 0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
mdio_aux: mdio-aux {
compatible = "realtek,rtl8380-aux-mdio";
#address-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl839x.dtsi b/target/linux/realtek/dts/rtl839x.dtsi
index 24b178c723..256ee0bc30 100644
--- a/target/linux/realtek/dts/rtl839x.dtsi
+++ b/target/linux/realtek/dts/rtl839x.dtsi
@@ -211,6 +211,18 @@
compatible = "syscon", "simple-mfd";
reg = <0x1b000000 0x10000>;
+ mdio_ctrl: mdio-controller {
+ compatible = "realtek,rtl8392-mdio", "realtek,otto-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_bus0: mdio-bus at 0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
mdio_aux: mdio-aux {
compatible = "realtek,rtl8390-aux-mdio";
#address-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi
index 312cc77956..13c6fad5a1 100644
--- a/target/linux/realtek/dts/rtl930x.dtsi
+++ b/target/linux/realtek/dts/rtl930x.dtsi
@@ -179,6 +179,18 @@
status = "disabled";
};
+ mdio_ctrl: mdio-controller {
+ compatible = "realtek,rtl9301-mdio", "realtek,otto-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_bus0: mdio-bus at 0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
mdio_aux: mdio-aux {
compatible = "realtek,rtl9300-aux-mdio";
#address-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index c048485c1b..27f12df2b8 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -211,6 +211,18 @@
status = "disabled";
};
+ mdio_ctrl: mdio-controller {
+ compatible = "realtek,rtl9311-mdio", "realtek,otto-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_bus0: mdio-bus at 0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
mdio_aux: mdio-aux {
compatible = "realtek,rtl9310-aux-mdio";
#address-cells = <1>;
More information about the lede-commits
mailing list