Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Analog Devices AD7606 Simultaneous Sampling ADC
0008 
0009 maintainers:
0010   - Michael Hennerich <michael.hennerich@analog.com>
0011 
0012 description: |
0013   Analog Devices AD7606 Simultaneous Sampling ADC
0014   https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
0015   https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
0016   https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
0017 
0018 properties:
0019   compatible:
0020     enum:
0021       - adi,ad7605-4
0022       - adi,ad7606-8
0023       - adi,ad7606-6
0024       - adi,ad7606-4
0025       - adi,ad7606b
0026       - adi,ad7616
0027 
0028   reg:
0029     maxItems: 1
0030 
0031   spi-cpha: true
0032 
0033   spi-cpol: true
0034 
0035   spi-max-frequency: true
0036 
0037   avcc-supply: true
0038 
0039   interrupts:
0040     maxItems: 1
0041 
0042   adi,conversion-start-gpios:
0043     description:
0044       Must be the device tree identifier of the CONVST pin.
0045       This logic input is used to initiate conversions on the analog
0046       input channels. As the line is active high, it should be marked
0047       GPIO_ACTIVE_HIGH.
0048     maxItems: 1
0049 
0050   reset-gpios:
0051     description:
0052       Must be the device tree identifier of the RESET pin. If specified,
0053       it will be asserted during driver probe. As the line is active high,
0054       it should be marked GPIO_ACTIVE_HIGH.
0055     maxItems: 1
0056 
0057   standby-gpios:
0058     description:
0059       Must be the device tree identifier of the STBY pin. This pin is used
0060       to place the AD7606 into one of two power-down modes, Standby mode or
0061       Shutdown mode. As the line is active low, it should be marked
0062       GPIO_ACTIVE_LOW.
0063     maxItems: 1
0064 
0065   adi,first-data-gpios:
0066     description:
0067       Must be the device tree identifier of the FRSTDATA pin.
0068       The FRSTDATA output indicates when the first channel, V1, is
0069       being read back on either the parallel, byte or serial interface.
0070       As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
0071     maxItems: 1
0072 
0073   adi,range-gpios:
0074     description:
0075       Must be the device tree identifier of the RANGE pin. The polarity on
0076       this pin determines the input range of the analog input channels. If
0077       this pin is tied to a logic high, the analog input range is ±10V for
0078       all channels. If this pin is tied to a logic low, the analog input range
0079       is ±5V for all channels. As the line is active high, it should be marked
0080       GPIO_ACTIVE_HIGH.
0081     maxItems: 1
0082 
0083   adi,oversampling-ratio-gpios:
0084     description:
0085       Must be the device tree identifier of the over-sampling
0086       mode pins. As the line is active high, it should be marked
0087       GPIO_ACTIVE_HIGH.
0088     maxItems: 3
0089 
0090   adi,sw-mode:
0091     description:
0092       Software mode of operation, so far available only for ad7616 and ad7606b.
0093       It is enabled when all three oversampling mode pins are connected to
0094       high level. The device is configured by the corresponding registers. If the
0095       adi,oversampling-ratio-gpios property is defined, then the driver will set the
0096       oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
0097       to VDD.
0098     type: boolean
0099 
0100 required:
0101   - compatible
0102   - reg
0103   - spi-cpha
0104   - avcc-supply
0105   - interrupts
0106   - adi,conversion-start-gpios
0107 
0108 additionalProperties: false
0109 
0110 examples:
0111   - |
0112     #include <dt-bindings/gpio/gpio.h>
0113     #include <dt-bindings/interrupt-controller/irq.h>
0114     spi0 {
0115         #address-cells = <1>;
0116         #size-cells = <0>;
0117 
0118         adc@0 {
0119                 compatible = "adi,ad7606-8";
0120                 reg = <0>;
0121                 spi-max-frequency = <1000000>;
0122                 spi-cpol;
0123                 spi-cpha;
0124 
0125                 avcc-supply = <&adc_vref>;
0126 
0127                 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
0128                 interrupt-parent = <&gpio>;
0129 
0130                 adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
0131                 reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
0132                 adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
0133                 adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
0134                                                <&gpio 23 GPIO_ACTIVE_HIGH>,
0135                                                <&gpio 26 GPIO_ACTIVE_HIGH>;
0136                 standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
0137                 adi,sw-mode;
0138         };
0139     };
0140 ...