realtek: switch RTL8231 driver for D-Link DGS-1210
authorSander Vanheule <sander@svanheule.net>
Sun, 12 Jan 2025 16:57:33 +0000 (17:57 +0100)
committerSander Vanheule <sander@svanheule.net>
Tue, 28 Jan 2025 06:30:33 +0000 (07:30 +0100)
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@svanheule.net>
target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio.dtsi

index b1477aa182148a5ea1036ba309919d51ad731184..ccfeef3a39e1d4ef0adfee00af6500e551270ab9 100644 (file)
                        linux,code = <KEY_RESTART>;
                };
        };
+};
+
+&mdio_aux {
+       status = "okay";
+
+       gpio1: expander@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";
+               };
        };
 };