From 1716bbd8d83bd45d6ee2da6112e66d4c469d89ff Mon Sep 17 00:00:00 2001 From: tinno18 Date: Fri, 10 Dec 2021 14:54:46 +0800 Subject: [PATCH] Hawaii+OLED: thermal adc NTC Bringup. modified: khaje-hawao-common-overlay.dtsi Hawaii+OLED:thermal adb NTC bringup Change-Id: I07973832be0b36ee75e24517d331cf0883682e2b Reviewed-on: https://gerrit.mot.com/2140776 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Submit-Approved: Jira Key Tested-by: Jira Key Reviewed-by: SLTApproved: Submit-Approved: Tested-by: Reviewed-by: Qiong Xie (cherry picked from commit 24c203e96be43fe4e3684793c38bef0f92d6314f) Reviewed-on: https://gerrit.mot.com/2145311 Reviewed-by: Wang Wang --- qcom/khaje-hawao-common-overlay.dtsi | 135 +++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/qcom/khaje-hawao-common-overlay.dtsi b/qcom/khaje-hawao-common-overlay.dtsi index 57061105e587..bbb1c0e6bd53 100644 --- a/qcom/khaje-hawao-common-overlay.dtsi +++ b/qcom/khaje-hawao-common-overlay.dtsi @@ -12,6 +12,7 @@ #include #include +#include #include "khaje-moto-common-overlay.dtsi" #include "khaje-hawao-display.dtsi" #include "khaje-hawao-fps-overlay_evb.dtsi" @@ -116,3 +117,137 @@ dr_mode = "otg"; }; }; + +&pm6125_vadc { + pinctrl-0 = <&camera_therm_default &emmc_therm_default &chg_therm_default>; + + chg_therm { + reg = ; + label = "chg_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pm6125_adc_tm { + io-channels = <&pm6125_vadc ADC_AMUX_THM1_PU2>, + <&pm6125_vadc ADC_AMUX_THM2_PU2>, + <&pm6125_vadc ADC_XO_THERM_PU2>, + <&pm6125_vadc ADC_GPIO4_PU2>; + + chg_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm6125_gpios { + + chg_therm { + chg_therm_default: chg_therm_default { + pins = "gpio7"; + bias-high-impedance; + }; + }; +}; + +&thermal_zones { + sdm-skin-therm-usr { + status = "disabled"; + }; + rear-cam-therm-usr { + status = "disabled"; + }; + camera-therm-usr { + status = "disabled"; + }; + quiet-therm-usr { + status = "disabled"; + }; + pa-therm0-usr { + status = "disabled"; + }; + pa-therm1-usr { + status = "disabled"; + }; + xo-therm-usr { + status = "disabled"; + }; + + pa_therm0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC_AMUX_THM1_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + quiet_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC_AMUX_THM2_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + chg_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC_GPIO4_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + msm_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm_iio ADC_GPIO2_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + camera_flash_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm_iio ADC_GPIO1_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +};