Skip to content

add support for AD3532R/AD3532 DAC#3177

Open
kseerp wants to merge 3 commits intoanalogdevicesinc:mirror_ci/jic23/iio/testingfrom
kseerp:dev/ad3532r
Open

add support for AD3532R/AD3532 DAC#3177
kseerp wants to merge 3 commits intoanalogdevicesinc:mirror_ci/jic23/iio/testingfrom
kseerp:dev/ad3532r

Conversation

@kseerp
Copy link
Copy Markdown
Member

@kseerp kseerp commented Mar 10, 2026

PR Description

These parts are unreleased but have BU approval to upstream the driver so it can be ready prior to RTS.

The AD3532R/AD3532 is a 16-channel, 16-bit voltage output DAC. These
devices use a dual-bank register architecture with base addresses at
0x1000 (bank 0) and 0x3000 (bank 1). Channels 0-7 are mapped to bank 0,
while channels 8-15 are mapped to bank 1.

Key Changes:

  • Add ad3532r_set_dac_powerdown() to handle 4-register powerdown
    mapping (0x1020/0x1021 for channels 0-7, 0x3020/0x3021 for 8-15)
  • Implement AD3532-specific powerdown modes: 1kΩ, 10kΩ, three-state
    (differs from AD3530/31's 1kΩ, 7.7kΩ, 32kΩ modes)
  • Extend ad3530r_normal_op_mode() and ad3530r_setup() to configure
    dual-bank registers for reference control and output settings
  • Add ad3532r_input_ch_reg() and ad3532r_trigger_sw_ldac_reg() for
    bank-aware register addressing
  • Use dynamic channel allocation with chip-specific ext_info to
    handle different powerdown mode enums per variant.

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

Same as #3191, if you are upstreaming, please target branches in sync with upstream cycle (the mirror_ci branches), this helps to avoid using deprecated methods.

@kseerp kseerp changed the base branch from main to mirror_ci/jic23/iio/testing March 27, 2026 05:14
@kseerp kseerp force-pushed the dev/ad3532r branch 4 times, most recently from 6b805e2 to 45351b7 Compare March 27, 2026 07:52
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented Mar 27, 2026

v2:

  • change target branch to mirror_ci/jic23/iio/testing
  • replace magic numbers in ad3532r_set_dac_powerdown() with channel arithmetic instead of switch case

@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 7 times, most recently from 71cdaf3 to 4b97d37 Compare April 3, 2026 00:00
@gastmaier
Copy link
Copy Markdown
Collaborator

Please, don't include the CI/CD commit on your pr.
the upstream branch can also be rebased. base your work in the latest tag, or near the head if your work depends on a pending patch.

@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 2 times, most recently from c87d572 to 0579d93 Compare April 4, 2026 23:59
@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch from 0579d93 to a0d5e30 Compare April 6, 2026 00:10
kseerp added 3 commits April 6, 2026 10:26
Add a new powerdown mode for DACs with 10kohm resistor to GND.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
The AD3532R/AD3532 is a 16-channel version of the AD3530R/AD3530.
This adds compatible strings for the AD3532R/AD3532.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
The AD3532R/AD3532 is a 16-channel, 16-bit voltage output DAC. These
devices use a dual-bank register architecture with base addresses at
0x1000 (bank 0) and 0x3000 (bank 1). Channels 0-7 are mapped to bank 0,
while channels 8-15 are mapped to bank 1.

To support the dual-bank architecture, a new ad3532r_set_dac_powerdown()
function handles the 4-register powerdown mapping, where channels 0-7
use registers 0x1020/0x1021 and channels 8-15 use 0x3020/0x3021. The
AD3532 variants also implement different powerdown modes (1kΩ, 10kΩ,
three-state) compared to the AD3530/31 devices (1kΩ, 7.7kΩ, 32kΩ).

The ad3530r_normal_op_mode() and ad3530r_setup() functions have been
extended to configure dual-bank registers for reference control and
output settings. New helper functions ad3532r_input_ch_reg() and
ad3532r_trigger_sw_ldac_reg() provide bank-aware register addressing
based on the channel number.

Dynamic channel allocation is now used with chip-specific ext_info
assignment to handle the different powerdown mode enums per variant.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented Apr 6, 2026

v3
remove CI/CD commit from the PR

@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 2 times, most recently from 5546c65 to aa19856 Compare April 15, 2026 00:11
@kseerp
Copy link
Copy Markdown
Member Author

kseerp commented Apr 15, 2026

Hi, just to follow-up on this PR, let me know if changes are needed, or if it looks ok to proceed with upstream submission. Thanks

@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 7 times, most recently from 9136ec9 to ad7922a Compare April 22, 2026 00:12
@gastmaier gastmaier force-pushed the mirror_ci/jic23/iio/testing branch 4 times, most recently from 49a7412 to 4674362 Compare April 26, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants