1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 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 device 8 9maintainers: 10 - Cosmin Tanislav <cosmin.tanislav@analog.com> 11 12description: | 13 The AD74115H is a single-channel software configurable input/output 14 device for industrial control applications. It contains functionality for 15 analog output, analog input, digital output, digital input, resistance 16 temperature detector, and thermocouple measurements integrated into a single 17 chip solution with an SPI interface. The device features a 16-bit ADC and a 18 14-bit DAC. 19 20 https://www.analog.com/en/products/ad74115h.html 21 22properties: 23 compatible: 24 enum: 25 - adi,ad74115h 26 27 reg: 28 maxItems: 1 29 30 spi-max-frequency: 31 maximum: 24000000 32 33 spi-cpol: true 34 35 reset-gpios: 36 maxItems: 1 37 38 interrupts: 39 minItems: 1 40 maxItems: 2 41 42 interrupt-names: 43 minItems: 1 44 maxItems: 2 45 items: 46 enum: 47 - adc_rdy 48 - alert 49 50 avdd-supply: true 51 avcc-supply: true 52 dvcc-supply: true 53 dovdd-supply: true 54 refin-supply: true 55 56 adi,ch-func: 57 $ref: /schemas/types.yaml#/definitions/uint32 58 description: | 59 Channel function. 60 0 - High impedance 61 1 - Voltage output 62 2 - Current output 63 3 - Voltage input 64 4 - Current input, externally-powered 65 5 - Current input, loop-powered 66 6 - Resistance input 67 7 - RTD measure 68 8 - Digital input logic 69 9 - Digital input, loop-powered 70 10 - Current output with HART 71 11 - Current input, externally-powered, with HART 72 12 - Current input, loop-powered, with HART 73 minimum: 0 74 maximum: 12 75 default: 0 76 77 adi,conv2-mux: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 description: | 80 Input node for ADC conversion 2. 81 0 - SENSE_EXT1 to AGND_SENSE 82 1 - SENSE_EXT2 to AGND_SENSE 83 2 - SENSE_EXT2 to SENSE_EXT1 84 3 - AGND to AGND 85 minimum: 0 86 maximum: 3 87 default: 0 88 89 adi,conv2-range-microvolt: 90 description: Conversion range for ADC conversion 2. 91 oneOf: 92 - items: 93 - enum: [-2500000, 0] 94 - const: 2500000 95 - items: 96 - enum: [-12000000, 0] 97 - const: 12000000 98 - items: 99 - const: -2500000 100 - const: 0 101 - items: 102 - const: -104000 103 - const: 104000 104 - items: 105 - const: 0 106 - const: 625000 107 108 adi,sense-agnd-buffer-low-power: 109 type: boolean 110 description: 111 Whether to enable low-power buffered mode for the AGND sense pin. 112 113 adi,lf-buffer-low-power: 114 type: boolean 115 description: 116 Whether to enable low-power buffered mode for the low-side filtered 117 sense pin. 118 119 adi,hf-buffer-low-power: 120 type: boolean 121 description: 122 Whether to enable low-power buffered mode for the high-side filtered 123 sense pin. 124 125 adi,ext2-buffer-low-power: 126 type: boolean 127 description: Whether to enable low-power buffered mode for the EXT2 pin. 128 129 adi,ext1-buffer-low-power: 130 type: boolean 131 description: Whether to enable low-power buffered mode for the EXT1 pin. 132 133 adi,comparator-invert: 134 type: boolean 135 description: Whether to invert the comparator output. 136 137 adi,digital-input-sink-range-high: 138 $ref: /schemas/types.yaml#/definitions/uint32 139 description: | 140 When not present, the digital input range is from 0 to 3700uA in steps 141 of 120uA, with a ~2k series resistance. 142 When present, the digital input range is from 0 to 7400uA in steps 143 of 240uA, with a ~1k series resistance. 144 145 adi,digital-input-sink-microamp: 146 description: Sink current in digital input mode. 147 minimum: 0 148 maximum: 3700 149 default: 0 150 151 adi,digital-input-debounce-mode-counter-reset: 152 type: boolean 153 description: | 154 When not present, a counter increments when the signal is asserted 155 and decrements when the signal is de-asserted. 156 When present, a counter increments while the signal is asserted and 157 resets when the signal de-asserts 158 159 adi,digital-input-unbuffered: 160 type: boolean 161 description: Whether to buffer digital input signals. 162 163 adi,digital-input-short-circuit-detection: 164 type: boolean 165 description: Whether to detect digital input short circuits. 166 167 adi,digital-input-open-circuit-detection: 168 type: boolean 169 description: Whether to detect digital input open circuits. 170 171 adi,digital-input-threshold-mode-fixed: 172 type: boolean 173 description: | 174 When not present, the digital input threshold range is -0.96 * AVDD 175 to AVDD. 176 When present, the threshold range is fixed from -19V to 30V. 177 178 adi,dac-bipolar: 179 type: boolean 180 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: boolean 186 description: Whether to enable the internal charge pump. 187 188 adi,dac-hart-slew: 189 type: boolean 190 description: Whether to use a HART-compatible slew rate. 191 192 adi,dac-current-limit-low: 193 type: boolean 194 description: | 195 When not present, the DAC short-circuit current limit is 32mA in 196 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: boolean 202 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: boolean 208 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: 250 214 215 adi,ext1-burnout: 216 type: boolean 217 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: 0 224 225 adi,ext1-burnout-current-polarity-sourcing: 226 type: boolean 227 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: boolean 233 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: 0 239 240 adi,ext2-burnout-current-polarity-sourcing: 241 type: boolean 242 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: boolean 248 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: 0 254 255 adi,viout-burnout-current-polarity-sourcing: 256 type: boolean 257 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/uint32 263 description: | 264 GPIO functions. 265 0 - Disabled 266 1 - Logic I/O 267 2 - Comparator output 268 3 - Control HART CD 269 4 - Monitor HART CD 270 5 - Monitor HART EOM status 271 minimum: 0 272 maximum: 5 273 default: 0 274 275 adi,gpio1-mode: 276 $ref: /schemas/types.yaml#/definitions/uint32 277 description: | 278 GPIO functions. 279 0 - Disabled 280 1 - Logic I/O 281 2 - Drive external digital output FET 282 3 - Control HART RXD 283 4 - Monitor HART RXD 284 5 - Monitor HART SOM status 285 minimum: 0 286 maximum: 5 287 default: 0 288 289 adi,gpio2-mode: 290 $ref: /schemas/types.yaml#/definitions/uint32 291 description: | 292 GPIO functions. 293 0 - Disabled 294 1 - Logic I/O 295 2 - Drive internal digital output FET 296 3 - Control HART TXD 297 4 - Monitor HART TXD 298 5 - Monitor HART TX complete status 299 minimum: 0 300 maximum: 5 301 default: 0 302 303 adi,gpio3-mode: 304 $ref: /schemas/types.yaml#/definitions/uint32 305 description: | 306 GPIO functions. 307 0 - Disabled 308 1 - Logic I/O 309 2 - High impedance 310 3 - Control HART RTS 311 4 - Monitor HART RTS 312 5 - Monitor HART CD complete status 313 minimum: 0 314 maximum: 5 315 default: 0 316 317required: 318 - compatible 319 - reg 320 - spi-cpol 321 - avdd-supply 322 323allOf: 324 - $ref: /schemas/spi/spi-peripheral-props.yaml# 325 - if: 326 required: 327 - adi,digital-input-sink-range-high 328 then: 329 properties: 330 adi,digital-input-sink-microamp: 331 maximum: 7400 332 333unevaluatedProperties: false 334 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