From: Kurt Borja <kuurtb@gmail.com>
To: Kurt Borja <kuurtb@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
David Lechner <dlechner@baylibre.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
"Jonathan Cameron" <jic23@kernel.org>
Subject: [PATCH v3 0/9] iio: adc: Add TI ADS126X ADC family support
Date: Fri, 07 Aug 2026 22:58:22 -0500 [thread overview]
Message-ID: <20260807-ads126x-v3-0-f89925d72792@gmail.com> (raw)
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
next reply other threads:[~2026-08-08 3:58 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 3:58 Kurt Borja [this message]
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
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=20260807-ads126x-v3-0-f89925d72792@gmail.com \
--to=kuurtb@gmail.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@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