arm64: dts: qrb5165-rb5: port thermal zone definitions
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 19 Jan 2021 05:48:48 +0000 (08:48 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 21 Jan 2021 17:08:26 +0000 (11:08 -0600)
Add thermal zones definitions basing on the downstream kernel.

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

index a424595da8b0a8e4f7208f2f2ecd3bcc609e0f60..58b94ce362b26a5a390e304f4d7e2dc6adb1a1af 100644 (file)
                regulator-always-on;
        };
 
+       thermal-zones {
+               conn-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150b_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               pm8150l-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150l_adc_tm 1>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <50000>;
+                                       hysteresis = <4000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               skin-msm-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150l_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <50000>;
+                                       hysteresis = <4000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               wifi-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150_adc_tm 1>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <52000>;
+                                       hysteresis = <4000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+
+               xo-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&pm8150_adc_tm 0>;
+
+                       trips {
+                               active-config0 {
+                                       temperature = <50000>;
+                                       hysteresis = <4000>;
+                                       type = "passive";
+                               };
+                       };
+               };
+       };
+
        vbat: vbat-regulator {
                compatible = "regulator-fixed";
                regulator-name = "VBAT";
        status = "okay";
 };
 
+&pm8150_adc {
+       xo-therm@4c {
+               reg = <ADC5_XO_THERM_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       wifi-therm@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>;
+       };
+
+       wifi-therm@1 {
+               reg = <1>;
+               io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+};
+
 &pm8150_gpios {
        gpio-reserved-ranges = <1 1>, <3 2>, <7 1>;
        gpio-line-names =
                "GPIO_10_P"; /* Green LED */
 };
 
+&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>;
+       };
+};
+
 &pm8150b_gpios {
        gpio-line-names =
                "NC",
                "NC";
 };
 
+&pm8150l_adc {
+       skin-msm-therm@4e {
+               reg = <ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+
+       pm8150l-therm@4f {
+               reg = <ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+       };
+};
+
+&pm8150l_adc_tm {
+       status = "okay";
+
+       skin-msm-therm@0 {
+               reg = <0>;
+               io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+
+       pm8150l-therm@1 {
+               reg = <1>;
+               io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time-us = <200>;
+       };
+};
+
 &pm8150l_gpios {
        gpio-line-names =
                "NC",