1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/adc/qcom,spmi-vadc-common.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm Technologies, Inc. SPMI PMIC ADC channels 8 9maintainers: 10 - Jishnu Prakash <jishnu.prakash@oss.qualcomm.com> 11 12description: 13 This defines the common properties used to define Qualcomm VADC channels. 14 15properties: 16 reg: 17 description: 18 ADC channel number (PMIC-specific for versions after PMIC5 ADC). 19 maxItems: 1 20 21 label: 22 description: 23 ADC input of the platform as seen in the schematics. 24 For thermistor inputs connected to generic AMUX or GPIO inputs 25 these can vary across platform for the same pins. Hence select 26 the platform schematics name for this channel. 27 28 qcom,decimation: 29 $ref: /schemas/types.yaml#/definitions/uint32 30 description: 31 This parameter is used to decrease ADC sampling rate. 32 Quicker measurements can be made by reducing decimation ratio. 33 34 qcom,pre-scaling: 35 $ref: /schemas/types.yaml#/definitions/uint32-array 36 description: 37 Used for scaling the channel input signal before the signal is 38 fed to VADC. The configuration for this node is to know the 39 pre-determined ratio and use it for post scaling. It is a pair of 40 integers, denoting the numerator and denominator of the fraction by which 41 input signal is multiplied. For example, <1 3> indicates the signal is scaled 42 down to 1/3 of its value before ADC measurement. 43 If property is not found default value depending on chip will be used. 44 oneOf: 45 - items: 46 - const: 1 47 - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] 48 - items: 49 - const: 10 50 - const: 81 51 52 qcom,ratiometric: 53 type: boolean 54 description: | 55 Channel calibration type. 56 - For compatible property "qcom,spmi-vadc", if this property is 57 specified VADC will use the VDD reference (1.8V) and GND for 58 channel calibration. If property is not found, channel will be 59 calibrated with 0.625V and 1.25V reference channels, also 60 known as absolute calibration. 61 - For other compatible properties, if this property is specified 62 VADC will use the VDD reference (1.875V) and GND for channel 63 calibration. If property is not found, channel will be calibrated 64 with 0V and 1.25V reference channels, also known as absolute calibration. 65 66 qcom,hw-settle-time: 67 $ref: /schemas/types.yaml#/definitions/uint32 68 description: | 69 Time between AMUX getting configured and the ADC starting 70 conversion. The 'hw_settle_time' is an index used from valid values 71 and programmed in hardware to achieve the hardware settling delay. 72 73 qcom,avg-samples: 74 $ref: /schemas/types.yaml#/definitions/uint32 75 description: | 76 Number of samples to be used for measurement. 77 Averaging provides the option to obtain a single measurement 78 from the ADC that is an average of multiple samples. The value 79 selected is 2^(value). 80 81required: 82 - reg 83 84additionalProperties: true 85