Skip to content

Commit def3ac3

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 def3ac3

File tree

4 files changed

+843
-0
lines changed

4 files changed

+843
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
adi,range-microvolt:
23+
description: Voltage output range <min, max> in microvolts
24+
enum:
25+
- [-10500000, 10500000]
26+
- [-12600000, 12600000]
27+
28+
adi,range-microamp:
29+
description: Current output range <min, max> in microamps
30+
enum:
31+
- [0, 24000]
32+
33+
adi,slew-time-us:
34+
description: |
35+
Output digital slew control time in microseconds
36+
minimum: 0
37+
maximum: 1000000
38+
39+
required:
40+
- compatible
41+
- reg
42+
- spi-max-frequency
43+
44+
allOf:
45+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
46+
- if:
47+
required: [adi, range-microamp]
48+
then:
49+
properties:
50+
adi,range-microvolt: false
51+
- if:
52+
required: [adi, range-microvolt]
53+
then:
54+
properties:
55+
adi,range-microamp: false
56+
57+
unevaluatedProperties: false
58+
59+
examples:
60+
- |
61+
spi {
62+
#address-cells = <1>;
63+
#size-cells = <0>;
64+
65+
dac@0 {
66+
compatible = "adi,ad5413";
67+
reg = <0>;
68+
spi-max-frequency = <1000000>;
69+
adi,range-microvolt = <(-10500000) 10500000>;
70+
adi,slew-time-us = <125>;
71+
};
72+
};

drivers/iio/dac/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,4 +564,13 @@ config VF610_DAC
564564
This driver can also be built as a module. If so, the module will
565565
be called vf610_dac.
566566

567+
config AD5413
568+
tristate "Analog Devices AD5413 DAC driver"
569+
depends on SPI_MASTER
570+
help
571+
Say yes here to build support for Analog Devices AD5413 single channel
572+
Digital to Analog Converter.
573+
574+
To compile this driver as a module, choose M here: the
575+
module will be called ad5758.
567576
endmenu

drivers/iio/dac/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ obj-$(CONFIG_TI_DAC5571) += ti-dac5571.o
5757
obj-$(CONFIG_TI_DAC7311) += ti-dac7311.o
5858
obj-$(CONFIG_TI_DAC7612) += ti-dac7612.o
5959
obj-$(CONFIG_VF610_DAC) += vf610_dac.o
60+
obj-$(CONFIG_AD5413) += ad5413.o

0 commit comments

Comments
 (0)