xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad4130.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
136a4df50SCosmin Tanislav# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
236a4df50SCosmin Tanislav# Copyright 2022 Analog Devices Inc.
336a4df50SCosmin Tanislav%YAML 1.2
436a4df50SCosmin Tanislav---
536a4df50SCosmin Tanislav$id: http://devicetree.org/schemas/iio/adc/adi,ad4130.yaml#
636a4df50SCosmin Tanislav$schema: http://devicetree.org/meta-schemas/core.yaml#
736a4df50SCosmin Tanislav
836a4df50SCosmin Tanislavtitle: Analog Devices AD4130 ADC device driver
936a4df50SCosmin Tanislav
1036a4df50SCosmin Tanislavmaintainers:
1136a4df50SCosmin Tanislav  - Cosmin Tanislav <cosmin.tanislav@analog.com>
1236a4df50SCosmin Tanislav
1336a4df50SCosmin Tanislavdescription: |
1436a4df50SCosmin Tanislav  Bindings for the Analog Devices AD4130 ADC. Datasheet can be found here:
1536a4df50SCosmin Tanislav    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4130-8.pdf
1636a4df50SCosmin Tanislav
1736a4df50SCosmin Tanislavproperties:
1836a4df50SCosmin Tanislav  compatible:
1936a4df50SCosmin Tanislav    enum:
2036a4df50SCosmin Tanislav      - adi,ad4130
2136a4df50SCosmin Tanislav
2236a4df50SCosmin Tanislav  reg:
2336a4df50SCosmin Tanislav    maxItems: 1
2436a4df50SCosmin Tanislav
2536a4df50SCosmin Tanislav  clocks:
2636a4df50SCosmin Tanislav    maxItems: 1
2736a4df50SCosmin Tanislav    description: phandle to the master clock (mclk)
2836a4df50SCosmin Tanislav
2936a4df50SCosmin Tanislav  clock-names:
3036a4df50SCosmin Tanislav    items:
3136a4df50SCosmin Tanislav      - const: mclk
3236a4df50SCosmin Tanislav
3336a4df50SCosmin Tanislav  interrupts:
3436a4df50SCosmin Tanislav    maxItems: 1
3536a4df50SCosmin Tanislav
3636a4df50SCosmin Tanislav  interrupt-names:
3736a4df50SCosmin Tanislav    description: |
3836a4df50SCosmin Tanislav      Specify which interrupt pin should be configured as Data Ready / FIFO
3936a4df50SCosmin Tanislav      interrupt.
4036a4df50SCosmin Tanislav      Default if not supplied is int.
4136a4df50SCosmin Tanislav    enum:
4236a4df50SCosmin Tanislav      - int
4336a4df50SCosmin Tanislav      - clk
4436a4df50SCosmin Tanislav      - p2
4536a4df50SCosmin Tanislav      - dout
4636a4df50SCosmin Tanislav
4736a4df50SCosmin Tanislav  '#address-cells':
4836a4df50SCosmin Tanislav    const: 1
4936a4df50SCosmin Tanislav
5036a4df50SCosmin Tanislav  '#size-cells':
5136a4df50SCosmin Tanislav    const: 0
5236a4df50SCosmin Tanislav
5336a4df50SCosmin Tanislav  '#clock-cells':
5436a4df50SCosmin Tanislav    const: 0
5536a4df50SCosmin Tanislav
5636a4df50SCosmin Tanislav  clock-output-names:
5736a4df50SCosmin Tanislav    maxItems: 1
5836a4df50SCosmin Tanislav
5936a4df50SCosmin Tanislav  refin1-supply:
6036a4df50SCosmin Tanislav    description: refin1 supply. Can be used as reference for conversion.
6136a4df50SCosmin Tanislav
6236a4df50SCosmin Tanislav  refin2-supply:
6336a4df50SCosmin Tanislav    description: refin2 supply. Can be used as reference for conversion.
6436a4df50SCosmin Tanislav
6536a4df50SCosmin Tanislav  avdd-supply:
6636a4df50SCosmin Tanislav    description: AVDD voltage supply. Can be used as reference for conversion.
6736a4df50SCosmin Tanislav
6836a4df50SCosmin Tanislav  iovdd-supply:
6936a4df50SCosmin Tanislav    description: IOVDD voltage supply. Used for the chip interface.
7036a4df50SCosmin Tanislav
7136a4df50SCosmin Tanislav  spi-max-frequency:
7236a4df50SCosmin Tanislav    maximum: 5000000
7336a4df50SCosmin Tanislav
7436a4df50SCosmin Tanislav  adi,ext-clk-freq-hz:
7536a4df50SCosmin Tanislav    description: Specify the frequency of the external clock.
7636a4df50SCosmin Tanislav    enum: [76800, 153600]
7736a4df50SCosmin Tanislav    default: 76800
7836a4df50SCosmin Tanislav
7936a4df50SCosmin Tanislav  adi,bipolar:
8036a4df50SCosmin Tanislav    description: Specify if the device should be used in bipolar mode.
8136a4df50SCosmin Tanislav    type: boolean
8236a4df50SCosmin Tanislav
8336a4df50SCosmin Tanislav  adi,vbias-pins:
8436a4df50SCosmin Tanislav    description: Analog inputs to apply a voltage bias of (AVDD − AVSS) / 2 to.
8536a4df50SCosmin Tanislav    $ref: /schemas/types.yaml#/definitions/uint32-array
8636a4df50SCosmin Tanislav    minItems: 1
8736a4df50SCosmin Tanislav    maxItems: 16
8836a4df50SCosmin Tanislav    items:
8936a4df50SCosmin Tanislav      minimum: 0
9036a4df50SCosmin Tanislav      maximum: 15
9136a4df50SCosmin Tanislav
9236a4df50SCosmin Tanislavrequired:
9336a4df50SCosmin Tanislav  - compatible
9436a4df50SCosmin Tanislav  - reg
9536a4df50SCosmin Tanislav  - interrupts
9636a4df50SCosmin Tanislav
9736a4df50SCosmin TanislavpatternProperties:
9836a4df50SCosmin Tanislav  "^channel@([0-9a-f])$":
9936a4df50SCosmin Tanislav    type: object
10036a4df50SCosmin Tanislav    $ref: adc.yaml
10136a4df50SCosmin Tanislav    unevaluatedProperties: false
10236a4df50SCosmin Tanislav
10336a4df50SCosmin Tanislav    properties:
10436a4df50SCosmin Tanislav      reg:
10536a4df50SCosmin Tanislav        description: The channel number.
10636a4df50SCosmin Tanislav        minimum: 0
10736a4df50SCosmin Tanislav        maximum: 15
10836a4df50SCosmin Tanislav
10936a4df50SCosmin Tanislav      diff-channels:
11036a4df50SCosmin Tanislav        description: |
11136a4df50SCosmin Tanislav          Besides the analog inputs available, internal inputs can be used.
11236a4df50SCosmin Tanislav          16: Internal temperature sensor.
11336a4df50SCosmin Tanislav          17: AVSS
11436a4df50SCosmin Tanislav          18: Internal reference
11536a4df50SCosmin Tanislav          19: DGND
11636a4df50SCosmin Tanislav          20: (AVDD − AVSS)/6+
11736a4df50SCosmin Tanislav          21: (AVDD − AVSS)/6-
11836a4df50SCosmin Tanislav          22: (IOVDD − DGND)/6+
11936a4df50SCosmin Tanislav          23: (IOVDD − DGND)/6-
12036a4df50SCosmin Tanislav          24: (ALDO − AVSS)/6+
12136a4df50SCosmin Tanislav          25: (ALDO − AVSS)/6-
12236a4df50SCosmin Tanislav          26: (DLDO − DGND)/6+
12336a4df50SCosmin Tanislav          27: (DLDO − DGND)/6-
12436a4df50SCosmin Tanislav          28: V_MV_P
12536a4df50SCosmin Tanislav          29: V_MV_M
12636a4df50SCosmin Tanislav        items:
12736a4df50SCosmin Tanislav          minimum: 0
12836a4df50SCosmin Tanislav          maximum: 29
12936a4df50SCosmin Tanislav
13036a4df50SCosmin Tanislav      adi,reference-select:
13136a4df50SCosmin Tanislav        description: |
13236a4df50SCosmin Tanislav          Select the reference source to use when converting on the
13336a4df50SCosmin Tanislav          specific channel. Valid values are:
13436a4df50SCosmin Tanislav          0: REFIN1(+)/REFIN1(−)
13536a4df50SCosmin Tanislav          1: REFIN2(+)/REFIN2(−)
13636a4df50SCosmin Tanislav          2: REFOUT/AVSS (Internal reference)
13736a4df50SCosmin Tanislav          3: AVDD/AVSS
13836a4df50SCosmin Tanislav          If not specified, REFIN1 is used.
13936a4df50SCosmin Tanislav        $ref: /schemas/types.yaml#/definitions/uint32
14036a4df50SCosmin Tanislav        enum: [0, 1, 2, 3]
14136a4df50SCosmin Tanislav        default: 0
14236a4df50SCosmin Tanislav
14336a4df50SCosmin Tanislav      adi,excitation-pin-0:
14436a4df50SCosmin Tanislav        description: |
14536a4df50SCosmin Tanislav          Analog input to apply excitation current to while the channel
14636a4df50SCosmin Tanislav          is active.
14736a4df50SCosmin Tanislav        $ref: /schemas/types.yaml#/definitions/uint32
14836a4df50SCosmin Tanislav        minimum: 0
14936a4df50SCosmin Tanislav        maximum: 15
15036a4df50SCosmin Tanislav        default: 0
15136a4df50SCosmin Tanislav
15236a4df50SCosmin Tanislav      adi,excitation-pin-1:
15336a4df50SCosmin Tanislav        description: |
15436a4df50SCosmin Tanislav          Analog input to apply excitation current to while this channel
15536a4df50SCosmin Tanislav          is active.
15636a4df50SCosmin Tanislav        $ref: /schemas/types.yaml#/definitions/uint32
15736a4df50SCosmin Tanislav        minimum: 0
15836a4df50SCosmin Tanislav        maximum: 15
15936a4df50SCosmin Tanislav        default: 0
16036a4df50SCosmin Tanislav
16136a4df50SCosmin Tanislav      adi,excitation-current-0-nanoamp:
16236a4df50SCosmin Tanislav        description: |
16336a4df50SCosmin Tanislav          Excitation current in nanoamps to be applied to pin specified in
16436a4df50SCosmin Tanislav          adi,excitation-pin-0 while this channel is active.
16536a4df50SCosmin Tanislav        enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]
16636a4df50SCosmin Tanislav        default: 0
16736a4df50SCosmin Tanislav
16836a4df50SCosmin Tanislav      adi,excitation-current-1-nanoamp:
16936a4df50SCosmin Tanislav        description: |
17036a4df50SCosmin Tanislav          Excitation current in nanoamps to be applied to pin specified in
17136a4df50SCosmin Tanislav          adi,excitation-pin-1 while this channel is active.
17236a4df50SCosmin Tanislav        enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]
17336a4df50SCosmin Tanislav        default: 0
17436a4df50SCosmin Tanislav
17536a4df50SCosmin Tanislav      adi,burnout-current-nanoamp:
17636a4df50SCosmin Tanislav        description: |
17736a4df50SCosmin Tanislav          Burnout current in nanoamps to be applied for this channel.
17836a4df50SCosmin Tanislav        enum: [0, 500, 2000, 4000]
17936a4df50SCosmin Tanislav        default: 0
18036a4df50SCosmin Tanislav
18136a4df50SCosmin Tanislav      adi,buffered-positive:
18236a4df50SCosmin Tanislav        description: Enable buffered mode for positive input.
18336a4df50SCosmin Tanislav        type: boolean
18436a4df50SCosmin Tanislav
18536a4df50SCosmin Tanislav      adi,buffered-negative:
18636a4df50SCosmin Tanislav        description: Enable buffered mode for negative input.
18736a4df50SCosmin Tanislav        type: boolean
18836a4df50SCosmin Tanislav
18936a4df50SCosmin Tanislav    required:
19036a4df50SCosmin Tanislav      - reg
19136a4df50SCosmin Tanislav      - diff-channels
19236a4df50SCosmin Tanislav
193*e0736b1bSCosmin TanislavallOf:
194*e0736b1bSCosmin Tanislav  - $ref: /schemas/spi/spi-peripheral-props.yaml#
195*e0736b1bSCosmin Tanislav
196*e0736b1bSCosmin TanislavunevaluatedProperties: false
19736a4df50SCosmin Tanislav
19836a4df50SCosmin Tanislavexamples:
19936a4df50SCosmin Tanislav  - |
20036a4df50SCosmin Tanislav    #include <dt-bindings/interrupt-controller/irq.h>
20136a4df50SCosmin Tanislav
20236a4df50SCosmin Tanislav    spi {
20336a4df50SCosmin Tanislav      #address-cells = <1>;
20436a4df50SCosmin Tanislav      #size-cells = <0>;
20536a4df50SCosmin Tanislav
20636a4df50SCosmin Tanislav      adc@0 {
20736a4df50SCosmin Tanislav        compatible = "adi,ad4130";
20836a4df50SCosmin Tanislav        reg = <0>;
20936a4df50SCosmin Tanislav
21036a4df50SCosmin Tanislav        #address-cells = <1>;
21136a4df50SCosmin Tanislav        #size-cells = <0>;
21236a4df50SCosmin Tanislav
21336a4df50SCosmin Tanislav        spi-max-frequency = <5000000>;
21436a4df50SCosmin Tanislav        interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
21536a4df50SCosmin Tanislav        interrupt-parent = <&gpio>;
21636a4df50SCosmin Tanislav
21736a4df50SCosmin Tanislav        channel@0 {
21836a4df50SCosmin Tanislav          reg = <0>;
21936a4df50SCosmin Tanislav
22036a4df50SCosmin Tanislav          adi,reference-select = <2>;
22136a4df50SCosmin Tanislav
22236a4df50SCosmin Tanislav          /* AIN8, AIN9 */
22336a4df50SCosmin Tanislav          diff-channels = <8 9>;
22436a4df50SCosmin Tanislav        };
22536a4df50SCosmin Tanislav
22636a4df50SCosmin Tanislav        channel@1 {
22736a4df50SCosmin Tanislav          reg = <1>;
22836a4df50SCosmin Tanislav
22936a4df50SCosmin Tanislav          adi,reference-select = <2>;
23036a4df50SCosmin Tanislav
23136a4df50SCosmin Tanislav          /* AIN10, AIN11 */
23236a4df50SCosmin Tanislav          diff-channels = <10 11>;
23336a4df50SCosmin Tanislav        };
23436a4df50SCosmin Tanislav
23536a4df50SCosmin Tanislav        channel@2 {
23636a4df50SCosmin Tanislav          reg = <2>;
23736a4df50SCosmin Tanislav
23836a4df50SCosmin Tanislav          adi,reference-select = <2>;
23936a4df50SCosmin Tanislav
24036a4df50SCosmin Tanislav          /* Temperature Sensor, DGND */
24136a4df50SCosmin Tanislav          diff-channels = <16 19>;
24236a4df50SCosmin Tanislav        };
24336a4df50SCosmin Tanislav
24436a4df50SCosmin Tanislav        channel@3 {
24536a4df50SCosmin Tanislav          reg = <3>;
24636a4df50SCosmin Tanislav
24736a4df50SCosmin Tanislav          adi,reference-select = <2>;
24836a4df50SCosmin Tanislav
24936a4df50SCosmin Tanislav          /* Internal reference, DGND */
25036a4df50SCosmin Tanislav          diff-channels = <18 19>;
25136a4df50SCosmin Tanislav        };
25236a4df50SCosmin Tanislav
25336a4df50SCosmin Tanislav        channel@4 {
25436a4df50SCosmin Tanislav          reg = <4>;
25536a4df50SCosmin Tanislav
25636a4df50SCosmin Tanislav          adi,reference-select = <2>;
25736a4df50SCosmin Tanislav
25836a4df50SCosmin Tanislav          /* DGND, DGND */
25936a4df50SCosmin Tanislav          diff-channels = <19 19>;
26036a4df50SCosmin Tanislav        };
26136a4df50SCosmin Tanislav      };
26236a4df50SCosmin Tanislav    };
263