OSDN Git Service

arm64: dts: qcom: sa8775p: pmic: add thermal zones
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 27 Mar 2023 12:53:09 +0000 (14:53 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 5 Apr 2023 03:42:29 +0000 (20:42 -0700)
Add the thermal zones and associated alarm nodes for the PMICs that have
them hooked up on sa8775p-ride.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230327125316.210812-12-brgl@bgdev.pl
arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi

index 8616ead..be12997 100644 (file)
@@ -6,6 +6,90 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/ {
+       thermal-zones {
+               pmm8654au_0_thermal: pm8775-0-thermal {
+                       polling-delay-passive = <100>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmm8654au_0_temp_alarm>;
+
+                       trips {
+                               trip0 {
+                                       temperature = <105000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               trip1 {
+                                       temperature = <125000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               pmm8654au_1_thermal: pm8775-1-thermal {
+                       polling-delay-passive = <100>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmm8654au_1_temp_alarm>;
+
+                       trips {
+                               trip0 {
+                                       temperature = <105000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               trip1 {
+                                       temperature = <125000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               pmm8654au_2_thermal: pm8775-2-thermal {
+                       polling-delay-passive = <100>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmm8654au_2_temp_alarm>;
+
+                       trips {
+                               trip0 {
+                                       temperature = <105000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               trip1 {
+                                       temperature = <125000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               pmm8654au_3_thermal: pm8775-3-thermal {
+                       polling-delay-passive = <100>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmm8654au_3_temp_alarm>;
+
+                       trips {
+                               trip0 {
+                                       temperature = <105000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               trip1 {
+                                       temperature = <125000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+               };
+       };
+};
+
 &spmi_bus {
        pmm8654au_0: pmic@0 {
                compatible = "qcom,pmm8654au", "qcom,spmi-pmic";
                #address-cells = <1>;
                #size-cells = <0>;
 
+               pmm8654au_0_temp_alarm: temp-alarm@a00 {
+                       compatible = "qcom,spmi-temp-alarm";
+                       reg = <0xa00>;
+                       interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       #thermal-sensor-cells = <0>;
+               };
+
                pmm8654au_0_pon: pon@1200 {
                        compatible = "qcom,pmk8350-pon";
                        reg = <0x1200>, <0x800>;
                reg = <0x2 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pmm8654au_1_temp_alarm: temp-alarm@a00 {
+                       compatible = "qcom,spmi-temp-alarm";
+                       reg = <0xa00>;
+                       interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       #thermal-sensor-cells = <0>;
+               };
        };
 
        pmm8654au_2: pmic@4 {
                reg = <0x4 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pmm8654au_2_temp_alarm: temp-alarm@a00 {
+                       compatible = "qcom,spmi-temp-alarm";
+                       reg = <0xa00>;
+                       interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       #thermal-sensor-cells = <0>;
+               };
        };
 
        pmm8654au_3: pmic@6 {
                reg = <0x6 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pmm8654au_3_temp_alarm: temp-alarm@a00 {
+                       compatible = "qcom,spmi-temp-alarm";
+                       reg = <0xa00>;
+                       interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       #thermal-sensor-cells = <0>;
+               };
        };
 };