xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml (revision 32cfb3c48e24511ccf9f76d8a2e04a30397af438)
1c4ea781cSDavid Lechner# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c4ea781cSDavid Lechner%YAML 1.2
3c4ea781cSDavid Lechner---
4c4ea781cSDavid Lechner$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml#
5c4ea781cSDavid Lechner$schema: http://devicetree.org/meta-schemas/core.yaml#
6c4ea781cSDavid Lechner
7c4ea781cSDavid Lechnertitle: Analog Devices Simultaneous Sampling Analog to Digital Converters
8c4ea781cSDavid Lechner
9c4ea781cSDavid Lechnermaintainers:
10c4ea781cSDavid Lechner  - Michael Hennerich <Michael.Hennerich@analog.com>
11c4ea781cSDavid Lechner  - Nuno Sá <nuno.sa@analog.com>
12c4ea781cSDavid Lechner
13c4ea781cSDavid Lechnerdescription: |
14c4ea781cSDavid Lechner  * https://www.analog.com/en/products/ad7380.html
15c4ea781cSDavid Lechner  * https://www.analog.com/en/products/ad7381.html
166b2c8019SDavid Lechner  * https://www.analog.com/en/products/ad7383.html
176b2c8019SDavid Lechner  * https://www.analog.com/en/products/ad7384.html
182043594dSJulien Stephan  * https://www.analog.com/en/products/ad7386.html
192043594dSJulien Stephan  * https://www.analog.com/en/products/ad7387.html
202043594dSJulien Stephan  * https://www.analog.com/en/products/ad7388.html
211a291cc8SJulien Stephan  * https://www.analog.com/en/products/ad7380-4.html
221a291cc8SJulien Stephan  * https://www.analog.com/en/products/ad7381-4.html
231a291cc8SJulien Stephan  * https://www.analog.com/en/products/ad7383-4.html
241a291cc8SJulien Stephan  * https://www.analog.com/en/products/ad7384-4.html
252043594dSJulien Stephan  * https://www.analog.com/en/products/ad7386-4.html
262043594dSJulien Stephan  * https://www.analog.com/en/products/ad7387-4.html
272043594dSJulien Stephan  * https://www.analog.com/en/products/ad7388-4.html
282043594dSJulien Stephan
29c4ea781cSDavid Lechner
30c4ea781cSDavid Lechner$ref: /schemas/spi/spi-peripheral-props.yaml#
31c4ea781cSDavid Lechner
32c4ea781cSDavid Lechnerproperties:
33c4ea781cSDavid Lechner  compatible:
34c4ea781cSDavid Lechner    enum:
35c4ea781cSDavid Lechner      - adi,ad7380
36c4ea781cSDavid Lechner      - adi,ad7381
376b2c8019SDavid Lechner      - adi,ad7383
386b2c8019SDavid Lechner      - adi,ad7384
392043594dSJulien Stephan      - adi,ad7386
402043594dSJulien Stephan      - adi,ad7387
412043594dSJulien Stephan      - adi,ad7388
421a291cc8SJulien Stephan      - adi,ad7380-4
431a291cc8SJulien Stephan      - adi,ad7381-4
441a291cc8SJulien Stephan      - adi,ad7383-4
451a291cc8SJulien Stephan      - adi,ad7384-4
462043594dSJulien Stephan      - adi,ad7386-4
472043594dSJulien Stephan      - adi,ad7387-4
482043594dSJulien Stephan      - adi,ad7388-4
49c4ea781cSDavid Lechner
50c4ea781cSDavid Lechner  reg:
51c4ea781cSDavid Lechner    maxItems: 1
52c4ea781cSDavid Lechner
53c4ea781cSDavid Lechner  spi-max-frequency:
54c4ea781cSDavid Lechner    maximum: 80000000
55c4ea781cSDavid Lechner  spi-cpol: true
56c4ea781cSDavid Lechner  spi-cpha: true
57c4ea781cSDavid Lechner
58c4ea781cSDavid Lechner  vcc-supply:
59c4ea781cSDavid Lechner    description: A 3V to 3.6V supply that powers the chip.
60c4ea781cSDavid Lechner
61c4ea781cSDavid Lechner  vlogic-supply:
62c4ea781cSDavid Lechner    description:
63c4ea781cSDavid Lechner      A 1.65V to 3.6V supply for the logic pins.
64c4ea781cSDavid Lechner
65c4ea781cSDavid Lechner  refio-supply:
66c4ea781cSDavid Lechner    description:
67c4ea781cSDavid Lechner      A 2.5V to 3.3V supply for the external reference voltage. When omitted,
68c4ea781cSDavid Lechner      the internal 2.5V reference is used.
69c4ea781cSDavid Lechner
70*fbe5956eSJulien Stephan  refin-supply:
71*fbe5956eSJulien Stephan    description:
72*fbe5956eSJulien Stephan      A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
73*fbe5956eSJulien Stephan
746b2c8019SDavid Lechner  aina-supply:
756b2c8019SDavid Lechner    description:
766b2c8019SDavid Lechner      The common mode voltage supply for the AINA- pin on pseudo-differential
776b2c8019SDavid Lechner      chips.
786b2c8019SDavid Lechner
796b2c8019SDavid Lechner  ainb-supply:
806b2c8019SDavid Lechner    description:
816b2c8019SDavid Lechner      The common mode voltage supply for the AINB- pin on pseudo-differential
826b2c8019SDavid Lechner      chips.
836b2c8019SDavid Lechner
841a291cc8SJulien Stephan  ainc-supply:
851a291cc8SJulien Stephan    description:
861a291cc8SJulien Stephan      The common mode voltage supply for the AINC- pin on pseudo-differential
871a291cc8SJulien Stephan      chips.
881a291cc8SJulien Stephan
891a291cc8SJulien Stephan  aind-supply:
901a291cc8SJulien Stephan    description:
911a291cc8SJulien Stephan      The common mode voltage supply for the AIND- pin on pseudo-differential
921a291cc8SJulien Stephan      chips.
931a291cc8SJulien Stephan
94c4ea781cSDavid Lechner  interrupts:
95c4ea781cSDavid Lechner    description:
96c4ea781cSDavid Lechner      When the device is using 1-wire mode, this property is used to optionally
97c4ea781cSDavid Lechner      specify the ALERT interrupt.
98c4ea781cSDavid Lechner    maxItems: 1
99c4ea781cSDavid Lechner
100c4ea781cSDavid Lechnerrequired:
101c4ea781cSDavid Lechner  - compatible
102c4ea781cSDavid Lechner  - reg
103c4ea781cSDavid Lechner  - vcc-supply
104c4ea781cSDavid Lechner  - vlogic-supply
105c4ea781cSDavid Lechner
106c4ea781cSDavid LechnerunevaluatedProperties: false
107c4ea781cSDavid Lechner
1086b2c8019SDavid LechnerallOf:
1096b2c8019SDavid Lechner  # pseudo-differential chips require common mode voltage supplies,
1106b2c8019SDavid Lechner  # true differential chips don't use them
1116b2c8019SDavid Lechner  - if:
1126b2c8019SDavid Lechner      properties:
1136b2c8019SDavid Lechner        compatible:
1146b2c8019SDavid Lechner          enum:
1156b2c8019SDavid Lechner            - adi,ad7383
1166b2c8019SDavid Lechner            - adi,ad7384
1171a291cc8SJulien Stephan            - adi,ad7383-4
1181a291cc8SJulien Stephan            - adi,ad7384-4
1196b2c8019SDavid Lechner    then:
1206b2c8019SDavid Lechner      required:
1216b2c8019SDavid Lechner        - aina-supply
1226b2c8019SDavid Lechner        - ainb-supply
1236b2c8019SDavid Lechner    else:
1246b2c8019SDavid Lechner      properties:
1256b2c8019SDavid Lechner        aina-supply: false
1266b2c8019SDavid Lechner        ainb-supply: false
1271a291cc8SJulien Stephan  - if:
1281a291cc8SJulien Stephan      properties:
1291a291cc8SJulien Stephan        compatible:
1301a291cc8SJulien Stephan          enum:
1311a291cc8SJulien Stephan            - adi,ad7383-4
1321a291cc8SJulien Stephan            - adi,ad7384-4
1331a291cc8SJulien Stephan    then:
1341a291cc8SJulien Stephan      required:
1351a291cc8SJulien Stephan        - ainc-supply
1361a291cc8SJulien Stephan        - aind-supply
1371a291cc8SJulien Stephan    else:
1381a291cc8SJulien Stephan      properties:
1391a291cc8SJulien Stephan        ainc-supply: false
1401a291cc8SJulien Stephan        aind-supply: false
1416b2c8019SDavid Lechner
142*fbe5956eSJulien Stephan  # ad7380-4 uses refin-supply as external reference.
143*fbe5956eSJulien Stephan  # All other chips from ad738x family use refio as optional external reference.
144*fbe5956eSJulien Stephan  # When refio-supply is omitted, internal reference is used.
145*fbe5956eSJulien Stephan  - if:
146*fbe5956eSJulien Stephan      properties:
147*fbe5956eSJulien Stephan        compatible:
148*fbe5956eSJulien Stephan          enum:
149*fbe5956eSJulien Stephan            - adi,ad7380-4
150*fbe5956eSJulien Stephan    then:
151*fbe5956eSJulien Stephan      properties:
152*fbe5956eSJulien Stephan        refio-supply: false
153*fbe5956eSJulien Stephan      required:
154*fbe5956eSJulien Stephan        - refin-supply
155*fbe5956eSJulien Stephan    else:
156*fbe5956eSJulien Stephan      properties:
157*fbe5956eSJulien Stephan        refin-supply: false
158*fbe5956eSJulien Stephan
159c4ea781cSDavid Lechnerexamples:
160c4ea781cSDavid Lechner  - |
161c4ea781cSDavid Lechner    #include <dt-bindings/interrupt-controller/irq.h>
162c4ea781cSDavid Lechner
163c4ea781cSDavid Lechner    spi {
164c4ea781cSDavid Lechner        #address-cells = <1>;
165c4ea781cSDavid Lechner        #size-cells = <0>;
166c4ea781cSDavid Lechner
167c4ea781cSDavid Lechner        adc@0 {
168c4ea781cSDavid Lechner            compatible = "adi,ad7380";
169c4ea781cSDavid Lechner            reg = <0>;
170c4ea781cSDavid Lechner
171c4ea781cSDavid Lechner            spi-cpol;
172c4ea781cSDavid Lechner            spi-cpha;
173c4ea781cSDavid Lechner            spi-max-frequency = <80000000>;
174c4ea781cSDavid Lechner
175c4ea781cSDavid Lechner            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
176c4ea781cSDavid Lechner            interrupt-parent = <&gpio0>;
177c4ea781cSDavid Lechner
178c4ea781cSDavid Lechner            vcc-supply = <&supply_3_3V>;
179c4ea781cSDavid Lechner            vlogic-supply = <&supply_3_3V>;
180c4ea781cSDavid Lechner            refio-supply = <&supply_2_5V>;
181c4ea781cSDavid Lechner        };
182c4ea781cSDavid Lechner    };
183