diff options
| author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2022-10-26 15:41:09 +0300 |
|---|---|---|
| committer | Claudiu Beznea <claudiu.beznea@microchip.com> | 2022-11-01 12:28:34 +0200 |
| commit | 12045a7a0768c65ab4cebc2f0c8afd207fc4bc47 (patch) | |
| tree | a34997a4d0b809b16c72313902a0a247f09ca268 | |
| parent | 65d8815281d03b304af60b0ff2289eac5d1e0370 (diff) | |
| download | linux-12045a7a0768c65ab4cebc2f0c8afd207fc4bc47.tar.gz linux-12045a7a0768c65ab4cebc2f0c8afd207fc4bc47.tar.bz2 linux-12045a7a0768c65ab4cebc2f0c8afd207fc4bc47.zip | |
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
| -rw-r--r-- | arch/arm/boot/dts/sama7g5.dtsi | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi index db5909403792..4c736db0cc7e 100644 --- a/arch/arm/boot/dts/sama7g5.dtsi +++ b/arch/arm/boot/dts/sama7g5.dtsi @@ -17,6 +17,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/mfd/at91-usart.h> #include <dt-bindings/nvmem/microchip,sama7g5-otpc.h> +#include <dt-bindings/thermal/thermal.h> / { model = "Microchip SAMA7G5 family SoC"; @@ -36,6 +37,7 @@ clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>; clock-names = "cpu"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; }; @@ -74,6 +76,46 @@ }; }; + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&thermal_sensor>; + + trips { + cpu_normal: cpu-alert0 { + temperature = <90000>; + hysteresis = <0>; + type = "passive"; + }; + + cpu_hot: cpu-alert1 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + cpu_critical: cpu-critical { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_normal>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&cpu_hot>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + clocks { slow_xtal: slow_xtal { compatible = "fixed-clock"; |
