Skip to content

iio: adc: Add initial driver support for MAX14001/MAX14002 #2848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: rpi-6.6.y_GSOC_2025_MAX14001
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
rpi-ltc2991.dtbo \
rpi-ltc4162.dtbo \
rpi-ltc6952.dtbo \
rpi-max14001-pmb.dtbo \
rpi-max14830-i2c.dtbo \
rpi-max14830-spi.dtbo \
rpi-max31335.dtbo \
Expand Down
68 changes: 68 additions & 0 deletions arch/arm/boot/dts/overlays/rpi-max14001-pmb-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Overlay for the MAX14001 ADC
*
* Copyright (c) 2025 Marilene Andrade Garcia <marilene.agarcia@gmail.com>
*
* Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/MAX14001-MAX14002.pdf
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2712";

vdd: fixedregulator@0 {
compatible = "regulator-fixed";
regulator-name = "Isolated DC-DC Power Supply Input Voltage";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
enable-active-high;
status = "okay";
};

vddl: fixedregulator@1 {
compatible = "regulator-fixed";
regulator-name = "Logic Power Supply Voltage";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
enable-active-high;
status = "okay";
};

vrefin: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "Reference Input Range Voltage";
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-boot-on;
enable-active-high;
status = "okay";
};
};

&spi0 {
status = "okay";
max14001_voltage_channel: max14001@0 {
compatible = "max14001";
reg = <0x0>;
spi-max-frequency = <5000000>;
vdd-supply = <&vdd>;
vddl-supply = <&vddl>;
vrefin-supply = <&vrefin>;
status = "okay";
};
max14001_current_channel: max14001@1 {
compatible = "max14001";
reg = <0x1>;
spi-max-frequency = <5000000>;
current-channel;
vdd-supply = <&vdd>;
vddl-supply = <&vddl>;
vrefin-supply = <&vrefin>;
status = "okay";
};
};
10 changes: 10 additions & 0 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,16 @@ config MAX1363
To compile this driver as a module, choose M here: the module will be
called max1363.

config MAX14001
tristate "Analog Devices MAX14001/MAX14002 ADCs driver"
depends on SPI
help
Say yes here to build support for Analog Devices MAX14001/MAX14002
Configurable, Isolated 10-bit ADCs for Multi-Range Binary Inputs.

To compile this driver as a module, choose M here: the module will be
called max14001.

config MAX77541_ADC
tristate "Analog Devices MAX77541 ADC driver"
depends on MFD_MAX77541
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/adc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ obj-$(CONFIG_MAX11205) += max11205.o
obj-$(CONFIG_MAX11410) += max11410.o
obj-$(CONFIG_MAX1241) += max1241.o
obj-$(CONFIG_MAX1363) += max1363.o
obj-$(CONFIG_MAX14001) += max14001.o
obj-$(CONFIG_MAX77541_ADC) += max77541-adc.o
obj-$(CONFIG_MAX9611) += max9611.o
obj-$(CONFIG_MCP320X) += mcp320x.o
Expand Down
Loading