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
23 "#thermal-sensor-cells":
26 Number of cells required to uniquely identify the thermal sensors. Since
27 we have multiple sensors this is set to 1
36 $ref: /schemas/types.yaml#/definitions/uint32
37 description: Number of samples to be used for measurement.
38 Not applicable for Gen2 ADC_TM peripheral.
48 $ref: /schemas/types.yaml#/definitions/uint32
49 description: This parameter is used to decrease ADC sampling rate.
50 Quicker measurements can be made by reducing decimation ratio.
51 Not applicable for Gen2 ADC_TM peripheral.
59 "^([-a-z0-9]*)@[0-7]$":
62 Represent one thermal sensor.
66 description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
72 From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
75 $ref: /schemas/types.yaml#/definitions/flag
77 Channel calibration type.
78 If this property is specified VADC will use the VDD reference
79 (1.875V) and GND for channel calibration. If property is not found,
80 channel will be calibrated with 0V and 1.25V reference channels,
81 also known as absolute calibration.
83 qcom,hw-settle-time-us:
84 description: Time between AMUX getting configured and the ADC starting conversion.
85 enum: [15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000]
88 $ref: /schemas/types.yaml#/definitions/uint32-array
89 description: Used for scaling the channel input signal before the
90 signal is fed to VADC. The configuration for this node is to know the
91 pre-determined ratio and use it for post scaling. It is a pair of
92 integers, denoting the numerator and denominator of the fraction by
93 which input signal is multiplied. For example, <1 3> indicates the
94 signal is scaled down to 1/3 of its value before ADC measurement. If
95 property is not found default value depending on chip will be used.
98 - enum: [ 1, 3, 4, 6, 20, 8, 10 ]
101 $ref: /schemas/types.yaml#/definitions/uint32
102 description: Number of samples to be used for measurement.
103 This property in child node is applicable only for Gen2 ADC_TM peripheral.
113 $ref: /schemas/types.yaml#/definitions/uint32
114 description: This parameter is used to decrease ADC sampling rate.
115 Quicker measurements can be made by reducing decimation ratio.
116 This property in child node is applicable only for Gen2 ADC_TM peripheral.
127 additionalProperties:
135 const: qcom,spmi-adc-tm5
139 "^([-a-z0-9]*)@[0-7]$":
141 qcom,decimation: false
142 qcom,avg-samples: false
148 const: qcom,spmi-adc-tm5-gen2
152 qcom,avg-samples: false
153 qcom,decimation: false
161 - "#thermal-sensor-cells"
163 additionalProperties: false
167 #include <dt-bindings/iio/qcom,spmi-vadc.h>
168 #include <dt-bindings/interrupt-controller/irq.h>
170 #address-cells = <1>;
172 pm8150b_adc: adc@3100 {
174 compatible = "qcom,spmi-adc5";
175 #address-cells = <1>;
177 #io-channel-cells = <1>;
179 /* Other properties are omitted */
181 reg = <ADC5_AMUX_THM3_100K_PU>;
183 qcom,hw-settle-time = <200>;
187 pm8150b_adc_tm: adc-tm@3500 {
188 compatible = "qcom,spmi-adc-tm5";
190 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
191 #thermal-sensor-cells = <1>;
192 #address-cells = <1>;
197 io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
199 qcom,hw-settle-time-us = <200>;
205 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
206 #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
207 #include <dt-bindings/interrupt-controller/irq.h>
209 #address-cells = <1>;
211 pmk8350_vadc: adc@3100 {
213 compatible = "qcom,spmi-adc7";
214 #address-cells = <1>;
216 #io-channel-cells = <1>;
218 /* Other properties are omitted */
220 reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
222 qcom,hw-settle-time = <200>;
226 reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
228 qcom,hw-settle-time = <200>;
232 pmk8350_adc_tm: adc-tm@3400 {
233 compatible = "qcom,spmi-adc-tm5-gen2";
235 interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
236 #thermal-sensor-cells = <1>;
237 #address-cells = <1>;
242 io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
243 qcom,decimation = <340>;
245 qcom,hw-settle-time-us = <200>;
250 io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>;
251 qcom,avg-samples = <2>;
253 qcom,hw-settle-time-us = <200>;