Path: blob/master/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/addac/adi,ad74413r.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices AD74412R/AD74413R device78maintainers:9- Cosmin Tanislav <cosmin.tanislav@analog.com>1011description: |12The AD74412R and AD74413R are quad-channel software configurable input/output13solutions for building and process control applications. They contain14functionality for analog output, analog input, digital input, resistance15temperature detector, and thermocouple measurements integrated16into a single chip solution with an SPI interface.17The devices feature a 16-bit ADC and four configurable 13-bit DACs to provide18four configurable input/output channels and a suite of diagnostic functions.19The AD74413R differentiates itself from the AD74412R by being HART-compatible.20https://www.analog.com/en/products/ad74412r.html21https://www.analog.com/en/products/ad74413r.html2223properties:24compatible:25enum:26- adi,ad74412r27- adi,ad74413r2829reg:30maxItems: 13132'#address-cells':33const: 13435'#size-cells':36const: 03738spi-max-frequency:39maximum: 10000004041spi-cpol: true4243interrupts:44maxItems: 14546refin-supply: true4748shunt-resistor-micro-ohms:49description:50Shunt (sense) resistor value in micro-Ohms.51default: 1000000005253reset-gpios:54maxItems: 15556required:57- compatible58- reg59- spi-max-frequency60- spi-cpol61- refin-supply6263patternProperties:64"^channel@[0-3]$":65type: object66additionalProperties: false67description: Represents the external channels which are connected to the device.6869properties:70reg:71description: |72The channel number. It can have up to 4 channels numbered from 0 to 3.73minimum: 074maximum: 37576adi,ch-func:77$ref: /schemas/types.yaml#/definitions/uint3278description: |79Channel function.80HART functions are not supported on AD74412R.810 - CH_FUNC_HIGH_IMPEDANCE821 - CH_FUNC_VOLTAGE_OUTPUT832 - CH_FUNC_CURRENT_OUTPUT843 - CH_FUNC_VOLTAGE_INPUT854 - CH_FUNC_CURRENT_INPUT_EXT_POWER865 - CH_FUNC_CURRENT_INPUT_LOOP_POWER876 - CH_FUNC_RESISTANCE_INPUT887 - CH_FUNC_DIGITAL_INPUT_LOGIC898 - CH_FUNC_DIGITAL_INPUT_LOOP_POWER909 - CH_FUNC_CURRENT_INPUT_EXT_POWER_HART9110 - CH_FUNC_CURRENT_INPUT_LOOP_POWER_HART92minimum: 093maximum: 1094default: 09596adi,gpo-comparator:97type: boolean98description: |99Whether to configure GPO as a comparator or not.100When not configured as a comparator, the GPO will be treated as an101output-only GPIO.102103drive-strength-microamp:104description: |105For channels configured as digital input, this configures the sink106current.107minimum: 0108maximum: 1800109default: 0110multipleOf: 120111112required:113- reg114115allOf:116- $ref: /schemas/spi/spi-peripheral-props.yaml#117118unevaluatedProperties: false119120examples:121- |122#include <dt-bindings/gpio/gpio.h>123#include <dt-bindings/interrupt-controller/irq.h>124#include <dt-bindings/iio/addac/adi,ad74413r.h>125126spi {127#address-cells = <1>;128#size-cells = <0>;129130addac@0 {131compatible = "adi,ad74413r";132reg = <0>;133spi-max-frequency = <1000000>;134spi-cpol;135136#address-cells = <1>;137#size-cells = <0>;138139interrupt-parent = <&gpio>;140interrupts = <26 IRQ_TYPE_EDGE_FALLING>;141142refin-supply = <&ad74413r_refin>;143reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;144145channel@0 {146reg = <0>;147148adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;149};150151channel@1 {152reg = <1>;153154adi,ch-func = <CH_FUNC_CURRENT_OUTPUT>;155};156157channel@2 {158reg = <2>;159160adi,ch-func = <CH_FUNC_DIGITAL_INPUT_LOGIC>;161adi,gpo-comparator;162};163164channel@3 {165reg = <3>;166167adi,ch-func = <CH_FUNC_CURRENT_INPUT_EXT_POWER>;168};169};170};171...172173174