[openwrt/openwrt] realtek: Switch ApresiaLightGS120GT-SS RTL8231 driver

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 28 11:59:40 PST 2025


svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f31c9bb237c306c89b553a96c96460f194202df2

commit f31c9bb237c306c89b553a96c96460f194202df2
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Sat Jan 18 21:41:53 2025 +0100

    realtek: Switch ApresiaLightGS120GT-SS RTL8231 driver
    
    Switch the implementation for the RTL8231 GPIO expander to the new
    driver.
    
    This allows specifying the GPIO driving the RTL8231's reset as a proper
    MDIO reset line, so the gpio-hog can be dropped. Since it was pinned at
    a high level, the reset line is actually active-low (i.e. high when not
    in reset).
    
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
 .../realtek/dts/rtl8382_apresia_aplgs120gtss.dts   | 32 +++++++++++++---------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/target/linux/realtek/dts/rtl8382_apresia_aplgs120gtss.dts b/target/linux/realtek/dts/rtl8382_apresia_aplgs120gtss.dts
index de17958af1..3c609701d5 100644
--- a/target/linux/realtek/dts/rtl8382_apresia_aplgs120gtss.dts
+++ b/target/linux/realtek/dts/rtl8382_apresia_aplgs120gtss.dts
@@ -61,13 +61,6 @@
 		open-source;
 	};
 
-	gpio1: rtl8231-gpio {
-		compatible = "realtek,rtl8231-gpio";
-		#gpio-cells = <2>;
-		gpio-controller;
-		indirect-access-bus-id = <0>;
-	};
-
 	i2c0: i2c-gpio-0 {
 		compatible = "i2c-gpio";
 		sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
@@ -134,12 +127,25 @@
 	};
 };
 
-&gpio0 {
-	rtl8231_reset {
-		gpio-hog;
-		gpios = <1 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "rtl8231-reset";
+&mdio_aux {
+	status = "okay";
+
+	reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <1000>;
+	reset-post-delay-us = <10000>;
+
+	gpio1: expander at 0 {
+		compatible = "realtek,rtl8231";
+		reg = <0>;
+
+		gpio-controller;
+		#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