[openwrt/openwrt] realtek: rtl839x: Enable AUX MDIO controller

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 22 03:57:35 PST 2025


svanheule pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/d7631cf577d76aa83c92daa590b96103d5860201

commit d7631cf577d76aa83c92daa590b96103d5860201
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Sat Jan 18 13:45:55 2025 +0100

    realtek: rtl839x: Enable AUX MDIO controller
    
    Enable the driver for the Realtek Otto auxiliary MDIO driver so RTL839x
    devices can use it. The related node is added to the base devicetree for
    rtl839x-based devices, so they can enabled and use it when required.
    
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
    (cherry picked from commit cddcc69ddf9c6284d6c9a6399c4ea48d7a044719)
---
 target/linux/realtek/dts/rtl839x.dtsi   | 21 +++++++++++++++++++++
 target/linux/realtek/rtl839x/config-6.6 |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/dts/rtl839x.dtsi b/target/linux/realtek/dts/rtl839x.dtsi
index 3f87f5622e..7fc5aea70c 100644
--- a/target/linux/realtek/dts/rtl839x.dtsi
+++ b/target/linux/realtek/dts/rtl839x.dtsi
@@ -258,6 +258,22 @@
 
 	};
 
+	switchcore at 1b000000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x1b000000 0x20000>;
+
+		mdio_aux: mdio-aux {
+			compatible = "realtek,rtl8390-aux-mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&mdio_aux_mdx>;
+		};
+	};
+
 	pinmux at 1b000004 {
 		compatible = "pinctrl-single";
 		reg = <0x1b000004 0x4>;
@@ -290,6 +306,11 @@
 		pinmux_disable_sys_led: disable_sys_led {
 			pinctrl-single,bits = <0x0 0x0 0x4000>;
 		};
+
+		/* enable AUX MDC/MDIO */
+		mdio_aux_mdx: aux-mdx-pins {
+			pinctrl-single,bits = <0x0 0x100000 0x1c0000>;
+		};
 	};
 
 	ethernet0: ethernet at 1b00a300 {
diff --git a/target/linux/realtek/rtl839x/config-6.6 b/target/linux/realtek/rtl839x/config-6.6
index d0b8f59dd3..7091a039fe 100644
--- a/target/linux/realtek/rtl839x/config-6.6
+++ b/target/linux/realtek/rtl839x/config-6.6
@@ -121,7 +121,7 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MDIO_I2C=y
-# CONFIG_MDIO_REALTEK_OTTO_AUX is not set
+CONFIG_MDIO_REALTEK_OTTO_AUX=y
 CONFIG_MDIO_SMBUS=y
 CONFIG_MEMFD_CREATE=y
 # CONFIG_MFD_RTL8231 is not set




More information about the lede-commits mailing list