[openwrt/openwrt] realtek: switch RTL8231 driver for D-Link DGS-1210

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


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

commit ed4f7a6dec3cad462a8befbdf6d0fb3012ce7459
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Sun Jan 12 17:57:33 2025 +0100

    realtek: switch RTL8231 driver for D-Link DGS-1210
    
    Update the common external GPIO DTSI file for the DGS-1210 devices to
    use an MDIO device on the auxilairy MDIO bus, as the original driver was
    doing behind the screen.
    
    Switching to the new driver will allow for full pin-control and will no
    longer reset pin config set by the bootloader.
    
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
    (cherry picked from commit 3d6a1a7874c991c4bd9719bf0a92ab6630034c67)
---
 .../realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi     | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi b/target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi
index b1477aa182..ccfeef3a39 100644
--- a/target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi
+++ b/target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi
@@ -17,11 +17,22 @@
 			linux,code = <KEY_RESTART>;
 		};
 	};
+};
+
+&mdio_aux {
+	status = "okay";
+
+	gpio1: expander at 0 {
+		compatible = "realtek,rtl8231";
+		reg = <0>;
 
-	gpio1: rtl8231-gpio {
-		compatible = "realtek,rtl8231-gpio";
-		#gpio-cells = <2>;
 		gpio-controller;
-		indirect-access-bus-id = <0>;
+		#gpio-cells = <2>;
+		gpio-ranges = <&gpio1 0 0 37>;
+
+		led-controller {
+			compatible = "realtek,rtl8231-leds";
+			status = "disabled";
+		};
 	};
 };




More information about the lede-commits mailing list