summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSander Vanheule2025-01-18 20:40:06 +0000
committerSander Vanheule2025-01-26 20:46:44 +0000
commitb7af54d5c18cf74b9b598b506a335443a0bbed87 (patch)
treef2fa9a378a0fa700bc03124fd2792123da9b7e5b
parentc0f06cb6ac002ce90c10839b3d98aed8b41a2da5 (diff)
downloadopenwrt-b7af54d5c18cf74b9b598b506a335443a0bbed87.tar.gz
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 <sander@svanheule.net>
-rw-r--r--target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts57
-rw-r--r--target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts19
-rw-r--r--target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi19
-rw-r--r--target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts19
4 files changed, 79 insertions, 35 deletions
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 = <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";
+ };
};
};
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 = <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";
+ };
};
};