File Index
Files and directories
Sign in
FILE

adi,ad7768-1.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml YAML
  1# SPDX-License-Identifier: GPL-2.0
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Analog Devices AD7768-1 ADC device driver
  8
  9maintainers:
 10  - Michael Hennerich <michael.hennerich@analog.com>
 11
 12description: |
 13  Datasheet at:
 14    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
 15
 16properties:
 17  compatible:
 18    const: adi,ad7768-1
 19
 20  reg:
 21    maxItems: 1
 22
 23  clocks:
 24    maxItems: 1
 25
 26  clock-names:
 27    const: mclk
 28
 29  trigger-sources:
 30    $ref: /schemas/types.yaml#/definitions/phandle-array
 31    minItems: 1
 32    maxItems: 2
 33    description: |
 34      A list of phandles referencing trigger source providers. Each entry
 35      represents a trigger source for the ADC:
 36
 37        - First entry specifies the device responsible for driving the
 38          synchronization (SYNC_IN) pin, as an alternative to adi,sync-in-gpios.
 39          This can be a `gpio-trigger` or another `ad7768-1` device. If the
 40          device's own SYNC_OUT pin is internally connected to its SYNC_IN pin,
 41          reference the device itself or omit this property.
 42        - Second entry optionally defines a GPIO3 pin used as a START signal trigger.
 43
 44      Use the accompanying trigger source cell to identify the type of each entry.
 45
 46  interrupts:
 47    description:
 48      DRDY (Data Ready) pin, which signals conversion results are available.
 49    maxItems: 1
 50
 51  '#address-cells':
 52    const: 1
 53
 54  '#size-cells':
 55    const: 0
 56
 57  vref-supply:
 58    description:
 59      ADC reference voltage supply
 60
 61  adi,sync-in-gpios:
 62    maxItems: 1
 63    description:
 64      Enables synchronization of multiple devices that require simultaneous
 65      sampling. A pulse is always required if the configuration is changed
 66      in any way, for example if the filter decimation rate changes.
 67      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
 68
 69  regulators:
 70    type: object
 71    description:
 72      list of regulators provided by this controller.
 73
 74    properties:
 75      vcm-output:
 76        $ref: /schemas/regulator/regulator.yaml#
 77        type: object
 78        unevaluatedProperties: false
 79
 80    additionalProperties: false
 81
 82  reset-gpios:
 83    maxItems: 1
 84
 85  spi-cpol: true
 86
 87  spi-cpha: true
 88
 89  "#io-channel-cells":
 90    const: 1
 91
 92  "#trigger-source-cells":
 93    description: |
 94      Cell indicates the trigger output signal: 0 = SYNC_OUT, 1 = GPIO3,
 95      2 = DRDY.
 96
 97      For better readability, macros for these values are available in
 98      dt-bindings/iio/adc/adi,ad7768-1.h.
 99    const: 1
100
101  gpio-controller: true
102
103  "#gpio-cells":
104    const: 2
105    description: |
106      The first cell is for the GPIO number: 0 to 3.
107      The second cell takes standard GPIO flags.
108
109required:
110  - compatible
111  - reg
112  - clocks
113  - clock-names
114  - vref-supply
115  - spi-cpol
116  - spi-cpha
117
118dependencies:
119  adi,sync-in-gpios:
120    not:
121      required:
122        - trigger-sources
123  trigger-sources:
124    not:
125      required:
126        - adi,sync-in-gpios
127
128patternProperties:
129  "^channel@([0-9]|1[0-5])$":
130    type: object
131    description: |
132      Represents the external channels which are connected to the device.
133
134    properties:
135      reg:
136        maxItems: 1
137        description: |
138          The channel number.
139
140      label:
141        description: |
142          Unique name to identify which channel this is.
143    required:
144      - reg
145    additionalProperties: false
146
147allOf:
148  - $ref: /schemas/spi/spi-peripheral-props.yaml#
149
150unevaluatedProperties: false
151
152examples:
153  - |
154    #include <dt-bindings/interrupt-controller/irq.h>
155    #include <dt-bindings/gpio/gpio.h>
156    spi {
157        #address-cells = <1>;
158        #size-cells = <0>;
159
160        adc@0 {
161            compatible = "adi,ad7768-1";
162            reg = <0>;
163            spi-max-frequency = <2000000>;
164            spi-cpol;
165            spi-cpha;
166            gpio-controller;
167            #gpio-cells = <2>;
168            vref-supply = <&adc_vref>;
169            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
170            interrupt-parent = <&gpio>;
171            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
172            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
173            clocks = <&ad7768_mclk>;
174            clock-names = "mclk";
175
176            #address-cells = <1>;
177            #size-cells = <0>;
178
179            channel@0 {
180                reg = <0>;
181                label = "channel_0";
182            };
183
184            regulators {
185              vcm_reg: vcm-output {
186                regulator-name = "ad7768-1-vcm";
187              };
188            };
189        };
190    };
191...
~/ Read-only file preview.