From 84e38c6fb77ccc64595f668c4a7c48e86e4cf257 Mon Sep 17 00:00:00 2001 From: Minghao Zhang Date: Wed, 1 Nov 2023 11:01:16 +0800 Subject: [PATCH] ARM: dts: msm: Add PMIC ADC5 GEN4 channels for sun Add VADC GEN4 channels provided by pmk8550 that are used by thermal clients on Sun. Also, add the corresponding thermal zone devices. Change-Id: Ia1eca3b4eb5e95612590ec2405bb366ed170c60a Signed-off-by: Minghao Zhang Signed-off-by: Anjelique Melendez --- qcom/pmk8550.dtsi | 1 + qcom/sun-pmic-overlay.dtsi | 126 +++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) diff --git a/qcom/pmk8550.dtsi b/qcom/pmk8550.dtsi index 82c4cb1d..ea77f222 100644 --- a/qcom/pmk8550.dtsi +++ b/qcom/pmk8550.dtsi @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index b736c4ee..bff7c867 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -119,6 +119,16 @@ io-channel-names = "thermal"; }; +&pmih010x_tz { + io-channels = <&pmk8550_vadc PMIH010X_ADC5_GEN4_DIE_TEMP>; + io-channel-names = "thermal"; +}; + +&pmih010x_lite_tz { + io-channels = <&pmk8550_vadc PMIH010X_ADC5_GEN4_TEMP_ALARM_LITE>; + io-channel-names = "thermal"; +}; + &pm8550vs_f_tz { io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(5)>; io-channel-names = "thermal"; @@ -199,6 +209,85 @@ qcom,adc-tm-type = <1>; }; + pmih010x_usb_therm { + reg = ; + label = "pmih010x_usb_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + qcom,adc5-gen4; + }; + + pmih010x_wls_therm { + reg = ; + label = "pmih010x_wls_therm"; + qcom,ratiometric; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + qcom,adc5-gen4; + }; + + pmih010x_offset_ref { + reg = ; + label = "pmih010x_offset_ref"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_vref_1p25 { + reg = ; + label = "pmih010x_vref_1p25"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_die_temp { + reg = ; + label = "pmih010x_die_temp"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_vph_pwr { + reg = ; + label = "pmih010x_vph_pwr"; + qcom,pre-scaling = <1 3>; + qcom,adc5-gen4; + }; + + pmih010x_vbat_sns_qbg { + reg = ; + label = "pmih010x_vbat_sns_qbg"; + qcom,pre-scaling = <1 3>; + qcom,adc5-gen4; + }; + + pmih010x_iin { + reg = ; + label = "pmih010x_iin"; + qcom,adc5-gen4; + }; + + pmih010x_ichg_fb { + reg = ; + label = "pmih010x_ichg_fb"; + qcom,adc5-gen4; + }; + + pmih010x_chg_temp { + reg = ; + label = "pmih010x_chg_temp"; + qcom,adc5-gen4; + }; + + pmih010x_lite_die_temp { + reg = ; + label = "pmih010x_lite_die_temp"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + pm8550vs_f_die_temp { reg = ; label = "pm8550vs_f_die_temp"; @@ -342,7 +431,44 @@ hysteresis = <1000>; type = "passive"; }; + }; + }; + sys-therm7 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIH010X_ADC5_GEN4_AMUX4_GPIO12_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm10 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIH010X_ADC5_GEN4_AMUX_THM4_USB_THERM_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; }; }; };