summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Mork2025-02-14 09:59:36 +0000
committerSander Vanheule2025-02-27 18:24:45 +0000
commitbe181cb3b31ebed14245046b2a084fa9e844b84e (patch)
tree6986255f389388ba6975d6299041ef6da8263551
parentf29b57dc68cbb6617f687db6f22ac3adf2d68a72 (diff)
downloadopenwrt-be181cb3b31ebed14245046b2a084fa9e844b84e.tar.gz
realtek: add thermal zones for SFP sensors on SKS8300-8X
Create thermal zones for SFP internal sensors, enabling shutdown on critical temperatures. Signed-off-by: Bjørn Mork <bjorn@mork.no> Link: https://github.com/openwrt/openwrt/pull/17967 Signed-off-by: Sander Vanheule <sander@svanheule.net>
-rw-r--r--target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts23
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
index 9632159368..e62636776b 100644
--- a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
+++ b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
@@ -132,6 +132,7 @@
mod-def0-gpio = <&gpio1 1 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2900>;
+ #thermal-sensor-cells = <0>;
};
sfp1: sfp-p2 {
@@ -141,6 +142,7 @@
mod-def0-gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
+ #thermal-sensor-cells = <0>;
};
sfp2: sfp-p3 {
@@ -150,6 +152,7 @@
mod-def0-gpio = <&gpio1 7 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
+ #thermal-sensor-cells = <0>;
};
sfp3: sfp-p4 {
@@ -159,6 +162,7 @@
mod-def0-gpio = <&gpio1 10 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2000>;
+ #thermal-sensor-cells = <0>;
};
sfp4: sfp-p5 {
@@ -168,6 +172,7 @@
mod-def0-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2000>;
+ #thermal-sensor-cells = <0>;
};
sfp5: sfp-p6 {
@@ -177,6 +182,7 @@
mod-def0-gpio = <&gpio1 22 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
+ #thermal-sensor-cells = <0>;
};
sfp6: sfp-p7 {
@@ -186,6 +192,7 @@
mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
+ #thermal-sensor-cells = <0>;
};
sfp7: sfp-p8 {
@@ -195,6 +202,7 @@
mod-def0-gpio = <&gpio1 28 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2900>;
+ #thermal-sensor-cells = <0>;
};
};
@@ -432,3 +440,18 @@
};
};
};
+
+&thermal_zones {
+ sfp-thermal {
+ polling-delay-passive = <10000>;
+ polling-delay = <10000>;
+ thermal-sensors = <&sfp0>, <&sfp1>, <&sfp2>, <&sfp3>, <&sfp4>, <&sfp5>, <&sfp6>, <&sfp7>;
+ trips {
+ sfp-crit {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+};