Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad4695.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,ad4695.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices Easy Drive Multiplexed SAR Analog to Digital Converters78maintainers:9- Michael Hennerich <Michael.Hennerich@analog.com>10- Nuno Sá <nuno.sa@analog.com>1112description: |13A family of similar multi-channel analog to digital converters with SPI bus.1415* https://www.analog.com/en/products/ad4695.html16* https://www.analog.com/en/products/ad4696.html17* https://www.analog.com/en/products/ad4697.html18* https://www.analog.com/en/products/ad4698.html1920$ref: /schemas/spi/spi-peripheral-props.yaml#2122properties:23compatible:24enum:25- adi,ad469526- adi,ad469627- adi,ad469728- adi,ad46982930reg:31maxItems: 13233spi-max-frequency:34maximum: 800000003536spi-cpol: true37spi-cpha: true3839spi-rx-bus-width:40minimum: 141maximum: 44243avdd-supply:44description: Analog power supply.4546vio-supply:47description: I/O pin power supply.4849ldo-in-supply:50description: Internal LDO Input. Mutually exclusive with vdd-supply.5152vdd-supply:53description: Core power supply. Mutually exclusive with ldo-in-supply.5455ref-supply:56description:57External reference voltage. Mutually exclusive with refin-supply.5859refin-supply:60description:61Internal reference buffer input. Mutually exclusive with ref-supply.6263com-supply:64description: Common voltage supply for pseudo-differential analog inputs.6566adi,no-ref-current-limit:67$ref: /schemas/types.yaml#/definitions/flag68description:69When this flag is present, the REF Overvoltage Reduced Current protection70is disabled.7172adi,no-ref-high-z:73$ref: /schemas/types.yaml#/definitions/flag74description:75Enable this flag if the ref-supply requires Reference Input High-Z Mode76to be disabled for proper operation.7778cnv-gpios:79description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.80maxItems: 18182reset-gpios:83description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.84maxItems: 18586pwms:87description: PWM signal connected to the CNV pin.88maxItems: 18990interrupts:91minItems: 192items:93- description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY).94- description: Signal coming from the GP2 pin (ALERT).95- description: Signal coming from the GP3 pin (BUSY).9697interrupt-names:98minItems: 199items:100- const: gp0101- const: gp2102- const: gp3103104gpio-controller: true105106"#gpio-cells":107const: 2108description: |109The first cell is the GPn number: 0 to 3.110The second cell takes standard GPIO flags.111112'#trigger-source-cells':113description: |114First cell indicates the output signal: 0 = BUSY, 1 = ALERT.115Second cell indicates which GPn pin is used: 0, 2 or 3.116117For convenience, macros for these values are available in118dt-bindings/iio/adc/adi,ad4695.h.119const: 2120121"#address-cells":122const: 1123124"#size-cells":125const: 0126127patternProperties:128"^in(?:[13579]|1[135])-supply$":129description:130Optional voltage supply for odd numbered channels when they are used as131the negative input for a pseudo-differential channel.132133"^channel@[0-9a-f]$":134type: object135$ref: adc.yaml136unevaluatedProperties: false137description:138Describes each individual channel. In addition the properties defined139below, bipolar from adc.yaml is also supported.140141properties:142reg:143maximum: 15144145common-mode-channel:146description:147Describes the common mode channel for single channels. 0xFF is REFGND148and OxFE is COM. Macros are available for these values in149dt-bindings/iio/adc/adi,ad4695.h. Values 1 to 15 correspond to INx150inputs. Only odd numbered INx inputs can be used as common mode151channels.152enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]153default: 0xFF154155adi,no-high-z:156$ref: /schemas/types.yaml#/definitions/flag157description:158Enable this flag if the input pin requires the Analog Input High-Z159Mode to be disabled for proper operation.160161required:162- reg163164allOf:165# bipolar mode can't be used with REFGND166- if:167properties:168common-mode-channel:169const: 0xFF170then:171properties:172bipolar: false173174required:175- compatible176- reg177- avdd-supply178- vio-supply179180allOf:181- oneOf:182- required:183- ldo-in-supply184- required:185- vdd-supply186187- oneOf:188- required:189- ref-supply190- required:191- refin-supply192193# the internal reference buffer always requires high-z mode194- if:195required:196- refin-supply197then:198properties:199adi,no-ref-high-z: false200201# limit channels for 8-channel chips202- if:203properties:204compatible:205contains:206enum:207- adi,ad4697208- adi,ad4698209then:210patternProperties:211"^in(?:9|1[135])-supply$": false212"^channel@[0-7]$":213properties:214reg:215maximum: 7216common-mode-channel:217enum: [1, 3, 5, 7, 0xFE, 0xFF]218"^channel@[8-9a-f]$": false219220unevaluatedProperties: false221222examples:223- |224#include <dt-bindings/gpio/gpio.h>225#include <dt-bindings/iio/adc/adi,ad4695.h>226227spi {228#address-cells = <1>;229#size-cells = <0>;230231adc@0 {232compatible = "adi,ad4695";233reg = <0>;234spi-cpol;235spi-cpha;236spi-max-frequency = <80000000>;237avdd-supply = <&power_supply>;238ldo-in-supply = <&power_supply>;239vio-supply = <&io_supply>;240refin-supply = <&supply_5V>;241com-supply = <&supply_2V5>;242in3-supply = <&supply_2V5>;243reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;244245#address-cells = <1>;246#size-cells = <0>;247248/* Pseudo-differential channel between IN0 and REFGND. */249channel@0 {250reg = <0>;251};252253/* Pseudo-differential channel between IN1 and COM. */254channel@1 {255reg = <1>;256common-mode-channel = <AD4695_COMMON_MODE_COM>;257bipolar;258};259260/* Pseudo-differential channel between IN2 and IN3. */261channel@2 {262reg = <2>;263common-mode-channel = <3>;264bipolar;265};266};267};268269270