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
105 changes: 105 additions & 0 deletions Documentation/devicetree/bindings/iio/dac/adi,ad5706r.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad5706r.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD5706R 4-Channel Current Output DAC

maintainers:
- Alexis Czezar Torreno <alexisczezar.torreno@analog.com>

description: |
The AD5706R is a 4-channel, 16-bit resolution, current output
digital-to-analog converter (DAC) with programmable output current
ranges (50mA, 150mA, 200mA, 300mA), an integrated 2.5V voltage
reference, and load DAC, A/B toggle, and dither functions.

Datasheet:
https://www.analog.com/en/products/ad5706r.html

properties:
compatible:
enum:
- adi,ad5706r
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding support for ad5705r


reg:
maxItems: 1

avdd-supply:
description: Analog power supply (2.9V to 3.6V).

iovdd-supply:
description: Logic power supply (1.14V to 1.89V).

pvdd0-supply:
description: Power supply for IDAC0 channel (1.65V to AVDD).

pvdd1-supply:
description: Power supply for IDAC1 channel (1.65V to AVDD).

pvdd2-supply:
description: Power supply for IDAC2 channel (1.65V to AVDD).

pvdd3-supply:
description: Power supply for IDAC3 channel (1.65V to AVDD).

vref-supply:
description:
Optional external 2.5V voltage reference. If not provided, the
internal 2.5V reference is used.

pwms:
maxItems: 1
description:
Optional PWM connected to the LDAC/TGP/DCK pin for hardware
triggered DAC updates, toggle, or dither clock generation.

reset-gpios:
maxItems: 1
description:
GPIO connected to the active low RESET pin. If not provided,
software reset is used.

enable-gpios:
maxItems: 1
description:
GPIO connected to the active low OUT_EN pin. Controls whether
the current outputs are enabled or in high-Z/ground state.

required:
- compatible
- reg
- avdd-supply
- iovdd-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,ad5706r";
reg = <0>;
avdd-supply = <&avdd>;
iovdd-supply = <&iovdd>;
pvdd0-supply = <&pvdd>;
pvdd1-supply = <&pvdd>;
pvdd2-supply = <&pvdd>;
pvdd3-supply = <&pvdd>;
vref-supply = <&vref>;
spi-max-frequency = <50000000>;
pwms = <&pwm0 0 1000000 0>;
reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
enable-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
Copy link
Copy Markdown
Collaborator

@rodrigo455 rodrigo455 May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe others can comment on that, but that is my view on the multi-device support

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

	multi-dac@0 {
		compatible = "adi,ad5706r";
		reg = <0>;
		spi-max-frequency = <50000000>;

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

		dac@0 {
  			reg = <0>
  			avdd-supply = <&avdd>;
  			iovdd-supply = <&iovdd>;
  			pvdd0-supply = <&pvdd>;
  			pvdd1-supply = <&pvdd>;
  			pvdd2-supply = <&pvdd>;
  			pvdd3-supply = <&pvdd>;
  			vref-supply = <&vref>;
  			pwms = <&pwm0 0 1000000 0>;
  			reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  			enable-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
		};

		dac@1 {
  			reg = <1>
  			avdd-supply = <&avdd>;
  			iovdd-supply = <&iovdd>;
  			pvdd0-supply = <&pvdd>;
  			pvdd1-supply = <&pvdd>;
  			pvdd2-supply = <&pvdd>;
  			pvdd3-supply = <&pvdd>;
  			vref-supply = <&vref>;
  			pwms = <&pwm0 0 1000000 0>;
  			reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  			enable-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
		};
};

each dac node provides 4 channels, this example could be a single 8-channel iio device or two 4-channel iio devices... need to evaluate which one is best.
Another point here is to figure out resource sharing... maybe we want to set pwms, reset-gpios or enable-gpios to the parent node? and child nodes can inherit them being able to override...

...
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,14 @@ F: Documentation/iio/ad4695.rst
F: drivers/iio/adc/ad4695.c
F: include/dt-bindings/iio/adc/adc/adi,ad4695.h

ANALOG DEVICES INC AD5706R DRIVER
M: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
L: linux-iio@vger.kernel.org
S: Supported
W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/dac/adi,ad5706r.yaml
F: drivers/iio/dac/ad5706r.c

ANALOG DEVICES INC AD7091R DRIVER
M: Marcelo Schmitt <marcelo.schmitt@analog.com>
L: linux-iio@vger.kernel.org
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/Kconfig.adi
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ config IIO_ALL_ADI_DRIVERS
imply AD5592R_BASE
imply AD5592R
imply AD5593R
imply AD5706R
imply AD5755
imply AD5758
imply AD5761
Expand Down
11 changes: 11 additions & 0 deletions drivers/iio/dac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ config AD5624R_SPI
Say yes here to build support for Analog Devices AD5624R, AD5644R and
AD5664R converters (DAC). This driver uses the common SPI interface.

config AD5706R
tristate "Analog Devices AD5706R DAC driver"
depends on SPI
select REGMAP
help
Say yes here to build support for Analog Devices AD5706R 4-channel,
16-bit current output DAC.

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

config AD9739A
tristate "Analog Devices AD9739A RF DAC spi 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 @@ -20,6 +20,7 @@ obj-$(CONFIG_AD5449) += ad5449.o
obj-$(CONFIG_AD5592R_BASE) += ad5592r-base.o
obj-$(CONFIG_AD5592R) += ad5592r.o
obj-$(CONFIG_AD5593R) += ad5593r.o
obj-$(CONFIG_AD5706R) += ad5706r.o
obj-$(CONFIG_AD5755) += ad5755.o
obj-$(CONFIG_AD5758) += ad5758.o
obj-$(CONFIG_AD5761) += ad5761.o
Expand Down
Loading
Loading