Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 # Copyright 2019 Analog Devices Inc.
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007 
0008 title: AD7476 and similar simple SPI ADCs from multiple manufacturers.
0009 
0010 maintainers:
0011   - Michael Hennerich <michael.hennerich@analog.com>
0012 
0013 description: |
0014   A lot of simple SPI ADCs have very straight forward interfaces.
0015   They typically don't provide a MOSI pin, simply reading out data
0016   on MISO when the clock toggles.
0017 
0018 properties:
0019   compatible:
0020     enum:
0021       - adi,ad7091
0022       - adi,ad7091r
0023       - adi,ad7273
0024       - adi,ad7274
0025       - adi,ad7276
0026       - adi,ad7277
0027       - adi,ad7278
0028       - adi,ad7466
0029       - adi,ad7467
0030       - adi,ad7468
0031       - adi,ad7475
0032       - adi,ad7476
0033       - adi,ad7476a
0034       - adi,ad7477
0035       - adi,ad7477a
0036       - adi,ad7478
0037       - adi,ad7478a
0038       - adi,ad7495
0039       - adi,ad7910
0040       - adi,ad7920
0041       - adi,ad7940
0042       - ti,adc081s
0043       - ti,adc101s
0044       - ti,adc121s
0045       - ti,ads7866
0046       - ti,ads7867
0047       - ti,ads7868
0048       - lltc,ltc2314-14
0049 
0050   reg:
0051     maxItems: 1
0052 
0053   vcc-supply:
0054     description:
0055       Main powersupply voltage for the chips, sometimes referred to as VDD on
0056       datasheets.  If there is no separate vref-supply, then this is needed
0057       to establish channel scaling.
0058 
0059   vdrive-supply:
0060     description:
0061       Some devices have separate supply for their digital control side.
0062 
0063   vref-supply:
0064     description:
0065       Some devices have a specific reference voltage supplied on a different pin
0066       to the other supplies. Needed to be able to establish channel scaling
0067       unless there is also an internal reference available (e.g. ad7091r)
0068 
0069   spi-max-frequency: true
0070 
0071   adi,conversion-start-gpios:
0072     description: A GPIO used to trigger the start of a conversion
0073     maxItems: 1
0074 
0075 required:
0076   - compatible
0077   - reg
0078 
0079 additionalProperties: false
0080 
0081 allOf:
0082   # Devices where reference is vcc
0083   - if:
0084       properties:
0085         compatible:
0086           contains:
0087             enum:
0088               - adi,ad7091
0089               - adi,ad7276
0090               - adi,ad7277
0091               - adi,ad7278
0092               - adi,ad7466
0093               - adi,ad7467
0094               - adi,ad7468
0095               - adi,ad7940
0096               - ti,adc081s
0097               - ti,adc101s
0098               - ti,adc121s
0099               - ti,ads7866
0100               - ti,ads7868
0101     then:
0102       required:
0103         - vcc-supply
0104   # Devices with a vref
0105   - if:
0106       properties:
0107         compatible:
0108           contains:
0109             enum:
0110               - adi,ad7091r
0111               - adi,ad7273
0112               - adi,ad7274
0113               - adi,ad7475
0114               - lltc,ltc2314-14
0115     then:
0116       properties:
0117         vref-supply: true
0118     else:
0119       properties:
0120         vref-supply: false
0121   # Devices with a vref where it is not optional
0122   - if:
0123       properties:
0124         compatible:
0125           contains:
0126             enum:
0127               - adi,ad7273
0128               - adi,ad7274
0129               - adi,ad7475
0130               - lltc,ltc2314-14
0131     then:
0132       required:
0133         - vref-supply
0134   - if:
0135       properties:
0136         compatible:
0137           contains:
0138             enum:
0139               - adi,ad7475
0140               - adi,ad7495
0141     then:
0142       properties:
0143         vdrive-supply: true
0144     else:
0145       properties:
0146         vdrive-supply: false
0147   - if:
0148       properties:
0149         compatible:
0150           contains:
0151             enum:
0152               - adi,ad7091
0153               - adi,ad7091r
0154     then:
0155       properties:
0156         adi,conversion-start-gpios: true
0157     else:
0158       properties:
0159         adi,conversion-start-gpios: false
0160 
0161 examples:
0162   - |
0163     spi {
0164       #address-cells = <1>;
0165       #size-cells = <0>;
0166 
0167       adc@0 {
0168         compatible = "adi,ad7091r";
0169         reg = <0>;
0170         spi-max-frequency = <5000000>;
0171         vcc-supply = <&adc_vcc>;
0172         vref-supply = <&adc_vref>;
0173       };
0174     };
0175 ...