summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3366.dtsi89
1 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3366.dtsi b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
index 75784150d756..8b54201b52a0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
@@ -49,6 +49,7 @@
#include <dt-bindings/display/mipi_dsi.h>
#include <dt-bindings/power/rk3366-power.h>
#include <dt-bindings/soc/rockchip_boot-mode.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
compatible = "rockchip,rk3366";
@@ -82,6 +83,8 @@
clocks = <&cru ARMCLK>;
operating-points-v2 = <&cpu0_opp_table>;
cpu-idle-states = <&cpu_sleep>;
+ #cooling-cells = <2>; /* min followed by max */
+ dynamic-power-coefficient = <166>;
};
cpu1: cpu@1 {
@@ -261,6 +264,69 @@
status = "disabled";
};
+ thermal-zones {
+ soc_thermal: soc-thermal {
+ polling-delay-passive = <100>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+ sustainable-power = <1600>; /* milliwatts */
+
+ thermal-sensors = <&tsadc 0>;
+
+ trips {
+ threshold: trip-point@0 {
+ temperature = <70000>; /* millicelsius */
+ hysteresis = <2000>; /* millicelsius */
+ type = "passive";
+ };
+ target: trip-point@1 {
+ temperature = <85000>; /* millicelsius */
+ hysteresis = <2000>; /* millicelsius */
+ type = "passive";
+ };
+ soc_crit: soc-crit {
+ temperature = <95000>; /* millicelsius */
+ hysteresis = <2000>; /* millicelsius */
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device =
+ <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ map1 {
+ trip = <&target>;
+ cooling-device =
+ <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ gpu_thermal: gpu-thermal {
+ polling-delay-passive = <100>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+
+ thermal-sensors = <&tsadc 1>;
+ };
+ };
+
+ tsadc: tsadc@ff260000 {
+ compatible = "rockchip,rk3366-tsadc";
+ reg = <0x0 0xff260000 0x0 0x100>;
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+ clock-names = "tsadc", "apb_pclk";
+ resets = <&cru SRST_TSADC>;
+ reset-names = "tsadc-apb";
+ pinctrl-names = "default";
+ pinctrl-0 = <&tsadc_gpio>;
+ #thermal-sensor-cells = <1>;
+ rockchip,hw-tshut-temp = <95000>;
+ status = "disabled";
+ };
+
sdmmc: rksdmmc@ff400000 {
compatible = "rockchip,rk3366-dw-mshc","rockchip,rk3288-dw-mshc";
clock-freq-min-max = <400000 150000000>;
@@ -1544,6 +1610,18 @@
<0 25 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ tsadc_pin {
+ tsadc_gpio: tsadc-gpio {
+ rockchip,pins =
+ <0 22 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ tsadc_int: tsadc-int {
+ rockchip,pins =
+ <0 22 RK_FUNC_2 &pcfg_pull_none>;
+ };
+ };
};
gpu: gpu@ffa30000 {
@@ -1561,8 +1639,19 @@
clocks = <&cru ACLK_GPU>;
clock-names = "clk_mali";
+ #cooling-cells = <2>; /* min followed by max */
operating-points-v2 = <&gpu_opp_table>;
status = "disabled";
+
+ power_model {
+ compatible = "arm,mali-simple-power-model";
+ voltage = <900>;
+ frequency = <500>;
+ static-power = <300>;
+ dynamic-power = <1780>;
+ ts = <32000 4700 (-80) 2>;
+ thermal-zone = "gpu-thermal";
+ };
};
gpu_opp_table: gpu_opp_table {