Skip to content

Commit 82e6e3a

Browse files
committed
dt-bindings: iio: dac: Add MAX22007 DAC bindings
Add device tree bindings header for the MAX22007 4-channel 12-bit DAC. Defines constants for channel modes and other configuration options. Signed-off-by: Janani Sunil <[email protected]>
1 parent 36dbe4c commit 82e6e3a

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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 Quad Channel Industrial Analog Output
8+
9+
maintainers:
10+
- Janani Sunil <[email protected]>
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+
17+
Datasheet available at:
18+
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+
'#address-cells':
28+
const: 1
29+
30+
'#size-cells':
31+
const: 0
32+
33+
patternProperties:
34+
"^channel@[0-3]$":
35+
type: object
36+
description: Represents the external channels which are connected to the DAC.
37+
38+
properties:
39+
reg:
40+
description: |
41+
The channel number. It can have up to 4 channels numbered from 0 to 3.
42+
maximum: 3
43+
44+
adi,dac-latch-mode:
45+
description: |
46+
DAC latch control mode for the channel.
47+
0 = LDAC pin controls the latch (default)
48+
1 = Transparent latch mode (immediate update)
49+
$ref: /schemas/types.yaml#/definitions/uint32
50+
enum: [0, 1]
51+
52+
adi,channel-mode:
53+
description: |
54+
Output mode for the channel.
55+
0 = Voltage output mode (default)
56+
1 = Current output mode
57+
$ref: /schemas/types.yaml#/definitions/uint32
58+
enum: [0, 1]
59+
60+
adi,channel-power:
61+
description: |
62+
Power state for the channel.
63+
0 = Channel powered off (default)
64+
1 = Channel powered on
65+
$ref: /schemas/types.yaml#/definitions/uint32
66+
enum: [0, 1]
67+
68+
required:
69+
- reg
70+
71+
additionalProperties: false
72+
73+
required:
74+
- compatible
75+
- reg
76+
77+
allOf:
78+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
79+
80+
unevaluatedProperties: false
81+
82+
examples:
83+
- |
84+
spi {
85+
#address-cells = <1>;
86+
#size-cells = <0>;
87+
88+
dac@0 {
89+
compatible = "adi,max22007";
90+
reg = <0>;
91+
spi-max-frequency = <25000000>;
92+
#address-cells = <1>;
93+
#size-cells = <0>;
94+
95+
channel@0 {
96+
reg = <0>;
97+
adi,channel-mode = <0>;
98+
adi,dac-latch-mode = <0>;
99+
};
100+
101+
channel@1 {
102+
reg = <1>;
103+
adi,channel-mode = <0>;
104+
};
105+
};
106+
};
107+
...
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
3+
#ifndef _DT_BINDINGS_ADI_MAX22007_H
4+
#define _DT_BINDINGS_ADI_MAX22007_H
5+
6+
#define MAX22007_VOLTAGE_MODE 0
7+
#define MAX22007_CURRENT_MODE 1
8+
9+
#define MAX22007_LDAC_CONTROL 0
10+
#define MAX22007_TRANSPARENT_LATCH 1
11+
12+
#define MAX22007_CH_POWER_OFF 0
13+
#define MAX22007_CH_POWER_ON 1
14+
15+
#endif /* _DT_BINDINGS_ADI_MAX22007_H */

0 commit comments

Comments
 (0)