|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
| 2 | +/* |
| 3 | + * Analog Devices ADAQ4380-4 |
| 4 | + * https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4380-4.pdf |
| 5 | + * https://www.analog.com/media/en/technical-documentation/user-guides/eval-adaq4380-4-4370-4-4381-4-ug-2224.pdf |
| 6 | + * https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad738x |
| 7 | + * http://analogdevicesinc.github.io/hdl/projects/ad738x_fmc/index.html |
| 8 | + * |
| 9 | + * hdl_project: <ad738x_fmc/zed> |
| 10 | + * board_revision: <> |
| 11 | + * |
| 12 | + * Copyright (C) 2025 Analog Devices Inc. |
| 13 | + */ |
| 14 | +/dts-v1/; |
| 15 | + |
| 16 | +#include <dt-bindings/gpio/gpio.h> |
| 17 | +#include <dt-bindings/interrupt-controller/irq.h> |
| 18 | + |
| 19 | +#include "zynq-zed.dtsi" |
| 20 | +#include "zynq-zed-adv7511.dtsi" |
| 21 | + |
| 22 | +/ { |
| 23 | + eval_u3: eval-board-u3-regulator { |
| 24 | + compatible = "regulator-fixed"; |
| 25 | + regulator-name = "EVAL +5V supply (U3)"; |
| 26 | + regulator-min-microvolt = <5000000>; |
| 27 | + regulator-max-microvolt = <5000000>; |
| 28 | + regulator-always-on; |
| 29 | + }; |
| 30 | + |
| 31 | + eval_gnd: eval-board-gnd-regulator { |
| 32 | + compatible = "regulator-fixed"; |
| 33 | + regulator-name = "EVAL GND (0V) supply"; |
| 34 | + regulator-always-on; |
| 35 | + }; |
| 36 | + |
| 37 | + // technically, the ADC node should be a regulator provider instead of this |
| 38 | + adc_ldo: adc-ldo-regulator { |
| 39 | + compatible = "regulator-fixed"; |
| 40 | + regulator-name = "ADC LDO output"; |
| 41 | + regulator-always-on; |
| 42 | + }; |
| 43 | + |
| 44 | + trigger_pwm: adc-pwm-trigger { |
| 45 | + compatible = "pwm-trigger"; |
| 46 | + #trigger-source-cells = <0>; |
| 47 | + pwms = <&adc_trigger 0 10000 0>; |
| 48 | + }; |
| 49 | +}; |
| 50 | + |
| 51 | +&fpga_axi { |
| 52 | + adc_trigger: pwm@44b00000 { |
| 53 | + compatible = "adi,axi-pwmgen-2.00.a"; |
| 54 | + reg = <0x44b00000 0x1000>; |
| 55 | + #pwm-cells = <3>; |
| 56 | + clocks = <&spi_clk>; |
| 57 | + }; |
| 58 | + |
| 59 | + spi_clk: clock-controller@44a70000 { |
| 60 | + compatible = "adi,axi-clkgen-2.00.a"; |
| 61 | + reg = <0x44a70000 0x1000>; |
| 62 | + #clock-cells = <0>; |
| 63 | + clocks = <&clkc 15>, <&clkc 15>; |
| 64 | + clock-names = "clkin1", "s_axi_aclk"; |
| 65 | + clock-output-names = "spi_clk"; |
| 66 | + assigned-clocks = <&spi_clk>; |
| 67 | + assigned-clock-rates = <160000000>; |
| 68 | + }; |
| 69 | + |
| 70 | + rx_dma: dma-controller@44a30000 { |
| 71 | + compatible = "adi,axi-dmac-1.00.a"; |
| 72 | + reg = <0x44a30000 0x1000>; |
| 73 | + #dma-cells = <1>; |
| 74 | + interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; |
| 75 | + clocks = <&clkc 15>; |
| 76 | + }; |
| 77 | + |
| 78 | + axi_spi_engine_0: spi@44a00000 { |
| 79 | + compatible = "adi,axi-spi-engine-1.00.a"; |
| 80 | + reg = <0x44a00000 0x1000>; |
| 81 | + interrupt-parent = <&intc>; |
| 82 | + interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>; |
| 83 | + clocks = <&clkc 15>, <&spi_clk>; |
| 84 | + clock-names = "s_axi_aclk", "spi_clk"; |
| 85 | + |
| 86 | + dmas = <&rx_dma 0>; |
| 87 | + dma-names = "offload0-rx"; |
| 88 | + trigger-sources = <&trigger_pwm>; |
| 89 | + |
| 90 | + #address-cells = <1>; |
| 91 | + #size-cells = <0>; |
| 92 | + |
| 93 | + adc@0 { |
| 94 | + compatible = "adi,adaq4380-4"; |
| 95 | + reg = <0>; |
| 96 | + |
| 97 | + spi-cpol; |
| 98 | + spi-max-frequency = <80000000>; |
| 99 | + |
| 100 | + /* |
| 101 | + * ADI tree extension (not mainline). Set this based on |
| 102 | + * HDL NUM_OF_SDI compile argument. Can omit if =1. |
| 103 | + * REVISIT: replace this upstream equivalent when it |
| 104 | + * becomes available. |
| 105 | + */ |
| 106 | + adi,num-sdi = <4>; |
| 107 | + |
| 108 | + vcc-supply = <&adc_ldo>; |
| 109 | + vlogic-supply = <&adc_ldo>; |
| 110 | + refin-supply = <&eval_u3>; |
| 111 | + vs-p-supply = <&eval_u3>; |
| 112 | + vs-n-supply = <&eval_gnd>; |
| 113 | + ldo-supply = <&eval_u3>; |
| 114 | + |
| 115 | + #address-cells = <1>; |
| 116 | + #size-cells = <0>; |
| 117 | + |
| 118 | + channel@0 { |
| 119 | + reg = <0>; |
| 120 | + // depends on LKA jumper positions |
| 121 | + adi,gain-milli = /bits/ 16 <300>; |
| 122 | + }; |
| 123 | + |
| 124 | + channel@1 { |
| 125 | + reg = <1>; |
| 126 | + // depends on LKB jumper positions |
| 127 | + adi,gain-milli = /bits/ 16 <300>; |
| 128 | + }; |
| 129 | + |
| 130 | + channel@2 { |
| 131 | + reg = <2>; |
| 132 | + // depends on LKC jumper positions |
| 133 | + adi,gain-milli = /bits/ 16 <300>; |
| 134 | + }; |
| 135 | + |
| 136 | + channel@3 { |
| 137 | + reg = <3>; |
| 138 | + // depends on LKD jumper positions |
| 139 | + adi,gain-milli = /bits/ 16 <300>; |
| 140 | + }; |
| 141 | + }; |
| 142 | + }; |
| 143 | +}; |
0 commit comments