[PATCH 2/5] dt-bindings: qcom,spmi-temp-alarm: Add compatible for lite temp alarm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add compatible "qcom,spmi-temp-alarm-lite" for Temp alarm lite
peripherals. Temp alarm lite peripherals have two stages: warning and
shutdown, and use a pair of registers to configure warning interrupt
threshold temperature and an automatic hardware shutdown threshold
temperature.

When defining thermal zone trips for a temp alarm lite device the first
thermal zone trip is for warning alarm IRQ in HW, the second thermal
zone trip is purely for software to perform a controlled shutdown (no HW
support) and the third thermal zone trip is for automatic hardware
shutdown.

Signed-off-by: Anjelique Melendez <quic_amelende@xxxxxxxxxxx>
---
 .../thermal/qcom,spmi-temp-alarm.yaml         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
index f9af88d51c2d..bbf201cad16b 100644
--- a/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
@@ -22,6 +22,7 @@ properties:
     enum:
       - qcom,spmi-temp-alarm
       - qcom,spmi-temp-alarm-gen2-rev2
+      - qcom,spmi-temp-alarm-lite
 
   reg:
     maxItems: 1
@@ -84,3 +85,46 @@ examples:
             };
         };
     };
+
+  - |
+
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pm8550b_lite_tz: pm8550b-temp-alarm-lite@c00 {
+            compatible = "qcom,spmi-temp-alarm-lite";
+            reg = <0xc00>;
+            interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+            #thermal-sensor-cells = <0>;
+        };
+    };
+
+    thermal-zones {
+        pm8550b_lite_temp_alarm: pm8550blite-thermal {
+            polling-delay-passive = <100>;
+            polling-delay = <0>;
+            thermal-sensors = <&pm8550b_lite_tz>;
+
+            trips {
+                pm8550b_lite_trip0: trip0 {
+                    temperature = <125000>;
+                    hysteresis = <0>;
+                    type = "passive";
+                };
+
+                pm8550b_lite_trip1: trip1 {
+                    temperature = <135000>;
+                    hysteresis = <0>;
+                    type = "passive";
+                };
+
+                trip2 {
+                    temperature = <145000>;
+                    hysteresis = <0>;
+                    type = "critical";
+                };
+
+            };
+        };
+    };
-- 
2.34.1





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux