Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-drivers:iio-adc:ad7606 [11 Sep 2018 09:21] – [Example platform_device initialization / parallel interface] - add ad7605-4 Alexandru Ardeleanresources:tools-software:linux-drivers:iio-adc:ad7606 [30 Sep 2019 09:03] (current) – Add 7616 to the list Beniamin Bia
Line 7: Line 7:
   * [[adi>AD7606-6]]   * [[adi>AD7606-6]]
   * [[adi>AD7606-4]]   * [[adi>AD7606-4]]
 +  * [[adi>AD7606B]]
 +  * [[adi>AD7616]]
  
 ===== Reference Circuits ===== ===== Reference Circuits =====
Line 14: Line 16:
 ===== Evaluation Boards ===== ===== Evaluation Boards =====
  
 +  * [[adi>EVAL-AD7605-4]]
   * [[adi>EVAL-AD7606EDZ]]   * [[adi>EVAL-AD7606EDZ]]
   * [[adi>EVAL-AD7606-4EDZ]]   * [[adi>EVAL-AD7606-4EDZ]]
   * [[adi>EVAL-AD7606-6EDZ]]   * [[adi>EVAL-AD7606-6EDZ]]
 +  * [[adi>EVAL-AD7606BFMCZ]]
 +  * [[adi>EVAL-AD7616]]
 ===== Description ===== ===== Description =====
  
Line 28: Line 33:
  
 ^ Source ^ Mainlined? ^ ^ Source ^ Mainlined? ^
-| [[git.linux.org>drivers/staging/iio/adc/ad7606_core.c|git]] | [[git.linux.org>drivers/staging/iio/adc/ad7606_core.c|Yes]] |+| [[git.linux.org>drivers/iio/adc/ad7606.c|git]] | [[git.linux.org>drivers/iio/adc/ad7606.c|Yes]] |
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606.c]] | +| driver  | [[git.linux.org>drivers/iio/adc/ad7606.c]] | 
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_spi.c]] | +| driver  | [[git.linux.org>drivers/iio/adc/ad7606_spi.c]] | 
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_par.c]] | +| driver  | [[git.linux.org>drivers/iio/adc/ad7606_par.c]] | 
-| include | [[git.linux.org>drivers/staging/iio/adc/ad7606.h]] |+| include | [[git.linux.org>drivers/iio/adc/ad7606.h]] | 
 +| documentation| [[git.linux.org>Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml]] |
  
 ====== Example platform device initialization ====== ====== Example platform device initialization ======
Line 49: Line 55:
 | AD7606-6 | ad7606-6 | | AD7606-6 | ad7606-6 |
 | AD7606-4 | ad7606-4 | | AD7606-4 | ad7606-4 |
 +| AD7606B | ad7606b |
 +| AD7616 | ad7616 |
  
 <code c> <code c>
Line 108: Line 116:
  
 ^ ADI part number ^ spi_board_info modalias ^ ^ ADI part number ^ spi_board_info modalias ^
 +| AD7605-4 | ad7605-4 |
 | AD7606 | ad7606-8 | | AD7606 | ad7606-8 |
 | AD7606-6 | ad7606-6 | | AD7606-6 | ad7606-6 |
Line 152: Line 161:
 Linux Kernel Configuration Linux Kernel Configuration
  Device Drivers  --->  Device Drivers  --->
- [*] Staging drivers  ---> + <*>     Industrial I/O support ---> 
- <*>     Industrial I/O support ---> + --- Industrial I/O support
-     --- Industrial I/O support +
-     -*-   Enable ring buffer support within IIO +
-     -*-     Industrial I/O lock free software ring +
-     -*-   Enable triggered sampling support +
            *** Analog to digital converters ***            *** Analog to digital converters ***
      [--snip--]      [--snip--]
  
- <*>   Analog Devices AD7606 ADC driver + <*>     Analog Devices AD7606 ADC driver with parallel interface support 
- <*>     parallel interface support + <*>     Analog Devices AD7606 ADC driver with spi interface support
- <*>     spi interface support+
  
      [--snip--]      [--snip--]
  
 </code> </code>
 +
 +===== Devicetree =====
 +
 +Analog Devices AD7606 Simultaneous Sampling ADC
 +
 +Required properties for the AD7606:
 +
 +- compatible: Must be one of
 + * "adi,ad7605-4"
 + * "adi,ad7606-8"
 + * "adi,ad7606-6"
 + * "adi,ad7606-4"
 + * "adi,ad7606b"
 + * "adi,ad7616"
 +- reg: SPI chip select number for the device
 +- spi-max-frequency: Max SPI frequency to use.
 +        see: Documentation/devicetree/bindings/spi/spi-bus.txt
 +- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
 +- avcc-supply: phandle to the Avcc power supply
 +- interrupts: IRQ line for the ADC
 +        see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
 +- adi,conversion-start-gpios: must be the device tree identifier of the CONVST pin. This logic input is used to initiate conversions on the analog input channels. As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
 +
 +Optional properties:
 +
 +- reset-gpios: must be the device tree identifier of the RESET pin. If specified, it will be asserted during driver probe. As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
 +
 +- standby-gpios: must be the device tree identifier of the STBY pin. This pin is used to place the AD7606 into one of two power-down modes, Standby mode or Shutdown mode. As the line is active low, it should be marked GPIO_ACTIVE_LOW.
 +
 +- adi,first-data-gpios: must be the device tree identifier of the FRSTDATA pin. The FRSTDATA output indicates when the first channel, V1, is being read back on either the parallel, byte or serial interface. As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
 +
 +- adi,range-gpios: must be the device tree identifier of the RANGE pin. The polarity on this pin determines the input range of the analog input channels. If this pin is tied to a logic high, the analog input range is ±10V for all channels. If this pin is tied to a logic low, the analog input range is ±5V for all channels. As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
 +
 +- adi,oversampling-ratio-gpios: must be the device tree identifier of the over-sampling mode pins. As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
 +
 +- adi,sw-mode: Boolean, software mode of operation, so far available only for ad7606b. Software mode is enabled when all three oversampling mode pins are connected to high level. The AD7606B is configured by the corresponding registers. If the adi,oversampling-ratio-gpios property is defined, then the driver will set the oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired to VDD.
 +
 +Example:
 +
 + adc@0 {
 + compatible = "adi,ad7606-8";
 + reg = <0>;
 + spi-max-frequency = <1000000>;
 + spi-cpol;
 + avcc-supply = <&adc_vref>;
 + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
 + interrupt-parent = <&gpio>;
 + adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
 + reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
 + adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
 + adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH
 + &gpio 23 GPIO_ACTIVE_HIGH
 + &gpio 26 GPIO_ACTIVE_HIGH>;
 + standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
 + adi,sw-mode;
 + };
  
 ====== Hardware configuration ====== ====== Hardware configuration ======
resources/tools-software/linux-drivers/iio-adc/ad7606.1536650509.txt.gz · Last modified: 11 Sep 2018 09:21 by Alexandru Ardelean