Documentation / devicetree / bindings / iio / adc / adi,ad7380.yaml


Based on kernel version 6.15. Page generated on 2025-05-29 09:08 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 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices Simultaneous Sampling Analog to Digital Converters

maintainers:
  - Michael Hennerich <Michael.Hennerich@analog.com>
  - Nuno Sá <nuno.sa@analog.com>

description: |
  * https://www.analog.com/en/products/ad7380.html
  * https://www.analog.com/en/products/ad7381.html
  * https://www.analog.com/en/products/ad7383.html
  * https://www.analog.com/en/products/ad7384.html
  * https://www.analog.com/en/products/ad7386.html
  * https://www.analog.com/en/products/ad7387.html
  * https://www.analog.com/en/products/ad7388.html
  * https://www.analog.com/en/products/ad7380-4.html
  * https://www.analog.com/en/products/ad7381-4.html
  * https://www.analog.com/en/products/ad7383-4.html
  * https://www.analog.com/en/products/ad7384-4.html
  * https://www.analog.com/en/products/ad7386-4.html
  * https://www.analog.com/en/products/ad7387-4.html
  * https://www.analog.com/en/products/ad7388-4.html
  * https://www.analog.com/en/products/adaq4370-4.html
  * https://www.analog.com/en/products/adaq4380-4.html
  * https://www.analog.com/en/products/adaq4381-4.html
 
 
$ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
    enum:
      - adi,ad7380
      - adi,ad7381
      - adi,ad7383
      - adi,ad7384
      - adi,ad7386
      - adi,ad7387
      - adi,ad7388
      - adi,ad7380-4
      - adi,ad7381-4
      - adi,ad7383-4
      - adi,ad7384-4
      - adi,ad7386-4
      - adi,ad7387-4
      - adi,ad7388-4
      - adi,adaq4370-4
      - adi,adaq4380-4
      - adi,adaq4381-4

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 80000000
  spi-cpol: true
  spi-cpha: true

  vcc-supply:
    description: A 3V to 3.6V supply that powers the chip.

  vlogic-supply:
    description:
      A 1.65V to 3.6V supply for the logic pins.

  refio-supply:
    description:
      A 2.5V to 3.3V supply for the external reference voltage. When omitted,
      the internal 2.5V reference is used.

  refin-supply:
    description:
      A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
      For adaq devices, a 5V supply voltage. A 3.3V internal reference is
      derived from it. Connect to vs-p-supply for normal operation.

  vs-p-supply:
    description:
      Amplifiers positive supply.

  vs-n-supply:
    description:
      Amplifiers negative supply.

  ldo-supply:
    description:
      LDO supply. Connect to vs-p-supply or a 3.6 to 5.5 V supply.

  aina-supply:
    description:
      The common mode voltage supply for the AINA- pin on pseudo-differential
      chips.

  ainb-supply:
    description:
      The common mode voltage supply for the AINB- pin on pseudo-differential
      chips.

  ainc-supply:
    description:
      The common mode voltage supply for the AINC- pin on pseudo-differential
      chips.

  aind-supply:
    description:
      The common mode voltage supply for the AIND- pin on pseudo-differential
      chips.

  interrupts:
    description:
      When the device is using 1-wire mode, this property is used to optionally
      specify the ALERT interrupt.
    maxItems: 1
 
  "#address-cells":
    const: 1
 
  "#size-cells":
    const: 0

required:
  - compatible
  - reg
  - vcc-supply
  - vlogic-supply

patternProperties:
  "^channel@[0-3]$":
    $ref: adc.yaml
    type: object

    properties:
      reg:
        description:
          The channel number. From 0 to 3 corresponding to channels A,B,C,D
        minimum: 0
        maximum: 3

      adi,gain-milli:
        description:
          The hardware gain applied to the ADC input (in milli units).
          If not present, default to 1000 (no actual gain applied).
          Refer to the typical connection diagrams section of the datasheet for
          pin wiring.
        $ref: /schemas/types.yaml#/definitions/uint16
        enum: [300, 600, 1000, 1600]
        default: 1000

    required:
      - reg

    additionalProperties: false

unevaluatedProperties: false

allOf:
  # pseudo-differential chips require common mode voltage supplies,
  # true differential chips don't use them
  - if:
      properties:
        compatible:
          enum:
            - adi,ad7383
            - adi,ad7384
            - adi,ad7383-4
            - adi,ad7384-4
    then:
      required:
        - aina-supply
        - ainb-supply
    else:
      properties:
        aina-supply: false
        ainb-supply: false
  - if:
      properties:
        compatible:
          enum:
            - adi,ad7383-4
            - adi,ad7384-4
    then:
      required:
        - ainc-supply
        - aind-supply
    else:
      properties:
        ainc-supply: false
        aind-supply: false
 
  # ad7380-4 uses refin-supply as external reference.
  # adaq devices use internal reference only, derived from refin-supply
  # All other chips from ad738x family use refio as optional external reference.
  # When refio-supply is omitted, internal reference is used.
  - if:
      properties:
        compatible:
          enum:
            - adi,ad7380-4
            - adi,adaq4370-4
            - adi,adaq4380-4
            - adi,adaq4381-4
    then:
      properties:
        refio-supply: false
      required:
        - refin-supply
    else:
      properties:
        refin-supply: false
 
  # adaq devices need more supplies and using channel to declare gain property
  # only applies to adaq devices
  - if:
      properties:
        compatible:
          enum:
            - adi,adaq4370-4
            - adi,adaq4380-4
            - adi,adaq4381-4
    then:
      required:
        - vs-p-supply
        - vs-n-supply
        - ldo-supply
    else:
      properties:
        vs-p-supply: false
        vs-n-supply: false
        ldo-supply: false
      patternProperties:
        "^channel@[0-3]$": false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
 
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
 
        adc@0 {
            compatible = "adi,ad7380";
            reg = <0>;
 
            spi-cpol;
            spi-cpha;
            spi-max-frequency = <80000000>;
 
            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
            interrupt-parent = <&gpio0>;
 
            vcc-supply = <&supply_3_3V>;
            vlogic-supply = <&supply_3_3V>;
            refio-supply = <&supply_2_5V>;
        };
    };

  - |
    #include <dt-bindings/interrupt-controller/irq.h>
 
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
 
        adc@0 {
            compatible = "adi,adaq4380-4";
            reg = <0>;
 
            spi-cpol;
            spi-cpha;
            spi-max-frequency = <80000000>;
 
            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
            interrupt-parent = <&gpio0>;
 
            vcc-supply = <&supply_3_3V>;
            vlogic-supply = <&supply_3_3V>;
            refin-supply = <&supply_5V>;
            vs-p-supply = <&supply_5V>;
            vs-n-supply = <&supply_0V>;
            ldo-supply = <&supply_5V>;
 
            #address-cells = <1>;
            #size-cells = <0>;
 
            channel@0 {
                reg = <0>;
                adi,gain-milli = /bits/ 16 <300>;
            };
 
            channel@2 {
                reg = <2>;
                adi,gain-milli = /bits/ 16 <600>;
            };
 
            channel@3 {
                reg = <3>;
                adi,gain-milli = /bits/ 16 <1000>;
            };
        };
    };