Skip to contentSkip to conversation

iio: adc: ad4080: add support for AD4884

PATCH Applied Antoniu Miclaus 2 participants 4 messages May 29

Subsystems (4)
lore
Share & tools
lore

Antoniu Miclaus

author maintainer
#0 lore raw

v2 cover iio: adc: ad4080: add support for AD4884

Add support for the AD4884, a dual-channel, 16-bit, 40 MSPS SAR ADC, to the ad4080 driver family.

Patch 1 adds the AD4884 compatible string to the devicetree binding. Patch 2 adds the chip info and device ID to the driver.

Changes in v2:
- Add rationale for no fallback compatible in commit message.
- Collect Acked-by tag.

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

 .../bindings/iio/adc/adi,ad4080.yaml           |  5 ++++-
 drivers/iio/adc/ad4080.c                       | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH v2 1/2 dt-bindings: iio: adc: ad4080: add AD4884 support

Add AD4884 compatible string to the AD4080 devicetree binding.

The AD4884 is a dual-channel, 16-bit, 40 MSPS SAR ADC, sharing the same register map and interface as the AD4080 family. Like the AD4880, it requires two SPI chip selects and two io-backends for its independent ADC channels. The AD4884 differs from the AD4880 in resolution (16-bit vs 20-bit), which requires distinct channel configuration in the driver, precluding a fallback compatible.

---
Changes in v2:
- Add rationale for no fallback compatible in commit message.
- Collect Acked-by tag.

 Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iio/adc/adi,ad4080.yaml +4 -1
index 9c6a56c7c8ef..4a3f7d3e05c3 100644
@@ -39,6 +39,7 @@ properties:
       - adi,ad4087
       - adi,ad4088
       - adi,ad4880
+      - adi,ad4884
 
   reg:
     minItems: 1
@@ -99,7 +100,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: adi,ad4880
+            enum:
+              - adi,ad4880
+              - adi,ad4884
     then:
       properties:
         reg:
Signature · 1 line
2.43.0
author maintainer
#2 lore raw

PATCH v2 2/2 iio: adc: ad4080: add support for AD4884

In reply to Antoniu Miclaus

Add support for the AD4884, a dual-channel, 16-bit, 40 MSPS SAR ADC.

The AD4884 is the dual-channel variant of the AD4084, sharing the same register map and SPI interface as the rest of the AD4080 family. Like the AD4880, it uses two independent ADC channels, each with its own SPI configuration interface.

---
Changes in v2:
- No changes.

 drivers/iio/adc/ad4080.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/iio/adc/ad4080.c +18 -0
index 265d85ac171a..764d49eca9e0 100644
@@ -136,6 +136,7 @@
 #define AD4087_CHIP_ID						0x0057
 #define AD4088_CHIP_ID						0x0058
 #define AD4880_CHIP_ID						0x0750
+#define AD4884_CHIP_ID						0x005C
 
 #define AD4080_MAX_CHANNELS					2
 
@@ -541,6 +542,11 @@ static const struct iio_chan_spec ad4880_channels[] = {
 	AD4880_CHANNEL_DEFINE(20, 32, 1),
 };
 
+static const struct iio_chan_spec ad4884_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,
@@ -641,6 +647,16 @@ static const struct ad4080_chip_info ad4880_chip_info = {
 	.lvds_cnv_clk_cnt_max = AD4080_LVDS_CNV_CLK_CNT_MAX,
 };
 
+static const struct ad4080_chip_info ad4884_chip_info = {
+	.name = "ad4884",
+	.product_id = AD4884_CHIP_ID,
+	.scale_table = ad4080_scale_table,
+	.num_scales = ARRAY_SIZE(ad4080_scale_table),
+	.num_channels = 2,
+	.channels = ad4884_channels,
+	.lvds_cnv_clk_cnt_max = 2,
+};
+
 static int ad4080_setup_channel(struct ad4080_state *st, unsigned int ch)
 {
 	struct device *dev = regmap_get_device(st->regmap[ch]);
@@ -843,6 +859,7 @@ static const struct spi_device_id ad4080_id[] = {
 	{ "ad4087", (kernel_ulong_t)&ad4087_chip_info },
 	{ "ad4088", (kernel_ulong_t)&ad4088_chip_info },
 	{ "ad4880", (kernel_ulong_t)&ad4880_chip_info },
+	{ "ad4884", (kernel_ulong_t)&ad4884_chip_info },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, ad4080_id);
@@ -858,6 +875,7 @@ static const struct of_device_id ad4080_of_match[] = {
 	{ .compatible = "adi,ad4087", &ad4087_chip_info },
 	{ .compatible = "adi,ad4088", &ad4088_chip_info },
 	{ .compatible = "adi,ad4880", &ad4880_chip_info },
+	{ .compatible = "adi,ad4884", &ad4884_chip_info },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ad4080_of_match);
Signature · 1 line
2.43.0
maintainer Applied
#3 lore raw
In reply to Antoniu Miclaus
Quoted 10 lines · On Fri, 29 May 2026 17:13:51 +0300 Antoniu Miclaus…

Add support for the AD4884, a dual-channel, 16-bit, 40 MSPS SAR ADC, to the ad4080 driver family.

Patch 1 adds the AD4884 compatible string to the devicetree binding. Patch 2 adds the chip info and device ID to the driver.

Changes in v2:
- Add rationale for no fallback compatible in commit message.
- Collect Acked-by tag.

Applied

Thanks,

J

Quoted 8 lines

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

 .../bindings/iio/adc/adi,ad4080.yaml           |  5 ++++-
 drivers/iio/adc/ad4080.c                       | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)