arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 19 Jan 2021 05:48:47 +0000 (08:48 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 21 Jan 2021 15:41:40 +0000 (09:41 -0600)
Port thermal zones definitions from msm-4.19 tree. Enable and add
channel configuration to PMIC's ADC-TM definitions. Declare thermal
zones and respective trip points.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210119054848.592329-5-dmitry.baryshkov@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sm8250-mtp.dts

index 767a2e446248de2584b7198a709f4f7548bc5f01..5b4c5b08434c6b2b57ca7cf88a9afb258a4f4ceb 100644 (file)
                stdout-path = "serial0:115200n8";
        };
 
+       thermal-zones {
+               camera-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150l_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               conn-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150b_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               mmw-pa1-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150_adc_tm 2>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               mmw-pa2-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150l_adc_tm 2>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               skin-msm-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150l_adc_tm 1>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               skin-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150_adc_tm 1>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               xo-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+       };
+
        vph_pwr: vph-pwr-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vph_pwr";
        /* rtc6226 @ 64 */
 };
 
+&pm8150_adc {
+       xo-therm@4c {
+               reg = <ADC5_XO_THERM_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       skin-therm@4d {
+               reg = <ADC5_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       pa-therm1@4e {
+               reg = <ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+};
+
+&pm8150_adc_tm {
+       status = "okay";
+
+       xo-therm@0 {
+               reg = <0>;
+               io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       skin-therm@1 {
+               reg = <1>;
+               io-channels = <&pm8150_adc ADC5_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       pa-therm1@2 {
+               reg = <2>;
+               io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+};
+
+&pm8150b_adc {
+       conn-therm@4f {
+               reg = <ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+};
+
+&pm8150b_adc_tm {
+       status = "okay";
+
+       conn-therm@0 {
+               reg = <0>;
+               io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+};
+
+&pm8150l_adc_tm {
+       status = "okay";
+
+       camera-flash-therm@0 {
+               reg = <0>;
+               io-channels = <&pm8150l_adc ADC5_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       skin-msm-therm@1 {
+               reg = <1>;
+               io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       pa-therm2@2 {
+               reg = <2>;
+               io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+};
+
+&pm8150l_adc {
+       camera-flash-therm@4d {
+               reg = <ADC5_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       skin-msm-therm@4e {
+               reg = <ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       pa-therm2@4f {
+               reg = <ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+};
+
 &pm8150_rtc {
        status = "okay";
 };