Skip to content

Commit 077d963

Browse files
committed
dt-bindings: iio: adc: Add adi,ad4052
Add dt-bindings for AD4052 family, devices AD4050/AD4052/AD4056/AD4058, low-power with monitor capabilities SAR ADCs. Each variant of the family differs in speed and resolution, resulting in different scan types and spi word sizes, that are matched by the compatible with the chip_info. The device contains two required interrupts (gp0, gp1) and one optional gpio (cnv). Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 7ff88f0 commit 077d963

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2025 Analog Devices Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/iio/adc/adi,ad4052.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Analog Devices AD4052 ADC family device driver
9+
10+
maintainers:
11+
- Jorge Marques <jorge.marques@analog.com>
12+
13+
description: |
14+
Analog Devices AD4052 Single Channel Precision SAR ADC family
15+
16+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4050-ad4056.pdf
17+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052-ad4058.pdf
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- adi,ad4050
23+
- adi,ad4052
24+
- adi,ad4056
25+
- adi,ad4058
26+
27+
reg:
28+
maxItems: 1
29+
30+
interrupts:
31+
items:
32+
- description: Signal coming from the GP0 pin (threshold).
33+
- description: Signal coming from the GP1 pin (data ready).
34+
35+
interrupt-names:
36+
items:
37+
- const: gp0
38+
- const: gp1
39+
40+
gpio-controller: true
41+
42+
"#gpio-cells":
43+
const: 2
44+
description: |
45+
The first cell is the GPn number: 0 to 1.
46+
The second cell takes standard GPIO flags.
47+
48+
cnv-gpios:
49+
description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.
50+
maxItems: 1
51+
52+
spi-max-frequency:
53+
maximum: 62500000
54+
55+
vdd-supply:
56+
description: Analog power supply.
57+
58+
vio-supply:
59+
description: Digital interface logic power supply.
60+
61+
vref-supply:
62+
description: Reference voltage to set the ADC full-scale range.
63+
64+
required:
65+
- compatible
66+
- reg
67+
- interrupts
68+
- interrupt-names
69+
- vdd-supply
70+
- vio-supply
71+
72+
allOf:
73+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
74+
75+
unevaluatedProperties: false
76+
77+
examples:
78+
- |
79+
#include <dt-bindings/gpio/gpio.h>
80+
#include <dt-bindings/interrupt-controller/irq.h>
81+
82+
spi {
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
86+
adc@0 {
87+
compatible = "adi,ad4052";
88+
reg = <0>;
89+
vdd-supply = <&adc_vdd>;
90+
vio-supply = <&adc_vio>;
91+
spi-max-frequency = <25000000>;
92+
93+
interrupt-parent = <&gpio>;
94+
interrupts = <0 0 IRQ_TYPE_EDGE_RISING>,
95+
<0 1 IRQ_TYPE_EDGE_FALLING>;
96+
interrupt-names = "gp0", "gp1";
97+
cnv-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
98+
};
99+
};
100+
...

0 commit comments

Comments
 (0)