[PATCH v3 3/4] dt-bindings: iio: adc: add ad7405

Pop Ioan Daniel posted 4 patches 7 months, 1 week ago
There is a newer version of this series
[PATCH v3 3/4] dt-bindings: iio: adc: add ad7405
Posted by Pop Ioan Daniel 7 months, 1 week ago
Add devicetree bindings for ad7405/adum770x family.

Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
---
changes in v2:
 - fix properties: clocks issue
 .../bindings/iio/adc/adi,ad7405.yaml          | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
new file mode 100644
index 000000000000..939de3bd6f26
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2025 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7405.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7405 family
+
+maintainers:
+  - Dragos Bogdan <dragos.bogdan@analog.com>
+  - Pop Ioan Daniel <pop.ioan-daniel@analog.com>
+
+description: |
+  Analog Devices AD7405 is a high performance isolated ADC, 1-channel,
+  16-bit with a second-order Σ-Δ modulator that converts an analog input signal
+  into a high speed, single-bit data stream.
+
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7405.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7701.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7702.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM7703.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,ad7405
+      - adi,adum7701
+      - adi,adum7702
+      - adi,adum7703
+
+  clocks:
+    maxItems: 1
+
+  vdd1-supply: true
+
+  vdd2-supply: true
+
+  io-backends:
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+  - vdd1-supply
+  - vdd2-supply
+  - io-backends
+
+additionalProperties: false
+
+examples:
+  - |
+    adc {
+        compatible = "adi,ad7405";
+        clocks = <&axi_clk_gen 0>;
+        vdd1-supply = <&vdd1>;
+        vdd2-supply = <&vdd2>;
+        io-backends = <&iio_backend>;
+    };
+...
-- 
2.34.1

Re: [PATCH v3 3/4] dt-bindings: iio: adc: add ad7405
Posted by Jonathan Cameron 7 months ago
On Fri, 16 May 2025 13:58:03 +0300
Pop Ioan Daniel <pop.ioan-daniel@analog.com> wrote:

> Add devicetree bindings for ad7405/adum770x family.
> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v2:
>  - fix properties: clocks issue
>  .../bindings/iio/adc/adi,ad7405.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> new file mode 100644
> index 000000000000..939de3bd6f26
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2025 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ad7405.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD7405 family
> +
> +maintainers:
> +  - Dragos Bogdan <dragos.bogdan@analog.com>
> +  - Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> +
> +description: |
> +  Analog Devices AD7405 is a high performance isolated ADC, 1-channel,
> +  16-bit with a second-order Σ-Δ modulator that converts an analog input signal
> +  into a high speed, single-bit data stream.
> +
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7405.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7701.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7702.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM7703.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad7405
> +      - adi,adum7701
> +      - adi,adum7702
> +      - adi,adum7703
> +
> +  clocks:
> +    maxItems: 1

The closest part we have to this (LVDS bus etc) that I could find was
the ad7625.  That does use an explicit clock but there is more going
on as it also has a pwm connected to gate that clock so maybe isn't
an idea example to follow.

As you will see in the driver review I just sent I'm wondering if an
explicit clock is a separate thing or considered part of the lvds bus.

It's definitely wired to the ADC as a clock but it's also (I think) either
wired up to the IP we map to the backend (from software point of view)
or generated by that.

I don't think this device is using an LVDS encoding to allow the clock
to be established from the data lines alone? 8b/10b or similar (if it were then the
clock to the ADC only description would be correct choice).

Perhaps this device is one that needs docs in the kernel to talk us
through how the signalling is working.

Jonathan

