-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: iio: adc: Add adi,ad4052.yaml
Add documentation for devicetree bindings for AD4052 ADC family. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
- Loading branch information
Showing
1 changed file
with
132 additions
and
0 deletions.
There are no files selected for viewing
132 changes: 132 additions & 0 deletions
132
Documentation/devicetree/bindings/iio/adc/adi,ad4052.yaml
This file contains 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,132 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
# Copyright 2024 Analog Devices Inc. | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/iio/adc/adi,ad4052.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Analog Devices AD4052 ADC family device driver | ||
|
||
maintainers: | ||
- Jorge Marques <jorge.marques@analog.com> | ||
|
||
description: | | ||
Analog Devices AD4052 Single Channel Precision SAR ADC family | ||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4050.pdf | ||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052.pdf | ||
properties: | ||
|
||
compatible: | ||
enum: | ||
- adi,ad4050 | ||
- adi,ad4052 | ||
- adi,ad4056 | ||
- adi,ad4058 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
description: | ||
Reference clock | ||
|
||
clock-names: | ||
const: ref_clk | ||
|
||
interrupts: | ||
description: IRQ line for the ADC GP0 | ||
maxItems: 1 | ||
|
||
dmas: | ||
maxItems: 1 | ||
|
||
dma-names: | ||
const: rx | ||
|
||
pwms: | ||
maxItems: 1 | ||
|
||
pwm-names: | ||
oneOf: | ||
- items: | ||
- const: cnv | ||
|
||
cnv-gpios: | ||
description: GPIO line for the ADC CNV | ||
maxItems: 1 | ||
|
||
spi-max-frequency: | ||
maximum: 25000000 | ||
|
||
vdd-supply: true | ||
vdd_1_8-supply: true | ||
vio-supply: true | ||
|
||
adi,functional-mode: | ||
description: | ||
The device supports functional modes, granuality depends on the device. | ||
|
||
0 - Sample is 12 or 16 bit. | ||
1 - Sample is 24 or 16-bit burst average of n-samples. | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1] | ||
default: 0 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- clocks | ||
- clock-names | ||
- dmas | ||
- dma-names | ||
- pwms | ||
- pwm-names | ||
- interrupts | ||
|
||
allOf: | ||
- $ref: /schemas/spi/spi-peripheral-props.yaml# | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
enum: | ||
- adi,ad4050 | ||
- adi,ad4052 | ||
- adi,ad4056 | ||
- adi,ad4058 | ||
then: | ||
properties: | ||
adi,functional-mode: | ||
enum: [0, 1] | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/gpio/gpio.h> | ||
spi { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
adc@0 { | ||
compatible = "adi,ad4052"; | ||
reg = <0>; | ||
spi-max-frequency = <25000000>; | ||
clocks = <&clk0>; | ||
clock-names = "ref_clk"; | ||
dmas = <&dma 0>; | ||
dma-names = "rx"; | ||
pwm-names = "cnv"; | ||
pwms = <&adc_trigger 0 0>; | ||
cnv-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; | ||
interrupts = <0 2>; | ||
interrupt-parent = <&gpio>; | ||
adi,functional-mode = <0>; | ||
}; | ||
}; | ||
... |