From d21d8d88a39c22f4e0523da0d84912235bb80876 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Thu, 22 Apr 2021 15:26:32 +0530 Subject: [PATCH] ARM: dts: msm: Add ADC thermistors for sdxnightjar Add VADC and ADCTM channels with corresponding thermal zones for ADC thermistors under PMD9650 on sdxnightjar. Change-Id: I1fa2d9ad2a3eaaf0c3c250d671fb297e520095c6 --- qcom/pmd9650.dtsi | 8 ++ qcom/sdxnightjar.dtsi | 167 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) diff --git a/qcom/pmd9650.dtsi b/qcom/pmd9650.dtsi index 03c2586b80de..4d0bf05aaae7 100644 --- a/qcom/pmd9650.dtsi +++ b/qcom/pmd9650.dtsi @@ -69,6 +69,14 @@ label = "ref_1p25"; qcom,pre-scaling = <1 1>; }; + + xo_therm { + reg = ; + label = "xo_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; }; qcom,pmd9650_rtc { diff --git a/qcom/sdxnightjar.dtsi b/qcom/sdxnightjar.dtsi index 1238ce10e2af..b625affa3b88 100644 --- a/qcom/sdxnightjar.dtsi +++ b/qcom/sdxnightjar.dtsi @@ -1055,6 +1055,173 @@ #include "sdxnightjar-audio-overlay.dtsi" #include "sdxnightjar-thermal.dtsi" +&pmd9650_gpios { + ambient_therm { + ambient_therm_default: ambient_therm_default { + pins = "gpio2"; + bias-high-impedance; + }; + }; +}; + +&pmd9650_vadc { + case_therm { + reg = ; + label = "case_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pa_therm1 { + reg = ; + label = "pa_therm1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pa_therm2 { + reg = ; + label = "pa_therm2"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + ambient_therm { + reg = ; + label = "ambient_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&spmi_bus { + qcom,pmd9650@0 { + pmd9650_adc_tm_iio: adc_tm@3400 { + compatible = "qcom,adc-tm5-iio"; + reg = <0x3400>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + io-channels = <&pmd9650_vadc ADC5_XO_THERM_100K_PU>, + <&pmd9650_vadc ADC5_AMUX_THM1_100K_PU>, + <&pmd9650_vadc ADC5_AMUX_THM2_100K_PU>, + <&pmd9650_vadc ADC5_AMUX_THM3_100K_PU>, + <&pmd9650_vadc ADC5_GPIO2_100K_PU>; + + xo_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + case_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa_therm1 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa_therm2 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + ambient_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + }; + }; +}; + +&thermal_zones { + xo-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmd9650_adc_tm_iio ADC5_XO_THERM_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + case-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmd9650_adc_tm_iio ADC5_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + pa-therm1-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmd9650_adc_tm_iio ADC5_AMUX_THM2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + pa-therm2-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmd9650_adc_tm_iio ADC5_AMUX_THM3_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + ambient-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmd9650_adc_tm_iio ADC5_GPIO2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + &i2c_3 { status = "ok"; smb1351_otg_supply: smb1351-charger@55 {