Documentation / devicetree / bindings / iio / adc / qcom,spmi-vadc-common.yaml


Based on kernel version 7.2. Page generated on 2026-08-20 08:41 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/qcom,spmi-vadc-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies, Inc. SPMI PMIC ADC channels

maintainers:
  - Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>

description:
  This defines the common properties used to define Qualcomm VADC channels.

properties:
  reg:
    description:
      ADC channel number (PMIC-specific for versions after PMIC5 ADC).
    maxItems: 1

  label:
    description:
      ADC input of the platform as seen in the schematics.
      For thermistor inputs connected to generic AMUX or GPIO inputs
      these can vary across platform for the same pins. Hence select
      the platform schematics name for this channel.

  qcom,decimation:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      This parameter is used to decrease ADC sampling rate.
      Quicker measurements can be made by reducing decimation ratio.

  qcom,pre-scaling:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description:
      Used for scaling the channel input signal before the signal is
      fed to VADC. The configuration for this node is to know the
      pre-determined ratio and use it for post scaling. It is a pair of
      integers, denoting the numerator and denominator of the fraction by which
      input signal is multiplied. For example, <1 3> indicates the signal is scaled
      down to 1/3 of its value before ADC measurement.
      If property is not found default value depending on chip will be used.
    oneOf:
      - items:
          - const: 1
          - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ]
      - items:
          - const: 10
          - const: 81

  qcom,ratiometric:
    type: boolean
    description: |
      Channel calibration type.
      - For compatible property "qcom,spmi-vadc", if this property is
        specified VADC will use the VDD reference (1.8V) and GND for
        channel calibration. If property is not found, channel will be
        calibrated with 0.625V and 1.25V reference channels, also
        known as absolute calibration.
      - For other compatible properties, if this property is specified
        VADC will use the VDD reference (1.875V) and GND for channel
        calibration. If property is not found, channel will be calibrated
        with 0V and 1.25V reference channels, also known as absolute calibration.

  qcom,hw-settle-time:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Time between AMUX getting configured and the ADC starting
      conversion. The 'hw_settle_time' is an index used from valid values
      and programmed in hardware to achieve the hardware settling delay.

  qcom,avg-samples:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Number of samples to be used for measurement.
      Averaging provides the option to obtain a single measurement
      from the ADC that is an average of multiple samples. The value
      selected is 2^(value).

required:
  - reg

additionalProperties: true