ARM: dts: msm: Add ADC support for SA8155

Add VADC and ADC_TM nodes and user thermal zones
for ADC thermistors on SA8155.

Change-Id: I819fad835c5e92cb2eb420d56456517417ce68fd
This commit is contained in:
Veera Vegivada
2021-08-17 11:44:26 +05:30
parent 6206d3437f
commit 624c9ee57f

View File

@@ -15,6 +15,27 @@ pm8150_1_rtc: &pm8150_rtc {
pm8150_1_gpios: &pm8150_gpios {
};
pm8150_1_vadc: &pm8150_vadc {
xo_therm {
reg = <ADC5_XO_THERM_100K_PU>;
label = "xo_therm";
qcom,ratiometric;
qcom,hw-settle-time = <1>;
qcom,pre-scaling = <1 1>;
};
};
pm8150_1_adc_tm: &pm8150_adc_tm {
io-channels = <&pm8150_1_vadc ADC5_XO_THERM_100K_PU>;
xo_therm@0 {
reg = <0>;
io-channels = <&pm8150_1_vadc ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <1>;
};
};
/* PM8150_2: */
&spmi_bus {
#address-cells = <2>;
@@ -90,6 +111,48 @@ pm8150_1_gpios: &pm8150_gpios {
label = "die_temp";
qcom,pre-scaling = <1 1>;
};
ufs_therm {
reg = <ADC5_XO_THERM_100K_PU>;
label = "ufs_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
soc_therm {
reg = <ADC5_AMUX_THM1_100K_PU>;
label = "soc_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
pm8150_2_adc_tm: adc_tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "threshold";
#address-cells = <1>;
#size-cells = <0>;
#thermal-sensor-cells = <1>;
io-channels = <&pm8150_2_vadc ADC5_XO_THERM_100K_PU>,
<&pm8150_2_vadc ADC5_AMUX_THM1_100K_PU>;
ufs_therm@0 {
reg = <0>;
io-channels = <&pm8150_2_vadc ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
soc_therm@1 {
reg = <1>;
io-channels = <&pm8150_2_vadc ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
};
@@ -166,4 +229,45 @@ pm8150_1_gpios: &pm8150_gpios {
};
xo-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm8150_1_adc_tm 0>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
ufs-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm8150_2_adc_tm 0>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
soc-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm8150_2_adc_tm 1>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};