xref: /linux/Documentation/devicetree/bindings/iio/dac/adi,max22007.yaml (revision 3e9e952bb3139ad1e08f3e1960239c2988ab90c9)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/dac/adi,max22007.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices MAX22007 DAC
8
9maintainers:
10  - Janani Sunil <janani.sunil@analog.com>
11
12description:
13  The MAX22007 is a quad-channel, 12-bit digital-to-analog converter (DAC)
14  with integrated precision output amplifiers and current output capability.
15  Each channel can be independently configured for voltage or current output.
16  Datasheet available at https://www.analog.com/en/products/max22007.html
17
18$ref: /schemas/spi/spi-peripheral-props.yaml#
19
20properties:
21  compatible:
22    const: adi,max22007
23
24  reg:
25    maxItems: 1
26
27  spi-max-frequency:
28    maximum: 500000
29
30  '#address-cells':
31    const: 1
32
33  '#size-cells':
34    const: 0
35
36  vdd-supply:
37    description: Low-Voltage Power Supply from +2.7V to +5.5V.
38
39  hvdd-supply:
40    description:
41      Positive High-Voltage Power Supply from +8V to (HVSS +24V) for
42      the Output Channels.
43
44  hvss-supply:
45    description:
46      Optional Negative High-Voltage Power Supply from -2V to 0V for the Output
47      Channels. For most applications HVSS can be connected to GND (0V), but for
48      applications requiring output down to true 0V or 0mA, connect to a -2V supply.
49
50  reset-gpios:
51    maxItems: 1
52    description:
53      Active low GPIO.
54
55patternProperties:
56  "^channel@[0-3]$":
57    $ref: /schemas/iio/dac/dac.yaml#
58    type: object
59    description:
60      Represents the external channels which are connected to the DAC.
61
62    properties:
63      reg:
64        description: Channel number
65        items:
66          minimum: 0
67          maximum: 3
68
69      adi,ch-func:
70        description:
71          Channel output type. Use CH_FUNC_VOLTAGE_OUTPUT for voltage
72          output or CH_FUNC_CURRENT_OUTPUT for current output.
73        $ref: /schemas/types.yaml#/definitions/uint32
74        enum: [1, 2]
75
76    required:
77      - reg
78      - adi,ch-func
79
80    unevaluatedProperties: false
81
82required:
83  - compatible
84  - reg
85  - vdd-supply
86  - hvdd-supply
87
88unevaluatedProperties: false
89
90examples:
91  - |
92    #include <dt-bindings/gpio/gpio.h>
93    #include <dt-bindings/iio/addac/adi,ad74413r.h>
94
95    spi {
96        #address-cells = <1>;
97        #size-cells = <0>;
98
99        dac@0 {
100            compatible = "adi,max22007";
101            reg = <0>;
102            spi-max-frequency = <500000>;
103            reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
104            vdd-supply = <&vdd_reg>;
105            hvdd-supply = <&hvdd_reg>;
106            #address-cells = <1>;
107            #size-cells = <0>;
108
109            channel@0 {
110                reg = <0>;
111                adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
112            };
113
114            channel@1 {
115                reg = <1>;
116                adi,ch-func = <CH_FUNC_CURRENT_OUTPUT>;
117            };
118        };
119    };
120...
121