Re: [PATCH 1/3] dt-bindings: iio: dac: Add binding for AD5706R
From: David Lechner
Date: Sat Feb 21 2026 - 11:06:08 EST
On 2/20/26 2:02 AM, Alexis Czezar Torreno wrote:
> Add device tree binding documentation for the Analog Devices
> AD5706R 4-channel 16-bit current output digital-to-analog converter.
>
> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@xxxxxxxxxx>
> ---
> .../devicetree/bindings/iio/dac/adi,ad5706r.yaml | 96 ++++++++++++++++++++++
> 1 file changed, 96 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5706r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5706r.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..dabaf2195a07d2c66d44f69ca60e32e6bc37cf55
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5706r.yaml
> @@ -0,0 +1,96 @@
> +# 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@xxxxxxxxxx>
> +
> +description: |
> + The AD5706R is a 16-bit, 4-channel current output digital-to-analog
> + converter with SPI interface.
> +
> + The driver supports dynamic SPI clock rate management via an external
> + clock generator (e.g., AXI CLKGEN) referenced by the 'clocks' property.
> + This allows separate read and write SPI speeds to be configured at
> + runtime.
Devicetree is for describing how it is wired up, not how the driver uses
it, so leave this part out.
> +
> + Datasheet:
> + https://www.analog.com/en/products/ad5706r.html
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ad5706r
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 100000000
> +
> + clocks:
> + maxItems: 1
> + description:
> + Reference clock for SPI clock rate management.
Based on the driver, it sounds like this clock is not connected
to this chip at all, but rather the SPI controller clock. So it
does not belong here.
> +
> + clock-names:
> + items:
> + - const: spi_clk
> +
> + pwms:
> + maxItems: 1
> +
> + pwm-names:
> + items:
> + - const: ad5706r_ldacb
Instead of giving it a name, we can just write it as:
pwms:
items:
- description: PWM connected to the LDAC/TGP/DCK pin.
The items: also limits it to exactly one item, so we don't need
maxItems:.
> +
> + dac-resetb-gpios:
> + maxItems: 1
> + description: GPIO connected to the active-low reset pin.
The datasheet just has a /RESET pin. Not sure where the "b" comes
from.
> +
> + dac-shdn-gpios:
> + maxItems: 1
> + description: GPIO connected to the active-high shutdown pin.
I didn't see a "shutdown" pin in the datasheet. Do you mean the
OUT_EN pin?
> +
We could also add an io-channel for reading back the MUX_OUT pin
from the ADC it is connected to.
> +required:
> + - compatible
> + - reg
> + - spi-max-frequency
Voltage supplies should be required.
> + - clocks
> + - clock-names
> + - pwms
> + - pwm-names
> + - dac-resetb-gpios
> + - dac-shdn-gpios
I would not expect any of these to be required. Reset could be hardwired if
there aren't enough GPIOs. And something other than a PWM could be connected
to the LDAC/TGP/DCK pin.
The point of the bindings is to describe how the chip is wired up, and that
includes any way it could possibly be wired up, not just what is implemented
in the driver.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + dac@0 {
> + compatible = "adi,ad5706r";
> + reg = <0>;
> + spi-max-frequency = <100000000>;
> +
> + clocks = <&spi_clk>;
> + clock-names = "spi_clk";
> +
> + dac-resetb-gpios = <&gpio0 86 GPIO_ACTIVE_LOW>;
> + dac-shdn-gpios = <&gpio0 87 GPIO_ACTIVE_HIGH>;
> +
> + pwms = <&axi_pwm_gen 0 0>;
> + pwm-names = "ad5706r_ldacb";
> + };
> + };
> +...
>