aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/dts-5.10
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2022-05-15 21:54:47 -0500
committerSander Vanheule <sander@svanheule.net>2022-06-25 15:45:30 +0200
commit4d1fc8916c50bb06c2cc0147e36d93eba6b85a9c (patch)
tree3a1349d79b880bec5837ae5e33624251039fd8ad /target/linux/realtek/dts-5.10
parent2cfaab4549f55f6981b6391b50f89aae4858886d (diff)
downloadupstream-4d1fc8916c50bb06c2cc0147e36d93eba6b85a9c.tar.gz
upstream-4d1fc8916c50bb06c2cc0147e36d93eba6b85a9c.tar.bz2
upstream-4d1fc8916c50bb06c2cc0147e36d93eba6b85a9c.zip
realtek: EnGenius EWS2910P: add support for SFP ports
The SFP cages 9F and 10F share the same SCL line. Currently, there isn't a good way to model this. Thus, only one SFP port can be fully supported. Cage 10F is fully supported with an I2C bus and sfp handle. Linux automatically handles enabling or disabling the TX laser. Cage 9F is only parially supported, without the sfp handle. The SDA line is hogged as an input, so that it remains high. SCL transitions sould not affect modules connected to this cage. The default value of the tx-disable line is high (active). It is exported as a gpio, but the laser is off by default. To enable the laser: echo 0 > /sys/class/gpio/sff-p9-tx-disable/value Thus, both modules can be used for networking, but only 10F will be able to detect and identify a plugged in SFP module. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'target/linux/realtek/dts-5.10')
-rw-r--r--target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts b/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts
index feb57fecff..f87c9585f9 100644
--- a/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts
+++ b/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts
@@ -42,6 +42,25 @@
#gpio-cells = <2>;
gpio-controller;
indirect-access-bus-id = <0>;
+
+ 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";
+
+ sff-p9-tx-disable {
+ gpio-export,name = "sff-p9-tx-disable";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ };
};
gpio-restart {
@@ -72,6 +91,22 @@
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
+
+ i2c1: i2c-gpio-1 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ sfp1: sfp-p10 {
+ compatible = "sff,sfp";
+ i2c-bus = <&i2c1>;
+ tx-disable-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
+ los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
+ };
};
&spi0 {
@@ -138,6 +173,9 @@
INTERNAL_PHY(13)
INTERNAL_PHY(14)
INTERNAL_PHY(15)
+
+ INTERNAL_PHY(24)
+ INTERNAL_PHY(26)
};
};
@@ -155,6 +193,17 @@
SWITCH_PORT(14, 7, internal)
SWITCH_PORT(15, 8, internal)
+ SWITCH_SFP_PORT(24, 9, 1000base-x)
+
+ port@26 {
+ reg = <26>;
+ label = "lan10";
+ phy-mode = "1000base-x";
+ phy-handle = <&phy26>;
+ managed = "in-band-status";
+ sfp = <&sfp1>;
+ };
+
port@28 {
ethernet = <&ethernet0>;
reg = <28>;