]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: dts: ux500: Add thermistors to the HREF
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 12 Dec 2020 10:46:26 +0000 (11:46 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 13 Jan 2021 12:12:20 +0000 (13:12 +0100)
This adds the two temperature-monitoring thermistors to the
HREF reference design, defines a thermal zone for the
chassis and sets some reasonable thermal limits.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-hrefv60plus.dtsi

index 05b4fbbba57f5935e4502e06d74b8480c9dc1ef3..ee0bf00a94b8a4ecc9bbe5ba059d08c1e5c2e1a7 100644 (file)
        model = "ST-Ericsson HREF (v60+) platform with Device Tree";
        compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
 
+       thermal-zones {
+               chassis-thermal {
+                       /* Poll every 20 seconds */
+                       polling-delay = <20000>;
+                       /* Poll every 2nd second when cooling */
+                       polling-delay-passive = <2000>;
+
+                       thermal-sensors = <&therm1>, <&therm2>;
+
+                       /* Tripping points made from rough guess about operating conditions */
+                       trips {
+                               chassis_alert: chassis-alert {
+                                       /* At 50 degrees take down the CPU frequency */
+                                       temperature = <50000>;
+                                       hysteresis = <3000>;
+                                       type = "active";
+                               };
+                               chassis_crit: chassis-crit {
+                                       /* Just shut down at 70 degrees */
+                                       temperature = <70000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       /* Push down the operating frequency of the SoC when it gets hot */
+                       cooling-maps {
+                               map0 {
+                                       trip = <&chassis_alert>;
+                                       cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                                       contribution = <100>;
+                               };
+                       };
+               };
+       };
+
+       /*
+        * Thermistors on the board, formally to monitor battery temperatures
+        * but what they measure is the board temperature.
+        */
+       therm1: thermistor@0 {
+               compatible = "murata,ncp18wb473";
+               io-channels = <&gpadc 0x06>; /* AUX1 */
+               pullup-uv = <1800000>;
+               pullup-ohm = <220000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
+       therm2: thermistor@1 {
+               compatible = "murata,ncp18wb473";
+               io-channels = <&gpadc 0x07>; /* AUX2 */
+               pullup-uv = <1800000>;
+               pullup-ohm = <220000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        soc {
                /* Name the GPIO muxed rails on the HREF boards */
                gpio@8012e000 {