Skip to content

Commit 5499f59

Browse files
committed
ARM: dts: at91: sama7g5: add thermal node
Add thermal management node with its associated trips and cooling-maps. It uses CPUFreq as cooling device for temperatures in the interval [50, 85) degrees Celsius and describe the temperature of 85 degrees Celsius as critical temperature. System will be is shuting down when reaching critical temperature. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 6b5e42b commit 5499f59

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

arch/arm/boot/dts/sama7g5.dtsi

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <dt-bindings/dma/at91.h>
1818
#include <dt-bindings/gpio/gpio.h>
1919
#include <dt-bindings/nvmem/microchip,otpc.h>
20+
#include <dt-bindings/thermal/thermal.h>
2021

2122
/ {
2223
model = "Microchip SAMA7G5 family SoC";
@@ -36,6 +37,7 @@
3637
clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>;
3738
clock-names = "cpu";
3839
operating-points-v2 = <&cpu_opp_table>;
40+
#cooling-cells = <2>; /* min followed by max */
3941
};
4042
};
4143

@@ -74,6 +76,47 @@
7476
};
7577
};
7678

79+
thermal-zones {
80+
cpu_thermal: cpu-thermal {
81+
polling-delay-passive = <1000>;
82+
polling-delay = <5000>;
83+
sustainable-power = <2500>;
84+
thermal-sensors = <&thermal_sensor>;
85+
86+
trips {
87+
cpu_normal: cpu-alert0 {
88+
temperature = <50000>;
89+
hysteresis = <0>;
90+
type = "passive";
91+
};
92+
93+
cpu_hot: cpu-alert1 {
94+
temperature = <65000>;
95+
hysteresis = <0>;
96+
type = "passive";
97+
};
98+
99+
cpu_critical: cpu-critical {
100+
temperature = <85000>;
101+
hysteresis = <0>;
102+
type = "critical";
103+
};
104+
};
105+
106+
cooling-maps {
107+
map0 {
108+
trip = <&cpu_normal>;
109+
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
110+
};
111+
112+
map1 {
113+
trip = <&cpu_hot>;
114+
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
115+
};
116+
};
117+
};
118+
};
119+
77120
clocks {
78121
slow_xtal: slow_xtal {
79122
compatible = "fixed-clock";

0 commit comments

Comments
 (0)