Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. image:: https://wiki.analog.com/_media/resources/eval/section>resources/eval/ad4630-24-eval-board&showfooter=nofooter
:alt: section>resources/eval/ad4630-24-eval-board&showfooter=nofooter

Large diffs are not rendered by default.

581 changes: 581 additions & 0 deletions docs/solutions/reference-designs/eval-ad4630/ad4630-24-eval-board.rst

Large diffs are not rendered by default.

346 changes: 346 additions & 0 deletions docs/solutions/reference-designs/eval-ad4630/ad4630.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,346 @@
AD4630 ADC Linux Driver
=======================

Supported Devices
-----------------

- :adi:`AD4030-24`
- :adi:`AD4630-16`
- :adi:`AD4630-24`
- :adi:`ADAQ4216`
- :adi:`ADAQ4220`
- :adi:`ADAQ4224`

Evaluation Boards
-----------------

- :adi:`EVAL-AD4630-24 <en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-AD4630-24.html>`

Status
------

+------------------------------------------------------------------------------------------+------------+
| Source | Mainlined? |
+==========================================================================================+============+
| :git-linux:`git <drivers/iio/adc/ad4630.c>` | [No] |
+------------------------------------------------------------------------------------------+------------+

Files
-----

+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Function | File |
+=========================+=================================================================================================================================================================================+
| driver | :git-linux:`master/drivers/iio/adc/ad4630.c <drivers/iio/adc/ad4630.c>` |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| devicetree bindings | :git-linux:`Documentation/devicetree/bindings/iio/adc/adi,ad4630.yaml` |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| devicetree for ad4630 | :git-linux:`arch/arm/boot/dts/zynq-zed-adv7511-ad4630-24.dts` |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| devicetree for adaq4224 | :git-linux:`arch/arm/boot/dts/zynq-zed-adv7511-adaq4224-24.dts` |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Overview
--------

The :adi:`ad4030-24`, :adi:`ad4630-16`, and :adi:`ad4630-24` are 24-bit, 2 MSPS SAR ADCs highly configurable through an extensive configuration register list.

Enabling the driver
-------------------

Configure kernel with "make menuconfig" (alternatively use "make xconfig" or
"make qconfig")

.. hint::

The AD4630 Driver depends on CONFIG_SPI

::

Linux Kernel Configuration
Device Drivers --->
...
<*> Industrial I/O support --->
--- Industrial I/O support
...
Analog to digital converters --->
...
<*> Analog Devices AD4630 ADC driver
...
...
...

Adding a device tree entry
--------------------------

Required properties
~~~~~~~~~~~~~~~~~~~

- **compatible**: Must be one of "adi,ad7091r2", "adi,ad7091r4", "adi,ad7091r8".
- **reg**: number of SPI chip select id for the device.
- **clocks**: reference clock phandle
- **clock-names**: name for the reference clock
- **dmas**: phandle for dma-engine
- **dma-names**: name for the dma-engine
- **pwms**: phandles for the PWM device used as conversion start trigger.
- **pwm-names**: name for PWM devices

Optional properties
~~~~~~~~~~~~~~~~~~~

- **vref-supply**: phandle + specifier to a regulator for the external VREF supply. If no external VREF is supplied this attribute should be omitted.
see: Documentation/devicetree/bindings/regulator/regulator.txt

Device tree example
~~~~~~~~~~~~~~~~~~~

::

// SPDX-License-Identifier: GPL-2.0
/*
* Analog Devices AD4630-24
*
* hdl_project: <ad4630_fmc/zed>
* board_revision: <B>
*
* Copyright (C) 2022 Analog Devices Inc.
*/
/dts-v1/;

#include "zynq-zed.dtsi"
#include "zynq-zed-adv7511.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>

