Skip to content

Commit 106223a

Browse files
committed
iio: dac: Add MAX22007 DAC driver support
Add support for the MAX22007 4 channel DAC that drives a voltage or current output on each channel. Signed-off-by: Janani Sunil <janani.sunil@analog.com>
1 parent 24275c2 commit 106223a

File tree

5 files changed

+575
-0
lines changed

5 files changed

+575
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
322322
rpi-ltc6952.dtbo \
323323
rpi-max14830-i2c.dtbo \
324324
rpi-max14830-spi.dtbo \
325+
rpi-max22007.dtbo \
325326
rpi-max31335.dtbo \
326327
rpi-poe.dtbo \
327328
rpi-poe-plus.dtbo \
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Analog Devices MAX22007
4+
*
5+
* Copyright (C) 2025 Analog Devices Inc.
6+
*/
7+
8+
/dts-v1/;
9+
/plugin/;
10+
11+
#include <dt-bindings/gpio/gpio.h>
12+
13+
&spi0 {
14+
status = "okay";
15+
16+
max22007: max22007@0 {
17+
compatible = "adi,max22007";
18+
reg = <0>;
19+
spi-max-frequency = <500000>;
20+
spi-cpha;
21+
spi-cpol;
22+
status = "okay";
23+
reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
24+
#address-cells = <1>;
25+
#size-cells = <0>;
26+
27+
channel@0 {
28+
reg = <0>;
29+
};
30+
31+
channel@1 {
32+
reg = <1>;
33+
output-range-microamp = <0 25000>;
34+
};
35+
36+
channel@2 {
37+
reg = <2>;
38+
};
39+
40+
channel@3 {
41+
reg = <3>;
42+
};
43+
};
44+
};
45+
46+
&spidev0 {
47+
status = "disabled";
48+
};
49+
50+
&spidev1 {
51+
status = "disabled";
52+
};

drivers/iio/dac/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,19 @@ config MAX517
472472
This driver can also be built as a module. If so, the module
473473
will be called max517.
474474

475+
config MAX22007
476+
tristate "Analog Devices MAX22007 DAC Driver"
477+
depends on SPI
478+
select REGMAP_SPI
479+
select CRC8
480+
help
481+
Say Y here if you want to build a driver for Analog Devices MAX22007.
482+
483+
MAX22007 is a quad-channel, 12-bit, voltage-output digital to
484+
analog converter (DAC) with SPI interface.
485+
486+
If compiled as a module, it will be called max22007.
487+
475488
config MAX5522
476489
tristate "Maxim MAX5522 DAC driver"
477490
depends on SPI_MASTER

drivers/iio/dac/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ obj-$(CONFIG_LTC2664) += ltc2664.o
4646
obj-$(CONFIG_LTC2688) += ltc2688.o
4747
obj-$(CONFIG_M62332) += m62332.o
4848
obj-$(CONFIG_MAX517) += max517.o
49+
obj-$(CONFIG_MAX22007) += max22007.o
4950
obj-$(CONFIG_MAX5522) += max5522.o
5051
obj-$(CONFIG_MAX5821) += max5821.o
5152
obj-$(CONFIG_MCP4725) += mcp4725.o

0 commit comments

Comments
 (0)