]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point
authorStefan Wahren <stefan.wahren@i2se.com>
Fri, 31 Mar 2017 20:03:04 +0000 (20:03 +0000)
committerEric Anholt <eric@anholt.net>
Mon, 15 May 2017 22:43:35 +0000 (15:43 -0700)
As suggested by Eduardo Valentin this adds the thermal zone for
the bcm2835 SoC with its single thermal sensor. We start with
the criticial trip point and leave the cooling devices empty
since we don't have any at the moment. Since the coefficients
could vary depending on the SoC we need to define them separate.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
arch/arm/boot/dts/bcm2835.dtsi
arch/arm/boot/dts/bcm2836.dtsi
arch/arm/boot/dts/bcm283x.dtsi

index 0890d97e674d4b0ee542822a39b1000ba0715414..659b6e9513b1d28fdd28171fd7973dc3cc968e3f 100644 (file)
        };
 };
 
+&cpu_thermal {
+       coefficients = <(-538)  407000>;
+};
+
 /* enable thermal sensor with the correct compatible property set */
 &thermal {
        compatible = "brcm,bcm2835-thermal";
index 519a44f5d25a6aa49eaeb0d50e5361276e5ca995..da3deeb42592926f36b49770b50b549abcb6ece7 100644 (file)
        interrupts = <8>;
 };
 
+&cpu_thermal {
+       coefficients = <(-538)  407000>;
+};
+
 /* enable thermal sensor with the correct compatible property set */
 &thermal {
        compatible = "brcm,bcm2836-thermal";
index 561f27d8d92224fe8f4f8c3224a5441f2d41175a..86a5db53da8fcbff5199de8b8c48cabef237425b 100644 (file)
                bootargs = "earlyprintk console=ttyAMA0";
        };
 
+       thermal-zones {
+               cpu_thermal: cpu-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&thermal>;
+
+                       trips {
+                               cpu-crit {
+                                       temperature     = <80000>;
+                                       hysteresis      = <0>;
+                                       type            = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                       };
+               };
+       };
+
        soc {
                compatible = "simple-bus";
                #address-cells = <1>;
                        compatible = "brcm,bcm2835-thermal";
                        reg = <0x7e212000 0x8>;
                        clocks = <&clocks BCM2835_CLOCK_TSENS>;
+                       #thermal-sensor-cells = <0>;
                        status = "disabled";
                };