From: David Lechner <dlechner@baylibre.com>
To: "Jorge Marques" <jorge.marques@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-pwm@vger.kernel.org
Subject: Re: [PATCH v2 3/5] dt-bindings: iio: adc: Add adi,ad4052
Date: Fri, 25 Apr 2025 17:50:58 -0500 [thread overview]
Message-ID: <88a326e7-3910-4e02-b4ba-7afe06402871@baylibre.com> (raw)
In-Reply-To: <20250422-iio-driver-ad4052-v2-3-638af47e9eb3@analog.com>
On 4/22/25 6:34 AM, Jorge Marques wrote:
> Add dt-bindings for AD4052 family, devices AD4050/AD4052/AD4056/AD4058,
> low-power with monitor capabilities SAR ADCs.
> Each variant of the family differs in speed and resolution, resulting
> in different scan types and spi word sizes, that are matched by the
> compatible with the chip_info.
> The device contains one input (cnv) and two outputs (gp0, gp1).
Don't need line breaks after every period.
>
> Signed-off-by: Jorge Marques <jorge.marques@analog.com>
> ---
...
> + interrupts:
> + items:
> + - description: Signal coming from the GP0 pin (threshold).
> + - description: Signal coming from the GP1 pin (data ready).
> +
> + interrupt-names:
> + items:
> + - const: gp0
> + - const: gp1
> +
> + gpio-controller: true
> +
> + "#gpio-cells":
> + const: 2
> + description: |
> + The first cell is the GPn number: 0 to 1.
> + The second cell takes standard GPIO flags.
> +
> + cnv-gpios:
> + description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.
> + maxItems: 1
> +
Assuming the diagram at [1] is correct, for SPI offload use, we are missing:
#trigger-source-cells:
const: 2
description: |
Output pins used as trigger source.
Cell 0 defines which pin:
* 0 = GP0
* 1 = GP1
Cell 1 defines the event:
* 0 = Data ready
* 1 = Min threshold
* 2 = Max threshold
* 3 = Either threshold
* 4 = Device ready
* 5 = Device enable
* 6 = Chop control
Bonus points for adding a header with macros for the arbitrary event values.
And we are missing:
pwms:
maxItems: 1
description: PWM connected to the CNV pin.
[1]: https://analogdevicesinc.github.io/hdl/projects/ad4052_ardz/index.html
> + spi-max-frequency:
> + maximum: 62500000
Datasheet Table 5. SPI Timing—ADC Modes, VIO ≥ 3.0 V says period can be 12 ns.
So that would make max frequency 83333333.
...
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + adc@0 {
> + compatible = "adi,ad4052";
> + reg = <0>;
> + vdd-supply = <&adc_vdd>;
> + vio-supply = <&adc_vio>;
> + spi-max-frequency = <25000000>;
> +
> + interrupt-parent = <&gpio>;
> + interrupts = <0 0 IRQ_TYPE_EDGE_RISING>,
> + <0 1 IRQ_TYPE_EDGE_FALLING>;
> + interrupt-names = "gp0", "gp1";
> + cnv-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
> + };
> + };
Could be nice to have a 2nd example showing SPI offload usage.
next prev parent reply other threads:[~2025-04-25 22:51 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 11:34 [PATCH v2 0/5] Add support for AD4052 device family Jorge Marques
2025-04-22 11:34 ` [PATCH v2 1/5] Documentation: ABI: add oversampling frequency in sysfs-bus-iio Jorge Marques
2025-04-22 15:50 ` Andy Shevchenko
2025-04-29 13:47 ` Jorge Marques
2025-04-29 15:40 ` David Lechner
2025-04-29 22:03 ` Andy Shevchenko
2025-05-05 12:39 ` Jonathan Cameron
2025-04-25 21:16 ` David Lechner
2025-04-29 13:47 ` Jorge Marques
2025-04-22 11:34 ` [PATCH v2 2/5] iio: code: mark iio_dev as const in iio_buffer_enabled Jorge Marques
2025-04-22 15:51 ` Andy Shevchenko
2025-04-26 15:45 ` Jonathan Cameron
2025-06-02 9:48 ` Jorge Marques
2025-04-22 11:34 ` [PATCH v2 3/5] dt-bindings: iio: adc: Add adi,ad4052 Jorge Marques
2025-04-25 20:58 ` Rob Herring (Arm)
2025-04-25 22:50 ` David Lechner [this message]
2025-04-29 13:48 ` Jorge Marques
2025-04-29 15:45 ` David Lechner
2025-06-02 9:17 ` Jorge Marques
2025-06-02 15:17 ` David Lechner
2025-06-02 16:32 ` Jorge Marques
2025-06-02 17:23 ` David Lechner
2025-06-03 7:29 ` Jorge Marques
2025-06-03 13:27 ` David Lechner
2025-04-22 11:34 ` [PATCH v2 4/5] docs: iio: new docs for ad4052 driver Jorge Marques
2025-04-25 21:44 ` David Lechner
2025-04-29 13:49 ` Jorge Marques
2025-04-29 15:50 ` David Lechner
2025-04-22 11:34 ` [PATCH v2 5/5] iio: adc: add support for ad4052 Jorge Marques
2025-04-22 16:33 ` Andy Shevchenko
2025-04-29 13:49 ` Jorge Marques
2025-04-25 23:13 ` David Lechner
2025-06-02 11:16 ` Jorge Marques
2025-06-02 15:33 ` David Lechner
2025-04-26 16:03 ` Jonathan Cameron
2025-06-02 10:50 ` Jorge Marques
2025-05-16 10:11 ` Uwe Kleine-König
2025-06-02 10:38 ` Jorge Marques
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=88a326e7-3910-4e02-b4ba-7afe06402871@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=jorge.marques@analog.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=ukleinek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox