From 9e7aa812997d6efcbd90478ede9c27efe1eeca74 Mon Sep 17 00:00:00 2001 From: chenyb1 Date: Wed, 29 Sep 2021 10:36:32 +0800 Subject: [PATCH] Thermal: Enable NTC on PMR735A The NTC camera_therm is on PMR735A which should include ADC and IIO configuration. Change-Id: I6ff0d618c1570d6ddcc5e69dc08f6fceb2176a28 Reviewed-on: https://gerrit.mot.com/2079164 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiaojun Ji Reviewed-by: Lu Chai Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- qcom/blair-cypfr-common-overlay.dtsi | 42 ++++++++++++++++++++++++---- qcom/holi-pmic-overlay-pm6125.dtsi | 2 +- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/qcom/blair-cypfr-common-overlay.dtsi b/qcom/blair-cypfr-common-overlay.dtsi index 9dd93a49613c..c3320159a163 100644 --- a/qcom/blair-cypfr-common-overlay.dtsi +++ b/qcom/blair-cypfr-common-overlay.dtsi @@ -224,14 +224,44 @@ }; }; -&pmr735a_tz { - io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>; - io-channel-names = "thermal"; - +&pmr735a_gpios { camera_therm { - reg = ; + camera_therm_default:camera_therm_default { + pins = "gpio3"; + bias-high-impedance; + }; + }; +}; + +&pmr735a_vadc { + status = "ok"; + + pinctrl-names = "default"; + pinctrl-0 = <&camera_therm_default>; + + pmr735a_camera_therm { + reg = ; + label = "pmr735a_camera_therm"; qcom,ratiometric; qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pmr735a_4{ + pmr735a_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 = <&pmr735a_vadc ADC7_GPIO3_100K_PU>; + + pmr735a_camera_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; }; }; @@ -336,7 +366,7 @@ polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; - thermal-sensors = <&pmr735a_tz PMR735A_ADC7_DIE_TEMP>; + thermal-sensors = <&pmr735a_adc_tm_iio ADC7_GPIO3_100K_PU>; wake-capable-sensor; trips { active-config0 { diff --git a/qcom/holi-pmic-overlay-pm6125.dtsi b/qcom/holi-pmic-overlay-pm6125.dtsi index b4e6769ace5b..22636f2c3ebc 100644 --- a/qcom/holi-pmic-overlay-pm6125.dtsi +++ b/qcom/holi-pmic-overlay-pm6125.dtsi @@ -21,7 +21,7 @@ }; &spmi_bus { - qcom,pmr735a@4 { + pmr735a_4: qcom,pmr735a@4 { /* Example configuration to enable PMR735A VADC in standalone mode */ pmr735a_vadc: vadc@3600 { compatible = "qcom,spmi-adc7-sw-calib";