Commit 6a7be15a authored by Yangtao Li's avatar Yangtao Li Committed by Maxime Ripard

ARM: dts: sun8i-r40: Add thermal sensor and thermal zones

There are two sensors, sensor0 for CPU, sensor1 for GPU.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent 5a5e5216
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <dt-bindings/clock/sun8i-tcon-top.h> #include <dt-bindings/clock/sun8i-tcon-top.h>
#include <dt-bindings/reset/sun8i-r40-ccu.h> #include <dt-bindings/reset/sun8i-r40-ccu.h>
#include <dt-bindings/reset/sun8i-de2.h> #include <dt-bindings/reset/sun8i-de2.h>
#include <dt-bindings/thermal/thermal.h>
/ { / {
#address-cells = <1>; #address-cells = <1>;
...@@ -110,6 +111,22 @@ de: display-engine { ...@@ -110,6 +111,22 @@ de: display-engine {
status = "disabled"; status = "disabled";
}; };
thermal-zones {
cpu_thermal: cpu0-thermal {
/* milliseconds */
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 0>;
};
gpu_thermal: gpu-thermal {
/* milliseconds */
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 1>;
};
};
soc { soc {
compatible = "simple-bus"; compatible = "simple-bus";
#address-cells = <1>; #address-cells = <1>;
...@@ -500,6 +517,17 @@ wdt: watchdog@1c20c90 { ...@@ -500,6 +517,17 @@ wdt: watchdog@1c20c90 {
clocks = <&osc24M>; clocks = <&osc24M>;
}; };
ths: thermal-sensor@1c24c00 {
compatible = "allwinner,sun8i-r40-ths";
reg = <0x01c24c00 0x100>;
clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
clock-names = "bus", "mod";
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
resets = <&ccu RST_BUS_THS>;
/* TODO: add nvmem-cells for calibration */
#thermal-sensor-cells = <1>;
};
uart0: serial@1c28000 { uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>; reg = <0x01c28000 0x400>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment