[openwrt/openwrt] realtek: switch LGS310C devicetree to new i2s-gpio-shared driver

LEDE Commits lede-commits at lists.infradead.org
Tue Jun 17 01:52:49 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c131870c34a6ae7fab6c145068b86243a210ebdd

commit c131870c34a6ae7fab6c145068b86243a210ebdd
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Fri Jun 13 04:34:34 2025 -0400

    realtek: switch LGS310C devicetree to new i2s-gpio-shared driver
    
    From now on both SFP ports can be used without manual intervention.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/18737
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/realtek/dts/rtl8380_linksys_lgs310c.dts  | 34 ++++++++--------------
 1 file changed, 12 insertions(+), 22 deletions(-)

diff --git a/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts b/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts
index ab095dbc65..1e08105363 100644
--- a/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts
+++ b/target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts
@@ -38,17 +38,23 @@
 			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
 		};
-
 	};
 
-	/* i2c of the left SFP cage: port 9 */
-	i2c0: i2c-gpio-0 {
-		compatible = "i2c-gpio";
-		sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	i2c-gpio-shared {
+		compatible = "i2c-gpio-shared";
 		scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-		i2c-gpio,delay-us = <2>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+
+		i2c0: i2c at 0 {
+			sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+		};
+
+		i2c1: i2c at 1 {
+			sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+		};
 	};
 
 	sfp0: sfp-p9 {
@@ -59,22 +65,6 @@
 		tx-disable-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
 	};
 
-	/* i2c of the right SFP cage: port 10 */
-	i2c1: i2c-gpio-1 {
-		compatible = "i2c-gpio";
-		sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-/*
- * ports 9 & 10 use a shared SCL, and are currently not usable in parallel
- * So for now disable the SCL on the second port.
- *
- *		scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- */
-		i2c-gpio,scl-open-drain;
-		i2c-gpio,delay-us = <2>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-	};
-
 	sfp1: sfp-p10 {
 		compatible = "sff,sfp";
 		i2c-bus = <&i2c1>;




More information about the lede-commits mailing list