Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357881 > unrolled thread

[RESEND][PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model.

Started byDawei Chien <dawei.chien@mediatek.com>
First post2016-03-15 09:20 +0100
Last post2016-03-15 09:20 +0100
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [RESEND][PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. Dawei Chien <dawei.chien@mediatek.com> - 2016-03-15 09:20 +0100
    [RESEND][PATCH 3/3] arm64: dts: mt8173: Add dynamic power node. Dawei Chien <dawei.chien@mediatek.com> - 2016-03-15 09:20 +0100
    [RESEND][PATCH 2/3] arm64: dts: mt8173: Add thermal zone node. Dawei Chien <dawei.chien@mediatek.com> - 2016-03-15 09:20 +0100

#1357881 — [RESEND][PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model.

FromDawei Chien <dawei.chien@mediatek.com>
Date2016-03-15 09:20 +0100
Subject[RESEND][PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model.
Message-ID<rcSmS-7Sw-3@gated-at.bofh.it>
Use Intelligent Power Allocation (IPA) technical to add dynamic power model for binding CPU thermal zone. The power allocator governor allocates power budget to control CPU temperature.

Power Allocator governor is able to keep SOC temperature within a defined temperature range to avoid SOC overheat and keep it's performance.
mt8173-cpufreq.c need to register its' own power model with power allocator thermal governor, so that power allocator governor can allocates suitable power budget to control CPU temperature.

Binding document is refer to this patchset
https://lkml.org/lkml/2015/11/30/239

Change since V5:
1. Remove thermal sensor ID from phandles

Change since V4:
1. Remove unnecessary error-checking for mt8173-cpufreq.c 2. Initializing variable capacitance with 0

Change since V3:
1. Remove static power model
2. Split V3's device tree in two for thermal zones and dynamic power models respectively

Change since V2:
1. Move dynamic/static power model in device tree

Change since V1:
1. Include mt8171.h and sort header file for mt8173.dtsi

Dawei Chien (3):
  thermal: mediatek: Add cpu dynamic power cooling model.
  arm64: dts: mt8173: Add thermal zone node.
  arm64: dts: mt8173: Add dynamic power node.

 arch/arm64/boot/dts/mediatek/mt8173.dtsi |   47 ++++++++++++++++++++++++++++++
 drivers/cpufreq/mt8173-cpufreq.c         |   12 ++++++--
 2 files changed, 57 insertions(+), 2 deletions(-)

[toc] | [next] | [standalone]


#1357886 — [RESEND][PATCH 3/3] arm64: dts: mt8173: Add dynamic power node.

FromDawei Chien <dawei.chien@mediatek.com>
Date2016-03-15 09:20 +0100
Subject[RESEND][PATCH 3/3] arm64: dts: mt8173: Add dynamic power node.
Message-ID<rcSmT-7Sw-17@gated-at.bofh.it>
In reply to#1357881
This device node is for calculating dynamic power in mW.
Since mt8173 has two clusters, there are two dynamic power
coefficient as well.

Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
---
This patch is base on patchset:
https://lkml.org/lkml/2015/11/17/251
---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index f9c44cc..5cb6b4e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -71,6 +71,7 @@
 			#cooling-cells = <2>;
 			#cooling-min-level = <0>;
 			#cooling-max-level = <7>;
+			dynamic-power-coefficient = <263>;
 		};
 
 		cpu1: cpu@1 {
@@ -95,6 +96,7 @@
 			#cooling-cells = <2>;
 			#cooling-min-level = <0>;
 			#cooling-max-level = <7>;
+			dynamic-power-coefficient = <263>;
 		};
 
 		cpu2: cpu@100 {
@@ -119,6 +121,7 @@
 			#cooling-cells = <2>;
 			#cooling-min-level = <0>;
 			#cooling-max-level = <7>;
+			dynamic-power-coefficient = <530>;
 		};
 
 		cpu3: cpu@101 {
@@ -143,6 +146,7 @@
 			#cooling-cells = <2>;
 			#cooling-min-level = <0>;
 			#cooling-max-level = <7>;
+			dynamic-power-coefficient = <530>;
 		};
 
 		idle-states {
-- 
1.7.9.5

[toc] | [prev] | [next] | [standalone]


#1357888 — [RESEND][PATCH 2/3] arm64: dts: mt8173: Add thermal zone node.

FromDawei Chien <dawei.chien@mediatek.com>
Date2016-03-15 09:20 +0100
Subject[RESEND][PATCH 2/3] arm64: dts: mt8173: Add thermal zone node.
Message-ID<rcSmT-7Sw-21@gated-at.bofh.it>
In reply to#1357881
This adds thermal zone node to Mediatek MT8173 dtsi file.

Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
---
This patch is base on patchset:
https://lkml.org/lkml/2015/11/30/239
---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi |   43 ++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 47151e8..f9c44cc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -188,6 +188,49 @@
 		clock-output-names = "cpum_ck";
 	};
 
+	thermal-zones {
+		cpu_thermal: cpu_thermal {
+			polling-delay-passive = <1000>; /* milliseconds */
+			polling-delay = <1000>; /* milliseconds */
+
+			thermal-sensors = <&thermal>;
+			sustainable-power = <1500>; /* milliwatts */
+
+			trips {
+				threshold: trip-point@0 {
+					temperature = <68000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				target: trip-point@1 {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit@0 {
+					temperature = <115000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map@0 {
+					trip = <&target>;
+					cooling-device = <&cpu0 0 0>;
+					contribution = <1024>;
+				};
+				map@1 {
+					trip = <&target>;
+					cooling-device = <&cpu2 0 0>;
+					contribution = <2048>;
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupt-parent = <&gic>;
-- 
1.7.9.5

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web