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 0890d97..659b6e9 100644 (file)
        };
 };
 
+&cpu_thermal {
+       coefficients = <(-538)  407000>;
+};
+
 /* enable thermal sensor with the correct compatible property set */
 &thermal {
        compatible = "brcm,bcm2835-thermal";
index 519a44f..da3deeb 100644 (file)
        interrupts = <8>;
 };
 
+&cpu_thermal {
+       coefficients = <(-538)  407000>;
+};
+
 /* enable thermal sensor with the correct compatible property set */
 &thermal {
        compatible = "brcm,bcm2836-thermal";
index 561f27d..86a5db5 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";
                };