255 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/adc/adi,ad4695.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices Easy Drive Multiplexed SAR Analog to Digital Converters8 9maintainers:10 - Michael Hennerich <Michael.Hennerich@analog.com>11 - Nuno Sá <nuno.sa@analog.com>12 13description: |14 A family of similar multi-channel analog to digital converters with SPI bus.15 16 * https://www.analog.com/en/products/ad4695.html17 * https://www.analog.com/en/products/ad4696.html18 * https://www.analog.com/en/products/ad4697.html19 * https://www.analog.com/en/products/ad4698.html20 21$ref: /schemas/spi/spi-peripheral-props.yaml#22 23properties:24 compatible:25 enum:26 - adi,ad469527 - adi,ad469628 - adi,ad469729 - adi,ad469830 31 reg:32 maxItems: 133 34 spi-max-frequency:35 maximum: 8000000036 37 spi-cpol: true38 spi-cpha: true39 40 spi-rx-bus-width:41 minimum: 142 maximum: 443 44 avdd-supply:45 description: Analog power supply.46 47 vio-supply:48 description: I/O pin power supply.49 50 ldo-in-supply:51 description: Internal LDO Input. Mutually exclusive with vdd-supply.52 53 vdd-supply:54 description: Core power supply. Mutually exclusive with ldo-in-supply.55 56 ref-supply:57 description:58 External reference voltage. Mutually exclusive with refin-supply.59 60 refin-supply:61 description:62 Internal reference buffer input. Mutually exclusive with ref-supply.63 64 com-supply:65 description: Common voltage supply for pseudo-differential analog inputs.66 67 adi,no-ref-current-limit:68 $ref: /schemas/types.yaml#/definitions/flag69 description:70 When this flag is present, the REF Overvoltage Reduced Current protection71 is disabled.72 73 adi,no-ref-high-z:74 $ref: /schemas/types.yaml#/definitions/flag75 description:76 Enable this flag if the ref-supply requires Reference Input High-Z Mode77 to be disabled for proper operation.78 79 cnv-gpios:80 description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.81 maxItems: 182 83 reset-gpios:84 description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.85 maxItems: 186 87 interrupts:88 minItems: 189 items:90 - description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY).91 - description: Signal coming from the GP2 pin (ALERT).92 - description: Signal coming from the GP3 pin (BUSY).93 94 interrupt-names:95 minItems: 196 items:97 - const: gp098 - const: gp299 - const: gp3100 101 gpio-controller: true102 103 "#gpio-cells":104 const: 2105 description: |106 The first cell is the GPn number: 0 to 3.107 The second cell takes standard GPIO flags.108 109 "#address-cells":110 const: 1111 112 "#size-cells":113 const: 0114 115patternProperties:116 "^in(?:[13579]|1[135])-supply$":117 description:118 Optional voltage supply for odd numbered channels when they are used as119 the negative input for a pseudo-differential channel.120 121 "^channel@[0-9a-f]$":122 type: object123 $ref: adc.yaml124 unevaluatedProperties: false125 description:126 Describes each individual channel. In addition the properties defined127 below, bipolar from adc.yaml is also supported.128 129 properties:130 reg:131 maximum: 15132 133 common-mode-channel:134 description:135 Describes the common mode channel for single channels. 0xFF is REFGND136 and OxFE is COM. Macros are available for these values in137 dt-bindings/iio/adi,ad4695.h. Values 1 to 15 correspond to INx inputs.138 Only odd numbered INx inputs can be used as common mode channels.139 enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]140 default: 0xFF141 142 adi,no-high-z:143 $ref: /schemas/types.yaml#/definitions/flag144 description:145 Enable this flag if the input pin requires the Analog Input High-Z146 Mode to be disabled for proper operation.147 148 required:149 - reg150 151 allOf:152 # bipolar mode can't be used with REFGND153 - if:154 properties:155 common-mode-channel:156 const: 0xFF157 then:158 properties:159 bipolar: false160 161required:162 - compatible163 - reg164 - avdd-supply165 - vio-supply166 167allOf:168 - oneOf:169 - required:170 - ldo-in-supply171 - required:172 - vdd-supply173 174 - oneOf:175 - required:176 - ref-supply177 - required:178 - refin-supply179 180 # the internal reference buffer always requires high-z mode181 - if:182 required:183 - refin-supply184 then:185 properties:186 adi,no-ref-high-z: false187 188 # limit channels for 8-channel chips189 - if:190 properties:191 compatible:192 contains:193 enum:194 - adi,ad4697195 - adi,ad4698196 then:197 patternProperties:198 "^in(?:9|1[135])-supply$": false199 "^channel@[0-7]$":200 properties:201 reg:202 maximum: 7203 common-mode-channel:204 enum: [1, 3, 5, 7, 0xFE, 0xFF]205 "^channel@[8-9a-f]$": false206 207unevaluatedProperties: false208 209examples:210 - |211 #include <dt-bindings/gpio/gpio.h>212 #include <dt-bindings/iio/adi,ad4695.h>213 214 spi {215 #address-cells = <1>;216 #size-cells = <0>;217 218 adc@0 {219 compatible = "adi,ad4695";220 reg = <0>;221 spi-cpol;222 spi-cpha;223 spi-max-frequency = <80000000>;224 avdd-supply = <&power_supply>;225 ldo-in-supply = <&power_supply>;226 vio-supply = <&io_supply>;227 refin-supply = <&supply_5V>;228 com-supply = <&supply_2V5>;229 in3-supply = <&supply_2V5>;230 reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;231 232 #address-cells = <1>;233 #size-cells = <0>;234 235 /* Pseudo-differential channel between IN0 and REFGND. */236 channel@0 {237 reg = <0>;238 };239 240 /* Pseudo-differential channel between IN1 and COM. */241 channel@1 {242 reg = <1>;243 common-mode-channel = <AD4695_COMMON_MODE_COM>;244 bipolar;245 };246 247 /* Pseudo-differential channel between IN2 and IN3. */248 channel@2 {249 reg = <2>;250 common-mode-channel = <3>;251 bipolar;252 };253 };254 };255