> +
> +  vdd1-supply: true
> +
> +  vdd2-supply: true
> +
> +  io-backends:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - vdd1-supply
> +  - vdd2-supply
> +  - io-backends
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    adc {
> +        compatible = "adi,ad7405";
> +        clocks = <&axi_clk_gen 0>;
> +        vdd1-supply = <&vdd1>;
> +        vdd2-supply = <&vdd2>;
> +        io-backends = <&iio_backend>;
> +    };
> +...
Re: [PATCH v3 3/4] dt-bindings: iio: adc: add ad7405
Posted by Krzysztof Kozlowski 7 months, 1 week ago
On 16/05/2025 12:58, Pop Ioan Daniel wrote:
> Add devicetree bindings for ad7405/adum770x family.
> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v2:
>  - fix properties: clocks issue
>  .../bindings/iio/adc/adi,ad7405.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Re: [PATCH v3 3/4] dt-bindings: iio: adc: add ad7405
Posted by Conor Dooley 7 months, 1 week ago
On Fri, May 16, 2025 at 01:58:03PM +0300, Pop Ioan Daniel wrote:
> Add devicetree bindings for ad7405/adum770x family.
> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v2:
>  - fix properties: clocks issue
>  .../bindings/iio/adc/adi,ad7405.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> new file mode 100644
> index 000000000000..939de3bd6f26
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2025 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ad7405.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD7405 family
> +
> +maintainers:
> +  - Dragos Bogdan <dragos.bogdan@analog.com>
> +  - Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> +
> +description: |
> +  Analog Devices AD7405 is a high performance isolated ADC, 1-channel,
> +  16-bit with a second-order Σ-Δ modulator that converts an analog input signal
> +  into a high speed, single-bit data stream.
> +
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7405.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7701.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7702.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM7703.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad7405
> +      - adi,adum7701
> +      - adi,adum7702
> +      - adi,adum7703
> +
> +  clocks:
> +    maxItems: 1
> +
> +  vdd1-supply: true
> +
> +  vdd2-supply: true
> +
> +  io-backends:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - vdd1-supply
> +  - vdd2-supply
> +  - io-backends
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    adc {
> +        compatible = "adi,ad7405";
> +        clocks = <&axi_clk_gen 0>;

No reg here, how do you actually access this device?
Is it entirely via the backend?

> +        vdd1-supply = <&vdd1>;
> +        vdd2-supply = <&vdd2>;
> +        io-backends = <&iio_backend>;
> +    };
> +...
> -- 
> 2.34.1
> 
Re: [PATCH v3 3/4] dt-bindings: iio: adc: add ad7405
Posted by David Lechner 7 months, 1 week ago
On 5/16/25 9:18 AM, Conor Dooley wrote:
> On Fri, May 16, 2025 at 01:58:03PM +0300, Pop Ioan Daniel wrote:
>> Add devicetree bindings for ad7405/adum770x family.
>>
>> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
>> ---
>> changes in v2:
>>  - fix properties: clocks issue
>>  .../bindings/iio/adc/adi,ad7405.yaml          | 60 +++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
>> new file mode 100644
>> index 000000000000..939de3bd6f26
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
>> @@ -0,0 +1,60 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright 2025 Analog Devices Inc.
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/adc/adi,ad7405.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Analog Devices AD7405 family
>> +
>> +maintainers:
>> +  - Dragos Bogdan <dragos.bogdan@analog.com>
>> +  - Pop Ioan Daniel <pop.ioan-daniel@analog.com>
>> +
>> +description: |
>> +  Analog Devices AD7405 is a high performance isolated ADC, 1-channel,
>> +  16-bit with a second-order Σ-Δ modulator that converts an analog input signal
>> +  into a high speed, single-bit data stream.
>> +
>> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7405.pdf
>> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7701.pdf
>> +  https://www.analog.com/media/en/technical-documentation/data-sheets/adum7702.pdf
>> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM7703.pdf
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - adi,ad7405
>> +      - adi,adum7701
>> +      - adi,adum7702
>> +      - adi,adum7703
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  vdd1-supply: true
>> +
>> +  vdd2-supply: true
>> +
>> +  io-backends:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - vdd1-supply
>> +  - vdd2-supply
>> +  - io-backends
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    adc {
>> +        compatible = "adi,ad7405";
>> +        clocks = <&axi_clk_gen 0>;
> 
> No reg here, how do you actually access this device?
> Is it entirely via the backend?

Yeah, it is just a high speed serial bus (not SPI) that reads data
and there are no programmable registers.

It would probably make sense to have this as a child node of the
backend rather than a random platform device. We had a similar
discussion about a similar case a while back [1].

However, the conclusion in that case was different because that
device had both configuration registers and non-SPI compatible
data stream on the same lines. So we concluded that even though
this was the same line on the DAC, it was two different buses.
We ended up with the AXI ADC node as a parent SPI controller node
that also used the io-backends binding to represent the separate
data bus.

In this case though, we only have one bus, so instead of using the
io-backend binding, we could just have the AXI ADC node be the
parent of the ADC node as was suggested in [2].

[1]: https://lore.kernel.org/linux-iio/f9a2b74f371fb4b02486ad7426c57b75739438f3.camel@gmail.com/
[2]: https://lore.kernel.org/linux-iio/e8af0f3f-a09c-42d7-b8ca-dd633539af73@kernel.org/

> 
>> +        vdd1-supply = <&vdd1>;
>> +        vdd2-supply = <&vdd2>;
>> +        io-backends = <&iio_backend>;
>> +    };
>> +...
>> -- 
>> 2.34.1
>>