-
Notifications
You must be signed in to change notification settings - Fork 943
iio: adc: ad4691: fixes and devicetree #3302
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
Draft
RaduSabau1
wants to merge
2
commits into
main
Choose a base branch
from
fix/ad4691
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+145
−1
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices AD4691 family - Non-manual offload modes (CNV_CLOCK_MODE, | ||
| * CNV_BURST_MODE, AUTONOMOUS_MODE, SPI_BURST_MODE) with SPI Engine Offload. | ||
| * https://www.analog.com/en/products/ad4691.html | ||
| * | ||
| * hdl_project: <ad469x_evb/coraz7s> | ||
| * Link: https://github.com/analogdevicesinc/hdl/tree/main/projects/ad469x_evb | ||
| * | ||
| * AD4692_ARDZ Eval Board Pinout on Cora Z7S Arduino Headers: | ||
| * CK_IO13: SPI SCLK | ||
| * CK_IO12: SPI SDO (MISO) | ||
| * CK_IO11: SPI SDI (MOSI) | ||
| * CK_IO10: SPI CS | ||
| * CK_IO09: GP0 (BUSY/DATA_READY) -> SPI Engine trigger input | ||
| * CK_IO06: CNV (PWM trigger output, CNV_CLOCK_MODE and CNV_BURST_MODE only) | ||
| * CK_IO04: RESETn | ||
| * | ||
| * Copyright (C) 2025 Analog Devices Inc. | ||
| */ | ||
| /dts-v1/; | ||
|
|
||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
| #include <dt-bindings/gpio/gpio.h> | ||
|
|
||
| #include "zynq-coraz7s.dtsi" | ||
|
|
||
| / { | ||
| avdd: regulator-avdd { | ||
| compatible = "regulator-fixed"; | ||
| regulator-name = "AD4692 AVDD"; | ||
| regulator-min-microvolt = <5000000>; | ||
| regulator-max-microvolt = <5000000>; | ||
| regulator-always-on; | ||
| }; | ||
|
|
||
| refin: regulator-refin { | ||
| compatible = "regulator-fixed"; | ||
| regulator-name = "AD4692 REFIN"; | ||
| regulator-min-microvolt = <5000000>; | ||
| regulator-max-microvolt = <5000000>; | ||
| regulator-always-on; | ||
| }; | ||
|
|
||
| ldo_in: regulator-ldo_in { | ||
| compatible = "regulator-fixed"; | ||
| regulator-name = "AD4692 LDO-IN"; | ||
| regulator-min-microvolt = <1800000>; | ||
| regulator-max-microvolt = <1800000>; | ||
| regulator-always-on; | ||
| }; | ||
|
|
||
| vio: regulator-vio { | ||
| compatible = "regulator-fixed"; | ||
| regulator-name = "AD4692 VIO"; | ||
| regulator-min-microvolt = <3300000>; | ||
| regulator-max-microvolt = <3300000>; | ||
| regulator-always-on; | ||
| }; | ||
|
|
||
| ref_clk: ref-clk { | ||
| compatible = "fixed-clock"; | ||
| #clock-cells = <0>; | ||
| clock-frequency = <100000000>; | ||
| clock-output-names = "ref_clk"; | ||
| }; | ||
| }; | ||
|
|
||
| &fpga_axi { | ||
| rx_dma: dma-controller@44a30000 { | ||
| compatible = "adi,axi-dmac-1.00.a"; | ||
| reg = <0x44a30000 0x1000>; | ||
| #dma-cells = <1>; | ||
| interrupt-parent = <&intc>; | ||
| interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; | ||
| clocks = <&clkc 15>; | ||
| }; | ||
|
|
||
| adc_trigger: pwm@44b00000 { | ||
| compatible = "adi,axi-pwmgen-2.00.a"; | ||
| reg = <0x44b00000 0x1000>; | ||
| #pwm-cells = <3>; | ||
| clocks = <&clkc 15>, <&spi_clk>; | ||
| clock-names = "axi", "ext"; | ||
| }; | ||
|
|
||
| spi_clk: clock-controller@44a70000 { | ||
| compatible = "adi,axi-clkgen-2.00.a"; | ||
| reg = <0x44a70000 0x10000>; | ||
| #clock-cells = <0>; | ||
| clocks = <&clkc 15>, <&clkc 15>; | ||
| clock-names = "clkin1", "s_axi_aclk"; | ||
| clock-output-names = "spi_clk"; | ||
| }; | ||
|
|
||
| axi_spi_engine: spi@44a00000 { | ||
| compatible = "adi,axi-spi-engine-1.00.a"; | ||
| reg = <0x44a00000 0x1000>; | ||
| interrupt-parent = <&intc>; | ||
| interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>; | ||
| clocks = <&clkc 15>, <&spi_clk>; | ||
| clock-names = "s_axi_aclk", "spi_clk"; | ||
|
|
||
| dmas = <&rx_dma 0>; | ||
| dma-names = "offload0-rx"; | ||
| trigger-sources = <&ad4692 0>; | ||
|
|
||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| ad4692: adc@0 { | ||
| compatible = "adi,ad4692"; | ||
| reg = <0>; | ||
|
|
||
| spi-cpol; | ||
| spi-cpha; | ||
| spi-max-frequency = <10000000>; | ||
|
|
||
| avdd-supply = <&avdd>; | ||
| ldo-in-supply = <&ldo_in>; | ||
| vio-supply = <&vio>; | ||
| refin-supply = <&refin>; | ||
|
|
||
| reset-gpios = <&gpio0 86 GPIO_ACTIVE_LOW>; | ||
|
|
||
| clocks = <&ref_clk>; | ||
| clock-names = "ref_clk"; | ||
|
|
||
| /* | ||
| * SPI_BURST_MODE: internal oscillator drives conversions, | ||
| * DATA_READY on GP0 signals completion. No CNV PWM needed. | ||
| * | ||
| * To switch to CNV_CLOCK_MODE or CNV_BURST_MODE, add: | ||
| * pwms = <&adc_trigger 0 10000 0>; | ||
| * pwm-names = "cnv"; | ||
| * and change adi,spi-mode to 0 or 1 respectively. | ||
| */ | ||
| pwms = <&adc_trigger 0 10000 0>; | ||
| pwm-names = "cnv"; | ||
|
|
||
| #trigger-source-cells = <1>; | ||
| }; | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
2026