arm64: dts: qcom: pm8916: add temp-alarm thermal zone
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 25 Jun 2024 20:16:18 +0000 (23:16 +0300)
committerBjorn Andersson <andersson@kernel.org>
Tue, 25 Jun 2024 23:02:27 +0000 (18:02 -0500)
Define the themal zones using the temperature values in stage1 for this
platform so that the spmi-temp-alarm driver becomes active.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20240625-pm8916-tz-v1-1-a4c1f61e92dd@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/pm8916.dtsi

index 4b2e8fb47d2da13cd1a80bae044f38cc410a2feb..2def48f2d1010c15a4ddd2d88b87ca77b4ed6094 100644 (file)
@@ -4,8 +4,37 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
-&spmi_bus {
+/ {
+       thermal-zones {
+               pm8150-thermal {
+                       polling-delay-passive = <100>;
+
+                       thermal-sensors = <&pm8916_temp>;
+
+                       trips {
+                               trip0 {
+                                       temperature = <105000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               trip1 {
+                                       temperature = <125000>;
+                                       hysteresis = <0>;
+                                       type = "hot";
+                               };
+
+                               trip2 {
+                                       temperature = <145000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+               };
+       };
+};
 
+&spmi_bus {
        pm8916_0: pmic@0 {
                compatible = "qcom,pm8916", "qcom,spmi-pmic";
                reg = <0x0 SPMI_USID>;