xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1dd29b129SJonathan Cameron# SPDX-License-Identifier: GPL-2.0
2dd29b129SJonathan Cameron%YAML 1.2
3dd29b129SJonathan Cameron---
4dd29b129SJonathan Cameron$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
5dd29b129SJonathan Cameron$schema: http://devicetree.org/meta-schemas/core.yaml#
6dd29b129SJonathan Cameron
7dd29b129SJonathan Camerontitle: Analog Devices AD7768-1 ADC device driver
8dd29b129SJonathan Cameron
9dd29b129SJonathan Cameronmaintainers:
10dd29b129SJonathan Cameron  - Michael Hennerich <michael.hennerich@analog.com>
11dd29b129SJonathan Cameron
12dd29b129SJonathan Camerondescription: |
13dd29b129SJonathan Cameron  Datasheet at:
14dd29b129SJonathan Cameron    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
15dd29b129SJonathan Cameron
16dd29b129SJonathan Cameronproperties:
17dd29b129SJonathan Cameron  compatible:
18dd29b129SJonathan Cameron    const: adi,ad7768-1
19dd29b129SJonathan Cameron
20dd29b129SJonathan Cameron  reg:
21dd29b129SJonathan Cameron    maxItems: 1
22dd29b129SJonathan Cameron
23dd29b129SJonathan Cameron  clocks:
24dd29b129SJonathan Cameron    maxItems: 1
25dd29b129SJonathan Cameron
26dd29b129SJonathan Cameron  clock-names:
27dd29b129SJonathan Cameron    const: mclk
28dd29b129SJonathan Cameron
29dd29b129SJonathan Cameron  interrupts:
30dd29b129SJonathan Cameron    maxItems: 1
31dd29b129SJonathan Cameron
327d4156ddSCristian Pop  '#address-cells':
337d4156ddSCristian Pop    const: 1
347d4156ddSCristian Pop
357d4156ddSCristian Pop  '#size-cells':
367d4156ddSCristian Pop    const: 0
377d4156ddSCristian Pop
38dd29b129SJonathan Cameron  vref-supply:
39dd29b129SJonathan Cameron    description:
40dd29b129SJonathan Cameron      ADC reference voltage supply
41dd29b129SJonathan Cameron
42dd29b129SJonathan Cameron  adi,sync-in-gpios:
430499220dSRob Herring    maxItems: 1
44dd29b129SJonathan Cameron    description:
45dd29b129SJonathan Cameron      Enables synchronization of multiple devices that require simultaneous
46dd29b129SJonathan Cameron      sampling. A pulse is always required if the configuration is changed
47dd29b129SJonathan Cameron      in any way, for example if the filter decimation rate changes.
48dd29b129SJonathan Cameron      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
49dd29b129SJonathan Cameron
50dd29b129SJonathan Cameron  reset-gpios:
51dd29b129SJonathan Cameron    maxItems: 1
52dd29b129SJonathan Cameron
53dd29b129SJonathan Cameron  spi-cpol: true
546ad8838dSRob Herring
55dd29b129SJonathan Cameron  spi-cpha: true
56dd29b129SJonathan Cameron
57dd29b129SJonathan Cameron  "#io-channel-cells":
58dd29b129SJonathan Cameron    const: 1
59dd29b129SJonathan Cameron
60dd29b129SJonathan Cameronrequired:
61dd29b129SJonathan Cameron  - compatible
62dd29b129SJonathan Cameron  - reg
63dd29b129SJonathan Cameron  - clocks
64dd29b129SJonathan Cameron  - clock-names
65dd29b129SJonathan Cameron  - vref-supply
66dd29b129SJonathan Cameron  - spi-cpol
67dd29b129SJonathan Cameron  - spi-cpha
68dd29b129SJonathan Cameron  - adi,sync-in-gpios
69dd29b129SJonathan Cameron
707d4156ddSCristian PoppatternProperties:
717d4156ddSCristian Pop  "^channel@([0-9]|1[0-5])$":
727d4156ddSCristian Pop    type: object
737d4156ddSCristian Pop    description: |
747d4156ddSCristian Pop      Represents the external channels which are connected to the device.
757d4156ddSCristian Pop
767d4156ddSCristian Pop    properties:
777d4156ddSCristian Pop      reg:
780499220dSRob Herring        maxItems: 1
797d4156ddSCristian Pop        description: |
807d4156ddSCristian Pop          The channel number.
817d4156ddSCristian Pop
827d4156ddSCristian Pop      label:
837d4156ddSCristian Pop        description: |
847d4156ddSCristian Pop          Unique name to identify which channel this is.
857d4156ddSCristian Pop    required:
867d4156ddSCristian Pop      - reg
877d4156ddSCristian Pop    additionalProperties: false
887d4156ddSCristian Pop
89*80137388SKrzysztof KozlowskiallOf:
90*80137388SKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
91*80137388SKrzysztof Kozlowski
92*80137388SKrzysztof KozlowskiunevaluatedProperties: false
93dd29b129SJonathan Cameron
94dd29b129SJonathan Cameronexamples:
95dd29b129SJonathan Cameron  - |
96dd29b129SJonathan Cameron    #include <dt-bindings/interrupt-controller/irq.h>
97dd29b129SJonathan Cameron    #include <dt-bindings/gpio/gpio.h>
98dd29b129SJonathan Cameron    spi {
99dd29b129SJonathan Cameron        #address-cells = <1>;
100dd29b129SJonathan Cameron        #size-cells = <0>;
101dd29b129SJonathan Cameron
102dd29b129SJonathan Cameron        adc@0 {
103dd29b129SJonathan Cameron            compatible = "adi,ad7768-1";
104dd29b129SJonathan Cameron            reg = <0>;
105dd29b129SJonathan Cameron            spi-max-frequency = <2000000>;
106dd29b129SJonathan Cameron            spi-cpol;
107dd29b129SJonathan Cameron            spi-cpha;
108dd29b129SJonathan Cameron            vref-supply = <&adc_vref>;
109dd29b129SJonathan Cameron            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
110dd29b129SJonathan Cameron            interrupt-parent = <&gpio>;
111dd29b129SJonathan Cameron            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
112dd29b129SJonathan Cameron            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
113dd29b129SJonathan Cameron            clocks = <&ad7768_mclk>;
114dd29b129SJonathan Cameron            clock-names = "mclk";
1157d4156ddSCristian Pop
1167d4156ddSCristian Pop            #address-cells = <1>;
1177d4156ddSCristian Pop            #size-cells = <0>;
1187d4156ddSCristian Pop
1197d4156ddSCristian Pop            channel@0 {
1207d4156ddSCristian Pop                reg = <0>;
1217d4156ddSCristian Pop                label = "channel_0";
1227d4156ddSCristian Pop            };
123dd29b129SJonathan Cameron        };
124dd29b129SJonathan Cameron    };
125dd29b129SJonathan Cameron...
126