From 60c582303d32f4099026a4c845cd5f7112ee7d5e Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Fri, 22 Apr 2022 15:16:03 +0530 Subject: [PATCH] ARM: dts: msm: Update ADC configuration for wlan_therm wlan_therm has a 100k pullup connected to it on the board for all platforms other than SG, so update VADC and ADC_TM configurations for it accordingly to ensure it gives accurate readings. While at it, also add additional thermal trip required for all thermal zones. Change-Id: If88e4dde6e714942036a6babdac03a1e1da522ce --- qcom/neo-pmic-overlay.dtsi | 39 ++++++++++++++++++++++++++++++++------ qcom/neo-sg-idp.dtsi | 28 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/qcom/neo-pmic-overlay.dtsi b/qcom/neo-pmic-overlay.dtsi index e97b77a9..4188fe44 100644 --- a/qcom/neo-pmic-overlay.dtsi +++ b/qcom/neo-pmic-overlay.dtsi @@ -38,12 +38,17 @@ qcom,pre-scaling = <1 1>; }; + /* + * This thermistor has 100k pullup already connected, + * modify config following HW recommendation, for all + * platforms other than SG. + */ pm8150_wlan_therm { - reg = ; + reg = ; label = "pm8150_wlan_temp"; qcom,hw-settle-time = <200>; - qcom,ratiometric; qcom,pre-scaling = <1 1>; + qcom,scale-fn-type = ; }; pm8150_xo_therm { @@ -57,7 +62,7 @@ &pm8150_adc_tm { io-channels = <&pm8150_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm8150_vadc ADC5_AMUX_THM2_100K_PU>, + <&pm8150_vadc ADC5_AMUX_THM2>, <&pm8150_vadc ADC5_XO_THERM_100K_PU>; pm8150_skin_therm { @@ -66,10 +71,14 @@ qcom,ratiometric; }; + /* + * This thermistor has 100k pullup already connected, + * modify config following HW recommendation, for all + * platforms other than SG. + */ pm8150_wlan_therm { - reg = ; + reg = ; qcom,hw-settle-time = <200>; - qcom,ratiometric; }; pm8150_xo_therm { @@ -90,19 +99,31 @@ hysteresis = <1000>; type = "passive"; }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; }; }; sys-therm-1 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8150_adc_tm ADC5_AMUX_THM2_100K_PU>; + thermal-sensors = <&pm8150_adc_tm ADC5_AMUX_THM2>; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; }; }; @@ -116,6 +137,12 @@ hysteresis = <1000>; type = "passive"; }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; }; }; }; diff --git a/qcom/neo-sg-idp.dtsi b/qcom/neo-sg-idp.dtsi index 6bbee8d6..202ee883 100644 --- a/qcom/neo-sg-idp.dtsi +++ b/qcom/neo-sg-idp.dtsi @@ -2,3 +2,31 @@ &soc { }; + +&pm8150_vadc { + pm8150_wlan_therm { + reg = ; + label = "pm8150_wlan_temp"; + qcom,hw-settle-time = <200>; + qcom,ratiometric; + qcom,pre-scaling = <1 1>; + }; +}; + +&pm8150_adc_tm { + io-channels = <&pm8150_vadc ADC5_AMUX_THM1_100K_PU>, + <&pm8150_vadc ADC5_AMUX_THM2_100K_PU>, + <&pm8150_vadc ADC5_XO_THERM_100K_PU>; + + pm8150_wlan_therm { + reg = ; + qcom,hw-settle-time = <200>; + qcom,ratiometric; + }; +}; + +&thermal_zones { + sys-therm-1 { + thermal-sensors = <&pm8150_adc_tm ADC5_AMUX_THM2_100K_PU>; + }; +};