Skip to content

Commit 5dd20e7

Browse files
committed
arch: arm: boot: Add AD4052 dts for Coraz7s
The AD4052 CNV pin is driven by a GPIO for single shot readings and by a PWM for buffer readings. The functional-mode entry allows to set Sample Mode (0) or Burst Averaging Mode (1). During runtime, it is possible to enter Trigger Mode through IIO Events. Signed-off-by: Jorge Marques <[email protected]>
1 parent 9580322 commit 5dd20e7

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed
+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Analog Devices AD405x
4+
*
5+
* hdl_project: <ad4052_ardz/coraz7s>
6+
*
7+
* Copyright (C) 2024 Analog Devices Inc.
8+
*/
9+
10+
/dts-v1/;
11+
#include "zynq-coraz7s.dtsi"
12+
#include <dt-bindings/interrupt-controller/irq.h>
13+
#include <dt-bindings/gpio/gpio.h>
14+
15+
&fpga_axi {
16+
axi_iic: i2c@44a40000 {
17+
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
18+
reg = <0x44a40000 0x10000>;
19+
interrupt-parent = <&intc>;
20+
interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
21+
clocks = <&clkc 15>;
22+
clock-names = "s_axi_aclk";
23+
24+
#size-cells = <0>;
25+
#address-cells = <1>;
26+
27+
eeprom1: eeprom@52 {
28+
compatible = "at24,24c02";
29+
reg = <0x52>;
30+
};
31+
32+
};
33+
34+
rx_dma: rx-dmac@44a30000 {
35+
compatible = "adi,axi-dmac-1.00.a";
36+
reg = <0x44a30000 0x1000>;
37+
#dma-cells = <1>;
38+
interrupt-parent = <&intc>;
39+
interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
40+
clocks = <&clkc 15>;
41+
};
42+
43+
spi_clk: axi-clkgen@44a70000 {
44+
compatible = "adi,axi-clkgen-2.00.a";
45+
reg = <0x44a70000 0x10000>;
46+
#clock-cells = <0>;
47+
clocks = <&clkc 15>, <&clkc 15>;
48+
clock-names = "s_axi_aclk", "clkin1";
49+
clock-output-names = "spi_clk";
50+
};
51+
52+
adc_trigger: pwm@44b00000 {
53+
compatible = "adi,axi-pwmgen-2.00.a";
54+
reg = <0x44b00000 0x1000>;
55+
label = "ad4052_cnv";
56+
#pwm-cells = <2>;
57+
clocks = <&spi_clk>;
58+
};
59+
60+
axi_spi_engine: spi@44a00000 {
61+
compatible = "adi-ex,axi-spi-engine-1.00.a";
62+
reg = <0x44a00000 0x1FF>;
63+
interrupt-parent = <&intc>;
64+
interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
65+
clocks = <&clkc 15>, <&spi_clk>;
66+
clock-names = "s_axi_aclk", "spi_clk";
67+
num-cs = <1>;
68+
69+
#address-cells = <0x1>;
70+
#size-cells = <0x0>;
71+
72+
ad4052: ad4052@0 {
73+
compatible = "adi,ad4052";
74+
reg = <0>;
75+
spi-max-frequency = <25000000>;
76+
clocks = <&spi_clk>;
77+
clock-names = "ref_clk";
78+
dmas = <&rx_dma 0>;
79+
dma-names = "rx";
80+
pwm-names = "cnv";
81+
pwms = <&adc_trigger 0 0>;
82+
cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>;
83+
interrupt-parent = <&intc>;
84+
interrupts = <0 58 IRQ_TYPE_EDGE_RISING>;
85+
86+
adi,functional-mode = <0>;
87+
};
88+
};
89+
};

0 commit comments

Comments
 (0)