1 From f4318af40544b8e7ff5a6b667ede60e6cf808262 Mon Sep 17 00:00:00 2001
2 From: Martin Botka <martin.botka@somainline.org>
3 Date: Mon, 19 Feb 2024 15:36:39 +0000
4 Subject: [PATCH] arm64: dts: allwinner: h616: Add thermal sensor and zones
6 There are four thermal sensors:
12 Add the thermal sensor configuration and the thermal zones.
14 Signed-off-by: Martin Botka <martin.botka@somainline.org>
15 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
16 Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
17 Link: https://lore.kernel.org/r/20240219153639.179814-8-andre.przywara@arm.com
18 Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
20 .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 88 +++++++++++++++++++
21 1 file changed, 88 insertions(+)
23 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
24 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
26 #include <dt-bindings/clock/sun6i-rtc.h>
27 #include <dt-bindings/reset/sun50i-h616-ccu.h>
28 #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
29 +#include <dt-bindings/thermal/thermal.h>
32 interrupt-parent = <&gic>;
34 reg = <0x03006000 0x1000>;
38 + ths_calibration: thermal-sensor-calibration@14 {
43 watchdog: watchdog@30090a0 {
48 + ths: thermal-sensor@5070400 {
49 + compatible = "allwinner,sun50i-h616-ths";
50 + reg = <0x05070400 0x400>;
51 + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
52 + clocks = <&ccu CLK_BUS_THS>;
53 + clock-names = "bus";
54 + resets = <&ccu RST_BUS_THS>;
55 + nvmem-cells = <&ths_calibration>;
56 + nvmem-cell-names = "calibration";
57 + allwinner,sram = <&syscon>;
58 + #thermal-sensor-cells = <1>;
62 compatible = "allwinner,sun50i-h616-musb",
63 "allwinner,sun8i-h3-musb";
71 + polling-delay-passive = <500>;
72 + polling-delay = <1000>;
73 + thermal-sensors = <&ths 2>;
74 + sustainable-power = <1000>;
77 + cpu_threshold: cpu-trip-0 {
78 + temperature = <60000>;
82 + cpu_target: cpu-trip-1 {
83 + temperature = <70000>;
87 + cpu_critical: cpu-trip-2 {
88 + temperature = <110000>;
96 + polling-delay-passive = <500>;
97 + polling-delay = <1000>;
98 + thermal-sensors = <&ths 0>;
99 + sustainable-power = <1100>;
102 + gpu_temp_critical: gpu-trip-0 {
103 + temperature = <110000>;
111 + polling-delay-passive = <0>;
112 + polling-delay = <0>;
113 + thermal-sensors = <&ths 1>;
116 + ve_temp_critical: ve-trip-0 {
117 + temperature = <110000>;
125 + polling-delay-passive = <0>;
126 + polling-delay = <0>;
127 + thermal-sensors = <&ths 3>;
130 + ddr_temp_critical: ddr-trip-0 {
131 + temperature = <110000>;