Skip to content

add driver for ad5710r/ad5711r#3191

Open
kseerp wants to merge 3 commits into
analogdevicesinc:mirror_ci/jic23/iio/testingfrom
kseerp:dev/ad5710r
Open

add driver for ad5710r/ad5711r#3191
kseerp wants to merge 3 commits into
analogdevicesinc:mirror_ci/jic23/iio/testingfrom
kseerp:dev/ad5710r

Conversation

@kseerp
Copy link
Copy Markdown
Member

@kseerp kseerp commented Mar 16, 2026

PR Description

This PR adds support for the AD5710R (16-bit) and AD5711R (12-bit) 8-channel configurable IDAC/VDAC.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad5711r-ad5710r.pdf

The AD5710R/AD5711R shares a similar register interface with the
AD3530R family but introduces current output (IDAC) support alongside
voltage output (VDAC), independently configurable per channel. This
brings additional complexity in channel mode configuration and
powerdown handling (high_z for IMODE, 15kohm_to_gnd for VMODE).

Rather than extending the AD3530R driver - which is already growing
in complexity with AD3532R dual-bank support (#3177) - this is
introduced as a dedicated driver.

Looking for feedback on whether keeping this as a separate driver is
the right approach, or if it should be folded into the AD3530R driver.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

@gastmaier
Copy link
Copy Markdown
Collaborator

is this targetting upstream? if so, can you target a mirroc_ci branch?
main is 6.12, upstream current cycle is 7.0
https://analogdevicesinc.github.io/linux/ci.html

Comment on lines +763 to +764
three_state: left floating,
high_z: left floating.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between three_state and high_z ? max5821 uses three_state

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the difference is naming convention. Voltage DAC like max5821 describe the powered-down output as tri-state, while current DAC like the ad5710R describe it as high impedance. I used high_z here to match the AD5710R datasheet terminology. That said, both are defined as left floating in the IIO ABI. Should I just use three_state instead for consistency with existing DAC drivers?

@gastmaier
Copy link
Copy Markdown
Collaborator

gastmaier commented Mar 25, 2026

@kseerp kseerp changed the base branch from main to mirror_ci/jic23/iio/testing April 6, 2026 03:16
@kseerp kseerp force-pushed the dev/ad5710r branch 2 times, most recently from 37b5e11 to 80469f8 Compare April 6, 2026 03:58
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented Apr 6, 2026

rebase to mirror_ci/jic23/iio/testing branch

@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 7 times, most recently from 5d18d61 to 353fec2 Compare April 13, 2026 00:12
@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 7 times, most recently from c2f48c4 to d16d458 Compare May 8, 2026 00:01
@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 6 times, most recently from 55ab0e3 to 90f0e0f Compare May 14, 2026 00:00
@kseerp kseerp force-pushed the dev/ad5710r branch 2 times, most recently from 0c53448 to fa2929b Compare May 14, 2026 06:54
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented May 14, 2026

v3

  • fix out-of-bounds write by indexing iio_channels with i++ instead of reg
  • use regmap_write() for write-only SW_LDAC_TRIG_A register
  • remove unused cleanup.h include and AD5710R_REG_VAL_MASK define
  • fix whitespace and simplify ad5710r_setup() return

@kseerp kseerp requested a review from gastmaier May 14, 2026 07:01
@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 6 times, most recently from dcbb031 to 5fd28f8 Compare May 20, 2026 00:00
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented May 20, 2026

Hi, just following up on this PR, are there any changes still needed, or is this good to go upstream? It seems CI failing are unrelated to this PR.

@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 3 times, most recently from 1567260 to fab5a96 Compare May 25, 2026 00:11
kseerp added 3 commits June 3, 2026 10:32
Add high_z powerdown mode for DACs with high impedance output in
current mode (IDAC) and 15kohm_to_gnd resistor to GND. Also add
out_currentY_powerdown_mode, out_currentY_powerdown_mode_available,
and out_currentY_powerdown entries to document current output
powerdown support.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Add device tree bindings for the Analog Devices AD5710R/AD5711R
8-channel 12-/16-bit Configurable IDAC/VDAC.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
The AD5710R (16-bit) and AD5711R (12-bit) are 8-channel, low-power,
configurable current/voltage output DACs with an on-chip 2.5V, 3ppm/°C
reference. Each channel can be independently configured as a voltage
output (0V to VREF or 0V to 2xVREF) or a current output (0mA to 50mA).
These devices operate from a single 2.7V to 5.5V supply and are
guaranteed monotonic by design.

Support for monitoring internal die temperature, output voltages, and
current of a selected channel via the MUXOUT pin using an external ADC
is currently not implemented.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm review Request a review from a LLM Reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants