-
Notifications
You must be signed in to change notification settings - Fork 970
Add adaq2387x support #3496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add adaq2387x support #3496
Changes from all commits
2d0ba34
9922bcb
9457903
5379931
cdc9480
ef64e73
422ca99
b62cfdf
7d720a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23875 (LTC2387-16 inside, 16-bit, one-lane mode). | ||
| * | ||
| * Pair with the matching one-lane HDL bitstream (TWOLANES=0, ADC_RES=16). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=16, TWOLANES=0> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23875.dtsi" | ||
|
|
||
| &adaq23875 { | ||
| adi,use-one-lane; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23875 (LTC2387-16 inside, 16-bit, two-lane mode). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=16, TWOLANES=1> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23875.dtsi" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * ADAQ23875 (LTC2387-16) on Zedboard. | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
|
|
||
| #include "zynq-zed-adv7511-adaq2387x.dtsi" | ||
|
|
||
| &rx_dma { | ||
| adi,channels { | ||
| #size-cells = <0>; | ||
| #address-cells = <1>; | ||
|
|
||
| dma-channel@0 { | ||
| reg = <0>; | ||
| adi,source-bus-width = <16>; | ||
| adi,source-bus-type = <2>; | ||
| adi,destination-bus-width = <64>; | ||
| adi,destination-bus-type = <0>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &fpga_axi { | ||
| adaq23875: adc@0 { | ||
| compatible = "adaq23875"; | ||
| clocks = <&ext_clk>; | ||
| dmas = <&rx_dma 0>; | ||
| dma-names = "rx"; | ||
| pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>; | ||
| pwm-names = "cnv", "clk_en"; | ||
| vref-supply = <&vref>; | ||
|
|
||
| /* Fixed FDA gain = 2, +/-2.048 V input range. */ | ||
| adi,gain-milli = <2000>; | ||
| }; | ||
|
Check warning on line 37 in arch/arm/boot/dts/xilinx/zynq-zed-adv7511-adaq23875.dtsi
|
||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23876 (LTC2387-16 inside, 16-bit, one-lane mode). | ||
| * | ||
| * Pair with the matching one-lane HDL bitstream (TWOLANES=0, ADC_RES=16). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=16, TWOLANES=0> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23876.dtsi" | ||
|
|
||
| &adaq23876 { | ||
| adi,use-one-lane; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23876 (LTC2387-16 inside, 16-bit, two-lane mode). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=16, TWOLANES=1> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23876.dtsi" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * ADAQ23876 (LTC2387-16) on Zedboard. | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
|
|
||
| #include "zynq-zed-adv7511-adaq2387x.dtsi" | ||
|
|
||
| &rx_dma { | ||
| adi,channels { | ||
| #size-cells = <0>; | ||
| #address-cells = <1>; | ||
|
|
||
| dma-channel@0 { | ||
| reg = <0>; | ||
| adi,source-bus-width = <16>; | ||
| adi,source-bus-type = <2>; | ||
| adi,destination-bus-width = <64>; | ||
| adi,destination-bus-type = <0>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &fpga_axi { | ||
| adaq23876: adc@0 { | ||
| compatible = "adaq23876"; | ||
| clocks = <&ext_clk>; | ||
| dmas = <&rx_dma 0>; | ||
| dma-names = "rx"; | ||
| pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>; | ||
| pwm-names = "cnv", "clk_en"; | ||
| vref-supply = <&vref>; | ||
|
|
||
| /* Pin-strapped: 370, 730, 870, 1380 or 2250. */ | ||
| adi,gain-milli = <870>; | ||
| }; | ||
|
Check warning on line 37 in arch/arm/boot/dts/xilinx/zynq-zed-adv7511-adaq23876.dtsi
|
||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23878 (LTC2387-18 inside, 18-bit, one-lane mode). | ||
| * | ||
| * Pair with the matching one-lane HDL bitstream (TWOLANES=0, ADC_RES=18). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=18, TWOLANES=0> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23878.dtsi" | ||
|
|
||
| &adaq23878 { | ||
| adi,use-one-lane; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices ADAQ23878 (LTC2387-18 inside, 18-bit, two-lane mode). | ||
| * | ||
| * hdl_project: <adaq2387x/zed with ADC_RES=18, TWOLANES=1> | ||
| * board_revision: <A> | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include "zynq-zed-adv7511-adaq23878.dtsi" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * ADAQ23878 (LTC2387-18) on Zedboard. | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
|
|
||
| #include "zynq-zed-adv7511-adaq2387x.dtsi" | ||
|
|
||
| &rx_dma { | ||
| adi,channels { | ||
| #size-cells = <0>; | ||
| #address-cells = <1>; | ||
|
|
||
| dma-channel@0 { | ||
| reg = <0>; | ||
| adi,source-bus-width = <32>; | ||
| adi,source-bus-type = <2>; | ||
| adi,destination-bus-width = <64>; | ||
| adi,destination-bus-type = <0>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &fpga_axi { | ||
| adaq23878: adc@0 { | ||
| compatible = "adaq23878"; | ||
| clocks = <&ext_clk>; | ||
| dmas = <&rx_dma 0>; | ||
| dma-names = "rx"; | ||
| pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>; | ||
| pwm-names = "cnv", "clk_en"; | ||
| vref-supply = <&vref>; | ||
|
|
||
| /* Pin-strapped: 370, 730, 870, 1380 or 2250. */ | ||
| adi,gain-milli = <870>; | ||
| }; | ||
|
Check warning on line 37 in arch/arm/boot/dts/xilinx/zynq-zed-adv7511-adaq23878.dtsi
|
||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Shared carrier pieces for the ADAQ2387x modules on Zedboard. | ||
| * | ||
| * ext_clk must match the reference clock the HDL bitstream produces. | ||
| * | ||
| * Copyright (C) 2026 Analog Devices Inc. | ||
| */ | ||
|
|
||
| #include "zynq-zed.dtsi" | ||
| #include "zynq-zed-adv7511.dtsi" | ||
| #include <dt-bindings/gpio/gpio.h> | ||
| #include <dt-bindings/pwm/pwm.h> | ||
|
|
||
| / { | ||
| vref: regulator-vref { | ||
| compatible = "regulator-fixed"; | ||
| regulator-name = "vref-4v096"; | ||
| regulator-min-microvolt = <4096000>; | ||
| regulator-max-microvolt = <4096000>; | ||
| regulator-always-on; | ||
| }; | ||
|
|
||
| clocks { | ||
| ext_clk: clock@0 { | ||
| #clock-cells = <0>; | ||
| compatible = "fixed-clock"; | ||
| clock-frequency = <120000000>; | ||
| clock-output-names = "ref_clk_120m"; | ||
| }; | ||
| }; | ||
|
|
||
| gpio-control@0 { | ||
| compatible = "adi,one-bit-adc-dac"; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| out-gpios = <&gpio0 86 GPIO_ACTIVE_HIGH>, | ||
| <&gpio0 87 GPIO_ACTIVE_HIGH>; | ||
| channel@0 { | ||
| reg = <0>; | ||
| label = "adaq2387x_testpat"; | ||
| }; | ||
| channel@1 { | ||
| reg = <1>; | ||
| label = "adaq2387x_pd"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &fpga_axi { | ||
| rx_dma: dma-controller@44a30000 { | ||
| compatible = "adi,axi-dmac-1.00.a"; | ||
| reg = <0x44a30000 0x1000>; | ||
| #dma-cells = <1>; | ||
| interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; | ||
| clocks = <&clkc 15>; | ||
| }; | ||
|
|
||
| axi_pwm_gen: pwm@44a60000 { | ||
| compatible = "adi,axi-pwmgen-2.00.a"; | ||
| reg = <0x44a60000 0x1000>; | ||
| label = "adaq2387x_if"; | ||
| #pwm-cells = <2>; | ||
| clocks = <&clkc 15>, <&ext_clk>; | ||
| clock-names = "axi", "ext"; | ||
| }; | ||
| }; | ||
|
|
||
| /* The FMC FRU EEPROM on this card is a 24AA32A, not the carrier's default. */ | ||
| &eeprom1 { | ||
| compatible = "atmel,24c32"; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
the devicetree is not really about defaults, but the topology.
Not clear how
adi,use-two-lanes->adi,use-one-laneis future-proof.Where/when was that discussed?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd meant to ask about it in the pull request as i wasn't sure of what convention to follow when naming this property.
currently, we have:
Having two lanes as the default for the adaq drivers helps achieve the maximum sample rate of the chip, which is why i thought it made sense. It's worth discussing the exact naming convention for this property in order to fall in line with other adc implementations