1 Qualcomm's SPMI PMIC voltage ADC
3 SPMI PMIC voltage ADC (VADC) provides interface to clients to read
4 voltage. The VADC is a 15-bit sigma-delta ADC.
11 Definition: Should contain "qcom,spmi-vadc".
15 Value type: <prop-encoded-array>
16 Definition: VADC base address and length in the SPMI PMIC register map.
21 Definition: Must be one. Child node 'reg' property should define ADC
27 Definition: Must be zero.
32 Definition: Must be one. For details about IIO bindings see:
33 Documentation/devicetree/bindings/iio/iio-bindings.txt
37 Value type: <prop-encoded-array>
38 Definition: End of conversion interrupt.
40 Channel node properties:
45 Definition: ADC channel number.
46 See include/dt-bindings/iio/qcom,spmi-vadc.h
51 Definition: This parameter is used to decrease ADC sampling rate.
52 Quicker measurements can be made by reducing decimation ratio.
53 Valid values are 512, 1024, 2048, 4096.
54 If property is not found, default value of 512 will be used.
58 Value type: <u32 array>
59 Definition: Used for scaling the channel input signal before the signal is
60 fed to VADC. The configuration for this node is to know the
61 pre-determined ratio and use it for post scaling. Select one from
62 the following options.
63 <1 1>, <1 3>, <1 4>, <1 6>, <1 20>, <1 8>, <10 81>, <1 10>
64 If property is not found default value depending on chip will be used.
69 Definition: Channel calibration type. If this property is specified
70 VADC will use the VDD reference (1.8V) and GND for channel
71 calibration. If property is not found, channel will be
72 calibrated with 0.625V and 1.25V reference channels, also
73 known as absolute calibration.
75 - qcom,hw-settle-time:
78 Definition: Time between AMUX getting configured and the ADC starting
79 conversion. Delay = 100us * (value) for value < 11, and
80 2ms * (value - 10) otherwise.
81 Valid values are: 0, 100, 200, 300, 400, 500, 600, 700, 800,
82 900 us and 1, 2, 4, 6, 8, 10 ms
83 If property is not found, channel will use 0us.
88 Definition: Number of samples to be used for measurement.
89 Averaging provides the option to obtain a single measurement
90 from the ADC that is an average of multiple samples. The value
91 selected is 2^(value).
92 Valid values are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512
93 If property is not found, 1 sample will be used.
97 Following channels, also known as reference point channels, are used for
98 result calibration and their channel configuration nodes should be defined:
99 VADC_REF_625MV and/or VADC_SPARE1(based on PMIC version) VADC_REF_1250MV,
100 VADC_GND_REF and VADC_VDD_VADC.
105 pmic_vadc: vadc@3100 {
106 compatible = "qcom,spmi-vadc";
107 reg = <0x3100 0x100>;
108 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
109 #address-cells = <1>;
111 #io-channel-cells = <1>;
116 reg = <VADC_LR_MUX10_USB_ID>;
117 qcom,decimation = <512>;
119 qcom,hw-settle-time = <200>;
120 qcom,avg-samples = <1>;
121 qcom,pre-scaling = <1 3>;
125 /* IIO client node */
127 io-channels = <&pmic_vadc VADC_LR_MUX10_USB_ID>;
128 io-channel-names = "vadc";