Skip to content

Commit 15694b1

Browse files
committed
iio: dac: Add AD5413 support
The AD5413 is a single-channel, 14-bit DAC with programmable current or voltage output. It communicates via SPI at clock rates up to 50 MHz. The output can be configured as either voltage or current and is available on a single terminal. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad5413.pdf Signed-off-by: Bruce Tsao <[email protected]>
1 parent 36cae35 commit 15694b1

File tree

10 files changed

+918
-695
lines changed

10 files changed

+918
-695
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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,ad5413.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices AD5413 DAC
8+
9+
maintainers:
10+
- Bruce Tsao <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: adi,ad5413
15+
16+
reg:
17+
maxItems: 1
18+
19+
spi-max-frequency:
20+
maximum: 50000000
21+
22+
reset-gpios: true
23+
24+
avdd-supply:
25+
description: Analog positive supply (AVDD)
26+
27+
dvdd-supply:
28+
description: Digital positive supply (DVDD)
29+
30+
avss-supply:
31+
description: Analog negative supply (AVSS)
32+
33+
adi,range-microvolt:
34+
description: Voltage output range <min, max> in microvolts
35+
oneOf:
36+
- items:
37+
- const: -10500000
38+
- const: 10500000
39+
- items:
40+
- const: -12600000
41+
- const: 12600000
42+
43+
adi,range-microamp:
44+
description: Current output range <min, max> in microamps
45+
items:
46+
- const: 0
47+
- const: 24000
48+
49+
adi,slew-time-us:
50+
description: Output digital slew control time in microseconds
51+
minimum: 0
52+
maximum: 1000000
53+
default: 0
54+
55+
required:
56+
- compatible
57+
- reg
58+
- spi-max-frequency
59+
- avdd-supply
60+
- dvdd-supply
61+
- avss-supply
62+
63+
allOf:
64+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
65+
- oneOf:
66+
- required: ['adi,range-microamp']
67+
- required: ['adi,range-microvolt']
68+
69+
unevaluatedProperties: false
70+
71+
examples:
72+
- |
73+
spi {
74+
#address-cells = <1>;
75+
#size-cells = <0>;
76+
77+
dac@0 {
78+
compatible = "adi,ad5413";
79+
reg = <0>;
80+
spi-max-frequency = <1000000>;
81+
reset-gpios = <&gpio 0 1>; /* 1 = active low */
82+
avdd-supply = <&avdd>;
83+
dvdd-supply = <&dvdd>;
84+
avss-supply = <&avss>;
85+
adi,range-microvolt = <(-10500000) 10500000>;
86+
adi,slew-time-us = <125>;
87+
};
88+
};

0 commit comments

Comments
 (0)