xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7380.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
10e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
20e8011faSEmmanuel Vadot%YAML 1.2
30e8011faSEmmanuel Vadot---
40e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml#
50e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
60e8011faSEmmanuel Vadot
70e8011faSEmmanuel Vadottitle: Analog Devices Simultaneous Sampling Analog to Digital Converters
80e8011faSEmmanuel Vadot
90e8011faSEmmanuel Vadotmaintainers:
100e8011faSEmmanuel Vadot  - Michael Hennerich <Michael.Hennerich@analog.com>
110e8011faSEmmanuel Vadot  - Nuno Sá <nuno.sa@analog.com>
120e8011faSEmmanuel Vadot
130e8011faSEmmanuel Vadotdescription: |
140e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7380.html
150e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7381.html
160e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7383.html
170e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7384.html
18*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7386.html
19*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7387.html
20*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7388.html
210e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7380-4.html
220e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7381-4.html
230e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7383-4.html
240e8011faSEmmanuel Vadot  * https://www.analog.com/en/products/ad7384-4.html
25*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7386-4.html
26*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7387-4.html
27*b2d2a78aSEmmanuel Vadot  * https://www.analog.com/en/products/ad7388-4.html
28*b2d2a78aSEmmanuel Vadot
290e8011faSEmmanuel Vadot
300e8011faSEmmanuel Vadot$ref: /schemas/spi/spi-peripheral-props.yaml#
310e8011faSEmmanuel Vadot
320e8011faSEmmanuel Vadotproperties:
330e8011faSEmmanuel Vadot  compatible:
340e8011faSEmmanuel Vadot    enum:
350e8011faSEmmanuel Vadot      - adi,ad7380
360e8011faSEmmanuel Vadot      - adi,ad7381
370e8011faSEmmanuel Vadot      - adi,ad7383
380e8011faSEmmanuel Vadot      - adi,ad7384
39*b2d2a78aSEmmanuel Vadot      - adi,ad7386
40*b2d2a78aSEmmanuel Vadot      - adi,ad7387
41*b2d2a78aSEmmanuel Vadot      - adi,ad7388
420e8011faSEmmanuel Vadot      - adi,ad7380-4
430e8011faSEmmanuel Vadot      - adi,ad7381-4
440e8011faSEmmanuel Vadot      - adi,ad7383-4
450e8011faSEmmanuel Vadot      - adi,ad7384-4
46*b2d2a78aSEmmanuel Vadot      - adi,ad7386-4
47*b2d2a78aSEmmanuel Vadot      - adi,ad7387-4
48*b2d2a78aSEmmanuel Vadot      - adi,ad7388-4
490e8011faSEmmanuel Vadot
500e8011faSEmmanuel Vadot  reg:
510e8011faSEmmanuel Vadot    maxItems: 1
520e8011faSEmmanuel Vadot
530e8011faSEmmanuel Vadot  spi-max-frequency:
540e8011faSEmmanuel Vadot    maximum: 80000000
550e8011faSEmmanuel Vadot  spi-cpol: true
560e8011faSEmmanuel Vadot  spi-cpha: true
570e8011faSEmmanuel Vadot
580e8011faSEmmanuel Vadot  vcc-supply:
590e8011faSEmmanuel Vadot    description: A 3V to 3.6V supply that powers the chip.
600e8011faSEmmanuel Vadot
610e8011faSEmmanuel Vadot  vlogic-supply:
620e8011faSEmmanuel Vadot    description:
630e8011faSEmmanuel Vadot      A 1.65V to 3.6V supply for the logic pins.
640e8011faSEmmanuel Vadot
650e8011faSEmmanuel Vadot  refio-supply:
660e8011faSEmmanuel Vadot    description:
670e8011faSEmmanuel Vadot      A 2.5V to 3.3V supply for the external reference voltage. When omitted,
680e8011faSEmmanuel Vadot      the internal 2.5V reference is used.
690e8011faSEmmanuel Vadot
70*b2d2a78aSEmmanuel Vadot  refin-supply:
71*b2d2a78aSEmmanuel Vadot    description:
72*b2d2a78aSEmmanuel Vadot      A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
73*b2d2a78aSEmmanuel Vadot
740e8011faSEmmanuel Vadot  aina-supply:
750e8011faSEmmanuel Vadot    description:
760e8011faSEmmanuel Vadot      The common mode voltage supply for the AINA- pin on pseudo-differential
770e8011faSEmmanuel Vadot      chips.
780e8011faSEmmanuel Vadot
790e8011faSEmmanuel Vadot  ainb-supply:
800e8011faSEmmanuel Vadot    description:
810e8011faSEmmanuel Vadot      The common mode voltage supply for the AINB- pin on pseudo-differential
820e8011faSEmmanuel Vadot      chips.
830e8011faSEmmanuel Vadot
840e8011faSEmmanuel Vadot  ainc-supply:
850e8011faSEmmanuel Vadot    description:
860e8011faSEmmanuel Vadot      The common mode voltage supply for the AINC- pin on pseudo-differential
870e8011faSEmmanuel Vadot      chips.
880e8011faSEmmanuel Vadot
890e8011faSEmmanuel Vadot  aind-supply:
900e8011faSEmmanuel Vadot    description:
910e8011faSEmmanuel Vadot      The common mode voltage supply for the AIND- pin on pseudo-differential
920e8011faSEmmanuel Vadot      chips.
930e8011faSEmmanuel Vadot
940e8011faSEmmanuel Vadot  interrupts:
950e8011faSEmmanuel Vadot    description:
960e8011faSEmmanuel Vadot      When the device is using 1-wire mode, this property is used to optionally
970e8011faSEmmanuel Vadot      specify the ALERT interrupt.
980e8011faSEmmanuel Vadot    maxItems: 1
990e8011faSEmmanuel Vadot
1000e8011faSEmmanuel Vadotrequired:
1010e8011faSEmmanuel Vadot  - compatible
1020e8011faSEmmanuel Vadot  - reg
1030e8011faSEmmanuel Vadot  - vcc-supply
1040e8011faSEmmanuel Vadot  - vlogic-supply
1050e8011faSEmmanuel Vadot
1060e8011faSEmmanuel VadotunevaluatedProperties: false
1070e8011faSEmmanuel Vadot
1080e8011faSEmmanuel VadotallOf:
1090e8011faSEmmanuel Vadot  # pseudo-differential chips require common mode voltage supplies,
1100e8011faSEmmanuel Vadot  # true differential chips don't use them
1110e8011faSEmmanuel Vadot  - if:
1120e8011faSEmmanuel Vadot      properties:
1130e8011faSEmmanuel Vadot        compatible:
1140e8011faSEmmanuel Vadot          enum:
1150e8011faSEmmanuel Vadot            - adi,ad7383
1160e8011faSEmmanuel Vadot            - adi,ad7384
1170e8011faSEmmanuel Vadot            - adi,ad7383-4
1180e8011faSEmmanuel Vadot            - adi,ad7384-4
1190e8011faSEmmanuel Vadot    then:
1200e8011faSEmmanuel Vadot      required:
1210e8011faSEmmanuel Vadot        - aina-supply
1220e8011faSEmmanuel Vadot        - ainb-supply
1230e8011faSEmmanuel Vadot    else:
1240e8011faSEmmanuel Vadot      properties:
1250e8011faSEmmanuel Vadot        aina-supply: false
1260e8011faSEmmanuel Vadot        ainb-supply: false
1270e8011faSEmmanuel Vadot  - if:
1280e8011faSEmmanuel Vadot      properties:
1290e8011faSEmmanuel Vadot        compatible:
1300e8011faSEmmanuel Vadot          enum:
1310e8011faSEmmanuel Vadot            - adi,ad7383-4
1320e8011faSEmmanuel Vadot            - adi,ad7384-4
1330e8011faSEmmanuel Vadot    then:
1340e8011faSEmmanuel Vadot      required:
1350e8011faSEmmanuel Vadot        - ainc-supply
1360e8011faSEmmanuel Vadot        - aind-supply
1370e8011faSEmmanuel Vadot    else:
1380e8011faSEmmanuel Vadot      properties:
1390e8011faSEmmanuel Vadot        ainc-supply: false
1400e8011faSEmmanuel Vadot        aind-supply: false
1410e8011faSEmmanuel Vadot
142*b2d2a78aSEmmanuel Vadot  # ad7380-4 uses refin-supply as external reference.
143*b2d2a78aSEmmanuel Vadot  # All other chips from ad738x family use refio as optional external reference.
144*b2d2a78aSEmmanuel Vadot  # When refio-supply is omitted, internal reference is used.
145*b2d2a78aSEmmanuel Vadot  - if:
146*b2d2a78aSEmmanuel Vadot      properties:
147*b2d2a78aSEmmanuel Vadot        compatible:
148*b2d2a78aSEmmanuel Vadot          enum:
149*b2d2a78aSEmmanuel Vadot            - adi,ad7380-4
150*b2d2a78aSEmmanuel Vadot    then:
151*b2d2a78aSEmmanuel Vadot      properties:
152*b2d2a78aSEmmanuel Vadot        refio-supply: false
153*b2d2a78aSEmmanuel Vadot      required:
154*b2d2a78aSEmmanuel Vadot        - refin-supply
155*b2d2a78aSEmmanuel Vadot    else:
156*b2d2a78aSEmmanuel Vadot      properties:
157*b2d2a78aSEmmanuel Vadot        refin-supply: false
158*b2d2a78aSEmmanuel Vadot
1590e8011faSEmmanuel Vadotexamples:
1600e8011faSEmmanuel Vadot  - |
1610e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1620e8011faSEmmanuel Vadot
1630e8011faSEmmanuel Vadot    spi {
1640e8011faSEmmanuel Vadot        #address-cells = <1>;
1650e8011faSEmmanuel Vadot        #size-cells = <0>;
1660e8011faSEmmanuel Vadot
1670e8011faSEmmanuel Vadot        adc@0 {
1680e8011faSEmmanuel Vadot            compatible = "adi,ad7380";
1690e8011faSEmmanuel Vadot            reg = <0>;
1700e8011faSEmmanuel Vadot
1710e8011faSEmmanuel Vadot            spi-cpol;
1720e8011faSEmmanuel Vadot            spi-cpha;
1730e8011faSEmmanuel Vadot            spi-max-frequency = <80000000>;
1740e8011faSEmmanuel Vadot
1750e8011faSEmmanuel Vadot            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
1760e8011faSEmmanuel Vadot            interrupt-parent = <&gpio0>;
1770e8011faSEmmanuel Vadot
1780e8011faSEmmanuel Vadot            vcc-supply = <&supply_3_3V>;
1790e8011faSEmmanuel Vadot            vlogic-supply = <&supply_3_3V>;
1800e8011faSEmmanuel Vadot            refio-supply = <&supply_2_5V>;
1810e8011faSEmmanuel Vadot        };
1820e8011faSEmmanuel Vadot    };
183