Skip to content

Commit 12165ac

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 a06505c commit 12165ac

File tree

1 file changed

+109
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)