Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / Documentation / devicetree / bindings / iio / dac / adi,ad5770r.yaml
blobfb2c48fc7ce432117d8cc9f045370774e6f2e616
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#
8 title: Analog Devices AD5770R DAC device driver
10 maintainers:
11   - Mircea Caprioru <mircea.caprioru@analog.com>
13 description: |
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
18 properties:
19   compatible:
20     enum:
21       - adi,ad5770r
23   reg:
24     maxItems: 1
26   avdd-supply:
27     description:
28       AVdd voltage supply. Represents two different supplies in the datasheet
29       that are in fact the same.
31   iovdd-supply:
32     description:
33       Voltage supply for the chip interface.
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.
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
47   reset-gpios:
48     description: GPIO spec for the RESET pin. If specified, it will be
49       asserted during driver probe.
50     maxItems: 1
52   spi-max-frequency: true
54   '#address-cells':
55     const: 1
57   '#size-cells':
58     const: 0
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
66     properties:
67       reg:
68         description: This represents the channel number.
69         const: 0
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
84   channel@1:
85     description: Represents an external channel which are
86       connected to the DAC.
87     type: object
89     properties:
90       reg:
91         description: This represents the channel number.
92         const: 1
94       adi,range-microamp:
95         description: Output range of the channel.
96         items:
97           - const: 0
98           - enum: [140000, 250000]
100   channel@2:
101     description: Represents an external channel which are
102       connected to the DAC.
103     type: object
105     properties:
106       reg:
107         description: This represents the channel number.
108         const: 2
110       adi,range-microamp:
111         description: Output range of the channel.
112         items:
113           - const: 0
114           - enum: [55000, 150000]
116 patternProperties:
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
126       adi,range-microamp:
127         description: Output range of the channel.
128         items:
129           - const: 0
130           - enum: [45000, 100000]
132 required:
133   - reg
134   - channel@0
135   - channel@1
136   - channel@2
137   - channel@3
138   - channel@4
139   - channel@5
141 additionalProperties: false
143 examples:
144   - |
145         spi {
146                 #address-cells = <1>;
147                 #size-cells = <0>;
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>;
159                         channel@0 {
160                                 reg = <0>;
161                                 adi,range-microamp = <0 300000>;
162                         };
164                         channel@1 {
165                                 reg = <1>;
166                                 adi,range-microamp = <0 140000>;
167                         };
169                         channel@2 {
170                                 reg = <2>;
171                                 adi,range-microamp = <0 55000>;
172                         };
174                         channel@3 {
175                                 reg = <3>;
176                                 adi,range-microamp = <0 45000>;
177                         };
179                         channel@4 {
180                                 reg = <4>;
181                                 adi,range-microamp = <0 45000>;
182                         };
184                         channel@5 {
185                                 reg = <5>;
186                                 adi,range-microamp = <0 45000>;
187                         };
188                 };
189         };