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