372 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,ad74115.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices AD74115H device8 9maintainers:10 - Cosmin Tanislav <cosmin.tanislav@analog.com>11 12description: |13 The AD74115H is a single-channel software configurable input/output14 device for industrial control applications. It contains functionality for15 analog output, analog input, digital output, digital input, resistance16 temperature detector, and thermocouple measurements integrated into a single17 chip solution with an SPI interface. The device features a 16-bit ADC and a18 14-bit DAC.19 20 https://www.analog.com/en/products/ad74115h.html21 22properties:23 compatible:24 enum:25 - adi,ad74115h26 27 reg:28 maxItems: 129 30 spi-max-frequency:31 maximum: 2400000032 33 spi-cpol: true34 35 reset-gpios:36 maxItems: 137 38 interrupts:39 minItems: 140 maxItems: 241 42 interrupt-names:43 minItems: 144 maxItems: 245 items:46 enum:47 - adc_rdy48 - alert49 50 avdd-supply: true51 avcc-supply: true52 dvcc-supply: true53 dovdd-supply: true54 refin-supply: true55 56 adi,ch-func:57 $ref: /schemas/types.yaml#/definitions/uint3258 description: |59 Channel function.60 0 - High impedance61 1 - Voltage output62 2 - Current output63 3 - Voltage input64 4 - Current input, externally-powered65 5 - Current input, loop-powered66 6 - Resistance input67 7 - RTD measure68 8 - Digital input logic69 9 - Digital input, loop-powered70 10 - Current output with HART71 11 - Current input, externally-powered, with HART72 12 - Current input, loop-powered, with HART73 minimum: 074 maximum: 1275 default: 076 77 adi,conv2-mux:78 $ref: /schemas/types.yaml#/definitions/uint3279 description: |80 Input node for ADC conversion 2.81 0 - SENSE_EXT1 to AGND_SENSE82 1 - SENSE_EXT2 to AGND_SENSE83 2 - SENSE_EXT2 to SENSE_EXT184 3 - AGND to AGND85 minimum: 086 maximum: 387 default: 088 89 adi,conv2-range-microvolt:90 description: Conversion range for ADC conversion 2.91 oneOf:92 - items:93 - enum: [-2500000, 0]94 - const: 250000095 - items:96 - enum: [-12000000, 0]97 - const: 1200000098 - items:99 - const: -2500000100 - const: 0101 - items:102 - const: -104000103 - const: 104000104 - items:105 - const: 0106 - const: 625000107 108 adi,sense-agnd-buffer-low-power:109 type: boolean110 description:111 Whether to enable low-power buffered mode for the AGND sense pin.112 113 adi,lf-buffer-low-power:114 type: boolean115 description:116 Whether to enable low-power buffered mode for the low-side filtered117 sense pin.118 119 adi,hf-buffer-low-power:120 type: boolean121 description:122 Whether to enable low-power buffered mode for the high-side filtered123 sense pin.124 125 adi,ext2-buffer-low-power:126 type: boolean127 description: Whether to enable low-power buffered mode for the EXT2 pin.128 129 adi,ext1-buffer-low-power:130 type: boolean131 description: Whether to enable low-power buffered mode for the EXT1 pin.132 133 adi,comparator-invert:134 type: boolean135 description: Whether to invert the comparator output.136 137 adi,digital-input-sink-range-high:138 $ref: /schemas/types.yaml#/definitions/uint32139 description: |140 When not present, the digital input range is from 0 to 3700uA in steps141 of 120uA, with a ~2k series resistance.142 When present, the digital input range is from 0 to 7400uA in steps143 of 240uA, with a ~1k series resistance.144 145 adi,digital-input-sink-microamp:146 description: Sink current in digital input mode.147 minimum: 0148 maximum: 3700149 default: 0150 151 adi,digital-input-debounce-mode-counter-reset:152 type: boolean153 description: |154 When not present, a counter increments when the signal is asserted155 and decrements when the signal is de-asserted.156 When present, a counter increments while the signal is asserted and157 resets when the signal de-asserts158 159 adi,digital-input-unbuffered:160 type: boolean161 description: Whether to buffer digital input signals.162 163 adi,digital-input-short-circuit-detection:164 type: boolean165 description: Whether to detect digital input short circuits.166 167 adi,digital-input-open-circuit-detection:168 type: boolean169 description: Whether to detect digital input open circuits.170 171 adi,digital-input-threshold-mode-fixed:172 type: boolean173 description: |174 When not present, the digital input threshold range is -0.96 * AVDD175 to AVDD.176 When present, the threshold range is fixed from -19V to 30V.177 178 adi,dac-bipolar:179 type: boolean180 description: |181 When not present, the DAC operates in the 0V to 12V range.182 When present, the DAC operates in the -12V to 12V range.183 184 adi,charge-pump:185 type: boolean186 description: Whether to enable the internal charge pump.187 188 adi,dac-hart-slew:189 type: boolean190 description: Whether to use a HART-compatible slew rate.191 192 adi,dac-current-limit-low:193 type: boolean194 description: |195 When not present, the DAC short-circuit current limit is 32mA in196 either source or sink for VOUT and 4mA sink for IOUT.197 When present, the limit is 16mA in either source or sink for VOUT,198 1mA sink for IOUT.199 200 adi,4-wire-rtd:201 type: boolean202 description: |203 When not present, the ADC should be used for measuring 3-wire RTDs.204 When present, the ADC should be used for measuring 4-wire RTDs.205 206 adi,3-wire-rtd-excitation-swap:207 type: boolean208 description: Whether to swap the excitation for 3-wire RTD.209 210 adi,rtd-excitation-current-microamp:211 description: Excitation current to apply to RTD.212 enum: [250, 500, 750, 1000]213 default: 250214 215 adi,ext1-burnout:216 type: boolean217 description: Whether to enable burnout current for EXT1.218 219 adi,ext1-burnout-current-nanoamp:220 description:221 Burnout current in nanoamps to be applied to EXT1.222 enum: [0, 50, 500, 1000, 10000]223 default: 0224 225 adi,ext1-burnout-current-polarity-sourcing:226 type: boolean227 description: |228 When not present, the burnout current polarity for EXT1 is sinking.229 When present, the burnout current polarity for EXT1 is sourcing.230 231 adi,ext2-burnout:232 type: boolean233 description: Whether to enable burnout current for EXT2.234 235 adi,ext2-burnout-current-nanoamp:236 description: Burnout current in nanoamps to be applied to EXT2.237 enum: [0, 50, 500, 1000, 10000]238 default: 0239 240 adi,ext2-burnout-current-polarity-sourcing:241 type: boolean242 description: |243 When not present, the burnout current polarity for EXT2 is sinking.244 When present, the burnout current polarity for EXT2 is sourcing.245 246 adi,viout-burnout:247 type: boolean248 description: Whether to enable burnout current for VIOUT.249 250 adi,viout-burnout-current-nanoamp:251 description: Burnout current in nanoamps to be applied to VIOUT.252 enum: [0, 1000, 10000]253 default: 0254 255 adi,viout-burnout-current-polarity-sourcing:256 type: boolean257 description: |258 When not present, the burnout current polarity for VIOUT is sinking.259 When present, the burnout current polarity for VIOUT is sourcing.260 261 adi,gpio0-mode:262 $ref: /schemas/types.yaml#/definitions/uint32263 description: |264 GPIO functions.265 0 - Disabled266 1 - Logic I/O267 2 - Comparator output268 3 - Control HART CD269 4 - Monitor HART CD270 5 - Monitor HART EOM status271 minimum: 0272 maximum: 5273 default: 0274 275 adi,gpio1-mode:276 $ref: /schemas/types.yaml#/definitions/uint32277 description: |278 GPIO functions.279 0 - Disabled280 1 - Logic I/O281 2 - Drive external digital output FET282 3 - Control HART RXD283 4 - Monitor HART RXD284 5 - Monitor HART SOM status285 minimum: 0286 maximum: 5287 default: 0288 289 adi,gpio2-mode:290 $ref: /schemas/types.yaml#/definitions/uint32291 description: |292 GPIO functions.293 0 - Disabled294 1 - Logic I/O295 2 - Drive internal digital output FET296 3 - Control HART TXD297 4 - Monitor HART TXD298 5 - Monitor HART TX complete status299 minimum: 0300 maximum: 5301 default: 0302 303 adi,gpio3-mode:304 $ref: /schemas/types.yaml#/definitions/uint32305 description: |306 GPIO functions.307 0 - Disabled308 1 - Logic I/O309 2 - High impedance310 3 - Control HART RTS311 4 - Monitor HART RTS312 5 - Monitor HART CD complete status313 minimum: 0314 maximum: 5315 default: 0316 317required:318 - compatible319 - reg320 - spi-cpol321 - avdd-supply322 323allOf:324 - $ref: /schemas/spi/spi-peripheral-props.yaml#325 - if:326 required:327 - adi,digital-input-sink-range-high328 then:329 properties:330 adi,digital-input-sink-microamp:331 maximum: 7400332 333unevaluatedProperties: false334 335examples:336 - |337 #include <dt-bindings/gpio/gpio.h>338 #include <dt-bindings/interrupt-controller/irq.h>339 340 spi {341 #address-cells = <1>;342 #size-cells = <0>;343 344 addac@0 {345 compatible = "adi,ad74115h";346 reg = <0>;347 348 spi-max-frequency = <12000000>;349 spi-cpol;350 351 reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;352 353 interrupt-parent = <&gpio>;354 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;355 interrupt-names = "adc_rdy";356 357 avdd-supply = <&ad74115_avdd>;358 359 adi,ch-func = <1>;360 adi,conv2-mux = <2>;361 adi,conv2-range-microvolt = <(-12000000) 12000000>;362 363 adi,gpio0-mode = <1>;364 adi,gpio1-mode = <1>;365 adi,gpio2-mode = <1>;366 adi,gpio3-mode = <1>;367 368 adi,dac-bipolar;369 };370 };371...372