[PATCH v4 0/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support

From: Nicolae-Daniel Deaconescu

Date: Thu Nov 19 2026 - 06:25:17 EST


Hi all,

This adds the LTC2387-16, LTC2387-18, ADAQ23875, ADAQ23876 and ADAQ23878
to the ad7625 driver. They are single channel differential 16 and 18 bit
SAR ADCs, up to 15 MSPS, read like the AD762x and AD796x with two PWMs
(CNV and CLK) and an IIO backend that captures the LVDS data. They differ in
four ways: double data rate on one or two lanes, a CLK burst that overlaps
the next conversion at high rates, so the sampling period is raised until it
fits, no EN pins, and on the ADAQ modules an amplifier whose gain divides
the scale.

Patches 1 and 2 let the PWM provider report its clock rate and the clock
cycles per step, so the driver can place the burst in whole steps. Patch 3
fixes sampling frequency problems that the new parts would also hit, and
patch 4 moves code so that patch 6 touches less of the old code. The binding
is a file of its own, as few properties are shared with adi,ad7625.yaml.

Changes in v4:
- Dropped the patch that renamed existing variables and macros to the
standard unit names.
- Patch 4: pick the bandwidth mode first and check the result of setting it
once.
- Patch 5: added the Acked-by.
- Patch 6: added chip info members for the gain, EN pins, second PWM name and
supplies, report the sampling frequency rounded up so that writing it back
keeps the rate, drop the 0 V reference check, name the AD7625 and similar
parts in Kconfig, the top comment, MODULE_DESCRIPTION() and the documentation,
shorten the commit message, and fix comments.

Changes in v3:
- Split the binding into adi,ltc2387.yaml and left adi,ad7625.yaml as it was.
- Moved the EN pin setup into a helper in a patch of its own.
- Made the Kconfig prompt, top comment and MODULE_DESCRIPTION() generic and
sorted the part lists by part number.
- Used HZ_PER_MHZ for the maximum rate and a default gain of 1 * MILLI.
- Simplified the gain, reference supply and lane count handling.
- PWM step API: put Context before Returns in the kernel-doc and dropped a
redundant check.

Changes in v2:
- Joined the driver to ad7625 (binding, driver, Kconfig and documentation).
- Dropped the clocks property of the ADC and added the PWM waveform step API.
- Compatibles use the adi, prefix and the datasheet part numbers.
- Dropped the x4 parts.
- Fixed the missing return of dev_err_probe() for the initial sampling
frequency.
- Added the maintainers of the new parts to the AD7625 entry.

Tested on an ADAQ23875 with a ZedBoard. The other new parts and the existing
parts were not tested on hardware.

AI disclosure: parts of the commit text and the code were checked with an AI
coding assistant (Claude): the first version of the merge into ad7625, the PWM
step API, the timing arithmetic and the test scripts. I reviewed every change,
built it and ran tests on the ADAQ23875 + ZedBoard.

Link to v3: https://lore.kernel.org/all/20261106160529.876251-1-Nicolae-daniel.Deaconescu@xxxxxxxxxx/
Link to v2: https://lore.kernel.org/all/20261104132143.215581-1-Nicolae-daniel.Deaconescu@xxxxxxxxxx/
Link to v1: https://lore.kernel.org/all/20261027134409.76824-1-Nicolae-daniel.Deaconescu@xxxxxxxxxx/

Nicolae-Daniel Deaconescu (4):
pwm: core: add pwm_get_waveform_step_might_sleep()
pwm: axi-pwmgen: report the waveform step
iio: adc: ad7625: fix sampling frequency handling
iio: adc: ad7625: move initial mode setup

Sergiu Cuciurean (2):
dt-bindings: iio: adc: add adi,ltc2387
iio: adc: ad7625: add LTC2387 and ADAQ2387x support

.../bindings/iio/adc/adi,ltc2387.yaml | 169 +++++++
Documentation/iio/ad7625.rst | 34 +-
MAINTAINERS | 3 +
drivers/iio/adc/Kconfig | 7 +-
drivers/iio/adc/ad7625.c | 473 ++++++++++++++++--
drivers/pwm/core.c | 69 +++
drivers/pwm/pwm-axi-pwmgen.c | 13 +
include/linux/pwm.h | 34 ++
8 files changed, 765 insertions(+), 37 deletions(-)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ltc2387.yaml


base-commit: 43ffda3c7f8456bbe641ae8249a077a361b97880
--
2.56.0