ad7944.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. .. SPDX-License-Identifier: GPL-2.0-only
  2. =============
  3. AD7944 driver
  4. =============
  5. ADC driver for Analog Devices Inc. AD7944 and similar devices. The module name
  6. is ``ad7944``.
  7. Supported devices
  8. =================
  9. The following chips are supported by this driver:
  10. * `AD7944 <https://www.analog.com/AD7944>`_
  11. * `AD7985 <https://www.analog.com/AD7985>`_
  12. * `AD7986 <https://www.analog.com/AD7986>`_
  13. Supported features
  14. ==================
  15. SPI wiring modes
  16. ----------------
  17. The driver currently supports three of the many possible SPI wiring configurations.
  18. CS mode, 3-wire, without busy indicator
  19. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  20. .. code-block::
  21. +-------------+
  22. +--------------------| CS |
  23. v | |
  24. VIO +--------------------+ | HOST |
  25. | | CNV | | |
  26. +--->| SDI AD7944 SDO |-------->| SDI |
  27. | SCK | | |
  28. +--------------------+ | |
  29. ^ | |
  30. +--------------------| SCLK |
  31. +-------------+
  32. To select this mode in the device tree, set the ``adi,spi-mode`` property to
  33. ``"single"`` and omit the ``cnv-gpios`` property.
  34. CS mode, 4-wire, without busy indicator
  35. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  36. .. code-block::
  37. +-------------+
  38. +-----------------------------------| CS |
  39. | | |
  40. | +--------------------| GPIO |
  41. | v | |
  42. | +--------------------+ | HOST |
  43. | | CNV | | |
  44. +--->| SDI AD7944 SDO |-------->| SDI |
  45. | SCK | | |
  46. +--------------------+ | |
  47. ^ | |
  48. +--------------------| SCLK |
  49. +-------------+
  50. To select this mode in the device tree, omit the ``adi,spi-mode`` property and
  51. provide the ``cnv-gpios`` property.
  52. Chain mode, without busy indicator
  53. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  54. .. code-block::
  55. +-------------+
  56. +-------------------------+--------------------| CS |
  57. v v | |
  58. +--------------------+ +--------------------+ | HOST |
  59. | CNV | | CNV | | |
  60. +--->| SDI AD7944 SDO |--->| SDI AD7944 SDO |-------->| SDI |
  61. | | SCK | | SCK | | |
  62. GND +--------------------+ +--------------------+ | |
  63. ^ ^ | |
  64. +-------------------------+--------------------| SCLK |
  65. +-------------+
  66. To select this mode in the device tree, set the ``adi,spi-mode`` property to
  67. ``"chain"``, add the ``spi-cs-high`` flag, add the ``#daisy-chained-devices``
  68. property, and omit the ``cnv-gpios`` property.
  69. Reference voltage
  70. -----------------
  71. All 3 possible reference voltage sources are supported:
  72. - Internal reference
  73. - External 1.2V reference and internal buffer
  74. - External reference
  75. The source is determined by the device tree. If ``ref-supply`` is present, then
  76. the external reference is used. If ``refin-supply`` is present, then the internal
  77. buffer is used. If neither is present, then the internal reference is used.
  78. Unimplemented features
  79. ----------------------
  80. - ``BUSY`` indication
  81. - ``TURBO`` mode
  82. Device attributes
  83. =================
  84. There are two types of ADCs in this family, pseudo-differential and fully
  85. differential. The channel name is different depending on the type of ADC.
  86. Pseudo-differential ADCs
  87. ------------------------
  88. AD7944 and AD7985 are pseudo-differential ADCs and have the following attributes:
  89. +---------------------------------------+--------------------------------------------------------------+
  90. | Attribute | Description |
  91. +=======================================+==============================================================+
  92. | ``in_voltage0_raw`` | Raw ADC voltage value (*IN+* referenced to ground sense). |
  93. +---------------------------------------+--------------------------------------------------------------+
  94. | ``in_voltage0_scale`` | Scale factor to convert raw value to mV. |
  95. +---------------------------------------+--------------------------------------------------------------+
  96. In "chain" mode, additional chips will appear as additional voltage input
  97. channels, e.g. ``in_voltage1_raw``.
  98. Fully-differential ADCs
  99. -----------------------
  100. AD7986 is a fully-differential ADC and has the following attributes:
  101. +---------------------------------------+--------------------------------------------------------------+
  102. | Attribute | Description |
  103. +=======================================+==============================================================+
  104. | ``in_voltage0-voltage1_raw`` | Raw ADC voltage value (*IN+* - *IN-*). |
  105. +---------------------------------------+--------------------------------------------------------------+
  106. | ``in_voltage0-voltage1_scale`` | Scale factor to convert raw value to mV. |
  107. +---------------------------------------+--------------------------------------------------------------+
  108. In "chain" mode, additional chips will appear as additional voltage input
  109. channels, e.g. ``in_voltage2-voltage3_raw``.
  110. Device buffers
  111. ==============
  112. This driver supports IIO triggered buffers.
  113. See :doc:`iio_devbuf` for more information.