arm64: dts: allwinner: a64: Add thermal zones and enable thermal sensors
A64 has 3 thermal sensors: 1 for CPU, 2 for GPU. Add thermal sensor node and define thermal zones. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>alistair/sunxi64-5.4-dsi
parent
0e2ca512ca
commit
a7c7cb66bb
|
@ -287,6 +287,10 @@
|
|||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -363,6 +363,10 @@
|
|||
"MIC1", "Onboard Microphone";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -274,6 +274,10 @@
|
|||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -72,6 +72,9 @@
|
|||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-name = "vdd-ctp";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -307,6 +307,10 @@
|
|||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -345,6 +345,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* On debug connector */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
|
|
|
@ -297,6 +297,10 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* On Exp and Euler connectors */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
|
|
|
@ -334,6 +334,10 @@
|
|||
"MIC2", "Internal Microphone Right";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -204,6 +204,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
|
|
|
@ -316,6 +316,9 @@
|
|||
"MIC1", "Internal Microphone",
|
||||
"Headset Microphone", "HBIAS",
|
||||
"MIC2", "Headset Microphone";
|
||||
};
|
||||
|
||||
&ths {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <dt-bindings/reset/sun50i-a64-ccu.h>
|
||||
#include <dt-bindings/reset/sun8i-de2.h>
|
||||
#include <dt-bindings/reset/sun8i-r-ccu.h>
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
/ {
|
||||
interrupt-parent = <&gic>;
|
||||
|
@ -89,6 +90,7 @@
|
|||
reg = <0>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
|
@ -202,6 +204,60 @@
|
|||
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu0-thermal {
|
||||
/* milliseconds */
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <1000>;
|
||||
thermal-sensors = <&ths 0>;
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_alert0>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
map1 {
|
||||
trip = <&cpu_alert1>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
trips {
|
||||
cpu_alert0: cpu_alert0 {
|
||||
/* milliCelsius */
|
||||
temperature = <75000>;
|
||||
hysteresis = <2000>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
cpu_alert1: cpu_alert1 {
|
||||
/* milliCelsius */
|
||||
temperature = <90000>;
|
||||
hysteresis = <2000>;
|
||||
type = "hot";
|
||||
};
|
||||
|
||||
cpu_crit: cpu_crit {
|
||||
/* milliCelsius */
|
||||
temperature = <110000>;
|
||||
hysteresis = <2000>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
gpu0_thermal: gpu0-thermal {
|
||||
/* milliseconds */
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <1000>;
|
||||
thermal-sensors = <&ths 1>;
|
||||
};
|
||||
gpu1_thermal: gpu1-thermal {
|
||||
/* milliseconds */
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <1000>;
|
||||
thermal-sensors = <&ths 2>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
|
@ -797,6 +853,18 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
ths: thermal-sensor@1c25000 {
|
||||
compatible = "allwinner,sun50i-a64-ths";
|
||||
reg = <0x01c25000 0x100>;
|
||||
clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
|
||||
clock-names = "bus", "ahb";
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
resets = <&ccu RST_BUS_THS>;
|
||||
nvmem-cells = <&tsen_calib>;
|
||||
nvmem-cell-names = "calib";
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
|
||||
uart0: serial@1c28000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c28000 0x400>;
|
||||
|
|
Loading…
Reference in New Issue