realtek: Simple conversions to RTL8231 MFD driver
authorSander Vanheule <sander@svanheule.net>
Sat, 18 Jan 2025 20:40:06 +0000 (21:40 +0100)
committerSander Vanheule <sander@svanheule.net>
Sun, 26 Jan 2025 20:46:44 +0000 (21:46 +0100)
Change devices with RTL8231 GPIO expander definition that can easily be
translated to the new RTL8231 binding and carry over any gpio-hogs. This
will let them use the new RTL8231 MFD driver, without any functional
changes.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts
target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts
target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi
target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts

index 289ec8627407e362980146bc049499ca9ea8f207..b0f1e9b53899b95f27c1a490b687efa6906fcfc4 100644 (file)
                };
        };
 
-       gpio1: rtl8231-gpio {
-               compatible = "realtek,rtl8231-gpio";
-               #gpio-cells = <2>;
-               gpio-controller;
-               indirect-access-bus-id = <0>;
-
-               poe_enable {
-                       gpio-hog;
-                       gpios = <1 GPIO_ACTIVE_HIGH>;
-                       output-high;
-                       line-name = "poe-enable";
-               };
-
-               sff_p9_gpios {
-                       gpio-hog;
-                       gpios = < 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>,
-                               < 11 GPIO_ACTIVE_HIGH>, /* los-gpio */
-                               < 12 GPIO_ACTIVE_LOW>;   /* mod-def0-gpio */
-                       input;
-                       line-name = "sff-p9-gpios";
-               };
-       };
-
        gpio-export {
                compatible = "gpio-export";
 
        };
 };
 
+&mdio_aux {
+       status = "okay";
+
+       gpio1: expander@0 {
+               compatible = "realtek,rtl8231";
+               reg = <0>;
+
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-ranges = <&gpio1 0 0 37>;
+
+               poe_enable {
+                       gpio-hog;
+                       gpios = <1 GPIO_ACTIVE_HIGH>;
+                       output-high;
+                       line-name = "poe-enable";
+               };
+
+               sff_p9_gpios {
+                       gpio-hog;
+                       gpios = < 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>,
+                               < 11 GPIO_ACTIVE_HIGH>, /* los-gpio */
+                               < 12 GPIO_ACTIVE_LOW>;   /* mod-def0-gpio */
+                       input;
+                       line-name = "sff-p9-gpios";
+               };
+
+               led-controller {
+                       compatible = "realtek,rtl8231-leds";
+                       status = "disabled";
+               };
+       };
+};
+
 &spi0 {
        status = "okay";
 
index 08ef740399e6564a485e198b265669ca15fee075..ab095dbc65966f7c8199318f4d51d6970a5b8108 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";
+               };
        };
 };
 
index aca1a14774e2aee99c6a5e9b0679f515e55ba884..75bf06e674d23a7862eadcbb1ef9391e99c57ced 100644 (file)
                gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                open-source;
        };
+};
+
+&mdio_aux {
+       status = "okay";
+
+       gpio1: expander@31 {
+               compatible = "realtek,rtl8231";
+               reg = <31>;
 
-       gpio1: rtl8231-gpio {
-               compatible = "realtek,rtl8231-gpio";
-               #gpio-cells = <2>;
                gpio-controller;
-               indirect-access-bus-id = <31>;
+               #gpio-cells = <2>;
+               gpio-ranges = <&gpio1 0 0 37>;
+
+               led-controller {
+                       compatible = "realtek,rtl8231-leds";
+                       status = "disabled";
+               };
        };
 };
 
index 49b55813f9d50310b82adb6a94b1f0a2be1b138d..c4f81656042cde7e3335404cef45e316ee803fca 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";
+               };
        };
 };