[PATCH 4/5] dts: arm64: hi3660: Add thermal cooling management

2018-04-03 Thread Leo Yan
From: Tao Wang 

Add nodes and properties for thermal cooling management support.

Signed-off-by: Tao Wang 
Signed-off-by: Leo Yan 
---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 44 +++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi 
b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index a39da09..e20edd9 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -7,6 +7,7 @@
 
 #include 
 #include 
+#include 
 
 / {
compatible = "hisilicon,hi3660";
@@ -64,6 +65,8 @@
capacity-dmips-mhz = <592>;
clocks = <_clock HI3660_CLK_STUB_CLUSTER0>;
operating-points-v2 = <_opp>;
+   #cooling-cells = <2>;
+   dynamic-power-coefficient = <110>;
};
 
cpu1: cpu@1 {
@@ -112,6 +115,8 @@
capacity-dmips-mhz = <1024>;
clocks = <_clock HI3660_CLK_STUB_CLUSTER1>;
operating-points-v2 = <_opp>;
+   #cooling-cells = <2>;
+   dynamic-power-coefficient = <550>;
};
 
cpu5: cpu@101 {
@@ -1073,5 +1078,44 @@
interrupts = ;
#thermal-sensor-cells = <1>;
};
+
+   thermal-zones {
+
+   cls0: cls0 {
+   polling-delay = <1000>;
+   polling-delay-passive = <100>;
+   sustainable-power = <4500>;
+
+   /* sensor ID */
+   thermal-sensors = < 1>;
+
+   trips {
+   threshold: trip-point@0 {
+   temperature = <65000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+
+   target: trip-point@1 {
+   temperature = <75000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+   };
+
+   cooling-maps {
+   map0 {
+   trip = <>;
+   contribution = <1024>;
+   cooling-device = < 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+   };
+   map1 {
+   trip = <>;
+   contribution = <512>;
+   cooling-device = < 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+   };
+   };
+   };
+   };
};
 };
-- 
1.9.1



[PATCH 4/5] dts: arm64: hi3660: Add thermal cooling management

2018-04-03 Thread Leo Yan
From: Tao Wang 

Add nodes and properties for thermal cooling management support.

Signed-off-by: Tao Wang 
Signed-off-by: Leo Yan 
---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 44 +++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi 
b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index a39da09..e20edd9 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -7,6 +7,7 @@
 
 #include 
 #include 
+#include 
 
 / {
compatible = "hisilicon,hi3660";
@@ -64,6 +65,8 @@
capacity-dmips-mhz = <592>;
clocks = <_clock HI3660_CLK_STUB_CLUSTER0>;
operating-points-v2 = <_opp>;
+   #cooling-cells = <2>;
+   dynamic-power-coefficient = <110>;
};
 
cpu1: cpu@1 {
@@ -112,6 +115,8 @@
capacity-dmips-mhz = <1024>;
clocks = <_clock HI3660_CLK_STUB_CLUSTER1>;
operating-points-v2 = <_opp>;
+   #cooling-cells = <2>;
+   dynamic-power-coefficient = <550>;
};
 
cpu5: cpu@101 {
@@ -1073,5 +1078,44 @@
interrupts = ;
#thermal-sensor-cells = <1>;
};
+
+   thermal-zones {
+
+   cls0: cls0 {
+   polling-delay = <1000>;
+   polling-delay-passive = <100>;
+   sustainable-power = <4500>;
+
+   /* sensor ID */
+   thermal-sensors = < 1>;
+
+   trips {
+   threshold: trip-point@0 {
+   temperature = <65000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+
+   target: trip-point@1 {
+   temperature = <75000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+   };
+
+   cooling-maps {
+   map0 {
+   trip = <>;
+   contribution = <1024>;
+   cooling-device = < 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+   };
+   map1 {
+   trip = <>;
+   contribution = <512>;
+   cooling-device = < 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+   };
+   };
+   };
+   };
};
 };
-- 
1.9.1