Documentation / devicetree / bindings / iio / adc / adi,ad7768-1.yaml


Based on kernel version 7.0. Page generated on 2026-04-23 09:48 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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7768-1 ADC family

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices AD7768-1 24-Bit Single Channel Low Power sigma-delta ADC family
 
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7767-1.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7768-1.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7769-1.pdf

properties:
  compatible:
    enum:
      - adi,ad7768-1
      - adi,adaq7767-1
      - adi,adaq7768-1
      - adi,adaq7769-1

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: mclk

  trigger-sources:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    minItems: 1
    maxItems: 2
    description: |
      A list of phandles referencing trigger source providers. Each entry
      represents a trigger source for the ADC:
 
        - First entry specifies the device responsible for driving the
          synchronization (SYNC_IN) pin, as an alternative to adi,sync-in-gpios.
          This can be a `gpio-trigger` or another `ad7768-1` device. If the
          device's own SYNC_OUT pin is internally connected to its SYNC_IN pin,
          reference the device itself or omit this property.
        - Second entry optionally defines a GPIO3 pin used as a START signal trigger.
 
      Use the accompanying trigger source cell to identify the type of each entry.

  interrupts:
    description:
      DRDY (Data Ready) pin, which signals conversion results are available.
    maxItems: 1
 
  '#address-cells':
    const: 1
 
  '#size-cells':
    const: 0

  vref-supply:
    description:
      ADC reference voltage supply

  adi,aaf-gain-bp:
    description: |
       Specifies the gain applied by the Analog Anti-Aliasing Filter (AAF)
       to the ADC input in basis points (one hundredth of a percent).
       The hardware gain is determined by which input pin(s) the signal goes
       through into the AAF. The possible connections are:
       * For the ADAQ7767-1: Input connected to IN1±, IN2± or IN3±.
       * For the ADAQ7769-1: OUT_PGA pin connected to IN1_AAF+, IN2_AAF+,
         or IN3_AAF+.
    enum: [1430, 3640, 10000]
    default: 10000

  pga-gpios:
    description:
      GAIN 0, GAIN1 and GAIN2 pins for gain selection. For devices that have
      PGA configuration input pins, pga-gpios must be defined.
    minItems: 3
    maxItems: 3

  adi,sync-in-gpios:
    maxItems: 1
    description:
      Enables synchronization of multiple devices that require simultaneous
      sampling. A pulse is always required if the configuration is changed
      in any way, for example if the filter decimation rate changes.
      As the line is active low, it should be marked GPIO_ACTIVE_LOW.

  regulators:
    type: object
    description:
      list of regulators provided by this controller.

    properties:
      vcm-output:
        $ref: /schemas/regulator/regulator.yaml#
        type: object
        unevaluatedProperties: false

    additionalProperties: false

  reset-gpios:
    maxItems: 1

  spi-cpol: true

  spi-cpha: true
 
  "#io-channel-cells":
    const: 1
 
  "#trigger-source-cells":
    description: |
      Cell indicates the trigger output signal: 0 = SYNC_OUT, 1 = GPIO3,
      2 = DRDY.
 
      For better readability, macros for these values are available in
      dt-bindings/iio/adc/adi,ad7768-1.h.
    const: 1

  gpio-controller: true
 
  "#gpio-cells":
    const: 2
    description: |
      The first cell is for the GPIO number: 0 to 3.
      The second cell takes standard GPIO flags.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - vref-supply
  - spi-cpol
  - spi-cpha

dependencies:
  adi,sync-in-gpios:
    not:
      required:
        - trigger-sources
  trigger-sources:
    not:
      required:
        - adi,sync-in-gpios

patternProperties:
  "^channel@([0-9]|1[0-5])$":
    type: object
    description: |
      Represents the external channels which are connected to the device.

    properties:
      reg:
        maxItems: 1
        description: |
          The channel number.

      label:
        description: |
          Unique name to identify which channel this is.
    required:
      - reg
    additionalProperties: false

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
 
  # AAF Gain property only applies to ADAQ7767-1 and ADAQ7769-1 devices
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,adaq7767-1
              - adi,adaq7769-1
    then:
      required:
        - adi,aaf-gain-bp
    else:
      properties:
        adi,aaf-gain-bp: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,adaq7768-1
              - adi,adaq7769-1
    then:
      required:
        - pga-gpios
    else:
      properties:
        pga-gpios: false

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
 
        adc@0 {
            compatible = "adi,ad7768-1";
            reg = <0>;
            spi-max-frequency = <2000000>;
            spi-cpol;
            spi-cpha;
            gpio-controller;
            #gpio-cells = <2>;
            vref-supply = <&adc_vref>;
            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
            interrupt-parent = <&gpio>;
            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
            clocks = <&ad7768_mclk>;
            clock-names = "mclk";
 
            #address-cells = <1>;
            #size-cells = <0>;
 
            channel@0 {
                reg = <0>;
                label = "channel_0";
            };
 
            regulators {
              vcm_reg: vcm-output {
                regulator-name = "ad7768-1-vcm";
              };
            };
        };
    };
...