Skip to content

Commit b8c8edd

Browse files
committed
ad485x - version to be upstreamed
Signed-off-by: Dragos Bogdan <[email protected]>
1 parent 0262b32 commit b8c8edd

File tree

4 files changed

+945
-0
lines changed

4 files changed

+945
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/dts-v1/;
3+
#include "zynq-zed.dts"
4+
5+
#include <dt-bindings/interrupt-controller/irq.h>
6+
7+
/ {
8+
clocks {
9+
axi_clk: clock@0 {
10+
compatible = "fixed-clock";
11+
clock-frequency = <100000000>;
12+
clock-output-names = "axi-clk";
13+
#clock-cells = <0>;
14+
};
15+
};
16+
17+
fpga-axi@0 {
18+
compatible = "simple-bus";
19+
#address-cells = <0x1>;
20+
#size-cells = <0x1>;
21+
ranges;
22+
23+
rx_dma: dmac@43e00000 {
24+
compatible = "adi,axi-dmac-1.00.a";
25+
reg = <0x43E00000 0x1000>;
26+
#dma-cells = <1>;
27+
interrupt-parent = <&intc>;
28+
interrupts = <0 54 IRQ_TYPE_LEVEL_HIGH>;
29+
clocks = <&clkc 15>;
30+
31+
adi,channels {
32+
#size-cells = <0>;
33+
#address-cells = <1>;
34+
35+
dma_channel: dma-channel@0 {
36+
reg = <0>;
37+
adi,source-bus-width = <128>;
38+
adi,source-bus-type = <2>;
39+
adi,destination-bus-width = <64>;
40+
adi,destination-bus-type = <0>;
41+
};
42+
};
43+
};
44+
45+
ref_clk: clk@0x44000000 {
46+
compatible = "adi,axi-clkgen-2.00.a";
47+
reg = <0x44000000 0x10000>;
48+
#clock-cells = <0>;
49+
clocks = <&clkc 15>, <&clkc 16>;
50+
clock-names = "s_axi_aclk", "clkin1";
51+
clock-output-names = "ref_clk";
52+
};
53+
54+
axi_pwm_gen: pwm@0x43d00000 {
55+
compatible = "adi,axi-pwmgen";
56+
reg = <0x43d00000 0x1000>;
57+
label = "cnv";
58+
#pwm-cells = <2>;
59+
clocks = <&ref_clk>;
60+
};
61+
62+
iio_backend: axi_adc@43c00000 {
63+
compatible = "adi,axi-adc-10.0.a";
64+
reg = <0x43c00000 0x10000>;
65+
dmas = <&rx_dma 0>;
66+
dma-names = "rx";
67+
clocks = <&axi_clk>;
68+
spibus-connected = <&ad485x>;
69+
};
70+
};
71+
};
72+
73+
&spi0 {
74+
status = "okay";
75+
76+
ad485x: adc@0{
77+
compatible = "adi,ad4857";
78+
reg = <0>;
79+
spi-max-frequency = <10000000>;
80+
pwms = <&axi_pwm_gen 0 0>;
81+
pwm-names = "cnv";
82+
io-backends = <&iio_backend>;
83+
};
84+
};

drivers/iio/adc/Kconfig

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ config AD4130
3636
To compile this driver as a module, choose M here: the module will be
3737
called ad4130.
3838

39+
config AD485X
40+
tristate "Analog Device AD485x DAS Driver"
41+
depends on SPI
42+
select REGMAP_SPI
43+
select IIO_BACKEND
44+
help
45+
Say yes here to build support for Analog Devices AD485x high speed
46+
data acquisition system (DAS).
47+
48+
To compile this driver as a module, choose M here: the module will be
49+
called ad485x.
50+
3951
config AD7091R
4052
tristate
4153

drivers/iio/adc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o
88
obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
99
obj-$(CONFIG_AD4130) += ad4130.o
10+
obj-$(CONFIG_AD485X) += ad485x.o
1011
obj-$(CONFIG_AD7091R) += ad7091r-base.o
1112
obj-$(CONFIG_AD7091R5) += ad7091r5.o
1213
obj-$(CONFIG_AD7091R8) += ad7091r8.o

0 commit comments

Comments
 (0)