Skip to content

Commit 83de7cc

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 <jorge.marques@analog.com>
1 parent 077d963 commit 83de7cc

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Analog Devices AD4052
4+
*
5+
* hdl_project: <ad4052_ardz/coraz7s>
6+
*
7+
* Copyright (C) 2025 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+
/ {
16+
trigger_pwm: adc-pwm-trigger {
17+
compatible = "pwm-trigger";
18+
#trigger-source-cells = <0>;
19+
pwms = <&adc_trigger 0 10000 0>;
20+
};
21+
22+
adc_vdd: regulator-vref-adc {
23+
compatible = "regulator-fixed";
24+
regulator-name = "adc-vdd";
25+
regulator-min-microvolt = <3600000>;
26+
regulator-max-microvolt = <3600000>;
27+
regulator-always-on;
28+
};
29+
30+
adc_vio: regulator-vio-adc {
31+
compatible = "regulator-fixed";
32+
regulator-name = "adc_vio";
33+
regulator-min-microvolt = <3600000>;
34+
regulator-max-microvolt = <3600000>;
35+
regulator-always-on;
36+
};
37+
};
38+
39+
&fpga_axi {
40+
axi_iic: i2c@41600000 {
41+
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
42+
reg = <0x41600000 0x10000>;
43+
interrupt-parent = <&intc>;
44+
interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
45+
clocks = <&clkc 15>;
46+
clock-names = "s_axi_aclk";
47+
48+
#size-cells = <0>;
49+
#address-cells = <1>;
50+
51+
eeprom1: eeprom@52 {
52+
compatible = "atmel,24c32";
53+
reg = <0x52>;
54+
};
55+
56+
};
57+
58+
rx_dma: rx-dmac@44a30000 {
59+
compatible = "adi,axi-dmac-1.00.a";
60+
reg = <0x44a30000 0x1000>;
61+
#dma-cells = <1>;
62+
interrupt-parent = <&intc>;
63+
interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
64+
clocks = <&clkc 15>;
65+
};
66+
67+
spi_clk: axi-clkgen@44a70000 {
68+
compatible = "adi,axi-clkgen-2.00.a";
69+
reg = <0x44a70000 0x10000>;
70+
#clock-cells = <0>;
71+
clocks = <&clkc 15>, <&clkc 15>;
72+
clock-names = "s_axi_aclk", "clkin1";
73+
clock-output-names = "spi_clk";
74+
};
75+
76+
adc_trigger: pwm@44b00000 {
77+
compatible = "adi,axi-pwmgen-2.00.a";
78+
reg = <0x44b00000 0x1000>;
79+
#pwm-cells = <2>;
80+
clocks = <&spi_clk>;
81+
};
82+
83+
axi_spi_engine: spi@44a00000 {
84+
compatible = "adi,axi-spi-engine-1.00.a";
85+
reg = <0x44a00000 0x1FF>;
86+
interrupt-parent = <&intc>;
87+
interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
88+
clocks = <&clkc 15>, <&spi_clk>;
89+
clock-names = "s_axi_aclk", "spi_clk";
90+
91+
dmas = <&rx_dma 0>;
92+
dma-names = "offload0-rx";
93+
trigger-sources = <&trigger_pwm>;
94+
95+
#address-cells = <0x1>;
96+
#size-cells = <0x0>;
97+
98+
ad4052: ad4052@0 {
99+
compatible = "adi,ad4052";
100+
reg = <0>;
101+
vdd-supply = <&adc_vdd>;
102+
vio-supply = <&adc_vio>;
103+
spi-max-frequency = <31250000>;
104+
105+
interrupt-parent = <&gpio0>;
106+
interrupts = <86 IRQ_TYPE_EDGE_RISING>,
107+
<87 IRQ_TYPE_EDGE_FALLING>;
108+
interrupt-names = "gp0", "gp1";
109+
cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>;
110+
};
111+
};
112+
};

0 commit comments

Comments
 (0)