Skip to content

Commit

Permalink
sunxi: added thermal zones for t113 chip
Browse files Browse the repository at this point in the history
  • Loading branch information
srdgame committed Jul 4, 2024
1 parent 4847522 commit edcb67e
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dt-bindings/interrupt-controller/arm-gic.h>
#include <riscv/allwinner/sunxi-d1s-t113.dtsi>
#include <riscv/allwinner/sunxi-d1-t113.dtsi>
+#include <dt-bindings/thermal/thermal.h>

/ {
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>;

0 comments on commit edcb67e

Please sign in to comment.