xref: /linux/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml (revision ba2290b1b7505b28912092a0976e071a447ee18c)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2020 Analog Devices Inc.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/iio/dac/adi,ad5770r.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Analog Devices AD5770R DAC device driver
9
10maintainers:
11  - Mircea Caprioru <mircea.caprioru@analog.com>
12
13description: |
14  Bindings for the Analog Devices AD5770R current DAC device. Datasheet can be
15  found here:
16    https://www.analog.com/media/en/technical-documentation/data-sheets/AD5770R.pdf
17
18properties:
19  compatible:
20    enum:
21      - adi,ad5770r
22
23  reg:
24    maxItems: 1
25
26  avdd-supply:
27    description:
28      AVdd voltage supply. Represents two different supplies in the datasheet
29      that are in fact the same.
30
31  iovdd-supply:
32    description:
33      Voltage supply for the chip interface.
34
35  vref-supply:
36    description: Specify the voltage of the external reference used.
37      Available reference options are 1.25 V or 2.5 V. If no
38      external reference declared then the device will use the
39      internal reference of 1.25 V.
40
41  adi,external-resistor:
42    description: Specify if an external 2.5k ohm resistor is used. If not
43      specified the device will use an internal 2.5k ohm resistor.
44      The precision resistor is used for reference current generation.
45    type: boolean
46
47  reset-gpios:
48    description: GPIO spec for the RESET pin. If specified, it will be
49      asserted during driver probe.
50    maxItems: 1
51
52  spi-max-frequency: true
53
54  '#address-cells':
55    const: 1
56
57  '#size-cells':
58    const: 0
59
60  channel@0:
61    description: Represents an external channel which are
62      connected to the DAC. Channel 0 can act both as a current
63      source and sink.
64    type: object
65
66    properties:
67      reg:
68        description: This represents the channel number.
69        const: 0
70
71      adi,range-microamp:
72        description: Output range of the channel.
73        oneOf:
74          - items:
75              - const: 0
76              - const: 300000
77          - items:
78              - const: -60000
79              - const: 0
80          - items:
81              - const: -60000
82              - const: 300000
83
84  channel@1:
85    description: Represents an external channel which are
86      connected to the DAC.
87    type: object
88
89    properties:
90      reg:
91        description: This represents the channel number.
92        const: 1
93
94      adi,range-microamp:
95        description: Output range of the channel.
96        items:
97          - const: 0
98          - enum: [140000, 250000]
99
100  channel@2:
101    description: Represents an external channel which are
102      connected to the DAC.
103    type: object
104
105    properties:
106      reg:
107        description: This represents the channel number.
108        const: 2
109
110      adi,range-microamp:
111        description: Output range of the channel.
112        items:
113          - const: 0
114          - enum: [55000, 150000]
115
116patternProperties:
117  "^channel@([3-5])$":
118    type: object
119    description: Represents the external channels which are connected to the DAC.
120    properties:
121      reg:
122        description: This represents the channel number.
123        minimum: 3
124        maximum: 5
125
126      adi,range-microamp:
127        description: Output range of the channel.
128        items:
129          - const: 0
130          - enum: [45000, 100000]
131
132required:
133  - reg
134  - channel@0
135  - channel@1
136  - channel@2
137  - channel@3
138  - channel@4
139  - channel@5
140
141additionalProperties: false
142
143examples:
144  - |
145        spi {
146                #address-cells = <1>;
147                #size-cells = <0>;
148
149                ad5770r@0 {
150                        compatible = "adi,ad5770r";
151                        reg = <0>;
152                        spi-max-frequency = <1000000>;
153                        vref-supply = <&vref>;
154                        adi,external-resistor;
155                        reset-gpios = <&gpio 22 0>;
156                        #address-cells = <1>;
157                        #size-cells = <0>;
158
159                        channel@0 {
160                                reg = <0>;
161                                adi,range-microamp = <0 300000>;
162                        };
163
164                        channel@1 {
165                                reg = <1>;
166                                adi,range-microamp = <0 140000>;
167                        };
168
169                        channel@2 {
170                                reg = <2>;
171                                adi,range-microamp = <0 55000>;
172                        };
173
174                        channel@3 {
175                                reg = <3>;
176                                adi,range-microamp = <0 45000>;
177                        };
178
179                        channel@4 {
180                                reg = <4>;
181                                adi,range-microamp = <0 45000>;
182                        };
183
184                        channel@5 {
185                                reg = <5>;
186                                adi,range-microamp = <0 45000>;
187                        };
188                };
189        };
190...
191