Devicetree bindings for MAX22007 4-channel
12-bit DAC that drives a voltage or current
output on each channel
Signed-off-by: Janani Sunil <janani.sunil@analog.com>
---
.../devicetree/bindings/iio/dac/adi,max22007.yaml | 116 +++++++++++++++++++++
MAINTAINERS | 7 ++
2 files changed, 123 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
new file mode 100644
index 000000000000..c2f65d9e42d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,max22007.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX22007 DAC device driver
+
+maintainers:
+ - Janani Sunil <janani.sunil@analog.com>
+
+description:
+ The MAX22007 is a quad-channel, 12-bit digital-to-analog converter (DAC)
+ with integrated precision output amplifiers and current output capability.
+ Each channel can be independently configured for voltage or current output.
+ Datasheet available at https://www.analog.com/en/products/max22007.html
+
+$ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ const: adi,max22007
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 500000
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ vdd-supply:
+ description: Low-Voltage Power Supply from +2.7V to +5.5V.
+
+ hvdd-supply:
+ description:
+ Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
+ the Output Channels.
+
+ hvss-supply:
+ description:
+ Negative High-Voltage Power Supply from -2V to 0V for the Output Channels.
+
+ reset-gpios:
+ maxItems: 1
+ description:
+ GPIO used for hardware reset of the device.
+
+patternProperties:
+ "^channel@[0-3]$":
+ allOf:
+ - $ref: /schemas/iio/dac/dac.yaml#
+ - type: object
+ description:
+ Represents the external channels which are connected to the DAC.
+ Channels not specified in the device tree will be powered off.
+
+ properties:
+ reg:
+ description: Channel number
+ maxItems: 1
+
+ adi,type:
+ description: Channel output type.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [voltage, current]
+
+ required:
+ - reg
+ - adi,type
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+anyOf:
+ - required: [channel@0]
+ - required: [channel@1]
+ - required: [channel@2]
+ - required: [channel@3]
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dac@0 {
+ compatible = "adi,max22007";
+ reg = <0>;
+ spi-max-frequency = <500000>;
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0>;
+ adi,type = "voltage";
+ };
+
+ channel@1 {
+ reg = <1>;
+ adi,type = "current";
+ };
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 29340394ac9d..e1addbd21562 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1593,6 +1593,13 @@ W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/dac/adi,ad9739a.yaml
F: drivers/iio/dac/ad9739a.c
+ANALOG DEVICES INC MAX22007 DRIVER
+M: Janani Sunil <janani.sunil@analog.com>
+L: linux-iio@vger.kernel.org
+S: Supported
+W: https://ez.analog.com/linux-software-drivers
+F: Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
+
ANALOG DEVICES INC ADA4250 DRIVER
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
L: linux-iio@vger.kernel.org
--
2.43.0
On Fri, 19 Dec 2025 16:31:15 +0100
Janani Sunil <janani.sunil@analog.com> wrote:
Hi Janani and welcome to IIO.
> Devicetree bindings for MAX22007 4-channel
> 12-bit DAC that drives a voltage or current
> output on each channel
This is a very short wrap. Aim for 75 characters in patch description lines
(so slightly shorter than 80 chars standard for everything else).
>
> Signed-off-by: Janani Sunil <janani.sunil@analog.com>
> ---
> .../devicetree/bindings/iio/dac/adi,max22007.yaml | 116 +++++++++++++++++++++
> MAINTAINERS | 7 ++
> 2 files changed, 123 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
> new file mode 100644
> index 000000000000..c2f65d9e42d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
...
> + vdd-supply:
> + description: Low-Voltage Power Supply from +2.7V to +5.5V.
> +
> + hvdd-supply:
> + description:
> + Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
> + the Output Channels.
> +
> + hvss-supply:
> + description:
> + Negative High-Voltage Power Supply from -2V to 0V for the Output Channels.
> +
> + reset-gpios:
> + maxItems: 1
> + description:
> + GPIO used for hardware reset of the device.
> +
> +patternProperties:
> + "^channel@[0-3]$":
> + allOf:
> + - $ref: /schemas/iio/dac/dac.yaml#
> + - type: object
> + description:
> + Represents the external channels which are connected to the DAC.
> + Channels not specified in the device tree will be powered off.
> +
> + properties:
> + reg:
> + description: Channel number
> + maxItems: 1
min / max?
> +
> + adi,type:
> + description: Channel output type.
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [voltage, current]
This is much more constrained (as only two types of channel) but we do have
precedence for adi,ch-func in adi,ad74115.yaml and adi,ad74413r.yaml
That's not a particularly pretty binding but we should probably stick to
it anyway.
adi,type is too vague a name for this property anyway.
> +
> + required:
> + - reg
> + - adi,type
> +
> + unevaluatedProperties: false
> +
> +required:
> + - compatible
For supplies we document as required any that are needed for the device
to function, whether or not we happen to need to specify them on
a given board (given fallbacks that apply on assumption that fixes
always on supplies are in use). So I'd expect to see at least some
of the supplies listed here.
> + - reg
> +
> +anyOf:
> + - required: [channel@0]
> + - required: [channel@1]
> + - required: [channel@2]
> + - required: [channel@3]
Interesting. I'm not sure we have never bothered to document this before and there
are other devices for which some sort of channel config is pretty much needed.
What is the justification to have this explicitly listed here?
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + dac@0 {
> + compatible = "adi,max22007";
> + reg = <0>;
> + spi-max-frequency = <500000>;
> + reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@0 {
> + reg = <0>;
> + adi,type = "voltage";
> + };
> +
> + channel@1 {
> + reg = <1>;
> + adi,type = "current";
> + };
> + };
> + };
> +...
Hi Johnathan,
Thank you for your reviewing the patch.
On 12/19/25 17:40, Jonathan Cameron wrote:
> On Fri, 19 Dec 2025 16:31:15 +0100
> Janani Sunil <janani.sunil@analog.com> wrote:
>
> Hi Janani and welcome to IIO.
>
>
>> Devicetree bindings for MAX22007 4-channel
>> 12-bit DAC that drives a voltage or current
>> output on each channel
> This is a very short wrap. Aim for 75 characters in patch description lines
> (so slightly shorter than 80 chars standard for everything else).
Noted your point. Will update the message.
>> Signed-off-by: Janani Sunil <janani.sunil@analog.com>
>> ---
>> .../devicetree/bindings/iio/dac/adi,max22007.yaml | 116 +++++++++++++++++++++
>> MAINTAINERS | 7 ++
>> 2 files changed, 123 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
>> new file mode 100644
>> index 000000000000..c2f65d9e42d4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml
> ...
>
>> + vdd-supply:
>> + description: Low-Voltage Power Supply from +2.7V to +5.5V.
>> +
>> + hvdd-supply:
>> + description:
>> + Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
>> + the Output Channels.
>> +
>> + hvss-supply:
>> + description:
>> + Negative High-Voltage Power Supply from -2V to 0V for the Output Channels.
>> +
>> + reset-gpios:
>> + maxItems: 1
>> + description:
>> + GPIO used for hardware reset of the device.
>> +
>> +patternProperties:
>> + "^channel@[0-3]$":
>> + allOf:
>> + - $ref: /schemas/iio/dac/dac.yaml#
>> + - type: object
>> + description:
>> + Represents the external channels which are connected to the DAC.
>> + Channels not specified in the device tree will be powered off.
>> +
>> + properties:
>> + reg:
>> + description: Channel number
>> + maxItems: 1
> min / max?
Shall add the values.
>
>> +
>> + adi,type:
>> + description: Channel output type.
>> + $ref: /schemas/types.yaml#/definitions/string
>> + enum: [voltage, current]
> This is much more constrained (as only two types of channel) but we do have
> precedence for adi,ch-func in adi,ad74115.yaml and adi,ad74413r.yaml
>
> That's not a particularly pretty binding but we should probably stick to
> it anyway.
>
> adi,type is too vague a name for this property anyway.
Agreed. adi,ch-func seems to be a best fit here. Shall reuse it.
>
>> +
>> + required:
>> + - reg
>> + - adi,type
>> +
>> + unevaluatedProperties: false
>> +
>> +required:
>> + - compatible
> For supplies we document as required any that are needed for the device
> to function, whether or not we happen to need to specify them on
> a given board (given fallbacks that apply on assumption that fixes
> always on supplies are in use). So I'd expect to see at least some
> of the supplies listed here.
Noted. I shall update the required power supplies.
>> + - reg
>> +
>> +anyOf:
>> + - required: [channel@0]
>> + - required: [channel@1]
>> + - required: [channel@2]
>> + - required: [channel@3]
> Interesting. I'm not sure we have never bothered to document this before and there
> are other devices for which some sort of channel config is pretty much needed.
> What is the justification to have this explicitly listed here?
There is no need for the channels to be explicitly mentioned here. I Shall drop them.
>
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/gpio/gpio.h>
>> + spi {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + dac@0 {
>> + compatible = "adi,max22007";
>> + reg = <0>;
>> + spi-max-frequency = <500000>;
>> + reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + channel@0 {
>> + reg = <0>;
>> + adi,type = "voltage";
>> + };
>> +
>> + channel@1 {
>> + reg = <1>;
>> + adi,type = "current";
>> + };
>> + };
>> + };
>> +...
Thank you,
Janani Sunil
On 19/12/2025 16:31, Janani Sunil wrote: > Devicetree bindings for MAX22007 4-channel > 12-bit DAC that drives a voltage or current > output on each channel Please wrap commit message according to Linux coding style / submission process (neither too early nor over the limit): https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 > > Signed-off-by: Janani Sunil <janani.sunil@analog.com> > --- > .../devicetree/bindings/iio/dac/adi,max22007.yaml | 116 +++++++++++++++++++++ > MAINTAINERS | 7 ++ > 2 files changed, 123 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml > new file mode 100644 > index 000000000000..c2f65d9e42d4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml > @@ -0,0 +1,116 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/dac/adi,max22007.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices MAX22007 DAC device driver Bindings are for hardware, drop all device driver references. > + > +maintainers: > + - Janani Sunil <janani.sunil@analog.com> > + > +description: > + The MAX22007 is a quad-channel, 12-bit digital-to-analog converter (DAC) > + with integrated precision output amplifiers and current output capability. > + Each channel can be independently configured for voltage or current output. > + Datasheet available at https://www.analog.com/en/products/max22007.html > + > +$ref: /schemas/spi/spi-peripheral-props.yaml# > + > +properties: > + compatible: > + const: adi,max22007 > + > + reg: > + maxItems: 1 > + > + spi-max-frequency: > + maximum: 500000 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + vdd-supply: > + description: Low-Voltage Power Supply from +2.7V to +5.5V. > + > + hvdd-supply: > + description: > + Positive High-Voltage Power Supply from +8V to (HVSS +24V) for > + the Output Channels. > + > + hvss-supply: > + description: > + Negative High-Voltage Power Supply from -2V to 0V for the Output Channels. > + > + reset-gpios: > + maxItems: 1 > + description: > + GPIO used for hardware reset of the device. Drop description, redundant, because not saying anything other than schema already said. You could say whether it is active low for example if you wanted to add something useful. > + > +patternProperties: > + "^channel@[0-3]$": > + allOf: > + - $ref: /schemas/iio/dac/dac.yaml# > + - type: object Drop allOf. I don't get where did you get this syntax, it's not needed. > + description: > + Represents the external channels which are connected to the DAC. > + Channels not specified in the device tree will be powered off. > + > + properties: > + reg: > + description: Channel number > + maxItems: 1 > + > + adi,type: > + description: Channel output type. > + $ref: /schemas/types.yaml#/definitions/string > + enum: [voltage, current] Why would it matter if this is voltage or current? That's the first time this property appears. Why none of existing fit? > + > + required: > + - reg > + - adi,type > + > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + > +anyOf: > + - required: [channel@0] > + - required: [channel@1] > + - required: [channel@2] > + - required: [channel@3] > + > +unevaluatedProperties: false Best regards, Krzysztof
Hi Krzysztof, Thank you for reviewing the patch. On 12/19/25 16:50, Krzysztof Kozlowski wrote: > On 19/12/2025 16:31, Janani Sunil wrote: >> Devicetree bindings for MAX22007 4-channel >> 12-bit DAC that drives a voltage or current >> output on each channel > Please wrap commit message according to Linux coding style / submission > process (neither too early nor over the limit): > https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 Noted on the coding guidelines. Shall update the commit message. >> Signed-off-by: Janani Sunil <janani.sunil@analog.com> >> --- >> .../devicetree/bindings/iio/dac/adi,max22007.yaml | 116 +++++++++++++++++++++ >> MAINTAINERS | 7 ++ >> 2 files changed, 123 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml >> new file mode 100644 >> index 000000000000..c2f65d9e42d4 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml >> @@ -0,0 +1,116 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/iio/dac/adi,max22007.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Analog Devices MAX22007 DAC device driver > Bindings are for hardware, drop all device driver references. Right. Shall remove the references. >> + >> +maintainers: >> + - Janani Sunil <janani.sunil@analog.com> >> + >> +description: >> + The MAX22007 is a quad-channel, 12-bit digital-to-analog converter (DAC) >> + with integrated precision output amplifiers and current output capability. >> + Each channel can be independently configured for voltage or current output. >> + Datasheet available at https://www.analog.com/en/products/max22007.html >> + >> +$ref: /schemas/spi/spi-peripheral-props.yaml# >> + >> +properties: >> + compatible: >> + const: adi,max22007 >> + >> + reg: >> + maxItems: 1 >> + >> + spi-max-frequency: >> + maximum: 500000 >> + >> + '#address-cells': >> + const: 1 >> + >> + '#size-cells': >> + const: 0 >> + >> + vdd-supply: >> + description: Low-Voltage Power Supply from +2.7V to +5.5V. >> + >> + hvdd-supply: >> + description: >> + Positive High-Voltage Power Supply from +8V to (HVSS +24V) for >> + the Output Channels. >> + >> + hvss-supply: >> + description: >> + Negative High-Voltage Power Supply from -2V to 0V for the Output Channels. >> + >> + reset-gpios: >> + maxItems: 1 >> + description: >> + GPIO used for hardware reset of the device. > Drop description, redundant, because not saying anything other than > schema already said. You could say whether it is active low for example > if you wanted to add something useful. Agreed. Will add some information about the GPIO. >> + >> +patternProperties: >> + "^channel@[0-3]$": >> + allOf: >> + - $ref: /schemas/iio/dac/dac.yaml# >> + - type: object > Drop allOf. I don't get where did you get this syntax, it's not needed. Shall remove it. >> + description: >> + Represents the external channels which are connected to the DAC. >> + Channels not specified in the device tree will be powered off. >> + >> + properties: >> + reg: >> + description: Channel number >> + maxItems: 1 >> + >> + adi,type: >> + description: Channel output type. >> + $ref: /schemas/types.yaml#/definitions/string >> + enum: [voltage, current] > Why would it matter if this is voltage or current? That's the first time > this property appears. Why none of existing fit? The DAC allows configuring the outputs to be a current/voltage type. The IIO channel names need to change depending on that. But as per Johnathan's suggestions, I shall reuse the adi,ch-func instead of introducing a new property here. >> + >> + required: >> + - reg >> + - adi,type >> + >> + unevaluatedProperties: false >> + >> +required: >> + - compatible >> + - reg >> + >> +anyOf: >> + - required: [channel@0] >> + - required: [channel@1] >> + - required: [channel@2] >> + - required: [channel@3] >> + >> +unevaluatedProperties: false > > Best regards, > Krzysztof > Best regards, > Janani Sunil
© 2016 - 2026 Red Hat, Inc.