Re: [PATCH v3 1/2] dt-bindings: iio: dac: Add AD5529R
From: Rodrigo Alencar
Date: Tue May 26 2026 - 09:23:48 EST
On 26/05/19 05:42PM, Janani Sunil wrote:
> Devicetree bindings for AD5529R 16 channel 12/16 bit high voltage,
> buffered voltage output digital-to-analog converter (DAC) with an
> integrated precision reference.
...
> +properties:
> + compatible:
> + enum:
> + - adi,ad5529r-16 # 16-bit variant
> + - adi,ad5529r-12 # 12-bit variant
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 25000000
> + description:
> + Maximum SPI frequency. The device supports SPI Mode 0 and Mode 3.
> + Read operations are limited to 25MHz maximum.
> +
> + 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.
> +
> + tg0-gpios:
> + maxItems: 1
> + description:
> + GPIO connected to the TG0 toggle pin. Pulsing this pin allows all
> + selected DACs to be updated synchronously for coordinated output changes.
> +
> + 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.
Those toggle pins might need to be connected to a pwm source, rather than using
them as regular gpios (or maybe allow for both).
> +
> + 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 (1.08V to 1.98V)
> +
> + avdd-supply:
> + description: Analog power supply (4.75V to 5.25V)
> +
> + hvdd-supply:
> + description:
> + High voltage positive supply (7V to 45V). Supply voltage should be chosen
> + based on configured output ranges (see datasheet Table 9).
> +
> + hvss-supply:
> + description:
> + High voltage negative supply (-22.5V to 0V). 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).
> +
> + vref-supply:
> + description:
> + External voltage reference supply (4.056V to 4.136V, typically 4.096V).
> + When specified, the device uses external reference mode and the VREF pin becomes an
> + input. The device uses the internal 4.096V precision reference otherwise.
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
Probably others may comment on that, but...
This parent node may support device addressing for multi-device support through
those ID pins. I suppose that each device may have its own power supplies or
other resources like the toggle pins or reset and enable.
That way I suppose that an example would look like...
> +
> +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>;
> + };
> + };
> + };
...
spi {
#address-cells = <1>;
#size-cells = <0>;
multi-dac@0 {
compatible = "adi,ad5529r-16";
reg = <0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <0>;
dac@0 {
reg = <0>;
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>;
};
}
dac@1 {
reg = <1>;
vdd-supply = <&vdd_regulator>;
avdd-supply = <&avdd_regulator>;
hvdd-supply = <&hvdd_regulator>;
hvss-supply = <&hvss_regulator>;
reset-gpios = <&gpio0 88 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>;
};
}
};
};
then you might need something like:
patternProperties:
"^dac@[0-3]$":
and put most of the things under this node pattern.
So the main driver that you're putting together might need to handle up to four instances.
Even if your current driver cannot handle this, the dt-bindings might need cover that.
Need to double check if each dac node needs a separate compatible, so you would maybe populate
a platform data to be shared with the child nodes, which would be a separate driver.
(not sure if it would make sense to mix and match ad5529r-16 and ad5529r-12).
--
Kind regards,
Rodrigo Alencar