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 <quic_minghao@quicinc.com>
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
This commit is contained in:
Minghao Zhang
2023-11-01 11:01:16 +08:00
committed by Anjelique Melendez
parent a7c4d9e70b
commit 84e38c6fb7
2 changed files with 127 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-adc5-gen4-pmih010x.h>
#include <dt-bindings/iio/qcom,spmi-adc5-gen3-pmk8550.h>
#include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h>
#include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550b.h>

View File

@@ -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 = <PMIH010X_ADC5_GEN4_AMUX_THM4_USB_THERM_100K_PU>;
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 = <PMIH010X_ADC5_GEN4_AMUX4_GPIO12_100K_PU>;
label = "pmih010x_wls_therm";
qcom,ratiometric;
qcom,pre-scaling = <1 1>;
qcom,adc-tm-type = <1>;
qcom,adc5-gen4;
};
pmih010x_offset_ref {
reg = <PMIH010X_ADC5_GEN4_OFFSET_REF>;
label = "pmih010x_offset_ref";
qcom,pre-scaling = <1 1>;
qcom,adc5-gen4;
};
pmih010x_vref_1p25 {
reg = <PMIH010X_ADC5_GEN4_1P25VREF>;
label = "pmih010x_vref_1p25";
qcom,pre-scaling = <1 1>;
qcom,adc5-gen4;
};
pmih010x_die_temp {
reg = <PMIH010X_ADC5_GEN4_DIE_TEMP>;
label = "pmih010x_die_temp";
qcom,pre-scaling = <1 1>;
qcom,adc5-gen4;
};
pmih010x_vph_pwr {
reg = <PMIH010X_ADC5_GEN4_VPH_PWR>;
label = "pmih010x_vph_pwr";
qcom,pre-scaling = <1 3>;
qcom,adc5-gen4;
};
pmih010x_vbat_sns_qbg {
reg = <PMIH010X_ADC5_GEN4_VBAT_SNS_QBG>;
label = "pmih010x_vbat_sns_qbg";
qcom,pre-scaling = <1 3>;
qcom,adc5-gen4;
};
pmih010x_iin {
reg = <PMIH010X_ADC5_GEN4_IIN>;
label = "pmih010x_iin";
qcom,adc5-gen4;
};
pmih010x_ichg_fb {
reg = <PMIH010X_ADC5_GEN4_ICHG_FB>;
label = "pmih010x_ichg_fb";
qcom,adc5-gen4;
};
pmih010x_chg_temp {
reg = <PMIH010X_ADC5_GEN4_CHG_TEMP>;
label = "pmih010x_chg_temp";
qcom,adc5-gen4;
};
pmih010x_lite_die_temp {
reg = <PMIH010X_ADC5_GEN4_TEMP_ALARM_LITE>;
label = "pmih010x_lite_die_temp";
qcom,pre-scaling = <1 1>;
qcom,adc5-gen4;
};
pm8550vs_f_die_temp {
reg = <PM8550VX_ADC5_GEN3_DIE_TEMP(5)>;
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";
};
};
};
};