Analog Devices AD7192 ADC device driver

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/adi,ad7192.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Michael Hennerich <michael.hennerich@analog.com>"

Bindings for the Analog Devices AD7192 ADC device. Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "adi,ad7190", "adi,ad7192", "adi,ad7193", "adi,ad7194", "adi,ad7195"

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

reg — required here #

Maximum number of items (maxItems): 1

spi-cpol — required here #

true — No constraints added by this property rule.

spi-cpha — required here #

true — No constraints added by this property rule.

clocks — not listed as required here #

Maximum number of items (maxItems): 1

Optionally, either a crystal can be attached externally between MCLK1 and MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 pin. If absent, internal 4.92MHz clock is used, which can be made available on MCLK2 pin.

clock-names — not listed as required here #

Allowed values (enum): "xtal", "mclk"

#clock-cells — not listed as required here #

Exact value (const): 0

If present when internal clock is used, configured as clock provider.

interrupts — required here #

Maximum number of items (maxItems): 1

aincom-supply — not listed as required here #

AINCOM voltage supply. Analog inputs AINx are referenced to this input when configured for pseudo-differential operation.

dvdd-supply — required here #

DVdd voltage supply

avdd-supply — required here #

AVdd voltage supply

vref-supply — required here #

VRef voltage supply

adi,rejection-60-Hz-enable — not listed as required here #

This bit enables a notch at 60 Hz when the first notch of the sinc filter is at 50 Hz. When REJ60 is set, a filter notch is placed at 60 Hz when the sinc filter first notch is at 50 Hz. This allows simultaneous 50 Hz/ 60 Hz rejection.

Value type (type): "boolean"

adi,refin2-pins-enable — not listed as required here #

External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins.

Value type (type): "boolean"

adi,buffer-enable — not listed as required here #

Enables the buffer on the analog inputs. If cleared, the analog inputs are unbuffered, lowering the power consumption of the device. If this bit is set, the analog inputs are buffered, allowing the user to place source impedances on the front end without contributing gain errors to the system.

Value type (type): "boolean"

adi,burnout-currents-enable — not listed as required here #

When this bit is set to 1, the 500 nA current sources in the signal path are enabled. When BURN = 0, the burnout currents are disabled. The burnout currents can be enabled only when the buffer is active and when chop is disabled.

Value type (type): "boolean"

bipolar — not listed as required here #

see Documentation/devicetree/bindings/iio/adc/adc.yaml

Value type (type): "boolean"

rdy-gpios — not listed as required here #

GPIO reading the R̅D̅Y̅ line. Having such a GPIO is technically optional but highly recommended because DOUT/R̅D̅Y̅ toggles during SPI transfers (in its DOUT aka MISO role) and so usually triggers a spurious interrupt. The distinction between such a spurious event and a real one can only be done by reading such a GPIO. (There is a register telling the same information, but accessing that one needs a SPI transfer which then triggers another interrupt event.)

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^channel@[0-9a-f]+$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): adc.yaml

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — not listed as required here

The channel index.

Minimum value (minimum): 0

Maximum value (maximum): 271

diff-channels — not listed as required here

Both inputs can be connected to pins AIN1 to AIN16 by choosing the appropriate value from 1 to 16.

Array item rules (items)

Minimum value (minimum): 1

Maximum value (maximum): 16

single-channel — not listed as required here

Positive input can be connected to pins AIN1 to AIN16 by choosing the appropriate value from 1 to 16. Negative input is connected to AINCOM.

Minimum value (minimum): 1

Maximum value (maximum): 16

Exactly one of these rules must match (oneOf) #

Rule 1

Required in this object (required): "reg", "diff-channels"

Rule 2

Required in this object (required): "reg", "single-channel"

Required in this object (required): "compatible", "reg", "interrupts", "dvdd-supply", "avdd-supply", "vref-supply", "spi-cpol", "spi-cpha"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/spi/spi-peripheral-props.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "adi,ad7190", "adi,ad7192", "adi,ad7193", "adi,ad7195"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^channel@[0-9a-f]+$ — name matches this regular expression

false — Not permitted by this property rule.

Rule 3 #

Condition (if) #

At least one of these rules must match (anyOf)

Rule 1

Required in this object (required): "clocks"

Rule 2

Required in this object (required): "clock-names"

When the condition matches (then) #

Properties and child nodes (properties)

#clock-cells — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "clocks", "clock-names"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
spi {
    #address-cells = <1>;
    #size-cells = <0>;

    adc@0 {
        compatible = "adi,ad7192";
        reg = <0>;
        spi-max-frequency = <1000000>;
        spi-cpol;
        spi-cpha;
        clocks = <&ad7192_mclk>;
        clock-names = "mclk";
        interrupts = <25 0x2>;
        interrupt-parent = <&gpio>;
        rdy-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
        aincom-supply = <&aincom>;
        dvdd-supply = <&dvdd>;
        avdd-supply = <&avdd>;
        vref-supply = <&vref>;

        adi,refin2-pins-enable;
        adi,rejection-60-Hz-enable;
        adi,buffer-enable;
        adi,burnout-currents-enable;
    };
};
#include <dt-bindings/gpio/gpio.h>
spi {
    #address-cells = <1>;
    #size-cells = <0>;

    adc@0 {
        compatible = "adi,ad7194";
        reg = <0>;

        #address-cells = <1>;
        #size-cells = <0>;

        spi-max-frequency = <1000000>;
        spi-cpol;
        spi-cpha;
        #clock-cells = <0>;
        interrupts = <25 0x2>;
        interrupt-parent = <&gpio>;
        rdy-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
        aincom-supply = <&aincom>;
        dvdd-supply = <&dvdd>;
        avdd-supply = <&avdd>;
        vref-supply = <&vref>;

        channel@0 {
            reg = <0>;
            diff-channels = <1 6>;
        };

        channel@1 {
            reg = <1>;
            single-channel = <1>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Line 2: Copyright 2019 Analog Devices Inc.

Edit this page