aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@linaro.org>2016-04-29 01:34:04 +0800
committerJohn Stultz <john.stultz@linaro.org>2017-01-26 11:07:38 -0800
commit0a09f7a9e16155ea36dc614f70748418a42ffa65 (patch)
treeaadbbef8c9cf055be91f990154897274e47a05bd
parent066c6d1a667242343bd0073a9a6950b77073db5e (diff)
downloadhikey-clang-0a09f7a9e16155ea36dc614f70748418a42ffa65.tar.gz
arm64: dts: add Hi6220's EAS Energy model
Add energy model for the CPUs and cluster states into Hi6220's DTS. Change-Id: Ie15c93ea8ad9bcad19eda6ac906896f7c1653686 Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi6220-sched-energy.dtsi69
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi6220.dtsi10
2 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-sched-energy.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220-sched-energy.dtsi
new file mode 100644
index 000000000000..6dfc49332b4f
--- /dev/null
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-sched-energy.dtsi
@@ -0,0 +1,69 @@
+/*
+ * Hikey specific energy cost model data.
+ */
+
+/* static struct idle_state idle_states_cluster_a53[] = { */
+/* { .power = 47 }, /\* arch_cpu_idle() (active idle) = WFI *\/ */
+/* { .power = 47 }, /\* WFI *\/ */
+/* { .power = 47 }, /\* cpu-sleep-0 *\/ */
+/* { .power = 0 }, /\* cluster-sleep-0 *\/ */
+/* }; */
+
+/* static struct capacity_state cap_states_cluster_a53[] = { */
+/* /\* Power per cluster *\/ */
+/* { .cap = 178, .power = 16, }, /\* 200 MHz *\/ */
+/* { .cap = 369, .power = 29, }, /\* 432 MHz *\/ */
+/* { .cap = 622, .power = 47, }, /\* 729 MHz *\/ */
+/* { .cap = 819, .power = 75, }, /\* 960 MHz *\/ */
+/* { .cap = 1024, .power = 112, }, /\* 1200 Mhz *\/ */
+/* }; */
+
+/* static struct idle_state idle_states_core_a53[] = { */
+/* { .power = 15 }, /\* arch_cpu_idle() (active idle) = WFI *\/ */
+/* { .power = 15 }, /\* WFI *\/ */
+/* { .power = 0 }, /\* cpu-sleep-0 *\/ */
+/* { .power = 0 }, /\* cluster-sleep-0 *\/ */
+/* }; */
+
+/* static struct capacity_state cap_states_core_a53[] = { */
+/* /\* Power per cpu *\/ */
+/* { .cap = 178, .power = 69, }, /\* 200 MHz *\/ */
+/* { .cap = 369, .power = 124, }, /\* 432 MHz *\/ */
+/* { .cap = 622, .power = 224, }, /\* 729 MHz *\/ */
+/* { .cap = 819, .power = 367, }, /\* 960 MHz *\/ */
+/* { .cap = 1024, .power = 670, }, /\* 1200 Mhz *\/ */
+/* }; */
+
+energy-costs {
+ CPU_COST: core-cost {
+ busy-cost-data = <
+ 178 69
+ 369 124
+ 622 224
+ 819 367
+ 1024 670
+ >;
+ idle-cost-data = <
+ 15
+ 15
+ 0
+ 0
+ >;
+ };
+
+ CLUSTER_COST: cluster-cost {
+ busy-cost-data = <
+ 178 16
+ 369 29
+ 622 47
+ 819 75
+ 1024 112
+ >;
+ idle-cost-data = <
+ 47
+ 47
+ 47
+ 0
+ >;
+ };
+};
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 017d6ac64ab6..b9fddbed5205 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -91,6 +91,7 @@
cooling-max-level = <0>;
#cooling-cells = <2>; /* min followed by max */
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
dynamic-power-coefficient = <311>;
};
@@ -102,6 +103,7 @@
next-level-cache = <&CLUSTER0_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu2: cpu@2 {
@@ -112,6 +114,7 @@
next-level-cache = <&CLUSTER0_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu3: cpu@3 {
@@ -122,6 +125,7 @@
next-level-cache = <&CLUSTER0_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu4: cpu@100 {
@@ -132,6 +136,7 @@
next-level-cache = <&CLUSTER1_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu5: cpu@101 {
@@ -142,6 +147,7 @@
next-level-cache = <&CLUSTER1_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu6: cpu@102 {
@@ -152,6 +158,7 @@
next-level-cache = <&CLUSTER1_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
cpu7: cpu@103 {
@@ -162,6 +169,7 @@
next-level-cache = <&CLUSTER1_L2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+ sched-energy-costs = <&CPU_COST &CLUSTER_COST>;
};
CLUSTER0_L2: l2-cache0 {
@@ -171,6 +179,8 @@
CLUSTER1_L2: l2-cache1 {
compatible = "cache";
};
+
+ /include/ "hi6220-sched-energy.dtsi"
};
cpu_opp_table: cpu_opp_table {