arm64: dts: marvell: add interrupt support to ap806 thermal node
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 12 Dec 2018 09:36:44 +0000 (10:36 +0100)
committerGregory CLEMENT <gregory.clement@bootlin.com>
Wed, 6 Feb 2019 11:02:54 +0000 (12:02 +0100)
Add interrupt properties in the thermal node as well as a critical trip
point in the thermal-zone.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
arch/arm64/boot/dts/marvell/armada-ap806.dtsi

index 7d94c1fa592a064d2d42709ce9d6a198ef008eb6..faca07de4d84b5b464b12b747fbc5cf41800e608 100644 (file)
                                ap_thermal: thermal-sensor@80 {
                                        compatible = "marvell,armada-ap806-thermal";
                                        reg = <0x80 0x10>;
+                                       interrupt-parent = <&sei>;
+                                       interrupts = <18>;
                                        #thermal-sensor-cells = <1>;
                                };
                        };
         * The thermal IP features one internal sensor plus, if applicable, one
         * remote channel wired to one sensor per CPU.
         *
+        * Only one thermal zone per AP/CP may trigger interrupts at a time, the
+        * first one that will have a critical trip point will be chosen.
+        *
         * The cooling maps are always empty as there are no cooling devices.
         */
        thermal-zones {
                ap_thermal_ic: ap-thermal-ic {
-                       polling-delay-passive = <1000>;
-                       polling-delay = <1000>;
+                       polling-delay-passive = <0>; /* Interrupt driven */
+                       polling-delay = <0>; /* Interrupt driven */
 
                        thermal-sensors = <&ap_thermal 0>;
 
-                       trips { };
+                       trips {
+                               ap_crit: ap-crit {
+                                       temperature = <100000>; /* mC degrees */
+                                       hysteresis = <2000>; /* mC degrees */
+                                       type = "critical";
+                               };
+                       };
+
                        cooling-maps { };
                };