|
| 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 | + avdd: avdd-regulator { |
| 26 | + compatible = "regulator-fixed"; |
| 27 | + regulator-name = "Eval AVDD supply"; |
| 28 | + regulator-min-microvolt = <5000000>; |
| 29 | + regulator-max-microvolt = <5000000>; |
| 30 | + regulator-boot-on; |
| 31 | + }; |
| 32 | + iovdd: iovdd-regulator { |
| 33 | + compatible = "regulator-fixed"; |
| 34 | + regulator-name = "Eval IOVDD supply"; |
| 35 | + regulator-min-microvolt = <3300000>; |
| 36 | + regulator-max-microvolt = <3300000>; |
| 37 | + regulator-boot-on; |
| 38 | + }; |
| 39 | + refin1p: refin1p-regulator { |
| 40 | + compatible = "regulator-fixed"; |
| 41 | + regulator-name = "Eval REFIN+ voltage reference"; |
| 42 | + regulator-min-microvolt = <5000000>; |
| 43 | + regulator-max-microvolt = <5000000>; |
| 44 | + regulator-boot-on; |
| 45 | + }; |
| 46 | + refin1n: refin1n-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 | +}; |
| 54 | + |
| 55 | +&fpga_axi { |
| 56 | + rx_dma: rx-dmac@44a30000 { |
| 57 | + compatible = "adi,axi-dmac-1.00.a"; |
| 58 | + reg = <0x44a30000 0x1000>; |
| 59 | + #dma-cells = <1>; |
| 60 | + interrupt-parent = <&intc>; |
| 61 | + interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; |
| 62 | + clocks = <&clkc 16>; |
| 63 | + |
| 64 | + adi,channels { |
| 65 | + #size-cells = <0>; |
| 66 | + #address-cells = <1>; |
| 67 | + |
| 68 | + dma-channel@0 { |
| 69 | + reg = <0>; |
| 70 | + adi,source-bus-width = <32>; |
| 71 | + adi,source-bus-type = <1>; |
| 72 | + adi,destination-bus-width = <64>; |
| 73 | + adi,destination-bus-type = <0>; |
| 74 | + }; |
| 75 | + }; |
| 76 | + }; |
| 77 | + |
| 78 | + spi_engine: spi@0x44a00000 { |
| 79 | + compatible = "adi-ex,axi-spi-engine-1.00.a"; |
| 80 | + reg = <0x44a00000 0x10000>; |
| 81 | + interrupt-parent = <&intc>; |
| 82 | + interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>; |
| 83 | + clocks = <&clkc 15 &spi_clk>; |
| 84 | + clock-names = "s_axi_aclk", "spi_clk"; |
| 85 | + num-cs = <1>; |
| 86 | + |
| 87 | + #address-cells = <0x1>; |
| 88 | + #size-cells = <0x0>; |
| 89 | + |
| 90 | + ad4170@0 { |
| 91 | + compatible = "adi,ad4190"; |
| 92 | + reg = <0>; |
| 93 | + spi-max-frequency = <20000000>; |
| 94 | + spi-cpol; |
| 95 | + spi-cpha; |
| 96 | + avdd-supply = <&avdd>; |
| 97 | + iovdd-supply = <&iovdd>; |
| 98 | + refin1p-supply = <&refin1p>; |
| 99 | + refin1n-supply = <&refin1n>; |
| 100 | + interrupt-parent = <&gpio0>; |
| 101 | + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; |
| 102 | + interrupt-names = "adc_rdy"; |
| 103 | + dmas = <&rx_dma 0>; |
| 104 | + dma-names = "rx"; |
| 105 | + adi,dig-aux1 = /bits/ 8 <1>; |
| 106 | + adi,dig-aux2 = /bits/ 8 <0>; |
| 107 | + adi,sync-option = /bits/ 8 <0>; |
| 108 | + |
| 109 | + #address-cells = <1>; |
| 110 | + #size-cells = <0>; |
| 111 | + |
| 112 | + // Sample AIN0 with respect to AIN1 throughout AVDD/AVSS input range |
| 113 | + // Fully differential. If AVSS < 0V, Fully differential true bipolar |
| 114 | + channel@0 { |
| 115 | + // Feature under test: General functionality |
| 116 | + // Test setup |
| 117 | + // AVDD = 5V; AVSS = GND (0V) |
| 118 | + // AIN0 = square, 1 Hz, 100mV p-p centered at 1V. |
| 119 | + // AIN1 = sine, 10 Hz, 100mV p-p centered at 1V, 180º phase shifted. |
| 120 | + reg = <0>; |
| 121 | + bipolar; |
| 122 | + diff-channels = <AD4170_MAP_AIN0 AD4170_MAP_AIN1>; |
| 123 | + adi,config-setup-slot = <0>; |
| 124 | + adi,reference-select = <3>; |
| 125 | + adi,burnout-current-nanoamp = <100>; |
| 126 | + }; |
| 127 | + // Sample AIN2 with respect to DGND throughout AVDD/DGND input range |
| 128 | + // Peseudo-differential unipolar (fig. 2a) |
| 129 | + channel@1 { |
| 130 | + // Feature under test: Pseudo-diff scale |
| 131 | + // Test setup |
| 132 | + // AVDD = 5V; AVSS = GND (0V) |
| 133 | + // AIN2 = sine, 1 kHz, 100mV p-p centered at 2V. |
| 134 | + reg = <1>; |
| 135 | + single-channel = <AD4170_MAP_AIN2>; |
| 136 | + common-mode-channel = <AD4170_MAP_DGND>; |
| 137 | + adi,config-setup-slot = <1>; |
| 138 | + adi,reference-select = <3>; |
| 139 | + }; |
| 140 | + // Sample AIN3 with respect to REFOUT throughout AVDD/AVSS input range |
| 141 | + // Pseudo-differential bipolar (fig. 2b) |
| 142 | + channel@2 { |
| 143 | + // Feature under test: Channel offset |
| 144 | + // Test setup |
| 145 | + // AVDD = 5V; AVSS = GND (0V) |
| 146 | + // AIN7 = sine 100 mV p-p centered at 2.5V |
| 147 | + reg = <2>; |
| 148 | + bipolar; |
| 149 | + single-channel = <AD4170_MAP_AIN3>; |
| 150 | + common-mode-channel = <AD4170_MAP_REFOUT>; |
| 151 | + adi,config-setup-slot = <2>; |
| 152 | + adi,reference-select = <3>; |
| 153 | + }; |
| 154 | + // Sample AIN4 with respect to DGND throughout AVDD/AVSS input range |
| 155 | + // Pseudo-differential true bipolar if AVSS < 0V (fig. 2c) |
| 156 | + channel@3 { |
| 157 | + reg = <3>; |
| 158 | + bipolar; |
| 159 | + single-channel = <AD4170_MAP_AIN4>; |
| 160 | + common-mode-channel = <AD4170_MAP_DGND>; |
| 161 | + adi,config-setup-slot = <3>; |
| 162 | + adi,reference-select = <3>; |
| 163 | + }; |
| 164 | + // Sample AIN5 with respect to REFOUT throughout AVDD/REFOUT input range |
| 165 | + // Pseudo-differential unipolar (AD4170 datasheet page 46 example) |
| 166 | + channel@4 { |
| 167 | + // Feature under test: Channel offset |
| 168 | + // Test setup |
| 169 | + // AVDD = 5V; AVSS = GND (0V) |
| 170 | + // AIN5 = sine 100 mV p-p centered at 3.6V |
| 171 | + reg = <4>; |
| 172 | + single-channel = <AD4170_MAP_AIN5>; |
| 173 | + common-mode-channel = <AD4170_MAP_REFOUT>; |
| 174 | + adi,config-setup-slot = <4>; |
| 175 | + adi,reference-select = <3>; |
| 176 | + }; |
| 177 | + // Sample AIN6 with respect to AVSS throughout AVDD/AVSS input range |
| 178 | + // Pseudo-differential unipolar |
| 179 | + channel@5 { |
| 180 | + // Feature under test: Channel scale |
| 181 | + // Test setup |
| 182 | + // AVDD = 5V; AVSS = GND (0V) |
| 183 | + // AIN5 = sine 100 mV p-p centered at 3.6V |
| 184 | + reg = <5>; |
| 185 | + single-channel = <AD4170_MAP_AIN6>; |
| 186 | + common-mode-channel = <AD4170_MAP_AVSS>; |
| 187 | + adi,config-setup-slot = <4>; |
| 188 | + adi,reference-select = <3>; |
| 189 | + }; |
| 190 | + // Sample AIN7 with respect to (AVDD-AVSS)/5 throughout REFIN+/REFIN- input range |
| 191 | + // Pseudo-differential bipolar |
| 192 | + channel@6 { |
| 193 | + reg = <6>; |
| 194 | + bipolar; |
| 195 | + single-channel = <AD4170_MAP_AIN7>; |
| 196 | + common-mode-channel = <AD4170_MAP_AVDD_AVSS_P>; |
| 197 | + adi,config-setup-slot = <5>; |
| 198 | + adi,reference-select = <0>; |
| 199 | + }; |
| 200 | + // Temperature sensor |
| 201 | + channel@7 { |
| 202 | + reg = <7>; |
| 203 | + bipolar; |
| 204 | + diff-channels = <AD4170_MAP_TEMP_SENSOR_P AD4170_MAP_TEMP_SENSOR_N>; |
| 205 | + adi,config-setup-slot = <6>; |
| 206 | + adi,reference-select = <0>; |
| 207 | + }; |
| 208 | + // Sample AIN8 with respect to DGND throughout AVDD/AVSS input range |
| 209 | + // Pseudo-differential channel |
| 210 | + channel@8 { |
| 211 | + reg = <8>; |
| 212 | + bipolar; |
| 213 | + single-channel = <AD4170_MAP_AIN8>; |
| 214 | + common-mode-channel = <AD4170_MAP_DGND>; |
| 215 | + adi,config-setup-slot = <7>; |
| 216 | + adi,reference-select = <3>; |
| 217 | + }; |
| 218 | + |
| 219 | + }; |
| 220 | + }; |
| 221 | + |
| 222 | + axi_i2c_0:axi-iic@0x44a40000{ |
| 223 | + compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a"; |
| 224 | + reg = <0x44a40000 0x1000>; |
| 225 | + interrupt-parent = <&intc>; |
| 226 | + interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>; |
| 227 | + clocks = <&clkc 15>; |
| 228 | + |
| 229 | + #address-cells = <1>; |
| 230 | + #size-cells = <0>; |
| 231 | + |
| 232 | + ltc2606: ltc2606@10 { |
| 233 | + compatible = "adi,ltc2606"; |
| 234 | + reg = <0x10>; |
| 235 | + vref-supply = <&vref>; |
| 236 | + }; |
| 237 | + }; |
| 238 | + |
| 239 | + spi_clk: axi-clkgen@0x44a70000 { |
| 240 | + compatible = "adi,axi-clkgen-2.00.a"; |
| 241 | + reg = <0x44a70000 0x10000>; |
| 242 | + #clock-cells = <0>; |
| 243 | + clocks = <&clkc 15>, <&clkc 15>; |
| 244 | + clock-names = "s_axi_aclk", "clkin1"; |
| 245 | + clock-output-names = "spi_clk"; |
| 246 | + }; |
| 247 | +}; |
0 commit comments