Path: blob/main/sys/contrib/device-tree/Bindings/iio/adc/adi,ad4000.yaml
48406 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,ad4000.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices AD4000 and similar Analog to Digital Converters78maintainers:9- Marcelo Schmitt <marcelo.schmitt@analog.com>1011description: |12Analog Devices AD4000 family of Analog to Digital Converters with SPI support.13Specifications can be found at:14https://www.analog.com/media/en/technical-documentation/data-sheets/ad4000-4004-4008.pdf15https://www.analog.com/media/en/technical-documentation/data-sheets/ad4001-4005.pdf16https://www.analog.com/media/en/technical-documentation/data-sheets/ad4002-4006-4010.pdf17https://www.analog.com/media/en/technical-documentation/data-sheets/ad4003-4007-4011.pdf18https://www.analog.com/media/en/technical-documentation/data-sheets/ad4020-4021-4022.pdf19https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4001.pdf20https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4003.pdf2122$ref: /schemas/spi/spi-peripheral-props.yaml#2324properties:25compatible:26oneOf:27- const: adi,ad400028- items:29- enum:30- adi,ad400431- adi,ad400832- const: adi,ad40003334- const: adi,ad400135- items:36- enum:37- adi,ad400538- const: adi,ad40013940- const: adi,ad400241- items:42- enum:43- adi,ad400644- adi,ad401045- const: adi,ad40024647- const: adi,ad400348- items:49- enum:50- adi,ad400751- adi,ad401152- const: adi,ad40035354- const: adi,ad402055- items:56- enum:57- adi,ad402158- adi,ad402259- const: adi,ad40206061- const: adi,adaq40016263- const: adi,adaq40036465reg:66maxItems: 16768spi-max-frequency:69maximum: 102040816 # for VIO > 2.7 V, 81300813 for VIO > 1.7 V7071adi,sdi-pin:72$ref: /schemas/types.yaml#/definitions/string73enum: [ high, low, cs, sdi ]74default: sdi75description:76Describes how the ADC SDI pin is wired. A value of "sdi" indicates that77the ADC SDI is connected to host SDO. "high" indicates that the ADC SDI78pin is hard-wired to logic high (VIO). "low" indicates that it is79hard-wired low (GND). "cs" indicates that the ADC SDI pin is connected to80the host CS line.8182'#daisy-chained-devices': true8384vdd-supply:85description: A 1.8V supply that powers the chip (VDD).8687vio-supply:88description:89A 1.8V to 5.5V supply for the digital inputs and outputs (VIO).9091ref-supply:92description:93A 2.5 to 5V supply for the external reference voltage (REF).9495cnv-gpios:96description:97When provided, this property indicates the GPIO that is connected to the98CNV pin.99maxItems: 1100101adi,high-z-input:102type: boolean103description:104High-Z mode allows the amplifier and RC filter in front of the ADC to be105chosen based on the signal bandwidth of interest, rather than the settling106requirements of the switched capacitor SAR ADC inputs.107108adi,gain-milli:109description: |110The hardware gain applied to the ADC input (in milli units).111The gain provided by the ADC input scaler is defined by the hardware112connections between chip pins OUT+, R1K-, R1K1-, R1K+, R1K1+, and OUT-.113If not present, default to 1000 (no actual gain applied).114$ref: /schemas/types.yaml#/definitions/uint16115enum: [454, 909, 1000, 1900]116default: 1000117118interrupts:119description:120The SDO pin can also function as a busy indicator. This node should be121connected to an interrupt that is triggered when the SDO line goes low122while the SDI line is high and the CNV line is low ("3-wire" mode) or the123SDI line is low and the CNV line is high ("4-wire" mode); or when the SDO124line goes high while the SDI and CNV lines are high (chain mode),125maxItems: 1126127required:128- compatible129- reg130- vdd-supply131- vio-supply132- ref-supply133134allOf:135# The configuration register can only be accessed if SDI is connected to MOSI136- if:137required:138- adi,sdi-pin139then:140properties:141adi,high-z-input: false142# chain mode has lower SCLK max rate143- if:144required:145- '#daisy-chained-devices'146then:147properties:148spi-max-frequency:149maximum: 50000000 # for VIO > 2.7 V, 40000000 for VIO > 1.7 V150# Gain property only applies to ADAQ devices151- if:152properties:153compatible:154not:155contains:156enum:157- adi,adaq4001158- adi,adaq4003159then:160properties:161adi,gain-milli: false162163unevaluatedProperties: false164165examples:166- |167#include <dt-bindings/gpio/gpio.h>168spi {169#address-cells = <1>;170#size-cells = <0>;171adc@0 {172compatible = "adi,ad4020";173reg = <0>;174spi-max-frequency = <71000000>;175vdd-supply = <&supply_1_8V>;176vio-supply = <&supply_1_8V>;177ref-supply = <&supply_5V>;178adi,sdi-pin = "cs";179cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>;180};181};182- |183spi {184#address-cells = <1>;185#size-cells = <0>;186adc@0 {187compatible = "adi,adaq4003";188reg = <0>;189spi-max-frequency = <80000000>;190vdd-supply = <&supply_1_8V>;191vio-supply = <&supply_1_8V>;192ref-supply = <&supply_5V>;193adi,high-z-input;194adi,gain-milli = /bits/ 16 <454>;195};196};197198199