Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: adc: ad4080: add support for AD4885
@ 2026-09-07 10:19 Antoniu Miclaus
  2026-09-07 10:19 ` [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support Antoniu Miclaus
  2026-09-07 10:19 ` [PATCH 2/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus
  0 siblings, 2 replies; 4+ messages in thread
From: Antoniu Miclaus @ 2026-09-07 10:19 UTC (permalink / raw)
  To: Antoniu Miclaus, Nuno Sá, Michael Hennerich,
	Jonathan Cameron, David Lechner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, linux, devicetree, linux-kernel

Add support for the AD4885, a dual-channel, 16-bit, 10 MSPS SAR ADC in
the AD4080 family. The AD4885 is the dual-channel variant of the AD4085
and, like the AD4884, has two independent ADC channels, each with its
own SPI configuration interface, so the part requires two chip selects
and two io-backends. It runs at a lower maximum throughput than the
AD4884 and therefore uses the same maximum LVDS conversion clock count
as the AD4085.

The first patch adds the devicetree binding compatible string; the
second adds the driver support (chip ID, channel spec, chip info and
device-table entries).

Antoniu Miclaus (2):
  dt-bindings: iio: adc: ad4080: add AD4885 support
  iio: adc: ad4080: add support for AD4885

 .../bindings/iio/adc/adi,ad4080.yaml           |  2 ++
 drivers/iio/adc/ad4080.c                       | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)


