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,ad5064.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices AD5064 and similar DACs
8
9maintainers:
10  - Lars-Peter Clausen <lars@metafoo.de>
11  - Jonathan Cameron <jic23@kernel.org>
12
13description: |
14   A range of similar DAC devices with between 1 and 12 channels. Some parts
15   have internal references, others require a single shared external reference
16   and the remainder have a separate reference pin for each DAC.
17
18properties:
19  compatible:
20    oneOf:
21      - description: I2C devics
22        enum:
23          - adi,ad5024
24          - adi,ad5025
25          - adi,ad5044
26          - adi,ad5045
27          - adi,ad5064
28          - adi,ad5064-1
29          - adi,ad5065
30          - adi,ad5628-1
31          - adi,ad5628-2
32          - adi,ad5648-1
33          - adi,ad5648-2
34          - adi,ad5666-1
35          - adi,ad5666-2
36          - adi,ad5668-1
37          - adi,ad5668-2
38          - adi,ad5668-3
39      - description: SPI devices
40        enum:
41          - adi,ad5625
42          - adi,ad5625r-1v25
43          - adi,ad5625r-2v5
44          - adi,ad5627
45          - adi,ad5627r-1v25
46          - adi,ad5627r-2v5
47          - adi,ad5629-1
48          - adi,ad5629-2
49          - adi,ad5629-3
50          - adi,ad5645r-1v25
51          - adi,ad5645r-2v5
52          - adi,ad5665
53          - adi,ad5665r-1v25
54          - adi,ad5665r-2v5
55          - adi,ad5667
56          - adi,ad5667r-1v25
57          - adi,ad5667r-2v5
58          - adi,ad5669-1
59          - adi,ad5669-2
60          - adi,ad5669-3
61          - lltc,ltc2606
62          - lltc,ltc2607
63          - lltc,ltc2609
64          - lltc,ltc2616
65          - lltc,ltc2617
66          - lltc,ltc2619
67          - lltc,ltc2626
68          - lltc,ltc2627
69          - lltc,ltc2629
70          - lltc,ltc2631-l12
71          - lltc,ltc2631-h12
72          - lltc,ltc2631-l10
73          - lltc,ltc2631-h10
74          - lltc,ltc2631-l8
75          - lltc,ltc2631-h8
76          - lltc,ltc2633-l12
77          - lltc,ltc2633-h12
78          - lltc,ltc2633-l10
79          - lltc,ltc2633-h10
80          - lltc,ltc2633-l8
81          - lltc,ltc2633-h8
82          - lltc,ltc2635-l12
83          - lltc,ltc2635-h12
84          - lltc,ltc2635-l10
85          - lltc,ltc2635-h10
86          - lltc,ltc2635-l8
87          - lltc,ltc2635-h8
88
89  reg:
90    maxItems: 1
91
92  vrefA-supply: true
93  vrefB-supply: true
94  vrefC-supply: true
95  vrefD-supply: true
96  vref-supply: true
97
98  spi-max-frequency: true
99
100additionalProperties: false
101
102required:
103  - compatible
104  - reg
105
106allOf:
107  - # Shared external vref, no internal reference
108    if:
109      properties:
110        compatible:
111          contains:
112            enum:
113              - adi,ad5064-1
114              - adi,ad5625
115              - adi,ad5627
116              - adi,ad5665
117              - adi,ad5667
118              - lltc,ltc2606
119              - lltc,ltc2607
120              - lltc,ltc2616
121              - lltc,ltc2617
122              - lltc,ltc2626
123              - lltc,ltc2627
124    then:
125      properties:
126        vref-supply: true
127        vrefA-supply: false
128        vrefB-supply: false
129        vrefC-supply: false
130        vrefD-supply: false
131      required:
132        - vref-supply
133  - # Shared external vref, internal reference available
134    if:
135      properties:
136        compatible:
137          contains:
138            enum:
139              - adi,ad5625r-1v25
140              - adi,ad5625r-2v5
141              - adi,ad5627r-1v25
142              - adi,ad5627r-2v5
143              - adi,ad5628-1
144              - adi,ad5628-2
145              - adi,ad5629-1
146              - adi,ad5629-2
147              - adi,ad5629-3
148              - adi,ad5645r-1v25
149              - adi,ad5645r-2v5
150              - adi,ad5647r-1v25
151              - adi,ad5647r-2v5
152              - adi,ad5648-1
153              - adi,ad5648-2
154              - adi,ad5665r-1v25
155              - adi,ad5665r-2v5
156              - adi,ad5666-1
157              - adi,ad5666-2
158              - adi,ad5667r-1v25
159              - adi,ad5667r-2v5
160              - adi,ad5668-1
161              - adi,ad5668-2
162              - adi,ad5668-3
163              - adi,ad5669-1
164              - adi,ad5669-2
165              - adi,ad5669-3
166              - lltc,ltc2631-l12
167              - lltc,ltc2631-h12
168              - lltc,ltc2631-l10
169              - lltc,ltc2631-h10
170              - lltc,ltc2631-l8
171              - lltc,ltc2631-h8
172              - lltc,ltc2633-l12
173              - lltc,ltc2633-h12
174              - lltc,ltc2633-l10
175              - lltc,ltc2633-h10
176              - lltc,ltc2633-l8
177              - lltc,ltc2633-h8
178              - lltc,ltc2635-l12
179              - lltc,ltc2635-h12
180              - lltc,ltc2635-l10
181              - lltc,ltc2635-h10
182              - lltc,ltc2635-l8
183              - lltc,ltc2635-h8
184    then:
185      properties:
186        vref-supply: true
187        vrefA-supply: false
188        vrefB-supply: false
189        vrefC-supply: false
190        vrefD-supply: false
191  - # 4 input devices, separate vrefs, no internal reference
192    if:
193      properties:
194        compatible:
195          contains:
196            enum:
197              - adi,ad5024
198              - adi,ad5044
199              - adi,ad5064
200              - lltc,ltc2609
201              - lltc,ltc2619
202              - lltc,ltc2629
203    then:
204      properties:
205        vrefA-supply: true
206        vrefB-supply: true
207        vrefC-supply: true
208        vrefD-supply: true
209        vref-supply: false
210      required:
211        - vrefA-supply
212        - vrefB-supply
213        - vrefC-supply
214        - vrefD-supply
215  - # 2 input devices, separate vrefs, no internal reference
216    if:
217      properties:
218        compatible:
219          contains:
220            enum:
221              - adi,ad5025
222              - adi,ad5045
223              - adi,ad5065
224    then:
225      properties:
226        vrefA-supply: true
227        vrefB-supply: true
228        vrefC-supply: false
229        vrefD-supply: false
230        vref-supply: false
231      required:
232        - vrefA-supply
233        - vrefB-supply
234
235examples:
236  - |
237    spi {
238        #address-cells = <1>;
239        #size-cells = <0>;
240        dac@0 {
241            reg = <0>;
242            compatible = "adi,ad5625";
243            vref-supply = <&dac_vref>;
244        };
245    };
246  - |
247    spi {
248        #address-cells = <1>;
249        #size-cells = <0>;
250        dac@0 {
251            reg = <0>;
252            compatible = "adi,ad5625r-1v25";
253        };
254    };
255  - |
256    i2c {
257        #address-cells = <1>;
258        #size-cells = <0>;
259        dac@42 {
260            reg = <0x42>;
261            compatible = "adi,ad5024";
262            vrefA-supply = <&dac_vref>;
263            vrefB-supply = <&dac_vref>;
264            vrefC-supply = <&dac_vref2>;
265            vrefD-supply = <&dac_vref2>;
266        };
267    };
268...
269