Analog Devices AD74412R/AD74413R device
Schema identifier ($id): "http://devicetree.org/schemas/iio/addac/adi,ad74413r.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Cosmin Tanislav <cosmin.tanislav@analog.com>"
The AD74412R and AD74413R are quad-channel software configurable input/output
solutions for building and process control applications. They contain
functionality for analog output, analog input, digital input, resistance
temperature detector, and thermocouple measurements integrated
into a single chip solution with an SPI interface.
The devices feature a 16-bit ADC and four configurable 13-bit DACs to provide
four configurable input/output channels and a suite of diagnostic functions.
The AD74413R differentiates itself from the AD74412R by being HART-compatible.
https://www.analog.com/en/products/ad74412r.html
https://www.analog.com/en/products/ad74413r.html
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "adi,ad74412r", "adi,ad74413r"
reg — required here #
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
spi-max-frequency — required here #
Maximum value (maximum): 1000000
spi-cpol — required here #
true — No constraints added by this property rule.
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
refin-supply — required here #
true — No constraints added by this property rule.
shunt-resistor-micro-ohms — not listed as required here #
Shunt (sense) resistor value in micro-Ohms.
Default value (default): 100000000
reset-gpios — not listed as required here #
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "spi-max-frequency", "spi-cpol", "refin-supply"
Properties matching a name pattern (patternProperties) #
^channel@[0-3]$ — name matches this regular expression #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Represents the external channels which are connected to the device.
Properties and child nodes (properties) #
reg — required here
The channel number. It can have up to 4 channels numbered from 0 to 3.
Minimum value (minimum): 0
Maximum value (maximum): 3
adi,ch-func — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Channel function. HART functions are not supported on AD74412R. 0 - CH_FUNC_HIGH_IMPEDANCE 1 - CH_FUNC_VOLTAGE_OUTPUT 2 - CH_FUNC_CURRENT_OUTPUT 3 - CH_FUNC_VOLTAGE_INPUT 4 - CH_FUNC_CURRENT_INPUT_EXT_POWER 5 - CH_FUNC_CURRENT_INPUT_LOOP_POWER 6 - CH_FUNC_RESISTANCE_INPUT 7 - CH_FUNC_DIGITAL_INPUT_LOGIC 8 - CH_FUNC_DIGITAL_INPUT_LOOP_POWER 9 - CH_FUNC_CURRENT_INPUT_EXT_POWER_HART 10 - CH_FUNC_CURRENT_INPUT_LOOP_POWER_HART
Minimum value (minimum): 0
Maximum value (maximum): 10
Default value (default): 0
adi,gpo-comparator — not listed as required here
Value type (type): "boolean"
Whether to configure GPO as a comparator or not. When not configured as a comparator, the GPO will be treated as an output-only GPIO.
drive-strength-microamp — not listed as required here
For channels configured as digital input, this configures the sink current.
Minimum value (minimum): 0
Maximum value (maximum): 1800
Default value (default): 0
Multiple of (multipleOf): 120
Required in this object (required): "reg"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/spi/spi-peripheral-props.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/iio/addac/adi,ad74413r.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
addac@0 {
compatible = "adi,ad74413r";
reg = <0>;
spi-max-frequency = <1000000>;
spi-cpol;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&gpio>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
refin-supply = <&ad74413r_refin>;
reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
channel@0 {
reg = <0>;
adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
};
channel@1 {
reg = <1>;
adi,ch-func = <CH_FUNC_CURRENT_OUTPUT>;
};
channel@2 {
reg = <2>;
adi,ch-func = <CH_FUNC_DIGITAL_INPUT_LOGIC>;
adi,gpo-comparator;
};
channel@3 {
reg = <3>;
adi,ch-func = <CH_FUNC_CURRENT_INPUT_EXT_POWER>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)