Commit 2e09908f authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Thierry Reding

ARM: tegra: paz00: Add CPU thermal zone

Add thermal zone with a passive cooling trip for CPU. Attach it to the
LM90 sensor which monitors CPU temperature. Now CPU frequencies will be
throttled once trip point is reached, preventing critical overheat.
Tested-by: default avatarAgneli <poczt@protonmail.ch>
Tested-by: default avatarPaul Fertser <fercerpav@gmail.com>
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 5f45da70
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
/dts-v1/; /dts-v1/;
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/thermal/thermal.h>
#include "tegra20.dtsi" #include "tegra20.dtsi"
#include "tegra20-cpu-opp.dtsi" #include "tegra20-cpu-opp.dtsi"
#include "tegra20-cpu-opp-microvolt.dtsi" #include "tegra20-cpu-opp-microvolt.dtsi"
...@@ -498,9 +500,10 @@ ldo_rtc { ...@@ -498,9 +500,10 @@ ldo_rtc {
}; };
}; };
adt7461@4c { adt7461: temperature-sensor@4c {
compatible = "adi,adt7461"; compatible = "adi,adt7461";
reg = <0x4c>; reg = <0x4c>;
#thermal-sensor-cells = <1>;
}; };
}; };
...@@ -655,11 +658,46 @@ cpus { ...@@ -655,11 +658,46 @@ cpus {
cpu0: cpu@0 { cpu0: cpu@0 {
cpu-supply = <&cpu_vdd_reg>; cpu-supply = <&cpu_vdd_reg>;
operating-points-v2 = <&cpu0_opp_table>; operating-points-v2 = <&cpu0_opp_table>;
#cooling-cells = <2>;
}; };
cpu@1 { cpu1: cpu@1 {
cpu-supply = <&cpu_vdd_reg>; cpu-supply = <&cpu_vdd_reg>;
operating-points-v2 = <&cpu0_opp_table>; operating-points-v2 = <&cpu0_opp_table>;
#cooling-cells = <2>;
};
};
thermal-zones {
cpu-thermal {
polling-delay-passive = <500>; /* milliseconds */
polling-delay = <1500>; /* milliseconds */
thermal-sensors = <&adt7461 1>;
trips {
trip0: cpu-alert0 {
/* start throttling at 80C */
temperature = <80000>;
hysteresis = <200>;
type = "passive";
};
trip1: cpu-crit {
/* shut down at 85C */
temperature = <85000>;
hysteresis = <2000>;
type = "critical";
};
};
cooling-maps {
map0 {
trip = <&trip0>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
}; };
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment