[openwrt/openwrt] realtek: fix SFP support on Engenius EWS2910P
LEDE Commits
lede-commits at lists.infradead.org
Mon Dec 8 14:44:39 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c9553caa0e9e3df5c1cd549cb21c79a50543b872
commit c9553caa0e9e3df5c1cd549cb21c79a50543b872
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Fri Nov 7 18:34:58 2025 +0000
realtek: fix SFP support on Engenius EWS2910P
EWS2910P has two SFP slots of which only one was fully supported so far.
The issue so far was that both SFP slots share the same I2C SCL line but
neither the kernel nor any downstream driver was able to deal with this.
Thus, only one SFP slot was completely working (with detection etc.) but
the other one had to be enabled manually. Networking was functional in
both though.
Since acd7ecc9ed we have a driver which is able to deal with that. Thus,
we can fix the SFP support for this device.
Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20687
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../realtek/dts/rtl8380_engenius_ews2910p.dtsi | 54 ++++++++++++----------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
index 3147a277ac..c1534b07d3 100644
--- a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
+++ b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
@@ -35,16 +35,6 @@
};
};
- gpio-export {
- compatible = "gpio-export";
-
- sff-p9-tx-disable {
- gpio-export,name = "sff-p9-tx-disable";
- gpio-export,output = <1>;
- gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
- };
- };
-
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
@@ -76,13 +66,29 @@
};
};
- i2c1: i2c-gpio-1 {
- compatible = "i2c-gpio";
- sda-gpios = <&gpio1 7 (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 {
+ compatible = "sff,sfp";
+ i2c-bus = <&i2c0>;
+ tx-disable-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ los-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
};
sfp1: sfp-p10 {
compatible = "sff,sfp";
@@ -111,15 +117,6 @@
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";
@@ -202,8 +199,15 @@
SWITCH_PORT(14, 7, internal)
SWITCH_PORT(15, 8, internal)
- /* TODO: fixed link SFP is not right */
- SWITCH_SFP_PORT(24, 9, 1000base-x)
+ port at 24 {
+ reg = <24>;
+ label = "lan9";
+ pcs-handle = <&serdes4>;
+ phy-mode = "1000base-x";
+ phy-handle = <&phy24>;
+ managed = "in-band-status";
+ sfp = <&sfp0>;
+ };
port at 26 {
reg = <26>;
More information about the lede-commits
mailing list