-
Notifications
You must be signed in to change notification settings - Fork 944
AD7768 upstream #3146
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
Open
jansunil
wants to merge
5
commits into
mirror_ci/jic23/iio/testing
Choose a base branch
from
ad7768-upstream
base: mirror_ci/jic23/iio/testing
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.
Open
AD7768 upstream #3146
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
64c9e1f
dt-bindings: iio: adc: Add AD7768
jansunil c05006f
iio: backend: Add support for CRC
jansunil 7dff989
iio: adc: adi-axi-adc: Add support for CRC
jansunil c3df15c
drivers: iio: adc: AD7768 Driver support
jansunil 9e73504
Documentation: iio: Add AD7768 Documentation
jansunil 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
290 changes: 290 additions & 0 deletions
290
Documentation/devicetree/bindings/iio/adc/adi,ad7768.yaml
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,290 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/iio/adc/adi,ad7768.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices AD7768 and AD7768-4 ADC | ||
|
|
||
| maintainers: | ||
| - Janani Sunil <janani.sunil@analog.com> | ||
|
|
||
| description: | | ||
| The AD7768 is a 8-channel, 24-bit simultaneous sampling ADC with configurable | ||
| power and performance modes. The AD7768-4 is a 4-channel version. | ||
|
|
||
| Datasheet at: | ||
| https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768.pdf | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,ad7768 | ||
| - adi,ad7768-4 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| clocks: | ||
| maxItems: 1 | ||
| description: Master clock (MCLK) | ||
|
|
||
| avdd-supply: | ||
| description: Analog power supply AVDD1 (4.5V to 5.5V) | ||
|
|
||
| avss-supply: | ||
| description: Analog ground/negative supply AVSS (0V to -2.75V) | ||
|
|
||
| dvdd-supply: | ||
| description: Analog power supply AVDD2 (2.0V to 5.5V) | ||
|
|
||
| iovdd-supply: | ||
| description: Digital I/O power supply (1.8V or 2.25V to 3.6V) | ||
|
|
||
| vref-supply: | ||
| description: ADC reference voltage supply | ||
|
|
||
| resets: | ||
| maxItems: 1 | ||
| description: | | ||
| Reset control | ||
| reset-names: | ||
| const: reset | ||
|
|
||
| reset-gpios: | ||
| maxItems: 1 | ||
| description: | | ||
| GPIO reset pin. | ||
| Either resets or reset-gpios should be specified, not both. | ||
| adi,data-lines-number: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| enum: [1, 2, 4, 8] | ||
| description: | | ||
|
jansunil marked this conversation as resolved.
|
||
| Number of data output lines used for serial interface. | ||
| AD7768: supports 1, 2, 8 lines | ||
| AD7768-4: supports 1, 4 lines | ||
|
|
||
| adi,common-mode-output: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| enum: [0, 1, 2, 3] | ||
| description: | | ||
|
jansunil marked this conversation as resolved.
|
||
| Common mode voltage output selection: | ||
| 0 - (AVDD - AVSS) / 2 | ||
| 1 - 1.65V | ||
| 2 - 2.5V | ||
| 3 - 2.14V | ||
|
|
||
| adi,vcm-power-down: | ||
| type: boolean | ||
| description: Power down the common mode output buffer | ||
|
|
||
| adi,power-mode: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| enum: [0, 1, 2] | ||
| description: | | ||
| Power mode selection: | ||
| 0 - Low power mode | ||
| 1 - Median mode | ||
| 2 - Fast mode | ||
|
|
||
| io-backends: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: | | ||
| Phandle to an IIO backend device (e.g., AXI ADC) used for | ||
| high-speed data capture and DMA operations. | ||
|
|
||
| '#address-cells': | ||
| const: 1 | ||
|
|
||
| '#size-cells': | ||
| const: 0 | ||
|
|
||
| patternProperties: | ||
| "^channel@[0-7]$": | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| type: object | ||
| description: | | ||
| Represents the external channels which are connected to the device. | ||
| AD7768 supports channels 0-7, AD7768-4 supports channels 0-3. | ||
|
|
||
| properties: | ||
| reg: | ||
| minimum: 0 | ||
| maximum: 7 | ||
| description: The channel number | ||
|
|
||
| adi,ch-mode: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| minimum: 0 | ||
| maximum: 1 | ||
| description: | | ||
| Channel mode selection. The AD7768 supports two independent | ||
| configuration profiles (Mode A and Mode B) for filter and | ||
| decimation settings. Each channel can be assigned to either mode: | ||
| 0 - Channel uses Mode A filter and decimation settings | ||
| 1 - Channel uses Mode B filter and decimation settings | ||
|
|
||
| adi,prebuf-pos-en: | ||
| type: boolean | ||
| description: Enable positive input precharge buffer | ||
|
|
||
| adi,prebuf-neg-en: | ||
| type: boolean | ||
| description: Enable negative input precharge buffer | ||
|
|
||
| adi,refbuf-pos-en: | ||
| type: boolean | ||
| description: Enable positive reference buffer | ||
|
|
||
| adi,refbuf-neg-en: | ||
| type: boolean | ||
| description: Enable negative reference buffer | ||
|
|
||
| required: | ||
| - reg | ||
| - adi,ch-mode | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - clocks | ||
| - avdd-supply | ||
| - avss-supply | ||
| - dvdd-supply | ||
| - iovdd-supply | ||
| - vref-supply | ||
| - adi,data-lines-number | ||
| - adi,common-mode-output | ||
| - adi,power-mode | ||
| - io-backends | ||
|
|
||
| allOf: | ||
| - $ref: /schemas/spi/spi-peripheral-props.yaml# | ||
| - if: | ||
| properties: | ||
| compatible: | ||
| contains: | ||
| const: adi,ad7768-4 | ||
| then: | ||
| properties: | ||
| adi,data-lines-number: | ||
| enum: [1, 4] | ||
| patternProperties: | ||
| "^channel@[0-3]$": | ||
| properties: | ||
| reg: | ||
| maximum: 3 | ||
| else: | ||
| properties: | ||
| adi,data-lines-number: | ||
| enum: [1, 2, 8] | ||
|
|
||
| unevaluatedProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/iio/adc/adi,ad7768.h> | ||
| #include <dt-bindings/gpio/gpio.h> | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
|
|
||
| spi { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| adc@0 { | ||
| compatible = "adi,ad7768"; | ||
| reg = <0>; | ||
| spi-max-frequency = <1000000>; | ||
|
|
||
| avdd-supply = <&avdd_regulator>; | ||
| avss-supply = <&avss_regulator>; | ||
| dvdd-supply = <&dvdd_regulator>; | ||
| iovdd-supply = <&iovdd_regulator>; | ||
| vref-supply = <&vref_regulator>; | ||
| reset-gpios = <&gpio0 86 GPIO_ACTIVE_HIGH>; | ||
|
|
||
| clocks = <&ad7768_mclk>; | ||
|
|
||
| adi,data-lines-number = <8>; | ||
| adi,common-mode-output = <AD7768_2P5_V>; | ||
| adi,vcm-power-down; | ||
| adi,power-mode = <AD7768_POWER_MODE_MEDIAN>; | ||
|
|
||
| io-backends = <&iio_backend>; | ||
|
|
||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| channel@0 { | ||
| reg = <0>; | ||
| adi,ch-mode = <0>; | ||
| adi,prebuf-pos-en; | ||
| adi,refbuf-pos-en; | ||
| }; | ||
|
|
||
| channel@1 { | ||
| reg = <1>; | ||
| adi,ch-mode = <1>; | ||
| adi,prebuf-pos-en; | ||
| adi,prebuf-neg-en; | ||
| adi,refbuf-pos-en; | ||
| adi,refbuf-neg-en; | ||
| }; | ||
|
|
||
| channel@7 { | ||
| reg = <7>; | ||
| adi,ch-mode = <1>; | ||
| adi,prebuf-pos-en; | ||
| adi,refbuf-pos-en; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| - | | ||
| #include <dt-bindings/iio/adc/adi,ad7768.h> | ||
| #include <dt-bindings/gpio/gpio.h> | ||
|
|
||
| spi { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| adc@1 { | ||
| compatible = "adi,ad7768-4"; | ||
| reg = <1>; | ||
| spi-max-frequency = <1000000>; | ||
|
|
||
| avdd-supply = <&avdd_regulator>; | ||
| avss-supply = <&avss_regulator>; | ||
| dvdd-supply = <&dvdd_regulator>; | ||
| iovdd-supply = <&iovdd_regulator>; | ||
| vref-supply = <&vref_regulator>; | ||
| reset-gpios = <&gpio0 87 GPIO_ACTIVE_LOW>; | ||
|
|
||
| clocks = <&ad7768_mclk>; | ||
|
|
||
| adi,data-lines-number = <4>; | ||
| adi,common-mode-output = <AD7768_2P14_V>; | ||
| adi,power-mode = <AD7768_POWER_MODE_FAST>; | ||
|
|
||
| io-backends = <&iio_backend>; | ||
|
|
||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| channel@0 { | ||
| reg = <0>; | ||
| adi,ch-mode = <0>; | ||
| adi,prebuf-pos-en; | ||
| adi,refbuf-pos-en; | ||
| }; | ||
|
|
||
| channel@3 { | ||
| reg = <3>; | ||
| adi,ch-mode = <1>; | ||
| adi,prebuf-pos-en; | ||
| adi,refbuf-pos-en; | ||
| }; | ||
| }; | ||
| }; | ||
| ... | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.