realtek: dts: add mdio controller device nodes
authorMarkus Stockhausen <[email protected]>
Mon, 8 Sep 2025 05:51:21 +0000 (01:51 -0400)
committerHauke Mehrtens <[email protected]>
Fri, 12 Sep 2025 18:58:17 +0000 (20:58 +0200)
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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19986
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/dts/rtl838x.dtsi
target/linux/realtek/dts/rtl839x.dtsi
target/linux/realtek/dts/rtl930x.dtsi
target/linux/realtek/dts/rtl931x.dtsi

index 2b9938899b7eb622170b954a65b31cce5910132e..f4b629033b277a794994492517061324b4793a0a 100644 (file)
                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@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
                mdio_aux: mdio-aux {
                        compatible = "realtek,rtl8380-aux-mdio";
                        #address-cells = <1>;
index 24b178c72388f904b24704114b26da6328e6cb46..256ee0bc3056ae248b5c0915a765eedc07a02448 100644 (file)
                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@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
                mdio_aux: mdio-aux {
                        compatible = "realtek,rtl8390-aux-mdio";
                        #address-cells = <1>;
index 312cc77956d711af3ed70659cecb2b8259c522f9..13c6fad5a116de83a820e9892aff61d6cbb122e3 100644 (file)
                        status = "disabled";
                };
 
+               mdio_ctrl: mdio-controller {
+                       compatible = "realtek,rtl9301-mdio", "realtek,otto-mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       mdio_bus0: mdio-bus@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
                mdio_aux: mdio-aux {
                        compatible = "realtek,rtl9300-aux-mdio";
                        #address-cells = <1>;
index c048485c1bc5f693807d3977e624fbca5ae9b971..27f12df2b80130b4e9565c524a947b83bc3e4f19 100644 (file)
                        status = "disabled";
                };
 
+               mdio_ctrl: mdio-controller {
+                       compatible = "realtek,rtl9311-mdio", "realtek,otto-mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       mdio_bus0: mdio-bus@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
                mdio_aux: mdio-aux {
                        compatible = "realtek,rtl9310-aux-mdio";
                        #address-cells = <1>;