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

title: Analog Devices AD5529R 16-Channel 12/16-bit High Voltage DAC

maintainers:
- Janani Sunil <janani.sunil@analog.com>

description: |
The AD5529R is a 16-channel, 12-bit or 16-bit, high voltage, buffered voltage output
digital-to-analog converter (DAC) with an integrated precision reference.
The device operates from unipolar and bipolar supplies. It is guaranteed
monotonic and has built-in rail-to-rail output buffers that can source or
sink up to 25mA.

Specifications:
* 16 independent 12-bit or 16-bit DAC channels
* Independently programmable output ranges: 0V to 5V, 0V to 10V, 0V to 20V,
0V to 40V, ±5V, ±10V, ±15V, and ±20V
* The device supports SPI communication with Mode 0 and Mode 3.
* 4.096V precision reference, 12ppm/°C maximum
* Built-in function generation: Toggle, Sinusoidal Dither, and Ramp waveforms
* Multiplexer for output voltage, load current sense and die temperature

Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad5529r.pdf
Comment thread
jansunil marked this conversation as resolved.

properties:
compatible:
enum:
- adi,ad5529r-16 # 16-bit variant
- adi,ad5529r-12 # 12-bit variant

reg:
maxItems: 1

spi-max-frequency:
maximum: 50000000

reset-gpios:
maxItems: 1
description:
GPIO connected to the RESET pin. Active low. When asserted low,
performs a power-on reset and initializes the device to its default state.

clear-gpios:
maxItems: 1
description:
GPIO connected to the CLEAR pin. Active low. When asserted low,
clears all DAC data registers without affecting configuration settings.

interrupts:
maxItems: 1
description:
Interrupt connected to the ALARM pin. Active low interrupt output
for overtemperature conditions, SPI CRC errors, and function completion.

tg1-gpios:
maxItems: 1
description:
GPIO connected to the TG1 toggle pin. Pulsing this pin allows all
selected DACs to be updated synchronously for coordinated output changes.

tg2-gpios:
maxItems: 1
description:
GPIO connected to the TG2 toggle pin. Pulsing this pin allows all
selected DACs to be updated synchronously for coordinated output changes.

tg3-gpios:
maxItems: 1
description:
GPIO connected to the TG3 toggle pin. Pulsing this pin allows all
selected DACs to be updated synchronously for coordinated output changes.

io-channels:
maxItems: 1
description:
ADC channel connected to the MUXOUT pin for monitoring output voltage,
load current sense, and die temperature.

io-channel-names:
const: muxout

vdd-supply:
description: Digital power supply (typically 3.3V)

avdd-supply:
description: Analog power supply (typically 5V)

hvdd-supply:
description:
High voltage positive supply. Supply voltage should be chosen
based on configured output ranges (see datasheet Table 9).

hvss-supply:
description:
High voltage negative supply. Required only when using bipolar
output ranges (±5V, ±10V, ±15V, ±20V). Supply voltage should be
chosen based on configured output ranges (see datasheet Table 9).

"#address-cells":
const: 1

"#size-cells":
const: 0

patternProperties:
"^channel@([0-9]|1[0-5])$":
type: object
description: Child nodes for individual channel configuration

properties:
reg:
description: Channel number.
minimum: 0
maximum: 15

adi,output-range-microvolt:
description: |
Output voltage range for this channel as [min, max] in microvolts.
If not specified, defaults to 0V to 5V range.
oneOf:
- items:
- const: 0
- enum: [5000000, 10000000, 20000000, 40000000]
- items:
- const: -5000000
- const: 5000000
- items:
- const: -10000000
- const: 10000000
- items:
- const: -15000000
- const: 15000000
- items:
- const: -20000000
- const: 20000000

required:
- reg

additionalProperties: false

required:
- compatible
- reg
- vdd-supply
- avdd-supply
- hvdd-supply

dependencies:
spi-cpha: [ spi-cpol ]
spi-cpol: [ spi-cpha ]

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,ad5529r-16";
reg = <0>;
spi-max-frequency = <25000000>;

vdd-supply = <&vdd_regulator>;
avdd-supply = <&avdd_regulator>;
hvdd-supply = <&hvdd_regulator>;
hvss-supply = <&hvss_regulator>;

reset-gpios = <&gpio0 87 GPIO_ACTIVE_LOW>;

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

channel@0 {
reg = <0>;
adi,output-range-microvolt = <0 5000000>;
};

channel@1 {
reg = <1>;
adi,output-range-microvolt = <(-10000000) 10000000>;
};

channel@2 {
reg = <2>;
adi,output-range-microvolt = <0 40000000>;
};
};
};
...
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,14 @@ W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/adc/adi,ad4851.yaml
F: drivers/iio/adc/ad4851.c

ANALOG DEVICES INC AD5529R DRIVER
M: Janani Sunil <janani.sunil@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,ad5529r.yaml
F: drivers/iio/dac/ad5529r.c

ANALOG DEVICES INC AD5706R DRIVER
M: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
L: linux-iio@vger.kernel.org
Expand Down
17 changes: 17 additions & 0 deletions drivers/iio/dac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ config AD5449
To compile this driver as a module, choose M here: the
module will be called ad5449.

config AD5529R
tristate "Analog Devices AD5529R High Voltage DAC driver"
depends on SPI_MASTER
select REGMAP_SPI
help
Say yes here to build support for Analog Devices AD5529R
16-Channel, 12-Bit/16-Bit, 40V High Voltage Precision Digital to Analog
Converter.

The device features multiple output voltage ranges from -20V to +20V,
built-in 4.096V voltage reference, and digital functions including
toggle, dither, and ramp modes. Supports both 12-bit and 16-bit
resolution variants.

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

config AD5592R_BASE
tristate

Expand Down
1 change: 1 addition & 0 deletions drivers/iio/dac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ obj-$(CONFIG_AD5446) += ad5446.o
obj-$(CONFIG_AD5446_SPI) += ad5446-spi.o
obj-$(CONFIG_AD5446_I2C) += ad5446-i2c.o
obj-$(CONFIG_AD5449) += ad5449.o
obj-$(CONFIG_AD5529R) += ad5529r.o
obj-$(CONFIG_AD5592R_BASE) += ad5592r-base.o
obj-$(CONFIG_AD5592R) += ad5592r.o
obj-$(CONFIG_AD5593R) += ad5593r.o
Expand Down
Loading
Loading