Devicetree
 help / color / mirror / Atom feed
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>,
	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,
	"Jonathan Cameron" <jic23@kernel.org>
Subject: [PATCH v2 0/7] iio: adc: Add TI ADS126X ADC family support
Date: Sun, 28 Jun 2026 00:36:01 -0500	[thread overview]
Message-ID: <20260628-ads126x-v2-0-4b1b231325ba@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:

  - Automatic calibration
  - GPIO controller capabilities
  - Channel hot-reloading in buffer mode
  - SPI offload support (38400 SPS turns out to be too high for some
    systems)
  - User triggered, automatic calibration (Datasheet 9.4.9)

Additionally, full support for the (less capable) auxiliary ADC is
introduced by the auxiliary ti-ads1263-adc2 driver included in this
series.

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-explainatory. 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>
---
v2:
  dt-bindings
  -----------

  - ADS1262/ADS1263 now use a fallback compatible
    ("ti,ads1263", "ti,ads1262") instead of two independent compatibles,
    as the ADS1263 is a strict superset of the ADS1262.

  - Reworked dt-bindings keeping up with the latest discussion around
    per-channel IDAC and reference source selection. Reference source
    and excitation (IDAC) configuration moved from device-level
    properties to per-channel properties:
      - ti,pos-refmux/ti,neg-refmux -> per-channel "reference-sources"
      - ti,idac{1,2}-pin -> per-channel "excitation-channels"
      - ti,idac{1,2}-microamp -> per-channel "excitation-current-nanoamp"
      - ti,sbias-polarity -> ti,burn-out-polarity
      - ti,sbias-magnitude -> burn-out-current-nanoamp
      - ti,sbias-connection removed, maybe user-space should handle that

  - Split the single "vref-supply" into "refp-supply" and "refn-supply".

  - Renamed "ti,chop-mode" -> "ti,input-chopping" and
    "ti,idac-rotation-mode" -> "ti,idac-chopping".

  - Dropped "ti,rev-vref-pol"; reference polarity reversal is now handled
    automatically by the driver based on refp/refn voltages.

  - "#io-channel-cells" is now per-compatible to address the auxiliary
    ADC.

  - Dropped the "adc" sub-node and the separate ti,ads1263-adc2.yaml
    binding.

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

  - Split the main driver to make review easier.

  - Simplified the series a bit (I'll submit them later):
    - Removed runtime PM support.
    - Removed gpiochip support.
    - Removed channel hot-reloading.
    - Removed manual calibration support.

  - Reworked ads1262_channel struct to avoid bitfields.

  - Reworked firmware parsing and added easy to grep error messages.

  - Reference polarity reversal (MODE0 REFREV) is now applied
    automatically when refp < refn.

  - Reorganized registers and bitfield masks with indentantion. Moved
    bitfield values to enums.

  - Removed union in DMA aligned rx buffer.

  - Reworked the buffer/SPI transfer model.

  - The regmap_bus callbacks now copy regs and values into DMA safe
    buffers before transfer.

  - Now channels in direct mode are enabled with regmap as latency is
    not that big of a deal in this mode.

  - Added per-channel IDAC and reference source configuration. Scale is
    now computed from the per-channel reference source (internal 2.5 V,
    external refp/refn, or AVDD-AVSS).

  - Removed sensor bias (burn-out current) handling, as we are still
    discussing the approach for it.

  ti-ads1263-adc2
  ---------------
  
  - Dropped callbacks in favor of exported (TI_ADS1262 namespace)
    functions

  - Dropped channel hot-reloading

  - The auxiliary device is now instantiated with an explicit device link
    and inherits the parent's OF node; scale/reference handling moved to
    the parent driver.

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

---
Kurt Borja (7):
      dt-bindings: iio: adc: Add TI ADS126x ADC family
      iio: adc: Add ti-ads1262 driver
      iio: adc: ti-ads1262: Add channel filter support
      iio: adc: ti-ads1262: Add excitation current support
      iio: adc: ti-ads1262: Add conversion delay support
      iio: adc: ti-ads1262: Add buffer and trigger support
      iio: adc: Add ti-ads1263-adc2 driver

 .../devicetree/bindings/iio/adc/ti,ads1262.yaml    |  309 ++++
 MAINTAINERS                                        |    9 +
 drivers/iio/adc/Kconfig                            |   27 +
 drivers/iio/adc/Makefile                           |    2 +
 drivers/iio/adc/ti-ads1262.c                       | 1835 ++++++++++++++++++++
 drivers/iio/adc/ti-ads1262.h                       |   39 +
 drivers/iio/adc/ti-ads1263-adc2.c                  |  379 ++++
 7 files changed, 2600 insertions(+)
---
base-commit: 7667a80340e99fd45357d0c90ae05813b01bbfef
change-id: 20251129-ads126x-fb6107505cae
prerequisite-change-id: 20260514-iio-adc-ti-ads122c14-d0b92479334e:v2
prerequisite-patch-id: 8be45fbe0c6037e775f6ef0e028184403241866c
prerequisite-patch-id: e76673f5e60ebd0a47584756cbcd297cb87d74b7
prerequisite-patch-id: 7eb0e6028d5a49d311e373be866ebae8e83a523a
prerequisite-patch-id: d5c4c4c78f42e6c0b4f186f1ab7f51aa6acd3561
prerequisite-patch-id: ee187ef4a7632cab6bc76c0588c8e2002ac26b7b
prerequisite-patch-id: 31ce1bee6d2c97f43df79c44e5386bf88a9a5d98
prerequisite-patch-id: 3ec60d0638598ef8d006c12a3a8dece2d6bdc54b
prerequisite-patch-id: bbfa2e76f94d06b60e3458dab448579c627225ea

-- 
Thanks, 
 ~ Kurt


             reply	other threads:[~2026-06-28  5:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28  5:36 Kurt Borja [this message]
2026-06-28  5:36 ` [PATCH v2 1/7] dt-bindings: iio: adc: Add TI ADS126x ADC family Kurt Borja
2026-06-28 15:45   ` David Lechner
2026-06-28 19:12     ` Kurt Borja
2026-06-28  5:36 ` [PATCH v2 2/7] iio: adc: Add ti-ads1262 driver Kurt Borja
2026-06-28 17:15   ` David Lechner
2026-06-28 20:00     ` Kurt Borja
2026-06-28  5:36 ` [PATCH v2 3/7] iio: adc: ti-ads1262: Add channel filter support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 4/7] iio: adc: ti-ads1262: Add excitation current support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 5/7] iio: adc: ti-ads1262: Add conversion delay support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 6/7] iio: adc: ti-ads1262: Add buffer and trigger support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 7/7] iio: adc: Add ti-ads1263-adc2 driver Kurt Borja
2026-06-28 17:22   ` David Lechner
2026-06-28 20:08     ` 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=20260628-ads126x-v2-0-4b1b231325ba@gmail.com \
    --to=kuurtb@gmail.com \
    --cc=andy@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=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