From: Sander Vanheule Date: Sat, 18 Jan 2025 20:40:06 +0000 (+0100) Subject: realtek: Simple conversions to RTL8231 MFD driver X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7af54d5c18cf74b9b598b506a335443a0bbed87;p=openwrt%2Fstaging%2Fnbd.git realtek: Simple conversions to RTL8231 MFD driver 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 --- diff --git a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts index 289ec86274..b0f1e9b538 100644 --- a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts +++ b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts @@ -38,29 +38,6 @@ }; }; - 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"; @@ -119,6 +96,40 @@ }; }; +&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"; diff --git a/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts b/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts index 08ef740399..ab095dbc65 100644 --- a/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts +++ b/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts @@ -92,12 +92,23 @@ linux,code = ; }; }; +}; + +&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"; + }; }; }; diff --git a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi index aca1a14774..75bf06e674 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi +++ b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi @@ -31,12 +31,23 @@ 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"; + }; }; }; diff --git a/target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts b/target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts index 49b55813f9..c4f8165604 100644 --- a/target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts +++ b/target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts @@ -43,12 +43,23 @@ linux,code = ; }; }; +}; + +&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"; + }; }; };