Skip to content

Commit ef04070

Browse files
mhennerichJonathan Cameron
authored andcommitted
iio: adc: adi-axi-adc: add support for AXI ADC IP core
This change adds support for the Analog Devices Generic AXI ADC IP core. The IP core is used for interfacing with analog-to-digital (ADC) converters that require either a high-speed serial interface (JESD204B/C) or a source synchronous parallel interface (LVDS/CMOS). Usually, some other interface type (i.e SPI) is used as a control interface for the actual ADC, while the IP core (controlled via this driver), will interface to the data-lines of the ADC and handle the streaming of data into memory via DMA. Because of this, the AXI ADC driver needs the other SPI-ADC driver to register with it. The SPI-ADC needs to be register via the SPI framework, while the AXI ADC registers as a platform driver. The two cannot be ordered in a hierarchy as both drivers have their own registers, and trying to organize this [in a hierarchy becomes] problematic when trying to map memory/registers. There are some modes where the AXI ADC can operate as standalone ADC, but those will be implemented at a later point in time. DocLink: https://wiki.analog.com/resources/fpga/docs/axi_adc_ip Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent e0fcca9 commit ef04070

4 files changed

Lines changed: 567 additions & 0 deletions

File tree

‎drivers/iio/adc/Kconfig‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,26 @@ config AD799X
246246
To compile this driver as a module, choose M here: the module will be
247247
called ad799x.
248248

249+
config ADI_AXI_ADC
250+
tristate "Analog Devices Generic AXI ADC IP core driver"
251+
select IIO_BUFFER
252+
select IIO_BUFFER_HW_CONSUMER
253+
select IIO_BUFFER_DMAENGINE
254+
help
255+
Say yes here to build support for Analog Devices Generic
256+
AXI ADC IP core. The IP core is used for interfacing with
257+
analog-to-digital (ADC) converters that require either a high-speed
258+
serial interface (JESD204B/C) or a source synchronous parallel
259+
interface (LVDS/CMOS).
260+
Typically (for such devices) SPI will be used for configuration only,
261+
while this IP core handles the streaming of data into memory via DMA.
262+
263+
Link: https://wiki.analog.com/resources/fpga/docs/axi_adc_ip
264+
If unsure, say N (but it's safe to say "Y").
265+
266+
To compile this driver as a module, choose M here: the
267+
module will be called adi-axi-adc.
268+
249269
config ASPEED_ADC
250270
tristate "Aspeed ADC"
251271
depends on ARCH_ASPEED || COMPILE_TEST

‎drivers/iio/adc/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ obj-$(CONFIG_AD7793) += ad7793.o
2626
obj-$(CONFIG_AD7887) += ad7887.o
2727
obj-$(CONFIG_AD7949) += ad7949.o
2828
obj-$(CONFIG_AD799X) += ad799x.o
29+
obj-$(CONFIG_ADI_AXI_ADC) += adi-axi-adc.o
2930
obj-$(CONFIG_ASPEED_ADC) += aspeed_adc.o
3031
obj-$(CONFIG_AT91_ADC) += at91_adc.o
3132
obj-$(CONFIG_AT91_SAMA5D2_ADC) += at91-sama5d2_adc.o

0 commit comments

Comments
 (0)