/ {
vref: regulator-vref {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
};

vdd_1_8: regulator-vdd-1-8 {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

vio: regulator-vio {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

clocks {
cnv_ext_clk: ext-clk {
#clock-cells = <0x0>;
compatible = "fixed-clock";
clock-frequency = <100000000>;
clock-output-names = "cnv_ext_clk";
};
};
};

&fpga_axi {
rx_dma: rx-dmac@44a30000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x44a30000 0x1000>;
#dma-cells = <1>;
interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 15>;

adi,channels {
#size-cells = <0>;
#address-cells = <1>;

dma-channel@0 {
reg = <0>;
adi,source-bus-width = <64>;
adi,source-bus-type = <1>;
adi,destination-bus-width = <64>;
adi,destination-bus-type = <0>;
};
};
};

spi_clk: axi-clkgen@0x44a70000 {
compatible = "adi,axi-clkgen-2.00.a";
reg = <0x44a70000 0x10000>;
#clock-cells = <0>;
clocks = <&clkc 15>, <&clkc 15>;
clock-names = "s_axi_aclk", "clkin1";
clock-output-names = "spi_clk";
};

axi_pwm_gen: axi-pwm-gen@ {
compatible = "adi,axi-pwmgen";
reg = <0x44b00000 0x1000>;
label = "ad463x_cnv";
#pwm-cells = <2>;
clocks = <&cnv_ext_clk>;

};

axi_spi_engine: spi@44a00000 {
compatible = "adi,axi-spi-engine-1.00.a";
reg = <0x44a00000 0x1FF>;
interrupt-parent = <&intc>;
interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 15>, <&spi_clk>;
clock-names = "s_axi_aclk", "spi_clk";
num-cs = <1>;

#address-cells = <0x1>;
#size-cells = <0x0>;

ad463x: ad463x@0 {
compatible = "adi,ad463x";
reg = <0>;
vdd-supply = <&vref>;
vdd_1_8-supply = <&vdd_1_8>;
vio-supply = <&vio>;
vref-supply = <&vref>;
spi-max-frequency = <80000000>;
reset-gpios = <&gpio0 86 GPIO_ACTIVE_LOW>;
adi,lane-mode = <0>;
adi,clock-mode = <0>;
adi,out-data-mode = <0>;
adi,spi-trigger;
clocks = <&cnv_ext_clk>;
clock-names = "trigger_clock";
dmas = <&rx_dma 0>;
dma-names = "rx";
pwm-names = "spi_trigger", "cnv";
pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>;
};
};
};

Driver testing
==============

Each and every IIO device, typically a hardware chip, has a device folder under
/sys/bus/iio/devices/iio:deviceX. Where X is the IIO index of the device. Under
every of these directory folders reside a set of files, depending on the
characteristics and features of the hardware device in question. These files are
consistently generalized and documented in the IIO ABI documentation. In order
to determine which IIO deviceX corresponds to which hardware device, the user
can read the name file /sys/bus/iio/devices/iio:deviceX/name. In case the
sequence in which the iio device drivers are loaded/registered is constant, the
numbering is constant and may be known in advance.

.. tip::

\ TIP: An example program whiroot@analog:/sys/bus/iio/devices# ls -lch uses
the interface can be found here:


- :doc:`IIO Oscilloscope </wiki-migration/resources/tools-software/linux-software/iio_oscilloscope>`

Check warning on line 244 in docs/solutions/reference-designs/eval-ad4630/ad4630.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: unknown document: '/wiki-migration/resources/tools-software/linux-software/iio_oscilloscope' [ref.doc]


Show device name
----------------

.. container:: box bggreen

This specifies any shell prompt running on the target


::

root@analog:~ $ cat /sys/bus/iio/devices/iio\:device0/name
adaq4224


Show channel scale
------------------

**Description:** Scale to be applied to in_voltageX_raw in order to obtain the measured voltage in millivolts

.. container:: box bggreen

This specifies any shell prompt running on the target


::

root@analog:~ $ cat /sys/bus/iio/devices/iio\:device0/in_voltage0_scale
0.000196695


Show channel list of available scales
-------------------------------------

**Description:** List of available scales to be applied to in_voltageX_raw in order to obtain the measured voltage in millivolts. This affects the gain applied to the input signal before ADC sampling. This attribute is available for ADAQ devices only.

.. container:: box bggreen

This specifies any shell prompt running on the target


::

root@analog:~ $ cat /sys/bus/iio/devices/iio\:device0/in_voltage0_scale_available
0.000196695 0.000333786 0.001323223 0.003975629


Show channel calibration offset
-------------------------------

**Description:** Hardware applied calibration offset (calibbias). This is a hardware supported offset that can be applied to compensate for variation between different instances of the part.

.. container:: box bggreen

This specifies any shell prompt running on the target


::

root@analog:~ $ cat /sys/bus/iio/devices/iio\:device0/in_voltage0_calibbias
0


Show channel calibration scale
------------------------------

**Description:** Hardware applied calibration scale factor.

.. container:: box bggreen

This specifies any shell prompt running on the target


::

root@analog:~ $ cat /sys/bus/iio/devices/iio\:device0/in_voltage0_calibscale
1.000000


More Information
================

- IIO mailing list: linux-iio@vger.kernel.org
- `IIO Linux Kernel Documentation sysfs-bus-iio-\* <https://www.kernel.org/doc/Documentation/ABI/testing>`_
- `IIO Documentation <https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio>`_
- :doc:`IIO test and visualization application </wiki-migration/resources/tools-software/linux-software/iio_oscilloscope>`

Check warning on line 331 in docs/solutions/reference-designs/eval-ad4630/ad4630.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: unknown document: '/wiki-migration/resources/tools-software/linux-software/iio_oscilloscope' [ref.doc]
- :doc:`libiio - IIO system library </wiki-migration/resources/tools-software/linux-software/libiio>`

Check warning on line 332 in docs/solutions/reference-designs/eval-ad4630/ad4630.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: unknown document: '/wiki-migration/resources/tools-software/linux-software/libiio' [ref.doc]
- :doc:`libiio - Internals </wiki-migration/resources/tools-software/linux-software/libiio_internals>`

Check warning on line 333 in docs/solutions/reference-designs/eval-ad4630/ad4630.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: unknown document: '/wiki-migration/resources/tools-software/linux-software/libiio_internals' [ref.doc]
- :doc:`Pointers and good books </wiki-migration/resources/tools-software/pointers>`

Check warning on line 334 in docs/solutions/reference-designs/eval-ad4630/ad4630.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: unknown document: '/wiki-migration/resources/tools-software/pointers' [ref.doc]
- `IIO High Speed <https://events.static.linuxfound.org/sites/events/files/slides/iio_high_speed.pdf>`_
- `Software Defined Radio using the IIO framework <http://video.fosdem.org/2015/devroom-software_defined_radio/iiosdr.mp4>`_
-

|libiio introduction|

*Need Help?*

- :ez:`Analog Devices Linux Device Drivers Help Forum <linux-software-drivers>`
- `Ask a Question <https://ez.analog.com/>`_

.. |libiio introduction| image:: https://wiki.analog.com/_media/software/linux/docs/iio/youtube>p_vntewue24
48 changes: 48 additions & 0 deletions docs/solutions/reference-designs/eval-ad4630/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.. _eval_ad4630 eval:

EVAL AD4630
===================================================================

.. TODO: Add a picture of the chip/board

Overview
-------------------------------------------------------------------------------

.. TODO: Describe in max 10 rows the main features and applications.

Features:

- feature 1
- feature 2

Applications:

- application 1
- application 2

.. toctree::

Check warning on line 23 in docs/solutions/reference-designs/eval-ad4630/index.rst

View workflow job for this annotation

GitHub Actions / build-doc

sphinx: toctree contains reference to document 'solutions/reference-designs/eval-ad4630/ad4630-16-eval-board' that doesn't have a title: no link will be generated [toc.no_title]
:hidden:

ad4630
ad4630-16-eval-board
ad4630-24-developer-guide
ad4630-24-eval-board

Recommendations
-------------------------------------------------------------------------------

People who follow the flow that is outlined, have a much better experience with
things. However, like many things, documentation is never as complete as it
should be. If you have any questions, feel free to ask on our
:ref:`EngineerZone forums <help-and-support>`, but before that, please make
sure you read our documentation thoroughly.

Warning
-------------------------------------------------------------------------------

.. esd-warning::

Help and support
-------------------------------------------------------------------------------

Please go to :ref:`Help and Support <help-and-support>` page.
Loading
Loading