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: true 36 37 interrupts: 38 minItems: 1 39 maxItems: 2 40 41 interrupt-names: 42 minItems: 1 43 maxItems: 2 44 items: 45 enum: 46 - adc_rdy 47 - alert 48 49 avdd-supply: true 50 avcc-supply: true 51 dvcc-supply: true 52 dovdd-supply: true 53 refin-supply: true 54 55 adi,ch-func: 56 $ref: /schemas/types.yaml#/definitions/uint32 57 description: | 58 Channel function. 59 0 - High impedance 60 1 - Voltage output 61 2 - Current output 62 3 - Voltage input 63 4 - Current input, externally-powered 64 5 - Current input, loop-powered 65 6 - Resistance input 66 7 - RTD measure 67 8 - Digital input logic 68 9 - Digital input, loop-powered 69 10 - Current output with HART 70 11 - Current input, externally-powered, with HART 71 12 - Current input, loop-powered, with HART 72 minimum: 0 73 maximum: 12 74 default: 0 75 76 adi,conv2-mux: 77 $ref: /schemas/types.yaml#/definitions/uint32 78 description: | 79 Input node for ADC conversion 2. 80 0 - SENSE_EXT1 to AGND_SENSE 81 1 - SENSE_EXT2 to AGND_SENSE 82 2 - SENSE_EXT2 to SENSE_EXT1 83 3 - AGND to AGND 84 minimum: 0 85 maximum: 3 86 default: 0 87 88 adi,conv2-range-microvolt: 89 description: Conversion range for ADC conversion 2. 90 oneOf: 91 - items: 92 - enum: [-2500000, 0] 93 - const: 2500000 94 - items: 95 - enum: [-12000000, 0] 96 - const: 12000000 97 - items: 98 - const: -2500000 99 - const: 0 100 - items: 101 - const: -104000 102 - const: 104000 103 - items: 104 - const: 0 105 - const: 625000 106 107 adi,sense-agnd-buffer-low-power: 108 type: boolean 109 description: 110 Whether to enable low-power buffered mode for the AGND sense pin. 111 112 adi,lf-buffer-low-power: 113 type: boolean 114 description: 115 Whether to enable low-power buffered mode for the low-side filtered 116 sense pin. 117 118 adi,hf-buffer-low-power: 119 type: boolean 120 description: 121 Whether to enable low-power buffered mode for the high-side filtered 122 sense pin. 123 124 adi,ext2-buffer-low-power: 125 type: boolean 126 description: Whether to enable low-power buffered mode for the EXT2 pin. 127 128 adi,ext1-buffer-low-power: 129 type: boolean 130 description: Whether to enable low-power buffered mode for the EXT1 pin. 131 132 adi,comparator-invert: 133 type: boolean 134 description: Whether to invert the comparator output. 135 136 adi,digital-input-sink-range-high: 137 $ref: /schemas/types.yaml#/definitions/uint32 138 description: | 139 When not present, the digital input range is from 0 to 3700uA in steps 140 of 120uA, with a ~2k series resistance. 141 When present, the digital input range is from 0 to 7400uA in steps 142 of 240uA, with a ~1k series resistance. 143 144 adi,digital-input-sink-microamp: 145 description: Sink current in digital input mode. 146 minimum: 0 147 maximum: 3700 148 default: 0 149 150 adi,digital-input-debounce-mode-counter-reset: 151 type: boolean 152 description: | 153 When not present, a counter increments when the signal is asserted 154 and decrements when the signal is de-asserted. 155 When present, a counter increments while the signal is asserted and 156 resets when the signal de-asserts 157 158 adi,digital-input-unbuffered: 159 type: boolean 160 description: Whether to buffer digital input signals. 161 162 adi,digital-input-short-circuit-detection: 163 type: boolean 164 description: Whether to detect digital input short circuits. 165 166 adi,digital-input-open-circuit-detection: 167 type: boolean 168 description: Whether to detect digital input open circuits. 169 170 adi,digital-input-threshold-mode-fixed: 171 type: boolean 172 description: | 173 When not present, the digital input threshold range is -0.96 * AVDD 174 to AVDD. 175 When present, the threshold range is fixed from -19V to 30V. 176 177 adi,dac-bipolar: 178 type: boolean 179 description: | 180 When not present, the DAC operates in the 0V to 12V range. 181 When present, the DAC operates in the -12V to 12V range. 182 183 adi,charge-pump: 184 type: boolean 185 description: Whether to enable the internal charge pump. 186 187 adi,dac-hart-slew: 188 type: boolean 189 description: Whether to use a HART-compatible slew rate. 190 191 adi,dac-current-limit-low: 192 type: boolean 193 description: | 194 When not present, the DAC short-circuit current limit is 32mA in 195 either source or sink for VOUT and 4mA sink for IOUT. 196 When present, the limit is 16mA in either source or sink for VOUT, 197 1mA sink for IOUT. 198 199 adi,4-wire-rtd: 200 type: boolean 201 description: | 202 When not present, the ADC should be used for measuring 3-wire RTDs. 203 When present, the ADC should be used for measuring 4-wire RTDs. 204 205 adi,3-wire-rtd-excitation-swap: 206 type: boolean 207 description: Whether to swap the excitation for 3-wire RTD. 208 209 adi,rtd-excitation-current-microamp: 210 description: Excitation current to apply to RTD. 211 enum: [250, 500, 750, 1000] 212 default: 250 213 214 adi,ext1-burnout: 215 type: boolean 216 description: Whether to enable burnout current for EXT1. 217 218 adi,ext1-burnout-current-nanoamp: 219 description: 220 Burnout current in nanoamps to be applied to EXT1. 221 enum: [0, 50, 500, 1000, 10000] 222 default: 0 223 224 adi,ext1-burnout-current-polarity-sourcing: 225 type: boolean 226 description: | 227 When not present, the burnout current polarity for EXT1 is sinking. 228 When present, the burnout current polarity for EXT1 is sourcing. 229 230 adi,ext2-burnout: 231 type: boolean 232 description: Whether to enable burnout current for EXT2. 233 234 adi,ext2-burnout-current-nanoamp: 235 description: Burnout current in nanoamps to be applied to EXT2. 236 enum: [0, 50, 500, 1000, 10000] 237 default: 0 238 239 adi,ext2-burnout-current-polarity-sourcing: 240 type: boolean 241 description: | 242 When not present, the burnout current polarity for EXT2 is sinking. 243 When present, the burnout current polarity for EXT2 is sourcing. 244 245 adi,viout-burnout: 246 type: boolean 247 description: Whether to enable burnout current for VIOUT. 248 249 adi,viout-burnout-current-nanoamp: 250 description: Burnout current in nanoamps to be applied to VIOUT. 251 enum: [0, 1000, 10000] 252 default: 0 253 254 adi,viout-burnout-current-polarity-sourcing: 255 type: boolean 256 description: | 257 When not present, the burnout current polarity for VIOUT is sinking. 258 When present, the burnout current polarity for VIOUT is sourcing. 259 260 adi,gpio0-mode: 261 $ref: /schemas/types.yaml#/definitions/uint32 262 description: | 263 GPIO functions. 264 0 - Disabled 265 1 - Logic I/O 266 2 - Comparator output 267 3 - Control HART CD 268 4 - Monitor HART CD 269 5 - Monitor HART EOM status 270 minimum: 0 271 maximum: 5 272 default: 0 273 274 adi,gpio1-mode: 275 $ref: /schemas/types.yaml#/definitions/uint32 276 description: | 277 GPIO functions. 278 0 - Disabled 279 1 - Logic I/O 280 2 - Drive external digital output FET 281 3 - Control HART RXD 282 4 - Monitor HART RXD 283 5 - Monitor HART SOM status 284 minimum: 0 285 maximum: 5 286 default: 0 287 288 adi,gpio2-mode: 289 $ref: /schemas/types.yaml#/definitions/uint32 290 description: | 291 GPIO functions. 292 0 - Disabled 293 1 - Logic I/O 294 2 - Drive internal digital output FET 295 3 - Control HART TXD 296 4 - Monitor HART TXD 297 5 - Monitor HART TX complete status 298 minimum: 0 299 maximum: 5 300 default: 0 301 302 adi,gpio3-mode: 303 $ref: /schemas/types.yaml#/definitions/uint32 304 description: | 305 GPIO functions. 306 0 - Disabled 307 1 - Logic I/O 308 2 - High impedance 309 3 - Control HART RTS 310 4 - Monitor HART RTS 311 5 - Monitor HART CD complete status 312 minimum: 0 313 maximum: 5 314 default: 0 315 316required: 317 - compatible 318 - reg 319 - spi-cpol 320 - avdd-supply 321 322allOf: 323 - $ref: /schemas/spi/spi-peripheral-props.yaml# 324 - if: 325 required: 326 - adi,digital-input-sink-range-high 327 then: 328 properties: 329 adi,digital-input-sink-microamp: 330 maximum: 7400 331 332unevaluatedProperties: false 333 334examples: 335 - | 336 #include <dt-bindings/gpio/gpio.h> 337 #include <dt-bindings/interrupt-controller/irq.h> 338 339 spi { 340 #address-cells = <1>; 341 #size-cells = <0>; 342 343 addac@0 { 344 compatible = "adi,ad74115h"; 345 reg = <0>; 346 347 spi-max-frequency = <12000000>; 348 spi-cpol; 349 350 reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; 351 352 interrupt-parent = <&gpio>; 353 interrupts = <26 IRQ_TYPE_EDGE_FALLING>; 354 interrupt-names = "adc_rdy"; 355 356 avdd-supply = <&ad74115_avdd>; 357 358 adi,ch-func = <1>; 359 adi,conv2-mux = <2>; 360 adi,conv2-range-microvolt = <(-12000000) 12000000>; 361 362 adi,gpio0-mode = <1>; 363 adi,gpio1-mode = <1>; 364 adi,gpio2-mode = <1>; 365 adi,gpio3-mode = <1>; 366 367 adi,dac-bipolar; 368 }; 369 }; 370... 371