1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/iio/adc/qcom,pm8018-adc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm's PM8xxx voltage XOADC
10 - Linus Walleij <linus.walleij@linaro.org>
13 The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal
14 oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921.
27 ADC base address in the PMIC, typically 0x197.
31 The reference voltage may vary with PMIC variant but is typically
32 something like 2.2 or 1.8V.
40 The first cell is the prescaler (on PM8058) or premux (on PM8921)
41 with two valid bits so legal values are 0x00, 0x01 or 0x02.
42 The second cell is the main analog mux setting (0x00..0x0f).
43 The combination of prescaler/premux and analog mux uniquely addresses
44 a hardware channel on all systems.
52 The cells are precaler or premux followed by the analog muxing line.
54 additionalProperties: false
67 "^(adc-channel@)[0-9a-f]$":
70 ADC channel specific configuration.
71 Note that channels c, d and f must be present for calibration.
72 These three nodes are used for absolute and ratiometric calibration
73 and only need to have these reg values: they are by hardware definition
74 1:1 ratio converters that sample 625, 1250 and 0 milliV and create
75 an interpolation calibration for all other ADCs.
82 $ref: /schemas/types.yaml#/definitions/uint32
84 This parameter is used to decrease the ADC sampling rate.
85 Quicker measurements can be made by reducing the decimation ratio.
86 Valid values are 512, 1024, 2048, 4096.
87 If the property is not found, a default value of 512 will be used.
90 $ref: /schemas/types.yaml#/definitions/uint32
92 Channel calibration type. If this property is specified
93 VADC will use a special voltage references for channel
94 calibration. The available references are specified in the
95 as a u32 value setting (see below) and it is compulsory
96 to also specify this reference if ratiometric calibration
99 If the property is not found, the channel will be
100 calibrated with the 0.625V and 1.25V reference channels, also
101 known as an absolute calibration.
103 The reference voltage pairs when using ratiometric calibration:
105 1 = PMIC_IN/XOADC_GND
108 4 = XOADC_GND/XOADC_GND
109 5 = XOADC_VREF/XOADC_GND
111 additionalProperties: false
118 #include <dt-bindings/interrupt-controller/irq.h>
120 #address-cells = <1>;
124 compatible = "qcom,pm8058-adc";
126 interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
127 #address-cells = <2>;
129 #io-channel-cells = <2>;
131 vcoin: adc-channel@0 {
134 vbat: adc-channel@1 {
137 dcin: adc-channel@2 {
140 ichg: adc-channel@3 {
143 vph_pwr: adc-channel@4 {
146 usb_vbus: adc-channel@a {
149 die_temp: adc-channel@b {
152 ref_625mv: adc-channel@c {
155 ref_1250mv: adc-channel@d {
158 ref_325mv: adc-channel@e {
161 ref_muxoff: adc-channel@f {