diff options
author | Daniel González Cabanelas <dgcbueu@gmail.com> | 2021-01-03 22:32:59 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-01-30 01:03:00 +0100 |
commit | 24b910dca2d6a241d36da052a5067680c823cb04 (patch) | |
tree | db8ea0b946bc8d8812f0c3afca82e7d95d03416f /target/linux | |
parent | e9d551fac1b4a07a089c49adb5dd2e87dab9e8b6 (diff) | |
download | upstream-24b910dca2d6a241d36da052a5067680c823cb04.tar.gz upstream-24b910dca2d6a241d36da052a5067680c823cb04.tar.bz2 upstream-24b910dca2d6a241d36da052a5067680c823cb04.zip |
mvebu: LS421DE: fix the thermal zones
The thermal zones kernel documentation is misleading, we cannot use more
than one sensor in a thermal zone node.
Furthermore the drivetemp driver for some reason it only catches one
sensor from the hard drives array (the first available).
In the Buffalo Linkstation LS421DE board there is also a sensor at the
ethernet phy chip that can also be monitored. Very useful to stop the fan
when there are no hard drives in the bays.
(It might be also possible to add the CPU sensor, but it requires kernel
patching for registering the sensor via device tree, using the function:
devm_thermal_zone_of_sensor_register)
Fix the thermal zones to use only one sensor per node and add the ethernet
phy sensor. Also adjust the hdd temperatures to be more conservative for
a mechanical hard drive.
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts | 55 |
1 files changed, 42 insertions, 13 deletions
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts index dee271541e..57f1acf5f1 100644 --- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts @@ -50,31 +50,30 @@ }; thermal-zones { - chassis-thermal { + hdd-thermal { polling-delay = <20000>; polling-delay-passive = <2000>; - thermal-sensors = <&hdd0_temp>, <&hdd1_temp>; - coefficients = <1 1>; + thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */ trips { - chassis_alert1: chassis-alert1 { + hdd_alert1: trip1 { temperature = <36000>; hysteresis = <2000>; type = "active"; }; - chassis_alert2: chassis-alert2 { - temperature = <46000>; + hdd_alert2: trip2 { + temperature = <44000>; hysteresis = <2000>; type = "active"; }; - chassis_alert3: chassis-alert3 { - temperature = <56000>; + hdd_alert3: trip3 { + temperature = <52000>; hysteresis = <2000>; type = "passive"; }; - chassis_crit: chassis-crit { - temperature = <66000>; + hdd_crit: trip4 { + temperature = <60000>; hysteresis = <2000>; type = "critical"; }; @@ -82,19 +81,48 @@ cooling-maps { map1 { - trip = <&chassis_alert1>; + trip = <&hdd_alert1>; cooling-device = <&system_fan THERMAL_NO_LIMIT 1>; }; map2 { - trip = <&chassis_alert2>; + trip = <&hdd_alert2>; cooling-device = <&system_fan 2 2>; }; map3 { - trip = <&chassis_alert3>; + trip = <&hdd_alert3>; cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>; }; }; }; + + ethphy-thermal { + polling-delay = <20000>; + polling-delay-passive = <2000>; + + thermal-sensors = <ðphy0>; + + trips { + ethphy_alert1: trip1 { + temperature = <65000>; + hysteresis = <4000>; + type = "passive"; + }; + + ethphy_crit: trip2 { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map1 { + trip = <ðphy_alert1>; + cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + }; + }; }; gpio_keys { @@ -243,6 +271,7 @@ marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */ <0x3 0x11 0x1 0x4401>, /* LED polarity */ <0x3 0x12 0x1 0x4905>; /* LED timer */ + #thermal-sensor-cells = <0>; }; }; |