brintos

brintos / linux-shallow public Read only

0
0
Text · 4.1 KiB · 590ea79 Raw
173 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/addac/adi,ad74413r.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices AD74412R/AD74413R device8 9maintainers:10  - Cosmin Tanislav <cosmin.tanislav@analog.com>11 12description: |13  The AD74412R and AD74413R are quad-channel software configurable input/output14  solutions for building and process control applications. They contain15  functionality for analog output, analog input, digital input, resistance16  temperature detector, and thermocouple measurements integrated17  into a single chip solution with an SPI interface.18  The devices feature a 16-bit ADC and four configurable 13-bit DACs to provide19  four configurable input/output channels and a suite of diagnostic functions.20  The AD74413R differentiates itself from the AD74412R by being HART-compatible.21    https://www.analog.com/en/products/ad74412r.html22    https://www.analog.com/en/products/ad74413r.html23 24properties:25  compatible:26    enum:27      - adi,ad74412r28      - adi,ad74413r29 30  reg:31    maxItems: 132 33  '#address-cells':34    const: 135 36  '#size-cells':37    const: 038 39  spi-max-frequency:40    maximum: 100000041 42  spi-cpol: true43 44  interrupts:45    maxItems: 146 47  refin-supply: true48 49  shunt-resistor-micro-ohms:50    description:51      Shunt (sense) resistor value in micro-Ohms.52    default: 10000000053 54  reset-gpios:55    maxItems: 156 57required:58  - compatible59  - reg60  - spi-max-frequency61  - spi-cpol62  - refin-supply63 64patternProperties:65  "^channel@[0-3]$":66    type: object67    additionalProperties: false68    description: Represents the external channels which are connected to the device.69 70    properties:71      reg:72        description: |73          The channel number. It can have up to 4 channels numbered from 0 to 3.74        minimum: 075        maximum: 376 77      adi,ch-func:78        $ref: /schemas/types.yaml#/definitions/uint3279        description: |80          Channel function.81          HART functions are not supported on AD74412R.82          0 - CH_FUNC_HIGH_IMPEDANCE83          1 - CH_FUNC_VOLTAGE_OUTPUT84          2 - CH_FUNC_CURRENT_OUTPUT85          3 - CH_FUNC_VOLTAGE_INPUT86          4 - CH_FUNC_CURRENT_INPUT_EXT_POWER87          5 - CH_FUNC_CURRENT_INPUT_LOOP_POWER88          6 - CH_FUNC_RESISTANCE_INPUT89          7 - CH_FUNC_DIGITAL_INPUT_LOGIC90          8 - CH_FUNC_DIGITAL_INPUT_LOOP_POWER91          9 - CH_FUNC_CURRENT_INPUT_EXT_POWER_HART92          10 - CH_FUNC_CURRENT_INPUT_LOOP_POWER_HART93        minimum: 094        maximum: 1095        default: 096 97      adi,gpo-comparator:98        type: boolean99        description: |100          Whether to configure GPO as a comparator or not.101          When not configured as a comparator, the GPO will be treated as an102          output-only GPIO.103 104      drive-strength-microamp:105        description: |106          For channels configured as digital input, this configures the sink107          current.108        minimum: 0109        maximum: 1800110        default: 0111        multipleOf: 120112 113    required:114      - reg115 116allOf:117  - $ref: /schemas/spi/spi-peripheral-props.yaml#118 119unevaluatedProperties: false120 121examples:122  - |123    #include <dt-bindings/gpio/gpio.h>124    #include <dt-bindings/interrupt-controller/irq.h>125    #include <dt-bindings/iio/addac/adi,ad74413r.h>126 127    spi {128      #address-cells = <1>;129      #size-cells = <0>;130 131      addac@0 {132        compatible = "adi,ad74413r";133        reg = <0>;134        spi-max-frequency = <1000000>;135        spi-cpol;136 137        #address-cells = <1>;138        #size-cells = <0>;139 140        interrupt-parent = <&gpio>;141        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;142 143        refin-supply = <&ad74413r_refin>;144        reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;145 146        channel@0 {147          reg = <0>;148 149          adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;150        };151 152        channel@1 {153          reg = <1>;154 155          adi,ch-func = <CH_FUNC_CURRENT_OUTPUT>;156        };157 158        channel@2 {159          reg = <2>;160 161          adi,ch-func = <CH_FUNC_DIGITAL_INPUT_LOGIC>;162          adi,gpo-comparator;163        };164 165        channel@3 {166          reg = <3>;167 168          adi,ch-func = <CH_FUNC_CURRENT_INPUT_EXT_POWER>;169        };170      };171    };172...173