From: Lukas Metz <lukas.metz@gmx.net>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, Lukas Metz <lukas.metz@gmx.net>
Subject: [PATCH v2 0/2] Add driver for DAC8163:
Date: Wed, 08 Jul 2026 11:52:42 +0200 [thread overview]
Message-ID: <20260708-dac8163-work-v2-0-3acd1bf20182@gmx.net> (raw)
This series adds an IIO driver for the Texas Instruments DAC7562, DAC7563,
DAC8162, DAC8163, DAC8562, and DAC8563 dual-channel voltage-output DACs.
These devices are pin-compatible 12-, 14-, and 16-bit variants sharing the
same 24-bit SPI command interface. Each device provides two independently
addressable output channels and includes a 2.5 V, 4 ppm/°C internal
reference that can be enabled via device tree, or an external reference
supplied through a regulator. The register and command structure differs
from already existing drivers which makes adding a new driver a
reasonable choice in my opinion.
The driver supports:
- All six device variants via a shared chip info table
- DAC updates in synchronous mode
- Configurable internal or external voltage reference
- Optional LDAC GPIO which has to be asserted permanently when using
synchronous updates.
- IIO_CHAN_INFO_RAW and IIO_CHAN_INFO_SCALE attributes per channel
Datasheet (DAC8163):
https://www.ti.com/lit/gpn/dac8163
The driver was tested with a DAC8163 on a custom STM32MP157F board with
external reference enabled.
Signed-off-by: Lukas Metz <lukas.metz@gmx.net>
---
Changes in v2:
- add reg_defaults to initialize the output registers based on
the device (dacxxx2 resets to 0, dacxxx3 resets to mid-scale)
- add variable gain to dac8163_state struct to report correct scale when
internal reference is used (the device sets the gain register to 2
when the internal reference is selected)
- do a full reset of the device when probing to ensure we have a known
device state as pointed out by Jonathan Cameron
- use devm* calls where possible and omit remove callback
- make use of regmap and remove now unneeded things like manual locking
and caching of output register values (thanks to Andy Shevchenko,
David Lechner and others for the hint)
- remove internal_reference property
- add missing headers as suggested by Siratul Islam
- remove debug print from dac8163_write_raw (per Andy Shevchenko and
David Lechner)
- switch ldac-gpio polarity for consistency with datasheet (as per David
Lechner)
- rename dt properties ti,loaddacs-gpios to ldac-gpios and vref-supply to
vrefin-supply
- add required spi property spi-cpha to binding (the device only works
in spi mode 1 and 3)
- add missing spi properties spi-max-frequency and spi-rx-bus-width to
binding
- add avdd-supply to binding and enable it in the driver (thanks to
David Lechner)
- add clr-gpios to binding although not yet supported by the driver
- add nullptr check after calling spi_get_device_match_data (thanks to
Andy Shevchenko for pointing this out)
- add comment for permanent ldac assertion
- switch to GPL-2.0-or-later
- return -ERANGE when raw write is out of range
- use named structures instead of chip_info array
- rename driver identifiers from dacxx6x to dac8163 and partly remove
vendor prefix as suggested by David Lechner and Siratul Islam
- remove redundant call to gpiod_set_value
- Link to v1: https://patch.msgid.link/20260623-dac8163-work-v1-0-5b508158faa0@gmx.net
---
Lukas Metz (2):
dt-bindings: iio: dac: Add DAC8163
iio: dac: dac8163: Add driver for DAC8163
.../devicetree/bindings/iio/dac/ti,dac8163.yaml | 85 +++++
MAINTAINERS | 7 +
drivers/iio/dac/Kconfig | 15 +
drivers/iio/dac/Makefile | 1 +
drivers/iio/dac/ti-dac8163.c | 373 +++++++++++++++++++++
5 files changed, 481 insertions(+)
---
base-commit: 76b6720279964612111352ca5d09f5bd61e41ce4
change-id: 20260413-dac8163-work-2138a775b515
Best regards,
--
Lukas <lukas.metz@gmx.net>
next reply other threads:[~2026-07-08 9:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 9:52 Lukas Metz [this message]
2026-07-08 9:52 ` [PATCH v2 1/2] dt-bindings: iio: dac: Add DAC8163 Lukas Metz
2026-07-08 10:06 ` sashiko-bot
2026-07-08 16:37 ` Conor Dooley
2026-07-08 9:52 ` [PATCH v2 2/2] iio: dac: dac8163: Add driver for DAC8163 Lukas Metz
2026-07-08 10:04 ` sashiko-bot
2026-07-08 11:32 ` Andy Shevchenko
2026-07-09 10:03 ` Lukas
2026-07-09 10:19 ` Andy Shevchenko
2026-07-08 15:58 ` Siratul Islam
2026-07-08 17:33 ` Jonathan Cameron
2026-07-08 19:04 ` Siratul Islam
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=20260708-dac8163-work-v2-0-3acd1bf20182@gmx.net \
--to=lukas.metz@gmx.net \
--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