Skip to content

Commit c581bef

Browse files
Rocky Haorkhuangtao
authored andcommitted
ARM: dts: rockchip: add tsadc node and thermal config for rk312x
Change-Id: I5d3c5c77ec8e14b26ee7ef02cf4aec4729558d02 Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
1 parent 2954d5a commit c581bef

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

arch/arm/boot/dts/rk312x.dtsi

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <dt-bindings/soc/rockchip,boot-mode.h>
4747
#include <dt-bindings/clock/rk3128-cru.h>
4848
#include <dt-bindings/display/media-bus-format.h>
49+
#include <dt-bindings/thermal/thermal.h>
4950

5051
/ {
5152
interrupt-parent = <&gic>;
@@ -72,6 +73,8 @@
7273
reg = <0xf00>;
7374
operating-points-v2 = <&cpu0_opp_table>;
7475
clocks = <&cru ARMCLK>;
76+
#cooling-cells = <2>; /* min followed by max */
77+
dynamic-power-coefficient = <120>;
7578
};
7679
cpu1: cpu@f01 {
7780
device_type = "cpu";
@@ -215,6 +218,56 @@
215218
clock-frequency = <24000000>;
216219
};
217220

221+
thermal-zones {
222+
soc_thermal: soc-thermal {
223+
polling-delay-passive = <1000>;
224+
polling-delay = <2000>;
225+
sustainable-power = <200>;
226+
227+
thermal-sensors = <&tsadc 0>;
228+
229+
trips {
230+
threshold: trip-point0 {
231+
temperature = <80000>;
232+
hysteresis = <2000>;
233+
type = "passive";
234+
};
235+
target: trip-point1 {
236+
temperature = <90000>;
237+
hysteresis = <2000>;
238+
type = "passive";
239+
};
240+
soc_crit: soc-crit {
241+
temperature = <100000>;
242+
hysteresis = <2000>;
243+
type = "critical";
244+
};
245+
};
246+
247+
cooling-maps {
248+
map0 {
249+
trip = <&target>;
250+
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
251+
contribution = <1024>;
252+
};
253+
map1 {
254+
trip = <&target>;
255+
cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
256+
contribution = <1024>;
257+
};
258+
};
259+
};
260+
261+
};
262+
263+
tsadc: tsadc {
264+
compatible = "rockchip,rk3126-tsadc-virtual";
265+
nvmem-cells = <&cpu_leakage>;
266+
nvmem-cell-names = "cpu_leakage";
267+
#thermal-sensor-cells = <1>;
268+
status = "disabled";
269+
};
270+
218271
xin24m: oscillator {
219272
compatible = "fixed-clock";
220273
clock-frequency = <24000000>;

0 commit comments

Comments
 (0)