Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support
@ 2026-08-08  3:58 Kurt Borja
  2026-08-08  3:58 ` [PATCH v3 1/9] dt-bindings: iio: adc: support the TI ADS126x ADC family Kurt Borja
                   ` (9 more replies)
  0 siblings, 10 replies; 36+ messages in thread
From: Kurt Borja @ 2026-08-08  3:58 UTC (permalink / raw)
  To: Kurt Borja, Jonathan Cameron, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Bartosz Golaszewski, David Lechner
  Cc: Nuno Sá, Andy Shevchenko, linux-iio, devicetree,
	linux-kernel, linux-gpio, Jonathan Cameron

Hi all,

This series introduces support for TI ADS1262 and ADS1263 ADCs [1].
These devices are very similar (if not the same), except ADS1263
includes a secondary auxiliary ADC.

I plan to add these features to the main driver soon:

  - Filters
  - Calibration (manual and automatic)
  - GPIO controller capabilities
  - Channel hot-reloading in buffer mode
  - SPI offload support (38400 SPS turns out to be too high for some
    systems)
  - Conversion delay support
  - Full support for monitor channels
  - The ti-ads1263-adc2 driver for ADC2

The auxiliary ADC operates almost completely independent of the main
ADC. The only consideration that has to be taken for interoperability is
when reading conversion data in direct mode (Datasheet 9.4.7.1), which
happens only in buffer mode, when multiple channels are enabled.

When reading data in direct mode, all SPI activity is forbidden between
the data-ready signal and the data retrieval. To achieve this a second
mutex called xfer_lock was introduced to block SPI activity on the
device.

This is one of the biggest drivers I've developed, so I hope the code
and the comments are self-explanatory. If not, please let me know so I
can clarify them.

As always, thanks for your reviews and help. Submitting upstream is
always a great learning experience :)

[1] https://www.ti.com/lit/ds/symlink/ads1263.pdf

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
v3:
  dt-bindings
  -----------

  - Add interrupt-names property to support the dout/drdy DRDY pin

  - Model vbias and refout as regulator providers under a "regulators"
    node

  - Removed ref{p,n}-supply in favor of refp[1-3]-supply and
    refn[1-3]-supply, to match physical reference source pins.

  - Add ti,refp[1-3]-refn[1-3]-resistor-ohms for boards where the
    external reference is obtained from a resistor instead of being
    driven by a supply

  - Support single-channel and common-mode-channel

  - Add common-mode-[N]-supply properties for pseudo-differential
    inputs whose negative pin is tied to something other than ground

  - Allow excitation-* arrays to have only one item

  - Drop the "no connection" value from excitation-channels and the 0
    value from excitation-current-nanoamp, both are expressed by
    omitting the property or shortening the array

  - Restrict diff-channels to 0-14: drop the "Float" entry.

  - Add ti,reference-reversal

  - Renamed ti,idac-chopping -> ti,idac-rotation to match datasheet

  - Add avss-supply (negative analog supply) because it can actually be
    below ground (min -2.5 V; max 0 V).

  ti-ads1262
  ----------

  - Split the v2 driver into several commits to aliviate review burden

  - Conversion delay postponed to a later series

  - Filter selection postponed to a later series

  - Clock now allows the full frequency range. Worst case timing
    requirements are now calculated taking the worst case clock rate.

  - RESET signal now prefers GPIO if available

  - Move xfer_lock outside regmap calls

  - Use match_string() instead of ads1262_find_string()

  - Add hardware reset to ads1262_dev_reset()

  - ads1262_wait_for_conversion() now propagates errors

  - Support external reference resistors. Channels referenced that way
    are exposed as IIO_RESISTANCE.

  - Drop HARDWAREGAIN in favor of per channel _scale_available with the
    new IIO_VAL_DECIMAL64_PICO

  - Now the probe fails if there is no 'drdy' IRQ (doesn't mean it's now
    required in devicetree though). Support for no IRQ can be added if
    needed.

  - Style changes suggested by Jonathan and David.

  IMPORTANT:

  - Rework regulator parsing: now per-channel voltage reference is
    allowed and users may configure a reference resistor instead of
    supply.

    Additionally, I added support for bipolar analog supplies
    (AVSS < 0V). This configuration is important because it allows true
    bipolar measurements, but comes with a lot of problems because
    reference can also have voltage levels below ground and most
    importantly the regulator subsystem doesn't support negative
    voltages. The approach taken to solve this issue was the same as the
    ad4170-4 driver.

    More info in commit message and code comments.

  - @David: I added support for the monitor channels, but I prefer to
    parse them from DT instead of making them static (similar to the
    ad4170-4 approach too :p).

  - @David: About filters... As I mentioned in the previous version, the
    data_rate configuration takes precedence over the filter selection.
    If an incompatible filter (given a data rate) is selected, the chip
    resorts to a sane compatible one when doing conversions (either
    SINC1 or plain SINC5).

    Now, I don't know how to expose this in userspace. Should I limit
    the sampling_frequency_available attribute (given a filter)? Or
    should it be the other way around, limit the filter_type_available
    attribute (given a data rate)?.

  ti-ads1263-adc2
  ---------------

  - Postponed to a separate series to aliviate review burden.

