[PATCH v4 5/6] dt-bindings: iio: adc: adi-axi-adc: add ad7405 example

Pop Ioan Daniel posted 6 patches 7 months ago
There is a newer version of this series
[PATCH v4 5/6] dt-bindings: iio: adc: adi-axi-adc: add ad7405 example
Posted by Pop Ioan Daniel 7 months ago
The ad7405 device is defined as a child of the AXI ADC.

Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
---
changes in v4:
 - add ad7405 device that is defined as a child of the AXI ADC
 .../bindings/iio/adc/adi,axi-adc.yaml           | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
index cf74f84d6103..a6bc8acd101f 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
@@ -135,4 +135,21 @@ examples:
             io-backends = <&parallel_bus_controller>;
         };
     };
+  - |
+    axi_adc@44a00000 {
+        compatible = "adi,axi-adc-10.0.a";
+        reg = <0x44a00000 0x10000>;
+        dmas = <&rx_dma 0>;
+        dma-names = "rx";
+        clocks = <&axi_clk>;
+        #io-backend-cells = <0>;
+
+        adc@0 {
+            compatible = "adi,ad7405";
+            clocks = <&axi_clk_gen 0>;
+            vdd1-supply = <&vdd1>;
+            vdd2-supply = <&vdd2>;
+            io-backends = <&axi_adc>;
+        };
+    };
 ...
-- 
2.34.1
Re: [PATCH v4 5/6] dt-bindings: iio: adc: adi-axi-adc: add ad7405 example
Posted by Krzysztof Kozlowski 7 months ago
On Mon, May 19, 2025 at 05:02:13PM GMT, Pop Ioan Daniel wrote:
> The ad7405 device is defined as a child of the AXI ADC.

1. Why? What we see easily (although not here, because above does not
answer even to what).
2. I do not see any device being added to the binding.

> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v4:
>  - add ad7405 device that is defined as a child of the AXI ADC
>  .../bindings/iio/adc/adi,axi-adc.yaml           | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> index cf74f84d6103..a6bc8acd101f 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> @@ -135,4 +135,21 @@ examples:
>              io-backends = <&parallel_bus_controller>;
>          };
>      };
> +  - |
> +    axi_adc@44a00000 {

Follow DTS coding style.

> +        compatible = "adi,axi-adc-10.0.a";
> +        reg = <0x44a00000 0x10000>;
> +        dmas = <&rx_dma 0>;
> +        dma-names = "rx";
> +        clocks = <&axi_clk>;
> +        #io-backend-cells = <0>;

This example is already there, so I do not get why you duplicate it.
Skip the patch or with reason add the child to the existing example.

> +
> +        adc@0 {
> +            compatible = "adi,ad7405";

Best regards,
Krzysztof
Re: [PATCH v4 5/6] dt-bindings: iio: adc: adi-axi-adc: add ad7405 example
Posted by David Lechner 7 months ago
On 5/19/25 9:02 AM, Pop Ioan Daniel wrote:
> The ad7405 device is defined as a child of the AXI ADC.
> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v4:
>  - add ad7405 device that is defined as a child of the AXI ADC
>  .../bindings/iio/adc/adi,axi-adc.yaml           | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> index cf74f84d6103..a6bc8acd101f 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
> @@ -135,4 +135,21 @@ examples:
>              io-backends = <&parallel_bus_controller>;
>          };
>      };
> +  - |
> +    axi_adc@44a00000 {
> +        compatible = "adi,axi-adc-10.0.a";
> +        reg = <0x44a00000 0x10000>;
> +        dmas = <&rx_dma 0>;
> +        dma-names = "rx";
> +        clocks = <&axi_clk>;
> +        #io-backend-cells = <0>;
> +
> +        adc@0 {
> +            compatible = "adi,ad7405";
> +            clocks = <&axi_clk_gen 0>;
> +            vdd1-supply = <&vdd1>;
> +            vdd2-supply = <&vdd2>;
> +            io-backends = <&axi_adc>;
> +        };
> +    };
>  ...

I think this example would be better placed in the adi,ad7405 binding.