Skip to content

Commit a9783f0

Browse files
committed
arm: dts: Add device tree for AD4170 with AVSS on CoraZ7
Signed-off-by: Marcelo Schmitt <[email protected]>
1 parent 80e7f5c commit a9783f0

File tree

1 file changed

+216
-0
lines changed

1 file changed

+216
-0
lines changed
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Analog Devices AD4170
4+
*
5+
* hdl_project: <ad4170_asdz/coraz7s>
6+
* Link: https://github.com/analogdevicesinc/hdl/tree/main/projects/ad4170_asdz
7+
* board_revision: <A>
8+
*
9+
* Copyright (C) 2024 Analog Devices Inc.
10+
*/
11+
/dts-v1/;
12+
#include "zynq-coraz7s.dtsi"
13+
#include <dt-bindings/interrupt-controller/irq.h>
14+
#include <dt-bindings/gpio/gpio.h>
15+
#include <dt-bindings/iio/adc/adi,ad4170.h>
16+
17+
/ {
18+
vref: regulator-vref {
19+
compatible = "regulator-fixed";
20+
regulator-name = "fixed-supply";
21+
regulator-min-microvolt = <4096000>;
22+
regulator-max-microvolt = <4096000>;
23+
regulator-always-on;
24+
};
25+
avss: avss-regulator {
26+
compatible = "regulator-fixed";
27+
regulator-name = "Eval AVSS supply";
28+
regulator-min-microvolt = <2500000>;
29+
regulator-max-microvolt = <2500000>;
30+
regulator-boot-on;
31+
};
32+
avdd: avdd-regulator {
33+
compatible = "regulator-fixed";
34+
regulator-name = "Eval AVDD supply";
35+
regulator-min-microvolt = <2500000>;
36+
regulator-max-microvolt = <2500000>;
37+
regulator-boot-on;
38+
};
39+
iovdd: iovdd-regulator {
40+
compatible = "regulator-fixed";
41+
regulator-name = "Eval IOVDD supply";
42+
regulator-min-microvolt = <3300000>;
43+
regulator-max-microvolt = <3300000>;
44+
regulator-boot-on;
45+
};
46+
refin1p: refin1p-regulator {
47+
compatible = "regulator-fixed";
48+
regulator-name = "Eval REFIN+ voltage reference";
49+
regulator-min-microvolt = <2500000>;
50+
regulator-max-microvolt = <2500000>;
51+
regulator-boot-on;
52+
};
53+
refin1n: refin1n-regulator {
54+
compatible = "regulator-fixed";
55+
regulator-name = "Eval REFIN- voltage reference";
56+
regulator-min-microvolt = <2500000>;
57+
regulator-max-microvolt = <2500000>;
58+
regulator-boot-on;
59+
};
60+
};
61+
62+
&fpga_axi {
63+
rx_dma: rx-dmac@44a30000 {
64+
compatible = "adi,axi-dmac-1.00.a";
65+
reg = <0x44a30000 0x1000>;
66+
#dma-cells = <1>;
67+
interrupt-parent = <&intc>;
68+
interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
69+
clocks = <&clkc 16>;
70+
71+
adi,channels {
72+
#size-cells = <0>;
73+
#address-cells = <1>;
74+
75+
dma-channel@0 {
76+
reg = <0>;
77+
adi,source-bus-width = <32>;
78+
adi,source-bus-type = <1>;
79+
adi,destination-bus-width = <64>;
80+
adi,destination-bus-type = <0>;
81+
};
82+
};
83+
};
84+
85+
spi_engine: spi@0x44a00000 {
86+
compatible = "adi-ex,axi-spi-engine-1.00.a";
87+
reg = <0x44a00000 0x10000>;
88+
interrupt-parent = <&intc>;
89+
interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
90+
clocks = <&clkc 15 &spi_clk>;
91+
clock-names = "s_axi_aclk", "spi_clk";
92+
num-cs = <1>;
93+
94+
#address-cells = <0x1>;
95+
#size-cells = <0x0>;
96+
97+
ad4170@0 {
98+
compatible = "adi,ad4170";
99+
reg = <0>;
100+
spi-max-frequency = <20000000>;
101+
spi-cpol;
102+
spi-cpha;
103+
avss-supply = <&avss>;
104+
avdd-supply = <&avdd>;
105+
iovdd-supply = <&iovdd>;
106+
refin1p-supply = <&refin1p>;
107+
refin1n-supply = <&refin1n>;
108+
interrupt-parent = <&gpio0>;
109+
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
110+
interrupt-names = "adc_rdy";
111+
dmas = <&rx_dma 0>;
112+
dma-names = "rx";
113+
adi,dig-aux1 = /bits/ 8 <1>;
114+
adi,dig-aux2 = /bits/ 8 <0>;
115+
adi,sync-option = /bits/ 8 <0>;
116+
117+
#address-cells = <1>;
118+
#size-cells = <0>;
119+
120+
// Sample AIN0 with respect to AIN1 throughout AVDD/AVSS input range
121+
// Fully differential true bipolar.
122+
channel@0 {
123+
reg = <0>;
124+
bipolar;
125+
diff-channels = <AD4170_MAP_AIN0 AD4170_MAP_AIN1>;
126+
adi,config-setup-slot = <0>;
127+
adi,reference-select = <3>;
128+
adi,burnout-current-nanoamp = <100>;
129+
};
130+
// Sample AIN2 with respect to DGND throughout AVDD/DGND input range
131+
// Peseudo-differential unipolar (fig. 2a)
132+
channel@1 {
133+
reg = <1>;
134+
single-channel = <AD4170_MAP_AIN2>;
135+
common-mode-channel = <AD4170_MAP_DGND>;
136+
adi,config-setup-slot = <1>;
137+
adi,reference-select = <3>;
138+
};
139+
// Sample AIN3 with respect to REFOUT throughout AVDD/AVSS input range
140+
// Pseudo-differential true bipolar (AVSS at -2.5V)
141+
channel@2 {
142+
reg = <2>;
143+
bipolar;
144+
single-channel = <AD4170_MAP_AIN3>;
145+
common-mode-channel = <AD4170_MAP_REFOUT>;
146+
adi,config-setup-slot = <2>;
147+
adi,reference-select = <3>;
148+
};
149+
// Sample AIN4 with respect to DGND throughout AVDD/AVSS input range
150+
// Pseudo-differential ture bipolar (fig. 2c) (AVSS at -2.5V)
151+
channel@3 {
152+
reg = <3>;
153+
bipolar;
154+
single-channel = <AD4170_MAP_AIN4>;
155+
common-mode-channel = <AD4170_MAP_DGND>;
156+
adi,config-setup-slot = <2>;
157+
adi,reference-select = <3>;
158+
};
159+
// Sample AIN7 with respect to DGND throughout REFIN+/REFIN- input range
160+
// Pseudo-differential bipolar
161+
channel@4 {
162+
reg = <4>;
163+
bipolar;
164+
single-channel = <AD4170_MAP_AIN7>;
165+
common-mode-channel = <AD4170_MAP_IOVDD_DGND_P>;
166+
adi,config-setup-slot = <5>;
167+
adi,reference-select = <0>;
168+
};
169+
// Temperature sensor
170+
channel@5 {
171+
reg = <5>;
172+
bipolar;
173+
diff-channels = <AD4170_MAP_TEMP_SENSOR_P AD4170_MAP_TEMP_SENSOR_N>;
174+
adi,config-setup-slot = <6>;
175+
adi,reference-select = <0>;
176+
};
177+
// Sample AIN8 with respect to DGND throughout AVDD/AVSS input range
178+
// Pseudo-differential true bipolar channel (AVSS at -2.5V)
179+
channel@6 {
180+
reg = <6>;
181+
bipolar;
182+
single-channel = <AD4170_MAP_AIN8>;
183+
common-mode-channel = <AD4170_MAP_DGND>;
184+
adi,config-setup-slot = <7>;
185+
adi,reference-select = <3>;
186+
};
187+
188+
};
189+
};
190+
191+
axi_i2c_0:axi-iic@0x44a40000{
192+
compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a";
193+
reg = <0x44a40000 0x1000>;
194+
interrupt-parent = <&intc>;
195+
interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
196+
clocks = <&clkc 15>;
197+
198+
#address-cells = <1>;
199+
#size-cells = <0>;
200+
201+
ltc2606: ltc2606@10 {
202+
compatible = "adi,ltc2606";
203+
reg = <0x10>;
204+
vref-supply = <&vref>;
205+
};
206+
};
207+
208+
spi_clk: axi-clkgen@0x44a70000 {
209+
compatible = "adi,axi-clkgen-2.00.a";
210+
reg = <0x44a70000 0x10000>;
211+
#clock-cells = <0>;
212+
clocks = <&clkc 15>, <&clkc 15>;
213+
clock-names = "s_axi_aclk", "clkin1";
214+
clock-output-names = "spi_clk";
215+
};
216+
};

0 commit comments

Comments
 (0)