Commit 670734f5 authored by Viresh Kumar's avatar Viresh Kumar Committed by Krzysztof Kozlowski

ARM: dts: exynos: Add all CPUs in cooling maps

Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 6e2422ff
......@@ -36,11 +36,13 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 500MHz */
cooling-device = <&cpu0 5 5>;
cooling-device = <&cpu0 5 5>,
<&cpu1 5 5>;
};
map1 {
/* Corresponds to 200MHz */
cooling-device = <&cpu0 8 8>;
cooling-device = <&cpu0 8 8>,
<&cpu1 8 8>;
};
};
};
......
......@@ -121,11 +121,13 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Correspond to 500MHz at freq_table */
cooling-device = <&cpu0 5 5>;
cooling-device = <&cpu0 5 5>,
<&cpu1 5 5>;
};
map1 {
/* Correspond to 200MHz at freq_table */
cooling-device = <&cpu0 8 8>;
cooling-device = <&cpu0 8 8>,
<&cpu1 8 8>;
};
};
};
......
......@@ -116,11 +116,13 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 500MHz */
cooling-device = <&cpu0 5 5>;
cooling-device = <&cpu0 5 5>,
<&cpu1 5 5>;
};
map1 {
/* Corresponds to 200MHz */
cooling-device = <&cpu0 8 8>;
cooling-device = <&cpu0 8 8>,
<&cpu1 8 8>;
};
};
};
......
......@@ -138,11 +138,11 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 800MHz at freq_table */
cooling-device = <&cpu0 2 2>;
cooling-device = <&cpu0 2 2>, <&cpu1 2 2>;
};
map1 {
/* Corresponds to 200MHz at freq_table */
cooling-device = <&cpu0 4 4>;
cooling-device = <&cpu0 4 4>, <&cpu1 4 4>;
};
};
};
......
......@@ -51,7 +51,7 @@ cpu0: cpu@900 {
#cooling-cells = <2>; /* min followed by max */
};
cpu@901 {
cpu1: cpu@901 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0x901>;
......
......@@ -45,11 +45,15 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 800MHz at freq_table */
cooling-device = <&cpu0 7 7>;
cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
<&cpu2 7 7>, <&cpu3 7 7>;
};
map1 {
/* Corresponds to 200MHz at freq_table */
cooling-device = <&cpu0 13 13>;
cooling-device = <&cpu0 13 13>,
<&cpu1 13 13>,
<&cpu2 13 13>,
<&cpu3 13 13>;
};
};
};
......
......@@ -267,11 +267,15 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 800MHz at freq_table */
cooling-device = <&cpu0 7 7>;
cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
<&cpu2 7 7>, <&cpu3 7 7>;
};
map1 {
/* Corresponds to 200MHz at freq_table */
cooling-device = <&cpu0 13 13>;
cooling-device = <&cpu0 13 13>,
<&cpu1 13 13>,
<&cpu2 13 13>,
<&cpu3 13 13>;
};
};
};
......
......@@ -72,11 +72,15 @@ cpu_thermal: cpu-thermal {
cooling-maps {
cooling_map0: map0 {
/* Corresponds to 800MHz at freq_table */
cooling-device = <&cpu0 7 7>;
cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
<&cpu2 7 7>, <&cpu3 7 7>;
};
cooling_map1: map1 {
/* Corresponds to 200MHz at freq_table */
cooling-device = <&cpu0 13 13>;
cooling-device = <&cpu0 13 13>,
<&cpu1 13 13>,
<&cpu2 13 13>,
<&cpu3 13 13>;
};
};
};
......
......@@ -45,24 +45,22 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
trip = <&cpu_alert1>;
cooling-device = <&cpu0 9 9>;
cooling-device = <&cpu0 9 9>, <&cpu1 9 9>,
<&cpu2 9 9>, <&cpu3 9 9>,
<&fan0 1 2>;
};
map1 {
trip = <&cpu_alert2>;
cooling-device = <&cpu0 15 15>;
cooling-device = <&cpu0 15 15>,
<&cpu1 15 15>,
<&cpu2 15 15>,
<&cpu3 15 15>,
<&fan0 2 3>;
};
map2 {
trip = <&cpu_alert0>;
cooling-device = <&fan0 0 1>;
};
map3 {
trip = <&cpu_alert1>;
cooling-device = <&fan0 1 2>;
};
map4 {
trip = <&cpu_alert2>;
cooling-device = <&fan0 2 3>;
};
};
};
};
......
......@@ -45,7 +45,7 @@ cpu0: cpu@a00 {
#cooling-cells = <2>; /* min followed by max */
};
cpu@a01 {
cpu1: cpu@a01 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0xA01>;
......@@ -55,7 +55,7 @@ cpu@a01 {
#cooling-cells = <2>; /* min followed by max */
};
cpu@a02 {
cpu2: cpu@a02 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0xA02>;
......@@ -65,7 +65,7 @@ cpu@a02 {
#cooling-cells = <2>; /* min followed by max */
};
cpu@a03 {
cpu3: cpu@a03 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0xA03>;
......
......@@ -59,7 +59,7 @@ cpu0: cpu@0 {
operating-points-v2 = <&cpu0_opp_table>;
#cooling-cells = <2>; /* min followed by max */
};
cpu@1 {
cpu1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a15";
reg = <1>;
......@@ -1087,11 +1087,12 @@ cpu_thermal: cpu-thermal {
cooling-maps {
map0 {
/* Corresponds to 800MHz at freq_table */
cooling-device = <&cpu0 9 9>;
cooling-device = <&cpu0 9 9>, <&cpu1 9 9>;
};
map1 {
/* Corresponds to 200MHz at freq_table */
cooling-device = <&cpu0 15 15>;
cooling-device = <&cpu0 15 15>,
<&cpu1 15 15>;
};
};
};
......
......@@ -56,24 +56,30 @@ cooling-maps {
*/
map0 {
trip = <&cpu0_alert0>;
cooling-device = <&cpu0 0 2>;
};
map1 {
trip = <&cpu0_alert0>;
cooling-device = <&cpu4 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
/*
* When reaching cpu0_alert1, reduce CPU
* further, down to 600 MHz (12 steps for big,
* 7 steps for LITTLE).
*/
map2 {
trip = <&cpu0_alert1>;
cooling-device = <&cpu0 3 7>;
};
map3 {
map1 {
trip = <&cpu0_alert1>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -99,19 +105,25 @@ cpu1_crit0: cpu-crit-0 {
cooling-maps {
map0 {
trip = <&cpu1_alert0>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map1 {
trip = <&cpu1_alert0>;
cooling-device = <&cpu4 0 2>;
};
map2 {
trip = <&cpu1_alert1>;
cooling-device = <&cpu0 3 7>;
};
map3 {
trip = <&cpu1_alert1>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -137,19 +149,25 @@ cpu2_crit0: cpu-crit-0 {
cooling-maps {
map0 {
trip = <&cpu2_alert0>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map1 {
trip = <&cpu2_alert0>;
cooling-device = <&cpu4 0 2>;
};
map2 {
trip = <&cpu2_alert1>;
cooling-device = <&cpu0 3 7>;
};
map3 {
trip = <&cpu2_alert1>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -175,19 +193,25 @@ cpu3_crit0: cpu-crit-0 {
cooling-maps {
map0 {
trip = <&cpu3_alert0>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map1 {
trip = <&cpu3_alert0>;
cooling-device = <&cpu4 0 2>;
};
map2 {
trip = <&cpu3_alert1>;
cooling-device = <&cpu0 3 7>;
};
map3 {
trip = <&cpu3_alert1>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......
......@@ -113,24 +113,30 @@ map2 {
*/
map3 {
trip = <&cpu0_alert3>;
cooling-device = <&cpu0 0 2>;
};
map4 {
trip = <&cpu0_alert3>;
cooling-device = <&cpu4 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
/*
* When reaching cpu0_alert4, reduce CPU
* further, down to 600 MHz (12 steps for big,
* 7 steps for LITTLE).
*/
map5 {
trip = <&cpu0_alert4>;
cooling-device = <&cpu0 3 7>;
};
map6 {
map4 {
trip = <&cpu0_alert4>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -185,19 +191,25 @@ map2 {
};
map3 {
trip = <&cpu1_alert3>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map4 {
trip = <&cpu1_alert3>;
cooling-device = <&cpu4 0 2>;
};
map5 {
trip = <&cpu1_alert4>;
cooling-device = <&cpu0 3 7>;
};
map6 {
trip = <&cpu1_alert4>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -252,19 +264,25 @@ map2 {
};
map3 {
trip = <&cpu2_alert3>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map4 {
trip = <&cpu2_alert3>;
cooling-device = <&cpu4 0 2>;
};
map5 {
trip = <&cpu2_alert4>;
cooling-device = <&cpu0 3 7>;
};
map6 {
trip = <&cpu2_alert4>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......@@ -319,19 +337,25 @@ map2 {
};
map3 {
trip = <&cpu3_alert3>;
cooling-device = <&cpu0 0 2>;
cooling-device = <&cpu0 0 2>,
<&cpu1 0 2>,
<&cpu2 0 2>,
<&cpu3 0 2>,
<&cpu4 0 2>,
<&cpu5 0 2>,
<&cpu6 0 2>,
<&cpu7 0 2>;
};
map4 {
trip = <&cpu3_alert3>;
cooling-device = <&cpu4 0 2>;
};
map5 {
trip = <&cpu3_alert4>;
cooling-device = <&cpu0 3 7>;
};
map6 {
trip = <&cpu3_alert4>;
cooling-device = <&cpu4 3 12>;
cooling-device = <&cpu0 3 7>,
<&cpu1 3 7>,
<&cpu2 3 7>,
<&cpu3 3 7>,
<&cpu4 3 12>,
<&cpu5 3 12>,
<&cpu6 3 12>,
<&cpu7 3 12>;
};
};
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment