aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/files
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-03-28 21:55:31 +0000
committerDaniel Golle <daniel@makrotopia.org>2020-03-31 21:41:23 +0100
commit9f14216a2c4c9d669d8033df31f40f2ca05ce41d (patch)
tree750a41f02d13d63b1ba341964b06a37264e92cca /target/linux/oxnas/files
parent5e82e1ed2f71586ec4a9c4e21449a9a78013c38e (diff)
downloadupstream-9f14216a2c4c9d669d8033df31f40f2ca05ce41d.tar.gz
upstream-9f14216a2c4c9d669d8033df31f40f2ca05ce41d.tar.bz2
upstream-9f14216a2c4c9d669d8033df31f40f2ca05ce41d.zip
oxnas: some improvements for Shuttle KD20
* install kmod-hwmon-drivetemp by default * wire up thermal zone * fix fan GPIO polarity * fix i2c-gpio GPIO_OPEN_DRAIN Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/oxnas/files')
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts54
1 files changed, 50 insertions, 4 deletions
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
index 61ea2b57a7..0bcd2fcf00 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
model = "Shuttle KD20";
@@ -30,13 +31,48 @@
led-upgrade = &led_warn;
};
+ thermal_zones {
+ chassis-thermal {
+ /* Poll every 20 seconds */
+ polling-delay = <20000>;
+ /* Poll every 2nd second when cooling */
+ polling-delay-passive = <2000>;
+
+ thermal-sensors = <&hdd0_temp>, <&hdd1_temp>;
+
+ trips {
+ chassis_alert0: chassis-alert0 {
+ /* At 43 degrees turn on fan */
+ temperature = <43000>;
+ hysteresis = <3000>;
+ type = "active";
+ };
+
+ chassis_alert1: chassis-alert1 {
+ /* At 60 degrees emergency shutdown */
+ temperature = <60000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&chassis_alert0>;
+ cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
i2c-gpio {
compatible = "i2c-gpio";
- sda-gpios = <&gpio1 9 (GPIO_ACTIVE_HIGH|GPIO_LINE_OPEN_DRAIN)>;
- sck-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH|GPIO_LINE_OPEN_DRAIN)>;
+ sda-gpios = <&gpio1 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ sck-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <10>;
#address-cells = <1>;
#size-cells = <0>;
+
rtc0: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
@@ -112,9 +148,9 @@
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
};
- gpio-fan {
+ system_fan: gpio-fan {
compatible = "gpio-fan";
- gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
gpio-fan,speed-map = <0 0
3000 1>;
};
@@ -193,6 +229,16 @@
&sata {
status = "okay";
nr-ports = <2>;
+
+ hdd0_temp: sata-port@0 {
+ reg = <0>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ hdd1_temp: sata-port@1 {
+ reg = <1>;
+ #thermal-sensor-cells = <0>;
+ };
};
&pcie_phy {