Path: blob/main/sys/contrib/device-tree/Bindings/iio/adc/adi,ad4695.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,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: 18586interrupts:87minItems: 188items:89- description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY).90- description: Signal coming from the GP2 pin (ALERT).91- description: Signal coming from the GP3 pin (BUSY).9293interrupt-names:94minItems: 195items:96- const: gp097- const: gp298- const: gp399100gpio-controller: true101102"#gpio-cells":103const: 2104description: |105The first cell is the GPn number: 0 to 3.106The second cell takes standard GPIO flags.107108"#address-cells":109const: 1110111"#size-cells":112const: 0113114patternProperties:115"^in(?:[13579]|1[135])-supply$":116description:117Optional voltage supply for odd numbered channels when they are used as118the negative input for a pseudo-differential channel.119120"^channel@[0-9a-f]$":121type: object122$ref: adc.yaml123unevaluatedProperties: false124description:125Describes each individual channel. In addition the properties defined126below, bipolar from adc.yaml is also supported.127128properties:129reg:130maximum: 15131132common-mode-channel:133description:134Describes the common mode channel for single channels. 0xFF is REFGND135and OxFE is COM. Macros are available for these values in136dt-bindings/iio/adi,ad4695.h. Values 1 to 15 correspond to INx inputs.137Only odd numbered INx inputs can be used as common mode channels.138enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]139default: 0xFF140141adi,no-high-z:142$ref: /schemas/types.yaml#/definitions/flag143description:144Enable this flag if the input pin requires the Analog Input High-Z145Mode to be disabled for proper operation.146147required:148- reg149150allOf:151# bipolar mode can't be used with REFGND152- if:153properties:154common-mode-channel:155const: 0xFF156then:157properties:158bipolar: false159160required:161- compatible162- reg163- avdd-supply164- vio-supply165166allOf:167- oneOf:168- required:169- ldo-in-supply170- required:171- vdd-supply172173- oneOf:174- required:175- ref-supply176- required:177- refin-supply178179# the internal reference buffer always requires high-z mode180- if:181required:182- refin-supply183then:184properties:185adi,no-ref-high-z: false186187# limit channels for 8-channel chips188- if:189properties:190compatible:191contains:192enum:193- adi,ad4697194- adi,ad4698195then:196patternProperties:197"^in(?:9|1[135])-supply$": false198"^channel@[0-7]$":199properties:200reg:201maximum: 7202common-mode-channel:203enum: [1, 3, 5, 7, 0xFE, 0xFF]204"^channel@[8-9a-f]$": false205206unevaluatedProperties: false207208examples:209- |210#include <dt-bindings/gpio/gpio.h>211#include <dt-bindings/iio/adi,ad4695.h>212213spi {214#address-cells = <1>;215#size-cells = <0>;216217adc@0 {218compatible = "adi,ad4695";219reg = <0>;220spi-cpol;221spi-cpha;222spi-max-frequency = <80000000>;223avdd-supply = <&power_supply>;224ldo-in-supply = <&power_supply>;225vio-supply = <&io_supply>;226refin-supply = <&supply_5V>;227com-supply = <&supply_2V5>;228in3-supply = <&supply_2V5>;229reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;230231#address-cells = <1>;232#size-cells = <0>;233234/* Pseudo-differential channel between IN0 and REFGND. */235channel@0 {236reg = <0>;237};238239/* Pseudo-differential channel between IN1 and COM. */240channel@1 {241reg = <1>;242common-mode-channel = <AD4695_COMMON_MODE_COM>;243bipolar;244};245246/* Pseudo-differential channel between IN2 and IN3. */247channel@2 {248reg = <2>;249common-mode-channel = <3>;250bipolar;251};252};253};254255256