Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions Documentation/devicetree/bindings/iio/dac/adi,ad5413.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad5413.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD5413 DAC

description: |
Analog Devices AD5413 is a single-channel precision DAC supporting voltage
or current output modes with programmable slew-rate control.
The output mode is selected via the adi,chan-current-mode property.
Optional reset GPIO may be provided.

maintainers:
- bruce.tsao@analog.com

properties:
compatible:
const: adi,ad5413

spi-max-frequency:
maximum: 50000000

reset-gpios:
maxItems: 1
description: Optional reset GPIO (active low).

avdd-supply:
description: Analog positive supply (AVDD)

dvdd-supply:
description: Digital positive supply (DVDD)

avss-supply:
description: Analog negative supply (AVSS)

adi,chan-current-mode:
type: boolean
description: Select current output mode. If absent, voltage mode is used.

adi,slew-time-us:
description: Output digital slew control time in microseconds
minimum: 0
maximum: 1000000
default: 0

required:
- compatible
- avdd-supply
- dvdd-supply
- avss-supply

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

spi {
#address-cells = <1>;
#size-cells = <0>;

dac@0 {
compatible = "adi,ad5413";
reg = <0>;
spi-max-frequency = <1000000>;
reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
avdd-supply = <&avdd>;
dvdd-supply = <&dvdd>;
avss-supply = <&avss>;
adi,slew-time-us = <125>;
};
};

- |
spi {
#address-cells = <1>;
#size-cells = <0>;

dac@0 {
compatible = "adi,ad5413";
reg = <0>;
spi-max-frequency = <1000000>;
avdd-supply = <&avdd>;
dvdd-supply = <&dvdd>;
avss-supply = <&avss>;

adi,chan-current-mode;
};
};
11 changes: 11 additions & 0 deletions drivers/iio/dac/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# DAC drivers
Expand Down Expand Up @@ -89,6 +89,17 @@
To compile this driver as module choose M here: the module will be called
ad5380.

config AD5413
tristate "Analog Devices AD5413 DAC driver"
depends on SPI_MASTER
select CRC8
help
Say yes here to build support for Analog Devices AD5413 single channel
Digital to Analog Converter.

To compile this driver as a module, choose M here: the
module will be called ad5413.

config AD5421
tristate "Analog Devices AD5421 DAC driver"
depends on SPI
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/dac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ obj-$(CONFIG_AD3552R_LIB) += ad3552r-common.o
obj-$(CONFIG_AD3552R) += ad3552r.o
obj-$(CONFIG_AD5360) += ad5360.o
obj-$(CONFIG_AD5380) += ad5380.o
obj-$(CONFIG_AD5413) += ad5413.o
obj-$(CONFIG_AD5421) += ad5421.o
obj-$(CONFIG_AD5624R_SPI) += ad5624r_spi.o
obj-$(CONFIG_AD5064) += ad5064.o
Expand Down
Loading
Loading