Skip to content

Commit

Permalink
ad485x - version to be upstreamed
Browse files Browse the repository at this point in the history
Signed-off-by: Dragos Bogdan <[email protected]>
  • Loading branch information
dbogdan committed Jun 30, 2024
1 parent 0262b32 commit 9f9bebf
Show file tree
Hide file tree
Showing 4 changed files with 939 additions and 0 deletions.
84 changes: 84 additions & 0 deletions arch/arm/boot/dts/xilinx/zynq-zed-ad485x.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "zynq-zed.dts"

#include <dt-bindings/interrupt-controller/irq.h>

/ {
clocks {
axi_clk: clock@0 {
compatible = "fixed-clock";
clock-frequency = <100000000>;
clock-output-names = "axi-clk";
#clock-cells = <0>;
};
};

fpga-axi@0 {
compatible = "simple-bus";
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;

rx_dma: dmac@43e00000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x43E00000 0x1000>;
#dma-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <0 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 15>;

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

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

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

axi_pwm_gen: pwm@0x43d00000 {
compatible = "adi,axi-pwmgen";
reg = <0x43d00000 0x1000>;
label = "cnv";
#pwm-cells = <2>;
clocks = <&ref_clk>;
};

iio_backend: axi_adc@43c00000 {
compatible = "adi,axi-adc-10.0.a";
reg = <0x43c00000 0x10000>;
dmas = <&rx_dma 0>;
dma-names = "rx";
clocks = <&axi_clk>;
spibus-connected = <&ad485x>;
};
};
};

&spi0 {
status = "okay";

ad485x: adc@0{
compatible = "adi,ad4857";
reg = <0>;
spi-max-frequency = <10000000>;
pwms = <&axi_pwm_gen 0 0>;
pwm-names = "cnv";
io-backends = <&iio_backend>;
};
};
12 changes: 12 additions & 0 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ config AD4130
To compile this driver as a module, choose M here: the module will be
called ad4130.

config AD485X
tristate "Analog Device AD485x DAS Driver"
depends on SPI
select REGMAP_SPI
select IIO_BACKEND
help
Say yes here to build support for Analog Devices AD485x high speed
data acquisition system (DAS).

To compile this driver as a module, choose M here: the module will be
called ad485x.

config AD7091R
tristate

Expand Down
1 change: 1 addition & 0 deletions drivers/iio/adc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o
obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
obj-$(CONFIG_AD4130) += ad4130.o
obj-$(CONFIG_AD485X) += ad485x.o
obj-$(CONFIG_AD7091R) += ad7091r-base.o
obj-$(CONFIG_AD7091R5) += ad7091r5.o
obj-$(CONFIG_AD7091R8) += ad7091r8.o
Expand Down
Loading

0 comments on commit 9f9bebf

Please sign in to comment.