Analog Devices AD2552R DAC device driver

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

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

Maintainers (maintainers): "Nuno Sá <nuno.sa@analog.com>"

Bindings for the Analog Devices AD3552R DAC device and similar.
Datasheet can be found here:
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad3541r.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "adi,ad3541r", "adi,ad3542r", "adi,ad3551r", "adi,ad3552r"

reg — required here #

Maximum number of items (maxItems): 1

spi-max-frequency — required here #

Maximum value (maximum): 66000000

reset-gpios — not listed as required here #

Maximum number of items (maxItems): 1

ldac-gpios — not listed as required here #

LDAC pin to be used as a hardware trigger to update the DAC channels.

Maximum number of items (maxItems): 1

vref-supply — not listed as required here #

The regulator to use as an external reference. If it does not exists the internal reference will be used. External reference must be 2.5V

adi,vref-out-en — not listed as required here #

Vref I/O driven by internal vref to 2.5V. If not set, Vref pin will be floating.

Value type (type): "boolean"

adi,sdo-drive-strength — not listed as required here #

Configure SDIO0 and SDIO1 strength levels:
  - 0: low SDO drive strength.
  - 1: medium low SDO drive strength.
  - 2: medium high SDO drive strength.
  - 3: high SDO drive strength

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1, 2, 3

io-backends — not listed as required here #

The iio backend reference. Device can be optionally connected to the "axi-ad3552r IP" fpga-based QSPI + DDR (Double Data Rate) controller to reach high speed transfers.

Maximum number of items (maxItems): 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^channel@([0-1])$ — name matches this regular expression #

Value type (type): "object"

Configurations of the DAC Channels

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Channel number

Allowed values (enum): 0, 1

adi,output-range-microvolt — not listed as required here

true — No constraints added by this property rule.

custom-output-range-config — not listed as required here

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Configuration of custom range when adi,output-range-microvolt is not present. The formulas for calculation the output voltages are Vout_fs = 2.5 + [(GainN + Offset/1024) * 2.5 * Rfbx * 1.03] Vout_zs = 2.5 - [(GainP + Offset/1024) * 2.5 * Rfbx * 1.03]

Properties and child nodes (properties)

adi,gain-offset — required here

Gain offset used in the above formula

Shared schema rule ($ref): /schemas/types.yaml#/definitions/int32

Maximum value (maximum): 511

Minimum value (minimum): -511

adi,gain-scaling-p — required here

GainP = 1 / ( 2 ^ adi,gain-scaling-p)

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1, 2, 3

adi,gain-scaling-n — required here

GainN = 1 / ( 2 ^ adi,gain-scaling-n)

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1, 2, 3

adi,rfb-ohms — required here

Feedback Resistor

Required in this object (required): "adi,gain-offset", "adi,gain-scaling-p", "adi,gain-scaling-n", "adi,rfb-ohms"

Required in this object (required): "reg"

Exactly one of these rules must match (oneOf) #

Rule 1

Required in this object (required): "adi,output-range-microvolt"

Rule 2

Required in this object (required): "custom-output-range-config"

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

Rule for matching array elements (contains)

Allowed values (enum): "adi,ad3541r", "adi,ad3542r"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^channel@([0-1])$ — name matches this regular expression

Value type (type): "object"

Properties and child nodes (properties)

adi,output-range-microvolt — required here

Voltage output range of the channel as <minimum, maximum>
Required connections:
  Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V;
  Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V;

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): 0

Item 2

Allowed values (enum): 2500000, 3000000, 5000000, 10000000

Rule 2

Array item rules (items)

Item 1

Exact value (const): -2500000

Item 2

Exact value (const): 7500000

Rule 3

Array item rules (items)

Item 1

Exact value (const): -5000000

Item 2

Exact value (const): 5000000

Required in this object (required): "adi,output-range-microvolt"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "adi,ad3551r", "adi,ad3552r"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^channel@([0-1])$ — name matches this regular expression

Value type (type): "object"

Properties and child nodes (properties)

adi,output-range-microvolt — not listed as required here

Voltage output range of the channel as <minimum, maximum>
Required connections:
  Rfb1x for: 0 to 2.5 V; 0 to 5 V;
  Rfb2x for: 0 to 10 V; -5 to 5 V;
  Rfb4x for: -10 to 10V

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): 0

Item 2

Allowed values (enum): 2500000, 5000000, 10000000

Rule 2

Array item rules (items)

Item 1

Exact value (const): -5000000

Item 2

Exact value (const): 5000000

Rule 3

Array item rules (items)

Item 1

Exact value (const): -10000000

Item 2

Exact value (const): 10000000

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "adi,ad3541r", "adi,ad3551r"

When the condition matches (then) #

Properties and child nodes (properties)

channel@1 — not listed as required here

false — Not permitted by this property rule.

channel@0 — not listed as required here

Properties and child nodes (properties)

reg — not listed as required here

Exact value (const): 0

Required in this object (required): "compatible", "reg", "spi-max-frequency"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

spi {
    #address-cells = <1>;
    #size-cells = <0>;
    ad3552r@0 {
        compatible = "adi,ad3552r";
        reg = <0>;
        spi-max-frequency = <20000000>;
        #address-cells = <1>;
        #size-cells = <0>;
        channel@0 {
            reg = <0>;
            adi,output-range-microvolt = <0 10000000>;
        };
        channel@1 {
            reg = <1>;
            custom-output-range-config {
                adi,gain-offset = <5>;
                adi,gain-scaling-p = <1>;
                adi,gain-scaling-n = <2>;
                adi,rfb-ohms = <1>;
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 2: Copyright 2020 Analog Devices Inc.

Line 128: If adi,output-range-microvolt is missing,

Line 129: custom-output-range-config must be used

Edit this page