arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7325 thermals
authorLuca Weiss <luca.weiss@fairphone.com>
Fri, 13 Oct 2023 08:09:56 +0000 (10:09 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sun, 3 Dec 2023 01:24:58 +0000 (17:24 -0800)
Configure the thermals for the QUIET_THERM, CAM_FLASH_THERM, MSM_THERM
and RFC_CAM_THERM thermistors connected to PM7325.

With this PMIC the software communication to the ADC is going through
PMK7325 (= PMK8350).

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20231013-fp5-thermals-v1-4-f14df01922e6@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts

index 2c01f799a6b20e62c434591fa27683bd4192e9bf..d0b1e4e507ff93db0013788e6a70d77227ec5ba2 100644 (file)
@@ -9,6 +9,7 @@
 #define PM7250B_SID 8
 #define PM7250B_SID1 9
 
+#include <dt-bindings/iio/qcom,spmi-adc7-pm7325.h>
 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
        };
 
        thermal-zones {
+               camera-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmk8350_adc_tm 2>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
                chg-skin-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        };
                };
 
+               quiet-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmk8350_adc_tm 1>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               rear-cam-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmk8350_adc_tm 4>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               sdm-skin-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pmk8350_adc_tm 3>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
                xo-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                qcom,ratiometric;
                qcom,hw-settle-time-us = <200>;
        };
+
+       quiet-therm@1 {
+               reg = <1>;
+               io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       cam-flash-therm@2 {
+               reg = <2>;
+               io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       sdm-skin-therm@3 {
+               reg = <3>;
+               io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       wide-rfc-therm@4 {
+               reg = <4>;
+               io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM4_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
 };
 
 &pmk8350_rtc {
                qcom,pre-scaling = <1 1>;
                label = "pmk8350_xo_therm";
        };
+
+       channel@144 {
+               reg = <PM7325_ADC7_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+               qcom,pre-scaling = <1 1>;
+               label = "pm7325_quiet_therm";
+       };
+
+       channel@145 {
+               reg = <PM7325_ADC7_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+               qcom,pre-scaling = <1 1>;
+               label = "pm7325_cam_flash_therm";
+       };
+
+       channel@146 {
+               reg = <PM7325_ADC7_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+               qcom,pre-scaling = <1 1>;
+               label = "pm7325_sdm_skin_therm";
+       };
+
+       channel@147 {
+               reg = <PM7325_ADC7_AMUX_THM4_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+               qcom,pre-scaling = <1 1>;
+               label = "pm7325_wide_rfc_therm";
+       };
 };
 
 &pon_pwrkey {