Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Docs: iio: ad4030: Add double PWM SPI offload doc

Document double PWM setup SPI offload wiring schema.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marcelo Schmitt and committed by
Jonathan Cameron
c4c1c5b7 10373521

+39
+39
Documentation/iio/ad4030.rst
··· 92 92 In this mode, both channels conversion results are bit interleaved one SDO line. 93 93 As such the wiring is the same as `One lane mode`_. 94 94 95 + SPI offload wiring 96 + ^^^^^^^^^^^^^^^^^^ 97 + 98 + .. code-block:: 99 + 100 + +-------------+ +-------------+ 101 + | CNV |<-----+--| GPIO | 102 + | | +--| PWM0 | 103 + | | | | 104 + | | +--| PWM1 | 105 + | | | +-------------+ 106 + | | +->| TRIGGER | 107 + | CS |<--------| CS | 108 + | | | | 109 + | ADC | | SPI | 110 + | | | | 111 + | SDI |<--------| SDO | 112 + | SDO |-------->| SDI | 113 + | SCLK |<--------| SCLK | 114 + +-------------+ +-------------+ 115 + 116 + In this mode, both the ``cnv-gpios`` and a ``pwms`` properties are required. 117 + The ``pwms`` property specifies the PWM that is connected to the ADC CNV pin. 118 + The SPI offload will have a ``trigger-sources`` property to indicate the SPI 119 + offload (PWM) trigger source. For AD4030 and similar ADCs, there are two 120 + possible data transfer zones for sample N. One of them (zone 1) starts after the 121 + data conversion for sample N is complete while the other one (zone 2) starts 9.8 122 + nanoseconds after the rising edge of CNV for sample N + 1. 123 + 124 + The configuration depicted in the above diagram is intended to perform data 125 + transfer in zone 2. To achieve high sample rates while meeting ADC timing 126 + requirements, an offset is added between the rising edges of PWM0 and PWM1 to 127 + delay the SPI transfer until 9.8 nanoseconds after CNV rising edge. This 128 + requires a specialized PWM controller that can provide such an offset. 129 + The `AD4630-FMC HDL project`_, for example, can be configured to sample AD4030 130 + data during zone 2 data read window. 131 + 132 + .. _AD4630-FMC HDL project: https://analogdevicesinc.github.io/hdl/projects/ad4630_fmc/index.html 133 + 95 134 SPI Clock mode 96 135 -------------- 97 136