Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: at91: sama7g5: add thermal zones node

Add thermal zones node with its associated trips and cooling-maps.
It uses CPUFreq as cooling device for temperatures in the interval
[90, 100) degrees Celsius and describe the temperature of 100 degrees
Celsius as critical temperature. System will be is shutting down when
reaching critical temperature.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221026124114.985876-7-claudiu.beznea@microchip.com

+42
+42
arch/arm/boot/dts/sama7g5.dtsi
··· 17 17 #include <dt-bindings/gpio/gpio.h> 18 18 #include <dt-bindings/mfd/at91-usart.h> 19 19 #include <dt-bindings/nvmem/microchip,sama7g5-otpc.h> 20 + #include <dt-bindings/thermal/thermal.h> 20 21 21 22 / { 22 23 model = "Microchip SAMA7G5 family SoC"; ··· 37 36 clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>; 38 37 clock-names = "cpu"; 39 38 operating-points-v2 = <&cpu_opp_table>; 39 + #cooling-cells = <2>; /* min followed by max */ 40 40 }; 41 41 }; 42 42 ··· 73 71 opp-hz = /bits/ 64 <1000000002>; 74 72 opp-microvolt = <1250000 1225000 1300000>; 75 73 clock-latency-ns = <320000>; 74 + }; 75 + }; 76 + 77 + thermal-zones { 78 + cpu_thermal: cpu-thermal { 79 + polling-delay-passive = <1000>; 80 + polling-delay = <5000>; 81 + thermal-sensors = <&thermal_sensor>; 82 + 83 + trips { 84 + cpu_normal: cpu-alert0 { 85 + temperature = <90000>; 86 + hysteresis = <0>; 87 + type = "passive"; 88 + }; 89 + 90 + cpu_hot: cpu-alert1 { 91 + temperature = <95000>; 92 + hysteresis = <0>; 93 + type = "passive"; 94 + }; 95 + 96 + cpu_critical: cpu-critical { 97 + temperature = <100000>; 98 + hysteresis = <0>; 99 + type = "critical"; 100 + }; 101 + }; 102 + 103 + cooling-maps { 104 + map0 { 105 + trip = <&cpu_normal>; 106 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 107 + }; 108 + 109 + map1 { 110 + trip = <&cpu_hot>; 111 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 112 + }; 113 + }; 76 114 }; 77 115 }; 78 116