1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2# Copyright 2019 Analog Devices Inc. 3%YAML 1.2 4--- 5$id: http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml# 6$schema: http://devicetree.org/meta-schemas/core.yaml# 7 8title: AD7476 and similar simple SPI ADCs from multiple manufacturers. 9 10maintainers: 11 - Michael Hennerich <michael.hennerich@analog.com> 12 13description: | 14 A lot of simple SPI ADCs have very straight forward interfaces. 15 They typically don't provide a MOSI pin, simply reading out data 16 on MISO when the clock toggles. 17 18properties: 19 compatible: 20 oneOf: 21 - items: 22 - enum: 23 - adi,ad7091 24 - adi,ad7091r 25 - adi,ad7273 26 - adi,ad7274 27 - adi,ad7276 28 - adi,ad7277 29 - adi,ad7278 30 - adi,ad7466 31 - adi,ad7467 32 - adi,ad7468 33 - adi,ad7475 34 - adi,ad7476 35 - adi,ad7476a 36 - adi,ad7477 37 - adi,ad7477a 38 - adi,ad7478 39 - adi,ad7478a 40 - adi,ad7495 41 - adi,ad7910 42 - adi,ad7920 43 - adi,ad7940 44 - rohm,bd79105 45 - ti,adc081s 46 - ti,adc101s 47 - ti,adc121s 48 - ti,ads7866 49 - ti,ads7867 50 - ti,ads7868 51 - lltc,ltc2314-14 52 - items: 53 - const: rohm,bu79100g 54 - const: ti,ads7866 55 56 reg: 57 maxItems: 1 58 59 interrupts: 60 description: 61 The data-ready interrupt. Provided via DOUT pin. 62 maxItems: 1 63 64 vcc-supply: 65 description: 66 Main powersupply voltage for the chips, sometimes referred to as VDD on 67 datasheets. If there is no separate vref-supply, then this is needed 68 to establish channel scaling. 69 70 vdrive-supply: 71 description: 72 Some devices have separate supply for their digital control side. 73 74 vref-supply: 75 description: 76 Some devices have a specific reference voltage supplied on a different pin 77 to the other supplies. Needed to be able to establish channel scaling 78 unless there is also an internal reference available (e.g. ad7091r) 79 80 adi,conversion-start-gpios: 81 description: A GPIO used to trigger the start of a conversion 82 maxItems: 1 83 84 rdy-gpios: 85 description: A GPIO for detecting the data-ready. 86 maxItems: 1 87 88required: 89 - compatible 90 - reg 91 92allOf: 93 - $ref: /schemas/spi/spi-peripheral-props.yaml# 94 95# Devices with an IRQ 96 - if: 97 properties: 98 compatible: 99 contains: 100 enum: 101 - rohm,bd79105 102 then: 103 properties: 104 interrupts: true 105 else: 106 properties: 107 interrupts: false 108 109 # Devices where reference is vcc 110 - if: 111 properties: 112 compatible: 113 contains: 114 enum: 115 - adi,ad7091 116 - adi,ad7276 117 - adi,ad7277 118 - adi,ad7278 119 - adi,ad7466 120 - adi,ad7467 121 - adi,ad7468 122 - adi,ad7940 123 - ti,adc081s 124 - ti,adc101s 125 - ti,adc121s 126 - ti,ads7866 127 - ti,ads7868 128 then: 129 required: 130 - vcc-supply 131 # Devices with a vref 132 - if: 133 not: 134 properties: 135 compatible: 136 contains: 137 enum: 138 - adi,ad7091r 139 - adi,ad7273 140 - adi,ad7274 141 - adi,ad7475 142 - lltc,ltc2314-14 143 - rohm,bd79105 144 then: 145 properties: 146 vref-supply: false 147 # Devices with a vref where it is not optional 148 - if: 149 properties: 150 compatible: 151 contains: 152 enum: 153 - adi,ad7273 154 - adi,ad7274 155 - adi,ad7475 156 - lltc,ltc2314-14 157 - rohm,bd79105 158 then: 159 required: 160 - vref-supply 161 - if: 162 not: 163 properties: 164 compatible: 165 contains: 166 enum: 167 - adi,ad7475 168 - adi,ad7495 169 - rohm,bd79105 170 then: 171 properties: 172 vdrive-supply: false 173 174 # Devices which support polling the data-ready via GPIO 175 - if: 176 not: 177 properties: 178 compatible: 179 contains: 180 enum: 181 - rohm,bd79105 182 then: 183 properties: 184 rdy-gpios: false 185 186 - if: 187 not: 188 properties: 189 compatible: 190 contains: 191 enum: 192 - adi,ad7091 193 - adi,ad7091r 194 - rohm,bd79105 195 then: 196 properties: 197 adi,conversion-start-gpios: false 198 199 # Devices with a convstart GPIO where it is not optional 200 - if: 201 properties: 202 compatible: 203 contains: 204 enum: 205 - rohm,bd79105 206 then: 207 required: 208 - adi,conversion-start-gpios 209 210unevaluatedProperties: false 211 212examples: 213 - | 214 spi { 215 #address-cells = <1>; 216 #size-cells = <0>; 217 218 adc@0 { 219 compatible = "adi,ad7091r"; 220 reg = <0>; 221 spi-max-frequency = <5000000>; 222 vcc-supply = <&adc_vcc>; 223 vref-supply = <&adc_vref>; 224 }; 225 }; 226... 227