Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
53955 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:40items:41minimum: 142maximum: 44344avdd-supply:45description: Analog power supply.4647vio-supply:48description: I/O pin power supply.4950ldo-in-supply:51description: Internal LDO Input. Mutually exclusive with vdd-supply.5253vdd-supply:54description: Core power supply. Mutually exclusive with ldo-in-supply.5556ref-supply:57description:58External reference voltage. Mutually exclusive with refin-supply.5960refin-supply:61description:62Internal reference buffer input. Mutually exclusive with ref-supply.6364com-supply:65description: Common voltage supply for pseudo-differential analog inputs.6667adi,no-ref-current-limit:68$ref: /schemas/types.yaml#/definitions/flag69description:70When this flag is present, the REF Overvoltage Reduced Current protection71is disabled.7273adi,no-ref-high-z:74$ref: /schemas/types.yaml#/definitions/flag75description:76Enable this flag if the ref-supply requires Reference Input High-Z Mode77to be disabled for proper operation.7879cnv-gpios:80description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.81maxItems: 18283reset-gpios:84description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.85maxItems: 18687pwms:88description: PWM signal connected to the CNV pin.89maxItems: 19091interrupts:92minItems: 193items:94- description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY).95- description: Signal coming from the GP2 pin (ALERT).96- description: Signal coming from the GP3 pin (BUSY).9798interrupt-names:99minItems: 1100items:101- const: gp0102- const: gp2103- const: gp3104105gpio-controller: true106107"#gpio-cells":108const: 2109description: |110The first cell is the GPn number: 0 to 3.111The second cell takes standard GPIO flags.112113'#trigger-source-cells':114description: |115First cell indicates the output signal: 0 = BUSY, 1 = ALERT.116Second cell indicates which GPn pin is used: 0, 2 or 3.117118For convenience, macros for these values are available in119dt-bindings/iio/adc/adi,ad4695.h.120const: 2121122"#address-cells":123const: 1124125"#size-cells":126const: 0127128patternProperties:129"^in(?:[13579]|1[135])-supply$":130description:131Optional voltage supply for odd numbered channels when they are used as132the negative input for a pseudo-differential channel.133134"^channel@[0-9a-f]$":135type: object136$ref: adc.yaml137unevaluatedProperties: false138description:139Describes each individual channel. In addition the properties defined140below, bipolar from adc.yaml is also supported.141142properties:143reg:144maximum: 15145146common-mode-channel:147description:148Describes the common mode channel for single channels. 0xFF is REFGND149and OxFE is COM. Macros are available for these values in150dt-bindings/iio/adc/adi,ad4695.h. Values 1 to 15 correspond to INx151inputs. Only odd numbered INx inputs can be used as common mode152channels.153enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]154default: 0xFF155156adi,no-high-z:157$ref: /schemas/types.yaml#/definitions/flag158description:159Enable this flag if the input pin requires the Analog Input High-Z160Mode to be disabled for proper operation.161162required:163- reg164165allOf:166# bipolar mode can't be used with REFGND167- if:168properties:169common-mode-channel:170const: 0xFF171then:172properties:173bipolar: false174175required:176- compatible177- reg178- avdd-supply179- vio-supply180181allOf:182- oneOf:183- required:184- ldo-in-supply185- required:186- vdd-supply187188- oneOf:189- required:190- ref-supply191- required:192- refin-supply193194# the internal reference buffer always requires high-z mode195- if:196required:197- refin-supply198then:199properties:200adi,no-ref-high-z: false201202# limit channels for 8-channel chips203- if:204properties:205compatible:206contains:207enum:208- adi,ad4697209- adi,ad4698210then:211patternProperties:212"^in(?:9|1[135])-supply$": false213"^channel@[0-7]$":214properties:215reg:216maximum: 7217common-mode-channel:218enum: [1, 3, 5, 7, 0xFE, 0xFF]219"^channel@[8-9a-f]$": false220221unevaluatedProperties: false222223examples:224- |225#include <dt-bindings/gpio/gpio.h>226#include <dt-bindings/iio/adc/adi,ad4695.h>227228spi {229#address-cells = <1>;230#size-cells = <0>;231232adc@0 {233compatible = "adi,ad4695";234reg = <0>;235spi-cpol;236spi-cpha;237spi-max-frequency = <80000000>;238avdd-supply = <&power_supply>;239ldo-in-supply = <&power_supply>;240vio-supply = <&io_supply>;241refin-supply = <&supply_5V>;242com-supply = <&supply_2V5>;243in3-supply = <&supply_2V5>;244reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;245246#address-cells = <1>;247#size-cells = <0>;248249/* Pseudo-differential channel between IN0 and REFGND. */250channel@0 {251reg = <0>;252};253254/* Pseudo-differential channel between IN1 and COM. */255channel@1 {256reg = <1>;257common-mode-channel = <AD4695_COMMON_MODE_COM>;258bipolar;259};260261/* Pseudo-differential channel between IN2 and IN3. */262channel@2 {263reg = <2>;264common-mode-channel = <3>;265bipolar;266};267};268};269270271