summaryrefslogtreecommitdiff
path: root/qcom/pm8953.dtsi
diff options
context:
space:
mode:
Diffstat (limited to 'qcom/pm8953.dtsi')
-rw-r--r--qcom/pm8953.dtsi232
1 files changed, 112 insertions, 120 deletions
diff --git a/qcom/pm8953.dtsi b/qcom/pm8953.dtsi
index 05a07ecf..ba8b0711 100644
--- a/qcom/pm8953.dtsi
+++ b/qcom/pm8953.dtsi
@@ -1,3 +1,7 @@
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
&spmi_bus {
qcom,pm8953@0 {
@@ -41,10 +45,8 @@
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400 0x100>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
- label = "pm8953_tz";
- qcom,channel-num = <8>;
- qcom,threshold-set = <0>;
- qcom,temp_alarm-vadc = <&pm8953_vadc>;
+ io-channels = <&pm8953_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
};
@@ -103,178 +105,166 @@
pm8953_vadc: vadc@3100 {
compatible = "qcom,spmi-vadc";
reg = <0x3100 0x100>;
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
#address-cells = <1>;
#size-cells = <0>;
- interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "eoc-int-en-set";
- qcom,adc-bit-resolution = <15>;
- qcom,adc-vdd-reference = <1800>;
- qcom,vadc-poll-eoc;
- #thermal-sensor-cells = <1>;
+ #io-channel-cells = <1>;
+ io-channel-ranges;
pinctrl-names = "default";
pinctrl-0 = <&pa_therm1_default &cas_therm_default>;
- chan@5 {
+ /* Channel nodes */
+ vcoin {
+ reg = <VADC_VCOIN>;
label = "vcoin";
- reg = <5>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <1>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <0>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 3>;
};
- chan@7 {
+ vph_pwr {
+ reg = <VADC_VSYS>;
label = "vph_pwr";
- reg = <7>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <1>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <0>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 3>;
};
- chan@8 {
+ die_temp {
+ reg = <VADC_DIE_TEMP>;
label = "die_temp";
- reg = <8>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <3>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 1>;
};
- chan@9 {
+ ref_625mv {
+ reg = <VADC_REF_625MV>;
label = "ref_625mv";
- reg = <9>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <0>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 1>;
};
- chan@a {
+ ref_1250v {
+ reg = <VADC_REF_1250MV>;
label = "ref_1250v";
- reg = <0xa>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <0>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 1>;
};
- chan@c {
+ ref_buf_625mv {
+ reg = <VADC_SPARE1>;
label = "ref_buf_625mv";
- reg = <0xc>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "absolute";
- qcom,scale-function = <0>;
- qcom,hw-settle-time = <0>;
- qcom,fast-avg-setup = <0>;
+ qcom,pre-scaling = <1 1>;
+ };
+
+ ref_vdd {
+ reg = <VADC_VDD_VADC>;
+ label = "ref_vdd";
+ qcom,pre-scaling = <1 1>;
};
- chan@36 {
+ ref_gnd {
+ reg = <VADC_GND_REF>;
+ label = "ref_gnd";
+ qcom,pre-scaling = <1 1>;
+ };
+
+ pa_therm0 {
+ reg = <VADC_LR_MUX7_HW_ID>;
label = "pa_therm0";
- reg = <0x36>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <2>;
- qcom,hw-settle-time = <2>;
- qcom,fast-avg-setup = <0>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
};
- chan@11 {
+ pa_therm1 {
+ reg = <VADC_P_MUX2_1_1>;
label = "pa_therm1";
- reg = <0x11>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <2>;
- qcom,hw-settle-time = <2>;
- qcom,fast-avg-setup = <0>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
};
-
- chan@32 {
+ xo_therm {
+ reg = <VADC_LR_MUX3_XO_THERM>;
label = "xo_therm";
- reg = <0x32>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <4>;
- qcom,hw-settle-time = <2>;
- qcom,fast-avg-setup = <0>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
};
- chan@3c {
+ xo_therm_buf {
+ reg = <VADC_LR_MUX3_BUF_XO_THERM>;
label = "xo_therm_buf";
- reg = <0x3c>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <4>;
- qcom,hw-settle-time = <2>;
- qcom,fast-avg-setup = <0>;
- qcom,vadc-thermal-node;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
};
- chan@13 {
+ case_therm {
+ reg = <VADC_P_MUX4_1_1>;
label = "case_therm";
- reg = <0x13>;
- qcom,decimation = <0>;
- qcom,pre-div-channel-scaling = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <2>;
- qcom,hw-settle-time = <2>;
- qcom,fast-avg-setup = <0>;
- qcom,vadc-thermal-node;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ };
+ };
+
+ pm8953_adc_tm_iio: adc_tm_iio {
+ compatible = "qcom,adc-tm5-iio";
+ reg = <0x3500 0x100>;
+ #thermal-sensor-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ io-channels = <&pm8953_vadc VADC_LR_MUX3_BUF_XO_THERM>;
+
+ xo_therm_buf {
+ reg = <VADC_LR_MUX3_BUF_XO_THERM>;
+ label = "xo_therm_buf";
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
};
};
pm8953_adc_tm: vadc@3400 {
- compatible = "qcom,adc-tm-rev2";
+ compatible = "qcom,qpnp-adc-tm";
reg = <0x3400 0x100>;
#address-cells = <1>;
#size-cells = <0>;
- interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>,
+ interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>,
<0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>,
<0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "eoc-int-en-set",
+ interrupt-names = "eoc-int-en-set",
"high-thr-en-set",
"low-thr-en-set";
- qcom,adc-bit-resolution = <15>;
- qcom,adc-vdd-reference = <1800>;
- qcom,adc_tm-vadc = <&pm8953_vadc>;
#thermal-sensor-cells = <1>;
-
- chan@36 {
+ qcom,adc-vdd-reference = <1800>;
+ io-channels = <&pm8953_vadc VADC_REF_625MV>,
+ <&pm8953_vadc VADC_REF_1250MV>,
+ <&pm8953_vadc VADC_VDD_VADC>,
+ <&pm8953_vadc VADC_GND_REF>;
+ io-channel-names = "ref_625mv", "ref_1250v", "ref_vdd",
+ "ref_gnd";
+
+ pa_therm0 {
label = "pa_therm0";
- reg = <0x36>;
+ reg = <VADC_LR_MUX7_HW_ID>;
+ io-channels = <&pm8953_vadc VADC_LR_MUX7_HW_ID>;
+ io-channel-names = "pa_therm0";
qcom,pre-div-channel-scaling = <0>;
qcom,decimation = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <2>;
+ qcom,ratiometric;
+ qcom,scale-fn-type = <2>;
qcom,hw-settle-time = <2>;
qcom,btm-channel-number = <0x48>;
qcom,fast-avg-setup = <0>;
qcom,thermal-node;
};
- chan@32 {
+ xo_therm {
label = "xo_therm";
- reg = <0x32>;
+ reg = <VADC_LR_MUX3_XO_THERM>;
+ io-channels = <&pm8953_vadc
+ VADC_LR_MUX3_XO_THERM>;
+ io-channel-names = "xo_therm";
qcom,pre-div-channel-scaling = <0>;
qcom,decimation = <0>;
- qcom,calibration-type = "ratiometric";
- qcom,scale-function = <4>;
+ qcom,ratiometric;
+ qcom,scale-fn-type = <4>;
qcom,hw-settle-time = <2>;
qcom,btm-channel-number = <0x68>;
qcom,fast-avg-setup = <0>;
@@ -329,7 +319,7 @@
xo-therm-adc {
polling-delay-passive = <0>;
polling-delay = <0>;
- thermal-sensors = <&pm8953_adc_tm 0x32>;
+ thermal-sensors = <&pm8953_adc_tm VADC_LR_MUX3_XO_THERM>;
thermal-governor = "user_space";
wake-capable-sensor;
@@ -345,7 +335,8 @@
xo-therm-buf-adc {
polling-delay-passive = <0>;
polling-delay = <0>;
- thermal-sensors = <&pm8953_vadc 0x3c>;
+ thermal-sensors = <&pm8953_adc_tm_iio
+ VADC_LR_MUX3_BUF_XO_THERM>;
thermal-governor = "user_space";
wake-capable-sensor;
@@ -358,9 +349,10 @@
};
};
- pm8953_tz {
- polling-delay-passive = <0>;
+ pm8953_temp_alarm: pm8953_tz {
+ polling-delay-passive = <100>;
polling-delay = <0>;
+ thermal-governor = "step_wise";
thermal-sensors = <&pm8953_tz>;
wake-capable-sensor;