Documentation / devicetree / bindings / iio / adc / qcom,spmi-adc5-gen3.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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/qcom,spmi-adc5-gen3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm's SPMI PMIC ADC5 Gen3

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

description: |
  SPMI PMIC5 Gen3 voltage ADC (ADC) provides interface to clients to read
  voltage. It is a 16-bit sigma-delta ADC. It also performs the same thermal
  monitoring function as the existing ADC_TM devices.
 
  The interface is implemented on SDAM (Shared Direct Access Memory) peripherals
  on the master PMIC rather than a dedicated ADC peripheral. The number of PMIC
  SDAM peripherals allocated for ADC is not correlated with the PMIC used, it is
  programmed in FW (PBS) and is fixed per SOC, based on the SOC requirements.
  All boards using a particular (SOC + master PMIC) combination will have the
  same number of ADC SDAMs supported on that PMIC.

properties:
  compatible:
    const: qcom,spmi-adc5-gen3

  reg:
    items:
      - description: SDAM0 base address in the SPMI PMIC register map
      - description: SDAM1 base address
    minItems: 1
 
  "#address-cells":
    const: 1
 
  "#size-cells":
    const: 0
 
  "#io-channel-cells":
    const: 1
 
  "#thermal-sensor-cells":
    const: 1

  interrupts:
    items:
      - description: SDAM0 end of conversion (EOC) interrupt
      - description: SDAM1 EOC interrupt
    minItems: 1

patternProperties:
  "^channel@[0-9a-f]+$":
    type: object
    unevaluatedProperties: false
    $ref: /schemas/iio/adc/qcom,spmi-vadc-common.yaml
    description:
      Represents the external channels which are connected to the ADC.

    properties:
      qcom,decimation:
        enum: [ 85, 340, 1360 ]
        default: 1360

      qcom,hw-settle-time:
        enum: [ 15, 100, 200, 300, 400, 500, 600, 700,
                1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000 ]
        default: 15

      qcom,avg-samples:
        enum: [ 1, 2, 4, 8, 16 ]
        default: 1

      qcom,adc-tm:
        description:
          ADC_TM is a threshold monitoring feature in HW which can be enabled
          on any ADC channel, to trigger an IRQ for threshold violation. In
          earlier ADC generations, it was implemented in a separate device
          (documented in Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml.)
          In Gen3, this feature can be enabled in the same ADC device for any
          channel and threshold monitoring and IRQ triggering are handled in FW
          (PBS) instead of another dedicated HW block.
          This property indicates ADC_TM monitoring is done on this channel.
        type: boolean

required:
  - compatible
  - reg
  - "#address-cells"
  - "#size-cells"
  - "#io-channel-cells"
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
 
    pmic {
      #address-cells = <1>;
      #size-cells = <0>;
 
      adc@9000 {
        compatible = "qcom,spmi-adc5-gen3";
        reg = <0x9000>, <0x9100>;
        interrupts = <0x0 0x90 0x1 IRQ_TYPE_EDGE_RISING>,
                      <0x0 0x91 0x1 IRQ_TYPE_EDGE_RISING>;
        #address-cells = <1>;
        #size-cells = <0>;
        #io-channel-cells = <1>;
        #thermal-sensor-cells = <1>;
 
        /* PMK8550 Channel nodes */
        channel@3 {
          reg = <0x3>;
          label = "pmk8550_die_temp";
          qcom,pre-scaling = <1 1>;
        };
 
        channel@44 {
          reg = <0x44>;
          label = "pmk8550_xo_therm";
          qcom,pre-scaling = <1 1>;
          qcom,ratiometric;
          qcom,hw-settle-time = <200>;
          qcom,adc-tm;
        };
 
        /* PM8550 Channel nodes */
        channel@103 {
          reg = <0x103>;
          label = "pm8550_die_temp";
          qcom,pre-scaling = <1 1>;
        };
 
        /* PM8550B Channel nodes */
        channel@78f {
          reg = <0x78f>;
          label = "pm8550b_vbat_sns_qbg";
          qcom,pre-scaling = <1 3>;
        };
 
        /* PM8550VS_C Channel nodes */
        channel@203 {
          reg = <0x203>;
          label = "pm8550vs_c_die_temp";
          qcom,pre-scaling = <1 1>;
        };
      };
    };