16be33864SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: Analog Devices AD7768-1 ADC device driver
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Michael Hennerich <michael.hennerich@analog.com>
116be33864SEmmanuel Vadot
126be33864SEmmanuel Vadotdescription: |
136be33864SEmmanuel Vadot  Datasheet at:
146be33864SEmmanuel Vadot    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
156be33864SEmmanuel Vadot
166be33864SEmmanuel Vadotproperties:
176be33864SEmmanuel Vadot  compatible:
186be33864SEmmanuel Vadot    const: adi,ad7768-1
196be33864SEmmanuel Vadot
206be33864SEmmanuel Vadot  reg:
216be33864SEmmanuel Vadot    maxItems: 1
226be33864SEmmanuel Vadot
236be33864SEmmanuel Vadot  clocks:
246be33864SEmmanuel Vadot    maxItems: 1
256be33864SEmmanuel Vadot
266be33864SEmmanuel Vadot  clock-names:
276be33864SEmmanuel Vadot    const: mclk
286be33864SEmmanuel Vadot
296be33864SEmmanuel Vadot  interrupts:
306be33864SEmmanuel Vadot    maxItems: 1
316be33864SEmmanuel Vadot
325def4c47SEmmanuel Vadot  '#address-cells':
335def4c47SEmmanuel Vadot    const: 1
345def4c47SEmmanuel Vadot
355def4c47SEmmanuel Vadot  '#size-cells':
365def4c47SEmmanuel Vadot    const: 0
375def4c47SEmmanuel Vadot
386be33864SEmmanuel Vadot  vref-supply:
396be33864SEmmanuel Vadot    description:
406be33864SEmmanuel Vadot      ADC reference voltage supply
416be33864SEmmanuel Vadot
426be33864SEmmanuel Vadot  adi,sync-in-gpios:
435def4c47SEmmanuel Vadot    maxItems: 1
446be33864SEmmanuel Vadot    description:
456be33864SEmmanuel Vadot      Enables synchronization of multiple devices that require simultaneous
466be33864SEmmanuel Vadot      sampling. A pulse is always required if the configuration is changed
476be33864SEmmanuel Vadot      in any way, for example if the filter decimation rate changes.
486be33864SEmmanuel Vadot      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
496be33864SEmmanuel Vadot
506be33864SEmmanuel Vadot  reset-gpios:
516be33864SEmmanuel Vadot    maxItems: 1
526be33864SEmmanuel Vadot
536be33864SEmmanuel Vadot  spi-cpol: true
546be33864SEmmanuel Vadot
556be33864SEmmanuel Vadot  spi-cpha: true
566be33864SEmmanuel Vadot
576be33864SEmmanuel Vadot  "#io-channel-cells":
586be33864SEmmanuel Vadot    const: 1
596be33864SEmmanuel Vadot
606be33864SEmmanuel Vadotrequired:
616be33864SEmmanuel Vadot  - compatible
626be33864SEmmanuel Vadot  - reg
636be33864SEmmanuel Vadot  - clocks
646be33864SEmmanuel Vadot  - clock-names
656be33864SEmmanuel Vadot  - vref-supply
666be33864SEmmanuel Vadot  - spi-cpol
676be33864SEmmanuel Vadot  - spi-cpha
686be33864SEmmanuel Vadot  - adi,sync-in-gpios
696be33864SEmmanuel Vadot
705def4c47SEmmanuel VadotpatternProperties:
715def4c47SEmmanuel Vadot  "^channel@([0-9]|1[0-5])$":
725def4c47SEmmanuel Vadot    type: object
735def4c47SEmmanuel Vadot    description: |
745def4c47SEmmanuel Vadot      Represents the external channels which are connected to the device.
755def4c47SEmmanuel Vadot
765def4c47SEmmanuel Vadot    properties:
775def4c47SEmmanuel Vadot      reg:
785def4c47SEmmanuel Vadot        maxItems: 1
795def4c47SEmmanuel Vadot        description: |
805def4c47SEmmanuel Vadot          The channel number.
815def4c47SEmmanuel Vadot
825def4c47SEmmanuel Vadot      label:
835def4c47SEmmanuel Vadot        description: |
845def4c47SEmmanuel Vadot          Unique name to identify which channel this is.
855def4c47SEmmanuel Vadot    required:
865def4c47SEmmanuel Vadot      - reg
875def4c47SEmmanuel Vadot    additionalProperties: false
885def4c47SEmmanuel Vadot
89*7ef62cebSEmmanuel VadotallOf:
90*7ef62cebSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
91*7ef62cebSEmmanuel Vadot
92*7ef62cebSEmmanuel VadotunevaluatedProperties: false
936be33864SEmmanuel Vadot
946be33864SEmmanuel Vadotexamples:
956be33864SEmmanuel Vadot  - |
966be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
976be33864SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
986be33864SEmmanuel Vadot    spi {
996be33864SEmmanuel Vadot        #address-cells = <1>;
1006be33864SEmmanuel Vadot        #size-cells = <0>;
1016be33864SEmmanuel Vadot
1026be33864SEmmanuel Vadot        adc@0 {
1036be33864SEmmanuel Vadot            compatible = "adi,ad7768-1";
1046be33864SEmmanuel Vadot            reg = <0>;
1056be33864SEmmanuel Vadot            spi-max-frequency = <2000000>;
1066be33864SEmmanuel Vadot            spi-cpol;
1076be33864SEmmanuel Vadot            spi-cpha;
1086be33864SEmmanuel Vadot            vref-supply = <&adc_vref>;
1096be33864SEmmanuel Vadot            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
1106be33864SEmmanuel Vadot            interrupt-parent = <&gpio>;
1116be33864SEmmanuel Vadot            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
1126be33864SEmmanuel Vadot            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
1136be33864SEmmanuel Vadot            clocks = <&ad7768_mclk>;
1146be33864SEmmanuel Vadot            clock-names = "mclk";
1155def4c47SEmmanuel Vadot
1165def4c47SEmmanuel Vadot            #address-cells = <1>;
1175def4c47SEmmanuel Vadot            #size-cells = <0>;
1185def4c47SEmmanuel Vadot
1195def4c47SEmmanuel Vadot            channel@0 {
1205def4c47SEmmanuel Vadot                reg = <0>;
1215def4c47SEmmanuel Vadot                label = "channel_0";
1225def4c47SEmmanuel Vadot            };
1236be33864SEmmanuel Vadot        };
1246be33864SEmmanuel Vadot    };
1256be33864SEmmanuel Vadot...
126