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 - ti,adc081s 45 - ti,adc101s 46 - ti,adc121s 47 - ti,ads7866 48 - ti,ads7867 49 - ti,ads7868 50 - lltc,ltc2314-14 51 - items: 52 - const: rohm,bu79100g 53 - const: ti,ads7866 54 55 reg: 56 maxItems: 1 57 58 vcc-supply: 59 description: 60 Main powersupply voltage for the chips, sometimes referred to as VDD on 61 datasheets. If there is no separate vref-supply, then this is needed 62 to establish channel scaling. 63 64 vdrive-supply: 65 description: 66 Some devices have separate supply for their digital control side. 67 68 vref-supply: 69 description: 70 Some devices have a specific reference voltage supplied on a different pin 71 to the other supplies. Needed to be able to establish channel scaling 72 unless there is also an internal reference available (e.g. ad7091r) 73 74 adi,conversion-start-gpios: 75 description: A GPIO used to trigger the start of a conversion 76 maxItems: 1 77 78required: 79 - compatible 80 - reg 81 82allOf: 83 - $ref: /schemas/spi/spi-peripheral-props.yaml# 84 85 # Devices where reference is vcc 86 - if: 87 properties: 88 compatible: 89 contains: 90 enum: 91 - adi,ad7091 92 - adi,ad7276 93 - adi,ad7277 94 - adi,ad7278 95 - adi,ad7466 96 - adi,ad7467 97 - adi,ad7468 98 - adi,ad7940 99 - ti,adc081s 100 - ti,adc101s 101 - ti,adc121s 102 - ti,ads7866 103 - ti,ads7868 104 then: 105 required: 106 - vcc-supply 107 # Devices with a vref 108 - if: 109 properties: 110 compatible: 111 contains: 112 enum: 113 - adi,ad7091r 114 - adi,ad7273 115 - adi,ad7274 116 - adi,ad7475 117 - lltc,ltc2314-14 118 then: 119 properties: 120 vref-supply: true 121 else: 122 properties: 123 vref-supply: false 124 # Devices with a vref where it is not optional 125 - if: 126 properties: 127 compatible: 128 contains: 129 enum: 130 - adi,ad7273 131 - adi,ad7274 132 - adi,ad7475 133 - lltc,ltc2314-14 134 then: 135 required: 136 - vref-supply 137 - if: 138 properties: 139 compatible: 140 contains: 141 enum: 142 - adi,ad7475 143 - adi,ad7495 144 then: 145 properties: 146 vdrive-supply: true 147 else: 148 properties: 149 vdrive-supply: false 150 - if: 151 properties: 152 compatible: 153 contains: 154 enum: 155 - adi,ad7091 156 - adi,ad7091r 157 then: 158 properties: 159 adi,conversion-start-gpios: true 160 else: 161 properties: 162 adi,conversion-start-gpios: false 163 164unevaluatedProperties: false 165 166examples: 167 - | 168 spi { 169 #address-cells = <1>; 170 #size-cells = <0>; 171 172 adc@0 { 173 compatible = "adi,ad7091r"; 174 reg = <0>; 175 spi-max-frequency = <5000000>; 176 vcc-supply = <&adc_vcc>; 177 vref-supply = <&adc_vref>; 178 }; 179 }; 180... 181