diff mbox series

[v3,07/10] dt-bindings: iio: dac: add docs for AD9739A

Message ID 20240412-iio-backend-axi-dac-v3-7-3e9d4c5201fb@analog.com (mailing list archive)
State Superseded
Headers show
Series iio: dac: support IIO backends on the output direction | expand

Commit Message

Nuno Sa via B4 Relay April 12, 2024, 1:36 p.m. UTC
From: Nuno Sa <nuno.sa@analog.com>

This adds the bindings documentation for the 14 bit
RF Digital-to-Analog converter.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 .../devicetree/bindings/iio/dac/adi,ad9739a.yaml   | 94 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 102 insertions(+)

Comments

David Lechner April 12, 2024, 11:47 p.m. UTC | #1
On Fri, Apr 12, 2024 at 8:36 AM Nuno Sa via B4 Relay
<devnull+nuno.sa.analog.com@kernel.org> wrote:
>
> From: Nuno Sa <nuno.sa@analog.com>
>

...

> +  adi,full-scale-microamp:
> +    description: This property represents the DAC full scale current.

The description could be improved by saying what determines the value
that need to be entered here. (Also wondering if this is not something
that should be set at runtime using the _scale attribute instead.)

> +    minimum: 8700
> +    maximum: 31700

Missing a default value since this is not a required property?

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - io-backends
> +  - vdd-3p3-supply
> +  - vdd-supply
> +  - vdda-supply
> +  - vddc-supply
> +
Nuno Sá April 15, 2024, 12:25 p.m. UTC | #2
On Fri, 2024-04-12 at 18:47 -0500, David Lechner wrote:
> On Fri, Apr 12, 2024 at 8:36 AM Nuno Sa via B4 Relay
> <devnull+nuno.sa.analog.com@kernel.org> wrote:
> > 
> > From: Nuno Sa <nuno.sa@analog.com>
> > 
> 
> ...
> 
> > +  adi,full-scale-microamp:
> > +    description: This property represents the DAC full scale current.
> 
> The description could be improved by saying what determines the value
> that need to be entered here. (Also wondering if this is not something
> that should be set at runtime using the _scale attribute instead.)
> 

Hmm, not sure what you mean here? For anyone using a device like this, it should
be clear what this is about :)

> > +    minimum: 8700
> > +    maximum: 31700
> 
> Missing a default value since this is not a required property?
> 

Hmm, yes. That could definitely be added.

- Nuno Sá
>
David Lechner April 15, 2024, 1:51 p.m. UTC | #3
On 4/15/24 7:25 AM, Nuno Sá wrote:
> On Fri, 2024-04-12 at 18:47 -0500, David Lechner wrote:
>> On Fri, Apr 12, 2024 at 8:36 AM Nuno Sa via B4 Relay
>> <devnull+nuno.sa.analog.com@kernel.org> wrote:
>>>
>>> From: Nuno Sa <nuno.sa@analog.com>
>>>
>>
>> ...
>>
>>> +  adi,full-scale-microamp:
>>> +    description: This property represents the DAC full scale current.
>>
>> The description could be improved by saying what determines the value
>> that need to be entered here. (Also wondering if this is not something
>> that should be set at runtime using the _scale attribute instead.)
>>
> 
> Hmm, not sure what you mean here? For anyone using a device like this, it should
> be clear what this is about :)

I never used a part like this before, but Jonathan explained it in his
reply to my comments on the LTC2672 bindings. It does sound like this
is a common property.

> 
>>> +    minimum: 8700
>>> +    maximum: 31700
>>
>> Missing a default value since this is not a required property?
>>
> 
> Hmm, yes. That could definitely be added.
> 
> - Nuno Sá
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad9739a.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad9739a.yaml
new file mode 100644
index 000000000000..4ef66fe9d61b
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad9739a.yaml
@@ -0,0 +1,94 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad9739a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD9739A RF DAC
+
+maintainers:
+  - Dragos Bogdan <dragos.bogdan@analog.com>
+  - Nuno Sa <nuno.sa@analog.com>
+
+description: |
+  The AD9739A is a 14-bit, 2.5 GSPS high performance RF DACs that are capable
+  of synthesizing wideband signals from dc up to 3 GHz.
+
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ad9737a_9739a.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,ad9739a
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vdd-3p3-supply:
+    description: 3.3V Digital input supply.
+
+  vdd-supply:
+    description: 1.8V Digital input supply.
+
+  vdda-supply:
+    description: 3.3V Analog input supply.
+
+  vddc-supply:
+    description: 1.8V Clock input supply.
+
+  vref-supply:
+    description: Input/Output reference supply.
+
+  io-backends:
+    maxItems: 1
+
+  adi,full-scale-microamp:
+    description: This property represents the DAC full scale current.
+    minimum: 8700
+    maximum: 31700
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - io-backends
+  - vdd-3p3-supply
+  - vdd-supply
+  - vdda-supply
+  - vddc-supply
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad9739a";
+            reg = <0>;
+
+            clocks = <&dac_clk>;
+
+            io-backends = <&iio_backend>;
+
+            vdd-3p3-supply = <&vdd_3_3>;
+            vdd-supply = <&vdd>;
+            vdda-supply = <&vdd_3_3>;
+            vddc-supply = <&vdd>;
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 2137eb452376..76e872e320d7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1234,6 +1234,14 @@  W:	https://ez.analog.com/linux-software-drivers
 F:	Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml
 F:	drivers/iio/adc/ad7780.c
 
+ANALOG DEVICES INC AD9739a DRIVER
+M:	Nuno Sa <nuno.sa@analog.com>
+M:	Dragos Bogdan <dragos.bogdan@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,ad9739a.yaml
+
 ANALOG DEVICES INC ADA4250 DRIVER
 M:	Antoniu Miclaus <antoniu.miclaus@analog.com>
 L:	linux-iio@vger.kernel.org