From edcb67e9b9209192b64b1edc2365993a37f37d86 Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Thu, 4 Jul 2024 18:52:02 +0800 Subject: [PATCH] sunxi: added thermal zones for t113 chip --- .../842-sunxi-d1s-t113s-dtsi-improve.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/target/linux/sunxi/patches-6.6/842-sunxi-d1s-t113s-dtsi-improve.patch b/target/linux/sunxi/patches-6.6/842-sunxi-d1s-t113s-dtsi-improve.patch index 5da27ea0495e55..d1d53cb1df44b5 100644 --- a/target/linux/sunxi/patches-6.6/842-sunxi-d1s-t113s-dtsi-improve.patch +++ b/target/linux/sunxi/patches-6.6/842-sunxi-d1s-t113s-dtsi-improve.patch @@ -70,3 +70,51 @@ gic: interrupt-controller@1c81000 { compatible = "arm,gic-400"; reg = <0x03021000 0x1000>, +--- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi 2024-05-11 17:53:54.817246645 +0800 ++++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi 2024-05-11 17:54:14.628903221 +0800 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + / { + interrupt-parent = <&gic>; +@@ -31,6 +32,37 @@ + }; + }; + ++ thermal-zones { ++ cpu_thermal: cpu0-thermal { ++ /* milliseconds */ ++ polling-delay-passive = <0>; ++ polling-delay = <0>; ++ thermal-sensors = <&ths 0>; ++ ++ trips { ++ cpu_hot_trip: cpu-hot { ++ temperature = <80000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cpu_very_hot_trip: cpu-very-hot { ++ temperature = <120000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ cpu-hot-limit { ++ trip = <&cpu_hot_trip>; ++ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; ++ }; ++ }; ++ }; ++ }; ++ + osc24M: osc24M-clk { + compatible = "fixed-clock"; + clock-frequency = <24000000>;