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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Viresh Kumar 2018-11-16 15:31:10 +05:30 committed by Krzysztof Kozlowski
parent 6e2422ff94
commit 670734f558
13 changed files with 178 additions and 113 deletions

View File

@ -36,11 +36,13 @@
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>;
};
};
};

View File

@ -121,11 +121,13 @@
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>;
};
};
};

View File

@ -116,11 +116,13 @@
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>;
};
};
};

View File

@ -138,11 +138,11 @@
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>;
};
};
};

View File

@ -51,7 +51,7 @@
#cooling-cells = <2>; /* min followed by max */
};
cpu@901 {
cpu1: cpu@901 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0x901>;

View File

@ -45,11 +45,15 @@
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>;
};
};
};

View File

@ -267,11 +267,15 @@
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>;
};
};
};

View File

@ -72,11 +72,15 @@
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>;
};
};
};

View File

@ -45,24 +45,22 @@
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>;
};
};
};
};

View File

@ -45,7 +45,7 @@
#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 @@
#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 @@
#cooling-cells = <2>; /* min followed by max */
};
cpu@a03 {
cpu3: cpu@a03 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0xA03>;

View File

@ -59,7 +59,7 @@
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 @@
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>;
};
};
};

View File

@ -56,24 +56,30 @@
*/
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 {
map1 {
trip = <&cpu0_alert1>;
cooling-device = <&cpu0 3 7>;
};
map3 {
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 @@
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 @@
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 @@
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>;
};
};
};

View File

@ -113,24 +113,30 @@
*/
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 {
map4 {
trip = <&cpu0_alert4>;
cooling-device = <&cpu0 3 7>;
};
map6 {
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 @@
};
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 @@
};
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 @@
};
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>;
};
};
};