v2: https://patch.msgid.link/20260628-ads126x-v2-0-4b1b231325ba@gmail.com

v1: https://patch.msgid.link/20260612-ads126x-v1-0-894c788d03ed@gmail.com

---
Kurt Borja (9):
      dt-bindings: iio: adc: support the TI ADS126x ADC family
      iio: adc: add the ti-ads1262 driver
      iio: adc: ti-ads1262: support per-channel sampling frequency
      iio: adc: ti-ads1262: support per-channel reference and gain
      iio: adc: ti-ads1262: support input chopping
      iio: adc: ti-ads1262: support excitation currents
      iio: adc: ti-ads1262: support triggered buffer sampling
      iio: adc: ti-ads1262: support REFOUT and VBIAS regulators
      iio: adc: ti-ads1262: support common mode supplies

 .../devicetree/bindings/iio/adc/ti,ads1262.yaml    |  379 ++++
 MAINTAINERS                                        |    7 +
 drivers/iio/adc/Kconfig                            |   14 +
 drivers/iio/adc/Makefile                           |    1 +
 drivers/iio/adc/ti-ads1262.c                       | 1890 ++++++++++++++++++++
 5 files changed, 2291 insertions(+)
---
base-commit: 350d1fb9204b13c5f95e511e98b8bcb47574d425
change-id: 20251129-ads126x-fb6107505cae

-- 
Thanks, 
 ~ Kurt


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

end of thread, other threads:[~2026-08-09 16:24 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08  3:58 [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support Kurt Borja
2026-08-08  3:58 ` [PATCH v3 1/9] dt-bindings: iio: adc: support the TI ADS126x ADC family Kurt Borja
2026-08-08  4:08   ` sashiko-bot
2026-08-08 18:38   ` David Lechner
2026-08-09  8:26     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 2/9] iio: adc: add the ti-ads1262 driver Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:26     ` Kurt Borja
2026-08-08 22:28   ` Uwe Kleine-König
2026-08-09 16:24     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 3/9] iio: adc: ti-ads1262: support per-channel sampling frequency Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:27     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 4/9] iio: adc: ti-ads1262: support per-channel reference and gain Kurt Borja
2026-08-08 18:39   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 5/9] iio: adc: ti-ads1262: support input chopping Kurt Borja
2026-08-08 18:39   ` David Lechner
2026-08-08  3:58 ` [PATCH v3 6/9] iio: adc: ti-ads1262: support excitation currents Kurt Borja
2026-08-08  4:13   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-08  3:58 ` [PATCH v3 7/9] iio: adc: ti-ads1262: support triggered buffer sampling Kurt Borja
2026-08-08  4:09   ` sashiko-bot
2026-08-08 18:39   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 8/9] iio: adc: ti-ads1262: support REFOUT and VBIAS regulators Kurt Borja
2026-08-08  4:11   ` sashiko-bot
2026-08-08 18:40   ` David Lechner
2026-08-09  8:28     ` Kurt Borja
2026-08-08  3:58 ` [PATCH v3 9/9] iio: adc: ti-ads1262: support common mode supplies Kurt Borja
2026-08-08 18:40   ` David Lechner
2026-08-09  8:29     ` Kurt Borja
2026-08-08 18:37 ` [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support David Lechner
2026-08-09  8:29   ` Kurt Borja

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