Skip to content

Commit c3d7cc9

Browse files
committed
Documentation: iio: dac: Add MAX22007
Document MAX22007 4-channel 12-bit DAC that drives a voltage or current output on each channel Signed-off-by: Janani Sunil <janani.sunil@analog.com>
1 parent 36dbe4c commit c3d7cc9

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/dac/adi,max22007.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices MAX22007 DAC device driver
8+
9+
maintainers:
10+
- Janani Sunil <janani.sunil@analog.com>
11+
12+
description:
13+
The MAX22007 is a quad-channel, 12-bit digital-to-analog converter (DAC)
14+
with integrated precision output amplifiers and current output capability.
15+
Each channel can be independently configured for voltage or current output.
16+
The driver supports runtime LDAC (Latch DAC) control via per-channel sysfs
17+
attributes for precise output timing control.
18+
Datasheet available at https://www.analog.com/en/products/max22007.html
19+
20+
properties:
21+
compatible:
22+
const: adi,max22007
23+
24+
reg:
25+
maxItems: 1
26+
27+
spi-max-frequency:
28+
maximum: 500000
29+
30+
'#address-cells':
31+
const: 1
32+
33+
'#size-cells':
34+
const: 0
35+
36+
vdd-supply:
37+
description: Low-Voltage Power Supply from +2.7V to +5.5V.
38+
39+
hvdd-supply:
40+
description:
41+
Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
42+
the Output Channels.
43+
44+
hvss-supply:
45+
description:
46+
Negative High-Voltage Power Supply from -2V to 0V for the Output Channels.
47+
48+
adi,crc-disable:
49+
type: boolean
50+
description:
51+
Disable CRC8 error checking for SPI communications. By default, CRC8 is
52+
enabled for data integrity verification. Set this property to disable it.
53+
54+
reset-gpios:
55+
maxItems: 1
56+
description:
57+
GPIO used for hardware reset of the device. If not specified, the driver
58+
will use software reset via SPI register.
59+
60+
patternProperties:
61+
"^channel@[0-3]$":
62+
type: object
63+
description:
64+
Represents the external channels which are connected to the DAC.
65+
Channels not specified in the device tree will be powered off.
66+
properties:
67+
reg:
68+
description:
69+
This represents the channel number.
70+
maximum: 3
71+
72+
adi,dac-latch-mode:
73+
description:
74+
DAC latch control mode for the channel.
75+
$ref: /schemas/types.yaml#/definitions/string
76+
enum: [ldac-control, transparent]
77+
default: ldac-control
78+
79+
adi,mode:
80+
description:
81+
Output mode for the channel.
82+
$ref: /schemas/types.yaml#/definitions/string
83+
enum: [voltage, current]
84+
default: voltage
85+
86+
required:
87+
- reg
88+
89+
additionalProperties: false
90+
91+
required:
92+
- compatible
93+
- reg
94+
95+
anyOf:
96+
- required: [channel@0]
97+
- required: [channel@1]
98+
- required: [channel@2]
99+
- required: [channel@3]
100+
101+
allOf:
102+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
103+
104+
unevaluatedProperties: false
105+
106+
examples:
107+
- |
108+
#include <dt-bindings/gpio/gpio.h>
109+
spi {
110+
#address-cells = <1>;
111+
#size-cells = <0>;
112+
113+
dac@0 {
114+
compatible = "adi,max22007";
115+
reg = <0>;
116+
spi-max-frequency = <500000>;
117+
reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
118+
#address-cells = <1>;
119+
#size-cells = <0>;
120+
121+
channel@0 {
122+
reg = <0>;
123+
adi,mode = "voltage";
124+
adi,dac-latch-mode = "ldac-control";
125+
};
126+
127+
channel@1 {
128+
reg = <1>;
129+
adi,mode = "current";
130+
adi,dac-latch-mode = "transparent";
131+
};
132+
};
133+
};
134+
...

0 commit comments

Comments
 (0)