1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm5.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm's SPMI PMIC ADC Thermal Monitoring
9 - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
15 - qcom,spmi-adc-tm5-gen2
16 - qcom,adc-tm7 # Incomplete / subject to change
24 "#thermal-sensor-cells":
27 Number of cells required to uniquely identify the thermal sensors. Since
28 we have multiple sensors this is set to 1
37 $ref: /schemas/types.yaml#/definitions/uint32
38 description: Number of samples to be used for measurement.
39 Not applicable for Gen2 ADC_TM peripheral.
49 $ref: /schemas/types.yaml#/definitions/uint32
50 description: This parameter is used to decrease ADC sampling rate.
51 Quicker measurements can be made by reducing decimation ratio.
52 Not applicable for Gen2 ADC_TM peripheral.
60 "^([-a-z0-9]*)@[0-7]$":
63 Represent one thermal sensor.
67 description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
73 From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
76 $ref: /schemas/types.yaml#/definitions/flag
78 Channel calibration type.
79 If this property is specified VADC will use the VDD reference
80 (1.875V) and GND for channel calibration. If property is not found,
81 channel will be calibrated with 0V and 1.25V reference channels,
82 also known as absolute calibration.
84 qcom,hw-settle-time-us:
85 description: Time between AMUX getting configured and the ADC starting conversion.
86 enum: [15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000]
89 $ref: /schemas/types.yaml#/definitions/uint32-array
90 description: Used for scaling the channel input signal before the
91 signal is fed to VADC. The configuration for this node is to know the
92 pre-determined ratio and use it for post scaling. It is a pair of
93 integers, denoting the numerator and denominator of the fraction by
94 which input signal is multiplied. For example, <1 3> indicates the
95 signal is scaled down to 1/3 of its value before ADC measurement. If
96 property is not found default value depending on chip will be used.
99 - enum: [ 1, 3, 4, 6, 20, 8, 10 ]
102 $ref: /schemas/types.yaml#/definitions/uint32
103 description: Number of samples to be used for measurement.
104 This property in child node is applicable only for Gen2 ADC_TM peripheral.
114 $ref: /schemas/types.yaml#/definitions/uint32
115 description: This parameter is used to decrease ADC sampling rate.
116 Quicker measurements can be made by reducing decimation ratio.
117 This property in child node is applicable only for Gen2 ADC_TM peripheral.
128 additionalProperties:
136 const: qcom,spmi-adc-tm5
140 "^([-a-z0-9]*)@[0-7]$":
142 qcom,decimation: false
143 qcom,avg-samples: false
149 const: qcom,spmi-adc-tm5-gen2
153 qcom,avg-samples: false
154 qcom,decimation: false
162 - "#thermal-sensor-cells"
164 additionalProperties: false
168 #include <dt-bindings/iio/qcom,spmi-vadc.h>
169 #include <dt-bindings/interrupt-controller/irq.h>
171 #address-cells = <1>;
173 pm8150b_adc: adc@3100 {
175 compatible = "qcom,spmi-adc5";
176 #address-cells = <1>;
178 #io-channel-cells = <1>;
180 /* Other properties are omitted */
182 reg = <ADC5_AMUX_THM3_100K_PU>;
184 qcom,hw-settle-time = <200>;
185 label = "conn_therm";
189 pm8150b_adc_tm: adc-tm@3500 {
190 compatible = "qcom,spmi-adc-tm5";
192 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
193 #thermal-sensor-cells = <1>;
194 #address-cells = <1>;
199 io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
201 qcom,hw-settle-time-us = <200>;
207 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
208 #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
209 #include <dt-bindings/interrupt-controller/irq.h>
211 #address-cells = <1>;
213 pmk8350_vadc: adc@3100 {
215 compatible = "qcom,spmi-adc7";
216 #address-cells = <1>;
218 #io-channel-cells = <1>;
220 /* Other properties are omitted */
222 reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
224 qcom,hw-settle-time = <200>;
229 reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
231 qcom,hw-settle-time = <200>;
232 label = "conn_therm";
236 pmk8350_adc_tm: adc-tm@3400 {
237 compatible = "qcom,spmi-adc-tm5-gen2";
239 interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
240 #thermal-sensor-cells = <1>;
241 #address-cells = <1>;
246 io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
247 qcom,decimation = <340>;
249 qcom,hw-settle-time-us = <200>;
254 io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
255 qcom,avg-samples = <2>;
257 qcom,hw-settle-time-us = <200>;