base-commit: edb91bc566576f6664a3efbad6bd4205aa1d5259
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support
  2026-09-07 10:19 [PATCH 0/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus
@ 2026-09-07 10:19 ` Antoniu Miclaus
  2026-09-07 10:28   ` sashiko-bot
  2026-09-07 10:19 ` [PATCH 2/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus
  1 sibling, 1 reply; 4+ messages in thread
From: Antoniu Miclaus @ 2026-09-07 10:19 UTC (permalink / raw)
  To: Antoniu Miclaus, Nuno Sá, Michael Hennerich,
	Jonathan Cameron, David Lechner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, linux, devicetree, linux-kernel

Add AD4885 compatible string to the AD4080 devicetree binding.

The AD4885 is a dual-channel, 16-bit, 10 MSPS SAR ADC, sharing the same
register map and interface as the AD4080 family. Like the AD4884, it
requires two SPI chip selects and two io-backends for its independent
ADC channels. The AD4885 is the dual-channel variant of the AD4085 and
differs from the AD4884 in its maximum throughput and LVDS conversion
clock count, which requires distinct chip configuration in the driver,
precluding a fallback compatible.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
index db8467b98e67..07ac4e07f415 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
@@ -41,6 +41,7 @@ properties:
       - adi,ad4880
       - adi,ad4883
       - adi,ad4884
+      - adi,ad4885
 
   reg:
     minItems: 1
@@ -105,6 +106,7 @@ allOf:
               - adi,ad4880
               - adi,ad4883
               - adi,ad4884
+              - adi,ad4885
     then:
       properties:
         reg:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] iio: adc: ad4080: add support for AD4885
  2026-09-07 10:19 [PATCH 0/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus
  2026-09-07 10:19 ` [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support Antoniu Miclaus
@ 2026-09-07 10:19 ` Antoniu Miclaus
  1 sibling, 0 replies; 4+ messages in thread
From: Antoniu Miclaus @ 2026-09-07 10:19 UTC (permalink / raw)
  To: Antoniu Miclaus, Nuno Sá, Michael Hennerich,
	Jonathan Cameron, David Lechner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, linux, devicetree, linux-kernel

Add support for the AD4885, a dual-channel, 16-bit, 10 MSPS SAR ADC.

The AD4885 is the dual-channel variant of the AD4085, sharing the same
register map and SPI interface as the rest of the AD4080 family. Like
the AD4884, it uses two independent ADC channels, each with its own SPI
configuration interface, but it runs at a lower maximum throughput and
therefore uses the same maximum LVDS conversion clock count as the
AD4085.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/iio/adc/ad4080.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
index 994625a7cf8b..4843ecdd91a8 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -137,6 +137,7 @@
 #define AD4880_CHIP_ID						0x0059
 #define AD4883_CHIP_ID						0x005B
 #define AD4884_CHIP_ID						0x005C
+#define AD4885_CHIP_ID						0x005D
 
 #define AD4080_MAX_CHANNELS					2
 
@@ -561,6 +562,11 @@ static const struct iio_chan_spec ad4884_channels[] = {
 	AD4880_CHANNEL_DEFINE(16, 16, 1),
 };
 
+static const struct iio_chan_spec ad4885_channels[] = {
+	AD4880_CHANNEL_DEFINE(16, 16, 0),
+	AD4880_CHANNEL_DEFINE(16, 16, 1),
+};
+
 static const struct ad4080_chip_info ad4080_chip_info = {
 	.name = "ad4080",
 	.product_id = AD4080_CHIP_ID,
@@ -681,6 +687,16 @@ static const struct ad4080_chip_info ad4884_chip_info = {
 	.lvds_cnv_clk_cnt_max = 2,
 };
 
+static const struct ad4080_chip_info ad4885_chip_info = {
+	.name = "ad4885",
+	.product_id = AD4885_CHIP_ID,
+	.scale_table = ad4080_scale_table,
+	.num_scales = ARRAY_SIZE(ad4080_scale_table),
+	.num_channels = 2,
+	.channels = ad4885_channels,
+	.lvds_cnv_clk_cnt_max = 8,
+};
+
 static int ad4080_setup_channel(struct ad4080_state *st, unsigned int ch)
 {
 	struct device *dev = regmap_get_device(st->regmap[ch]);
@@ -890,6 +906,7 @@ static const struct spi_device_id ad4080_id[] = {
 	{ .name = "ad4880", .driver_data = (kernel_ulong_t)&ad4880_chip_info },
 	{ .name = "ad4883", .driver_data = (kernel_ulong_t)&ad4883_chip_info },
 	{ .name = "ad4884", .driver_data = (kernel_ulong_t)&ad4884_chip_info },
+	{ .name = "ad4885", .driver_data = (kernel_ulong_t)&ad4885_chip_info },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, ad4080_id);
@@ -907,6 +924,7 @@ static const struct of_device_id ad4080_of_match[] = {
 	{ .compatible = "adi,ad4880", &ad4880_chip_info },
 	{ .compatible = "adi,ad4883", &ad4883_chip_info },
 	{ .compatible = "adi,ad4884", &ad4884_chip_info },
+	{ .compatible = "adi,ad4885", &ad4885_chip_info },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ad4080_of_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support
  2026-09-07 10:19 ` [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support Antoniu Miclaus
@ 2026-09-07 10:28   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-09-07 10:28 UTC (permalink / raw)
  To: Antoniu Miclaus; +Cc: conor+dt, robh, devicetree

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The schema fails to enforce the presence of the `io-backends` property, despite the commit message explicitly stating it is required.
--

commit 9fc058b2c408d54ffde599d33ff5e645acdf0ad1
Author: Antoniu Miclaus <antoniu.miclaus@analog.com>

dt-bindings: iio: adc: ad4080: add AD4885 support

Add AD4885 compatible string to the AD4080 devicetree binding. The AD4885
is a dual-channel variant that requires two SPI chip selects and two
io-backends for its independent ADC channels.

> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
> index db8467b98e67d..07ac4e07f415a 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml

[ ... ]

> @@ -105,6 +106,7 @@ allOf:
>                - adi,ad4880
>                - adi,ad4883
>                - adi,ad4884
> +              - adi,ad4885
>      then:
>        properties:
>          reg:

[Severity: Medium]
The commit message states that the AD4885 "requires two SPI chip selects and
two io-backends for its independent ADC channels."

While this conditional block applies constraints to the newly added adi,ad4885
variant, it does not enforce the presence of the io-backends property:

    then:
      properties:
        reg:
          minItems: 2
        io-backends:
          minItems: 2

Should a required directive be added to this block to enforce the presence of
the io-backends property as claimed in the commit message?

    then:
      properties:
        ...
      required:
        - io-backends

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260907101944.9748-1-antoniu.miclaus@analog.com?part=1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-07 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 10:19 [PATCH 0/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus
2026-09-07 10:19 ` [PATCH 1/2] dt-bindings: iio: adc: ad4080: add AD4885 support Antoniu Miclaus
2026-09-07 10:28   ` sashiko-bot
2026-09-07 10:19 ` [PATCH 2/2] iio: adc: ad4080: add support for AD4885 Antoniu Miclaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox