1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot# Copyright 2019 Analog Devices Inc. 3c66ec88fSEmmanuel Vadot%YAML 1.2 4c66ec88fSEmmanuel Vadot--- 5c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad7192.yaml# 6c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7c66ec88fSEmmanuel Vadot 8c66ec88fSEmmanuel Vadottitle: Analog Devices AD7192 ADC device driver 9c66ec88fSEmmanuel Vadot 10c66ec88fSEmmanuel Vadotmaintainers: 11c66ec88fSEmmanuel Vadot - Michael Hennerich <michael.hennerich@analog.com> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: | 14c66ec88fSEmmanuel Vadot Bindings for the Analog Devices AD7192 ADC device. Datasheet can be 15c66ec88fSEmmanuel Vadot found here: 16c66ec88fSEmmanuel Vadot https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadotproperties: 19c66ec88fSEmmanuel Vadot compatible: 20c66ec88fSEmmanuel Vadot enum: 21c66ec88fSEmmanuel Vadot - adi,ad7190 22c66ec88fSEmmanuel Vadot - adi,ad7192 23c66ec88fSEmmanuel Vadot - adi,ad7193 240e8011faSEmmanuel Vadot - adi,ad7194 25c66ec88fSEmmanuel Vadot - adi,ad7195 26c66ec88fSEmmanuel Vadot 270e8011faSEmmanuel Vadot "#address-cells": 280e8011faSEmmanuel Vadot const: 1 290e8011faSEmmanuel Vadot 300e8011faSEmmanuel Vadot "#size-cells": 310e8011faSEmmanuel Vadot const: 0 320e8011faSEmmanuel Vadot 33c66ec88fSEmmanuel Vadot reg: 34c66ec88fSEmmanuel Vadot maxItems: 1 35c66ec88fSEmmanuel Vadot 36c66ec88fSEmmanuel Vadot spi-cpol: true 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot spi-cpha: true 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot clocks: 41c66ec88fSEmmanuel Vadot maxItems: 1 42*b2d2a78aSEmmanuel Vadot description: 43*b2d2a78aSEmmanuel Vadot Optionally, either a crystal can be attached externally between MCLK1 and 44*b2d2a78aSEmmanuel Vadot MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 45*b2d2a78aSEmmanuel Vadot pin. If absent, internal 4.92MHz clock is used, which can be made 46*b2d2a78aSEmmanuel Vadot available on MCLK2 pin. 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel Vadot clock-names: 49*b2d2a78aSEmmanuel Vadot enum: 50*b2d2a78aSEmmanuel Vadot - xtal 51*b2d2a78aSEmmanuel Vadot - mclk 52*b2d2a78aSEmmanuel Vadot 53*b2d2a78aSEmmanuel Vadot "#clock-cells": 54*b2d2a78aSEmmanuel Vadot const: 0 55*b2d2a78aSEmmanuel Vadot description: 56*b2d2a78aSEmmanuel Vadot If present when internal clock is used, configured as clock provider. 57c66ec88fSEmmanuel Vadot 58c66ec88fSEmmanuel Vadot interrupts: 59c66ec88fSEmmanuel Vadot maxItems: 1 60c66ec88fSEmmanuel Vadot 610e8011faSEmmanuel Vadot aincom-supply: 620e8011faSEmmanuel Vadot description: | 630e8011faSEmmanuel Vadot AINCOM voltage supply. Analog inputs AINx are referenced to this input 640e8011faSEmmanuel Vadot when configured for pseudo-differential operation. 650e8011faSEmmanuel Vadot 66c66ec88fSEmmanuel Vadot dvdd-supply: 67c66ec88fSEmmanuel Vadot description: DVdd voltage supply 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel Vadot avdd-supply: 70c66ec88fSEmmanuel Vadot description: AVdd voltage supply 71c66ec88fSEmmanuel Vadot 72f126890aSEmmanuel Vadot vref-supply: 73f126890aSEmmanuel Vadot description: VRef voltage supply 74f126890aSEmmanuel Vadot 75c66ec88fSEmmanuel Vadot adi,rejection-60-Hz-enable: 76c66ec88fSEmmanuel Vadot description: | 77c66ec88fSEmmanuel Vadot This bit enables a notch at 60 Hz when the first notch of the sinc 78c66ec88fSEmmanuel Vadot filter is at 50 Hz. When REJ60 is set, a filter notch is placed at 79c66ec88fSEmmanuel Vadot 60 Hz when the sinc filter first notch is at 50 Hz. This allows 80c66ec88fSEmmanuel Vadot simultaneous 50 Hz/ 60 Hz rejection. 81c66ec88fSEmmanuel Vadot type: boolean 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot adi,refin2-pins-enable: 84c66ec88fSEmmanuel Vadot description: | 85c66ec88fSEmmanuel Vadot External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins. 86c66ec88fSEmmanuel Vadot type: boolean 87c66ec88fSEmmanuel Vadot 88c66ec88fSEmmanuel Vadot adi,buffer-enable: 89c66ec88fSEmmanuel Vadot description: | 90c66ec88fSEmmanuel Vadot Enables the buffer on the analog inputs. If cleared, the analog inputs 91c66ec88fSEmmanuel Vadot are unbuffered, lowering the power consumption of the device. If this 92c66ec88fSEmmanuel Vadot bit is set, the analog inputs are buffered, allowing the user to place 93c66ec88fSEmmanuel Vadot source impedances on the front end without contributing gain errors to 94c66ec88fSEmmanuel Vadot the system. 95c66ec88fSEmmanuel Vadot type: boolean 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot adi,burnout-currents-enable: 98c66ec88fSEmmanuel Vadot description: | 99c66ec88fSEmmanuel Vadot When this bit is set to 1, the 500 nA current sources in the signal 100c66ec88fSEmmanuel Vadot path are enabled. When BURN = 0, the burnout currents are disabled. 101c66ec88fSEmmanuel Vadot The burnout currents can be enabled only when the buffer is active 102c66ec88fSEmmanuel Vadot and when chop is disabled. 103c66ec88fSEmmanuel Vadot type: boolean 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadot bipolar: 1065def4c47SEmmanuel Vadot description: see Documentation/devicetree/bindings/iio/adc/adc.yaml 107c66ec88fSEmmanuel Vadot type: boolean 108c66ec88fSEmmanuel Vadot 1090e8011faSEmmanuel VadotpatternProperties: 1100e8011faSEmmanuel Vadot "^channel@[0-9a-f]+$": 1110e8011faSEmmanuel Vadot type: object 1120e8011faSEmmanuel Vadot $ref: adc.yaml 1130e8011faSEmmanuel Vadot unevaluatedProperties: false 1140e8011faSEmmanuel Vadot 1150e8011faSEmmanuel Vadot properties: 1160e8011faSEmmanuel Vadot reg: 1170e8011faSEmmanuel Vadot description: The channel index. 1180e8011faSEmmanuel Vadot minimum: 0 1190e8011faSEmmanuel Vadot maximum: 271 1200e8011faSEmmanuel Vadot 1210e8011faSEmmanuel Vadot diff-channels: 1220e8011faSEmmanuel Vadot description: 1230e8011faSEmmanuel Vadot Both inputs can be connected to pins AIN1 to AIN16 by choosing the 1240e8011faSEmmanuel Vadot appropriate value from 1 to 16. 1250e8011faSEmmanuel Vadot items: 1260e8011faSEmmanuel Vadot minimum: 1 1270e8011faSEmmanuel Vadot maximum: 16 1280e8011faSEmmanuel Vadot 1290e8011faSEmmanuel Vadot single-channel: 1300e8011faSEmmanuel Vadot description: 1310e8011faSEmmanuel Vadot Positive input can be connected to pins AIN1 to AIN16 by choosing the 1320e8011faSEmmanuel Vadot appropriate value from 1 to 16. Negative input is connected to AINCOM. 1330e8011faSEmmanuel Vadot minimum: 1 1340e8011faSEmmanuel Vadot maximum: 16 1350e8011faSEmmanuel Vadot 1360e8011faSEmmanuel Vadot oneOf: 1370e8011faSEmmanuel Vadot - required: 1380e8011faSEmmanuel Vadot - reg 1390e8011faSEmmanuel Vadot - diff-channels 1400e8011faSEmmanuel Vadot - required: 1410e8011faSEmmanuel Vadot - reg 1420e8011faSEmmanuel Vadot - single-channel 1430e8011faSEmmanuel Vadot 144c66ec88fSEmmanuel Vadotrequired: 145c66ec88fSEmmanuel Vadot - compatible 146c66ec88fSEmmanuel Vadot - reg 147c66ec88fSEmmanuel Vadot - interrupts 148c66ec88fSEmmanuel Vadot - dvdd-supply 149c66ec88fSEmmanuel Vadot - avdd-supply 150f126890aSEmmanuel Vadot - vref-supply 151c66ec88fSEmmanuel Vadot - spi-cpol 152c66ec88fSEmmanuel Vadot - spi-cpha 153c66ec88fSEmmanuel Vadot 1547ef62cebSEmmanuel VadotallOf: 1557ef62cebSEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 1560e8011faSEmmanuel Vadot - if: 1570e8011faSEmmanuel Vadot properties: 1580e8011faSEmmanuel Vadot compatible: 1590e8011faSEmmanuel Vadot enum: 1600e8011faSEmmanuel Vadot - adi,ad7190 1610e8011faSEmmanuel Vadot - adi,ad7192 1620e8011faSEmmanuel Vadot - adi,ad7193 1630e8011faSEmmanuel Vadot - adi,ad7195 1640e8011faSEmmanuel Vadot then: 1650e8011faSEmmanuel Vadot patternProperties: 1660e8011faSEmmanuel Vadot "^channel@[0-9a-f]+$": false 167*b2d2a78aSEmmanuel Vadot - if: 168*b2d2a78aSEmmanuel Vadot anyOf: 169*b2d2a78aSEmmanuel Vadot - required: 170*b2d2a78aSEmmanuel Vadot - clocks 171*b2d2a78aSEmmanuel Vadot - required: 172*b2d2a78aSEmmanuel Vadot - clock-names 173*b2d2a78aSEmmanuel Vadot then: 174*b2d2a78aSEmmanuel Vadot properties: 175*b2d2a78aSEmmanuel Vadot "#clock-cells": false 176*b2d2a78aSEmmanuel Vadot required: 177*b2d2a78aSEmmanuel Vadot - clocks 178*b2d2a78aSEmmanuel Vadot - clock-names 1797ef62cebSEmmanuel Vadot 1807ef62cebSEmmanuel VadotunevaluatedProperties: false 1816be33864SEmmanuel Vadot 182c66ec88fSEmmanuel Vadotexamples: 183c66ec88fSEmmanuel Vadot - | 184cb7aa33aSEmmanuel Vadot spi { 185c66ec88fSEmmanuel Vadot #address-cells = <1>; 186c66ec88fSEmmanuel Vadot #size-cells = <0>; 187c66ec88fSEmmanuel Vadot 188c66ec88fSEmmanuel Vadot adc@0 { 189c66ec88fSEmmanuel Vadot compatible = "adi,ad7192"; 190c66ec88fSEmmanuel Vadot reg = <0>; 191c66ec88fSEmmanuel Vadot spi-max-frequency = <1000000>; 192c66ec88fSEmmanuel Vadot spi-cpol; 193c66ec88fSEmmanuel Vadot spi-cpha; 194c66ec88fSEmmanuel Vadot clocks = <&ad7192_mclk>; 195c66ec88fSEmmanuel Vadot clock-names = "mclk"; 196c66ec88fSEmmanuel Vadot interrupts = <25 0x2>; 197c66ec88fSEmmanuel Vadot interrupt-parent = <&gpio>; 1980e8011faSEmmanuel Vadot aincom-supply = <&aincom>; 199c66ec88fSEmmanuel Vadot dvdd-supply = <&dvdd>; 200c66ec88fSEmmanuel Vadot avdd-supply = <&avdd>; 201f126890aSEmmanuel Vadot vref-supply = <&vref>; 202c66ec88fSEmmanuel Vadot 203c66ec88fSEmmanuel Vadot adi,refin2-pins-enable; 204c66ec88fSEmmanuel Vadot adi,rejection-60-Hz-enable; 205c66ec88fSEmmanuel Vadot adi,buffer-enable; 206c66ec88fSEmmanuel Vadot adi,burnout-currents-enable; 207c66ec88fSEmmanuel Vadot }; 208c66ec88fSEmmanuel Vadot }; 2090e8011faSEmmanuel Vadot - | 2100e8011faSEmmanuel Vadot spi { 2110e8011faSEmmanuel Vadot #address-cells = <1>; 2120e8011faSEmmanuel Vadot #size-cells = <0>; 2130e8011faSEmmanuel Vadot 2140e8011faSEmmanuel Vadot adc@0 { 2150e8011faSEmmanuel Vadot compatible = "adi,ad7194"; 2160e8011faSEmmanuel Vadot reg = <0>; 2170e8011faSEmmanuel Vadot 2180e8011faSEmmanuel Vadot #address-cells = <1>; 2190e8011faSEmmanuel Vadot #size-cells = <0>; 2200e8011faSEmmanuel Vadot 2210e8011faSEmmanuel Vadot spi-max-frequency = <1000000>; 2220e8011faSEmmanuel Vadot spi-cpol; 2230e8011faSEmmanuel Vadot spi-cpha; 224*b2d2a78aSEmmanuel Vadot #clock-cells = <0>; 2250e8011faSEmmanuel Vadot interrupts = <25 0x2>; 2260e8011faSEmmanuel Vadot interrupt-parent = <&gpio>; 2270e8011faSEmmanuel Vadot aincom-supply = <&aincom>; 2280e8011faSEmmanuel Vadot dvdd-supply = <&dvdd>; 2290e8011faSEmmanuel Vadot avdd-supply = <&avdd>; 2300e8011faSEmmanuel Vadot vref-supply = <&vref>; 2310e8011faSEmmanuel Vadot 2320e8011faSEmmanuel Vadot channel@0 { 2330e8011faSEmmanuel Vadot reg = <0>; 2340e8011faSEmmanuel Vadot diff-channels = <1 6>; 2350e8011faSEmmanuel Vadot }; 2360e8011faSEmmanuel Vadot 2370e8011faSEmmanuel Vadot channel@1 { 2380e8011faSEmmanuel Vadot reg = <1>; 2390e8011faSEmmanuel Vadot single-channel = <1>; 2400e8011faSEmmanuel Vadot }; 2410e8011faSEmmanuel Vadot }; 2420e8011faSEmmanuel Vadot }; 243