-
Notifications
You must be signed in to change notification settings - Fork 902
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
MarileneGarcia
wants to merge
3
commits into
analogdevicesinc:rpi-6.6.y_GSOC_2025_MAX14001
Choose a base branch
from
MarileneGarcia:rpi-6.6.y_GSOC_2025_MAX14001
base: rpi-6.6.y_GSOC_2025_MAX14001
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
# Copyright 2025 Marilene Andrade Garcia | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/iio/adc/adi,max14001.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Analog Devices MAX14001-MAX14002 10-bit ADCs | ||
|
||
maintainers: | ||
- Marilene Andrade Garcia <[email protected]> | ||
|
||
description: | ||
Bindings for the Analog Devices MAX14001-MAX14002 Configurable, | ||
Isolated 10-bit ADCs for Multi-Range Binary Inputs. | ||
|
||
Datasheet can be found here | ||
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX14001-MAX14002.pdf | ||
|
||
$ref: /schemas/spi/spi-peripheral-props.yaml# | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- adi,max14001 | ||
- adi,max14002 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
vdd-supply: | ||
description: | ||
Isolated DC-DC power supply input voltage. | ||
|
||
vddl-supply: | ||
description: | ||
Logic power supply. | ||
|
||
vrefin-supply: | ||
description: | ||
ADC voltage reference supply. | ||
|
||
MarileneGarcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
interrupts: | ||
items: | ||
- description: | | ||
Interrupt for signaling when conversion results exceed the configured | ||
upper threshold for ADC readings or fall below the lower threshold for | ||
them. Interrupt source must be attached to COUT pin. | ||
- description: | | ||
Alert output that asserts low during a number of different error | ||
conditions. The interrupt source must be attached to FAULT pin. | ||
|
||
spi-max-frequency: | ||
maximum: 5000000 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- vdd-supply | ||
- vddl-supply | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
spi { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
max14001: adc@0 { | ||
compatible = "adi,max14001"; | ||
reg = <0>; | ||
spi-max-frequency = <5000000>; | ||
vdd-supply = <&vdd>; | ||
vddl-supply = <&vddl>; | ||
}; | ||
}; | ||
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13122,6 +13122,14 @@ W: https://ez.analog.com/linux-software-drivers | |
F: Documentation/devicetree/bindings/iio/adc/maxim,max11205.yaml | ||
F: drivers/iio/adc/max11205.c | ||
|
||
MAXIM MAX14001/MAX14002 DRIVER | ||
M: Marilene Andrade Garcia <[email protected]> | ||
L: [email protected] | ||
S: Maintained | ||
W: https://ez.analog.com/linux-software-drivers | ||
F: Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml | ||
F: drivers/iio/adc/max14001.c | ||
|
||
MAXIM MAX17040 FAMILY FUEL GAUGE DRIVERS | ||
R: Iskren Chernev <[email protected]> | ||
R: Krzysztof Kozlowski <[email protected]> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
* Overlay for the MAX14001 ADC | ||
* | ||
* Copyright (c) 2025 Marilene Andrade Garcia <[email protected]> | ||
* | ||
* 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; | ||
regulator-always-on; | ||
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; | ||
regulator-always-on; | ||
status = "okay"; | ||
}; | ||
|
||
MarileneGarcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
vrefin: fixedregulator@2 { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "Reference Input Range Voltage"; | ||
regulator-min-microvolt = <1250000>; | ||
regulator-max-microvolt = <1250000>; | ||
regulator-boot-on; | ||
regulator-always-on; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "okay"; | ||
max14001_u51: max14001@0 { | ||
compatible = "adi,max14001"; | ||
reg = <0x0>; | ||
spi-max-frequency = <5000000>; | ||
vdd-supply = <&vdd>; | ||
vddl-supply = <&vddl>; | ||
vrefin-supply = <&vrefin>; | ||
status = "okay"; | ||
}; | ||
max14001_u11: max14001@1 { | ||
compatible = "adi,max14001"; | ||
reg = <0x1>; | ||
spi-max-frequency = <5000000>; | ||
vdd-supply = <&vdd>; | ||
vddl-supply = <&vddl>; | ||
vrefin-supply = <&vrefin>; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&spidev0 { | ||
status = "disabled"; | ||
}; | ||
|
||
&spidev1 { | ||
status = "disabled"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.