Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/adc/adi,ad7944.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices PulSAR LFCSP Analog to Digital Converters78maintainers:9- Michael Hennerich <Michael.Hennerich@analog.com>10- Nuno Sá <nuno.sa@analog.com>1112description: |13A family of pin-compatible single channel differential analog to digital14converters with SPI support in a LFCSP package.1516* https://www.analog.com/en/products/ad7944.html17* https://www.analog.com/en/products/ad7985.html18* https://www.analog.com/en/products/ad7986.html1920$ref: /schemas/spi/spi-peripheral-props.yaml#2122properties:23compatible:24enum:25- adi,ad794426- adi,ad798527- adi,ad79862829reg:30maxItems: 13132spi-max-frequency:33maximum: 1111111113435spi-cpol: true36spi-cpha: true3738adi,spi-mode:39$ref: /schemas/types.yaml#/definitions/string40enum: [ single, chain ]41description: |42This property indicates the SPI wiring configuration.4344When this property is omitted, it is assumed that the device is using what45the datasheet calls "4-wire mode". This is the conventional SPI mode used46when there are multiple devices on the same bus. In this mode, the CNV47line is used to initiate the conversion and the SDI line is connected to48CS on the SPI controller.4950When this property is present, it indicates that the device is using one51of the following alternative wiring configurations:5253* single: The datasheet calls this "3-wire mode". (NOTE: The datasheet's54definition of 3-wire mode is NOT at all related to the standard55spi-3wire property!) This mode is often used when the ADC is the only56device on the bus. In this mode, SDI is tied to VIO, and the CNV line57can be connected to the CS line of the SPI controller or to a GPIO, in58which case the CS line of the controller is unused.59* chain: The datasheet calls this "chain mode". This mode is used to save60on wiring when multiple ADCs are used. In this mode, the SDI line of61one chip is tied to the SDO of the next chip in the chain and the SDI of62the last chip in the chain is tied to GND. Only the first chip in the63chain is connected to the SPI bus. The CNV line of all chips are tied64together. The CS line of the SPI controller can be used as the CNV line65only if it is active high.6667'#daisy-chained-devices': true6869avdd-supply:70description: A 2.5V supply that powers the analog circuitry.7172dvdd-supply:73description: A 2.5V supply that powers the digital circuitry.7475vio-supply:76description:77A 1.8V to 2.7V supply for the digital inputs and outputs.7879bvdd-supply:80description:81A voltage supply for the buffered power. When using an external reference82without an internal buffer (PDREF high, REFIN low), this should be83connected to the same supply as ref-supply. Otherwise, when using an84internal reference or an external reference with an internal buffer, this85is connected to a 5V supply.8687ref-supply:88description:89Voltage regulator for the external reference voltage (REF). This property90is omitted when using an internal reference.9192refin-supply:93description:94Voltage regulator for the reference buffer input (REFIN). When using an95external buffer with internal reference, this should be connected to a961.2V external reference voltage supply. Otherwise, this property is97omitted.9899cnv-gpios:100description:101The Convert Input (CNV). This input has multiple functions. It initiates102the conversions and selects the SPI mode of the device (chain or CS). In103'single' mode, this property is omitted if the CNV pin is connected to the104CS line of the SPI controller.105maxItems: 1106107turbo-gpios:108description:109GPIO connected to the TURBO line. If omitted, it is assumed that the TURBO110line is hard-wired and the state is determined by the adi,always-turbo111property.112maxItems: 1113114adi,always-turbo:115type: boolean116description:117When present, this property indicates that the TURBO line is hard-wired118and the state is always high. If neither this property nor turbo-gpios is119present, the TURBO line is assumed to be hard-wired and the state is120always low.121122interrupts:123description:124The SDO pin can also function as a busy indicator. This node should be125connected to an interrupt that is triggered when the SDO line goes low126while the SDI line is high and the CNV line is low ('single' mode) or the127SDI line is low and the CNV line is high ('multi' mode); or when the SDO128line goes high while the SDI and CNV lines are high (chain mode),129maxItems: 1130131required:132- compatible133- reg134- avdd-supply135- dvdd-supply136- vio-supply137- bvdd-supply138139allOf:140# ref-supply and refin-supply are mutually exclusive (neither is also valid)141- if:142required:143- ref-supply144then:145properties:146refin-supply: false147- if:148required:149- refin-supply150then:151properties:152ref-supply: false153# in '4-wire' mode, cnv-gpios is required, for other modes it is optional154- if:155not:156required:157- adi,spi-mode158then:159required:160- cnv-gpios161# chain mode has lower SCLK max rate and doesn't work when TURBO is enabled162- if:163required:164- adi,spi-mode165properties:166adi,spi-mode:167const: chain168then:169properties:170spi-max-frequency:171maximum: 90909090172adi,always-turbo: false173required:174- '#daisy-chained-devices'175else:176properties:177'#daisy-chained-devices': false178# turbo-gpios and adi,always-turbo are mutually exclusive179- if:180required:181- turbo-gpios182then:183properties:184adi,always-turbo: false185- if:186required:187- adi,always-turbo188then:189properties:190turbo-gpios: false191192unevaluatedProperties: false193194examples:195- |196#include <dt-bindings/gpio/gpio.h>197spi {198#address-cells = <1>;199#size-cells = <0>;200adc@0 {201compatible = "adi,ad7944";202reg = <0>;203spi-cpha;204spi-max-frequency = <111111111>;205avdd-supply = <&supply_2_5V>;206dvdd-supply = <&supply_2_5V>;207vio-supply = <&supply_1_8V>;208bvdd-supply = <&supply_5V>;209cnv-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;210turbo-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;211};212};213214215