ARM: dts: exynos: Override thermal by label in Exynos4412 Odroids
authorKrzysztof Kozlowski <krzk@kernel.org>
Sun, 30 Aug 2020 13:51:54 +0000 (15:51 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 2 Sep 2020 15:46:28 +0000 (17:46 +0200)
Using full paths to extend or override a device tree node is error prone
since if there was a typo error, a new node will be created instead of
extending the node as it was desired.  This will lead to run-time errors
that could be hard to detect.

A mistyped label on the other hand, will cause a dtc compile error
(during build time).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200830135200.24304-27-krzk@kernel.org
arch/arm/boot/dts/exynos4412-odroid-common.dtsi
arch/arm/boot/dts/exynos4412-odroidu3.dts

index a5c1ce1e396cc10f0c2284a8c9e8a9a65196e11f..2983e91bc7ddee6be97465167e737187ccd75263 100644 (file)
                        clock-frequency = <24000000>;
                };
        };
-
-       thermal-zones {
-               cpu_thermal: cpu-thermal {
-                       cooling-maps {
-                               cooling_map0: map0 {
-                                    /* Corresponds to 800MHz at freq_table */
-                                    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>,
-                                                     <&cpu1 13 13>,
-                                                     <&cpu2 13 13>,
-                                                     <&cpu3 13 13>;
-                              };
-                      };
-               };
-       };
 };
 
 &bus_dmc {
        };
 };
 
+&cpu_thermal {
+       cooling-maps {
+               cooling_map0: map0 {
+                       /* Corresponds to 800MHz at freq_table */
+                       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>, <&cpu1 13 13>,
+                                        <&cpu2 13 13>, <&cpu3 13 13>;
+               };
+       };
+};
+
 &pinctrl_1 {
        gpio_power_key: power_key {
                samsung,pins = "gpx1-3";
index 8ff243ba454260f240d65f51d740fbcab17bd4f4..b8549d846f86ec4fdc874ca5e07a0a6c2677beb0 100644 (file)
                #cooling-cells = <2>;
                cooling-levels = <0 102 170 230>;
        };
-
-       thermal-zones {
-               cpu_thermal: cpu-thermal {
-                       cooling-maps {
-                               map0 {
-                                    trip = <&cpu_alert1>;
-                                    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>,
-                                                     <&cpu1 15 15>,
-                                                     <&cpu2 15 15>,
-                                                     <&cpu3 15 15>,
-                                                     <&fan0 2 3>;
-                               };
-                               map2 {
-                                    trip = <&cpu_alert0>;
-                                    cooling-device = <&fan0 0 1>;
-                               };
-                       };
-               };
-       };
 };
 
 &adc {
        regulator-max-microvolt = <3300000>;
 };
 
+&cpu_thermal {
+       cooling-maps {
+               map0 {
+                       trip = <&cpu_alert1>;
+                       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>, <&cpu1 15 15>,
+                                        <&cpu2 15 15>, <&cpu3 15 15>,
+                                        <&fan0 2 3>;
+               };
+               map2 {
+                       trip = <&cpu_alert0>;
+                       cooling-device = <&fan0 0 1>;
+               };
+       };
+};
+
 &hdmicec {
        needs-hpd;
 };