All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>,
	jic23@kernel.org, robh@kernel.org, conor+dt@kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/14] dt-bindings: iio: adc: add ad4080
Date: Thu, 20 Feb 2025 13:30:11 -0600	[thread overview]
Message-ID: <6d4e65b9-1392-46e9-ac2e-0c4ef2239fa0@baylibre.com> (raw)
In-Reply-To: <20250220135429.8615-13-antoniu.miclaus@analog.com>

On 2/20/25 7:54 AM, Antoniu Miclaus wrote:
> Add devicetree bindings for ad4080 family.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
>  .../bindings/iio/adc/adi,ad4080.yaml          | 92 +++++++++++++++++++
>  1 file changed, 92 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
> new file mode 100644
> index 000000000000..e0ea712b8457
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
> @@ -0,0 +1,92 @@
> +# 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,ad4080.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD4080 20-Bit, 40 MSPS, Differential SAR ADC
> +
> +maintainers:
> +  - Antoniu Miclaus <antoniu.miclaus@analog.com>
> +
> +description: |
> +  The AD4080 is a high speed, low noise, low distortion, 20-bit, Easy Drive,
> +  successive approximation register (SAR) analog-to-digital converter (ADC).
> +  Maintaining high performance (signal-to-noise and distortion (SINAD) ratio
> +  > 90 dBFS) at signal frequencies in excess of 1 MHz enables the AD4080 to
> +  service a wide variety of precision, wide bandwidth data acquisition
> +  applications.
> +
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad4080.pdf
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad4080
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 50000000

Since there are potentially two independent SPI busses on this chip
(one for configuration, one for data) it might be a good idea to put
in a description somewhere that these SPI properties are for the
configuration SPI bus.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: adc-clk

Clocks don't need a name if there is only one clock.

But the description of clocks should say which pin you mean.
Is the the CLK+/- pins or the CNV+/- pins?

> +
> +  vdd33-supply: true
> +
> +  vdd11-supply: true
> +
> +  vddldo-supply: true
> +
> +  iovdd-supply: true
> +
> +  vrefin-supply: true

I would expect we need a vendor boolean property to say if the
DCO+/- pins are wired or not for the echoed clock.

And what does the CNV trigger get wired to? We probably need a
vendor boolean property to say if it is wired to something CMOS
or LVDS. Plus maybe a pwms property or whatever makes sense for
whatever kind of signal generator it is connected to.

> +
> +  adi,num-lanes:
> +    description:
> +      Nmber of lanes on which the data is sent on the output (DA, DB pins).

s/Nmber/Number/

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2]
> +    default: 1
> +

Also, don't we need io-backends for the data interface?

We can also add gpio-controller and #gpio-cells since this
chips provides GPIOs.

> +required:
> +  - compatible
> +  - reg
> +  - clocks

Assuming clocks is CLK+/- pins, this should be optional since
the pins are used for a different function in SPI mode.

> +  - clock-names
> +  - vdd33-supply
> +  - vdd11-supply
> +  - vddldo-supply
> +  - iovdd-supply
> +  - vrefin-supply

The datasheet says things like, "If VDDLDO is connected to a
voltage source, neither VDD11 nor IOVDD should be connected to
any external voltage source.". So making all supplies required
doesn't seem correct.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@0 {
> +          compatible = "adi,ad4080";
> +          reg = <0>;
> +          spi-max-frequency = <10000000>;
> +          vdd33-supply = <&vdd33>;
> +          vdd11-supply = <&vdd11>;
> +          vddldo-supply = <&vddldo>;
> +          iovdd-supply = <&iovdd>;
> +          vrefin-supply = <&vrefin>;
> +          clocks = <&adc_clk>;
> +          clock-names = "adc-clk";
> +        };
> +    };
> +...


  reply	other threads:[~2025-02-20 19:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 13:54 [PATCH 00/14] Add support for AD4080 ADC Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 01/14] iio: backend: add support for filter config Antoniu Miclaus
2025-02-22 16:47   ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 02/14] iio: backend: add support for sync process Antoniu Miclaus
2025-02-22 16:49   ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 03/14] iio: backend: add support for self sync Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 04/14] iio: backend: add support for sync status Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 05/14] iio: backend: add support for number of lanes Antoniu Miclaus
2025-02-20 20:20   ` David Lechner
2025-02-21 15:59     ` Nuno Sá
2025-02-20 13:54 ` [PATCH 06/14] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-02-21 17:49   ` Conor Dooley
2025-02-20 13:54 ` [PATCH 07/14] iio: adc: adi-axi-adc: add filter enable/disable Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 08/14] iio: adc: adi-axi-adc: add bitslip enable/disable Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 09/14] iio: adc: adi-axi-adc: add self sync support Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 10/14] iio: adc: adi-axi-adc: add sync status Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 11/14] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-02-20 13:54 ` [PATCH 12/14] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-02-20 19:30   ` David Lechner [this message]
2025-02-21 17:51     ` Conor Dooley
2025-02-20 13:54 ` [PATCH 13/14] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-02-20 15:21   ` Nuno Sá
2025-02-22 17:12   ` Jonathan Cameron
2025-02-20 13:54 ` [PATCH 14/14] Documentation: ABI: testing: ad4080 docs Antoniu Miclaus
2025-02-20 14:53   ` Nuno Sá
2025-02-20 18:27     ` David Lechner
2025-02-25  9:16       ` Nuno Sá
2025-02-25 15:26         ` David Lechner
2025-03-05 13:00           ` Jonathan Cameron
2025-02-20 20:12 ` [PATCH 00/14] Add support for AD4080 ADC David Lechner
2025-02-22 16:56   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d4e65b9-1392-46e9-ac2e-0c4ef2239fa0@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.