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
98required:
99  - compatible
100  - reg
101
102allOf:
103  - $ref: /schemas/spi/spi-peripheral-props.yaml#
104  - # Shared external vref, no internal reference
105    if:
106      properties:
107        compatible:
108          contains:
109            enum:
110              - adi,ad5064-1
111              - adi,ad5625
112              - adi,ad5627
113              - adi,ad5665
114              - adi,ad5667
115              - lltc,ltc2606
116              - lltc,ltc2607
117              - lltc,ltc2616
118              - lltc,ltc2617
119              - lltc,ltc2626
120              - lltc,ltc2627
121    then:
122      properties:
123        vref-supply: true
124        vrefA-supply: false
125        vrefB-supply: false
126        vrefC-supply: false
127        vrefD-supply: false
128      required:
129        - vref-supply
130  - # Shared external vref, internal reference available
131    if:
132      properties:
133        compatible:
134          contains:
135            enum:
136              - adi,ad5625r-1v25
137              - adi,ad5625r-2v5
138              - adi,ad5627r-1v25
139              - adi,ad5627r-2v5
140              - adi,ad5628-1
141              - adi,ad5628-2
142              - adi,ad5629-1
143              - adi,ad5629-2
144              - adi,ad5629-3
145              - adi,ad5645r-1v25
146              - adi,ad5645r-2v5
147              - adi,ad5647r-1v25
148              - adi,ad5647r-2v5
149              - adi,ad5648-1
150              - adi,ad5648-2
151              - adi,ad5665r-1v25
152              - adi,ad5665r-2v5
153              - adi,ad5666-1
154              - adi,ad5666-2
155              - adi,ad5667r-1v25
156              - adi,ad5667r-2v5
157              - adi,ad5668-1
158              - adi,ad5668-2
159              - adi,ad5668-3
160              - adi,ad5669-1
161              - adi,ad5669-2
162              - adi,ad5669-3
163              - lltc,ltc2631-l12
164              - lltc,ltc2631-h12
165              - lltc,ltc2631-l10
166              - lltc,ltc2631-h10
167              - lltc,ltc2631-l8
168              - lltc,ltc2631-h8
169              - lltc,ltc2633-l12
170              - lltc,ltc2633-h12
171              - lltc,ltc2633-l10
172              - lltc,ltc2633-h10
173              - lltc,ltc2633-l8
174              - lltc,ltc2633-h8
175              - lltc,ltc2635-l12
176              - lltc,ltc2635-h12
177              - lltc,ltc2635-l10
178              - lltc,ltc2635-h10
179              - lltc,ltc2635-l8
180              - lltc,ltc2635-h8
181    then:
182      properties:
183        vref-supply: true
184        vrefA-supply: false
185        vrefB-supply: false
186        vrefC-supply: false
187        vrefD-supply: false
188  - # 4 input devices, separate vrefs, no internal reference
189    if:
190      properties:
191        compatible:
192          contains:
193            enum:
194              - adi,ad5024
195              - adi,ad5044
196              - adi,ad5064
197              - lltc,ltc2609
198              - lltc,ltc2619
199              - lltc,ltc2629
200    then:
201      properties:
202        vrefA-supply: true
203        vrefB-supply: true
204        vrefC-supply: true
205        vrefD-supply: true
206        vref-supply: false
207      required:
208        - vrefA-supply
209        - vrefB-supply
210        - vrefC-supply
211        - vrefD-supply
212  - # 2 input devices, separate vrefs, no internal reference
213    if:
214      properties:
215        compatible:
216          contains:
217            enum:
218              - adi,ad5025
219              - adi,ad5045
220              - adi,ad5065
221    then:
222      properties:
223        vrefA-supply: true
224        vrefB-supply: true
225        vrefC-supply: false
226        vrefD-supply: false
227        vref-supply: false
228      required:
229        - vrefA-supply
230        - vrefB-supply
231
232unevaluatedProperties: false
233
234examples:
235  - |
236    spi {
237        #address-cells = <1>;
238        #size-cells = <0>;
239        dac@0 {
240            reg = <0>;
241            compatible = "adi,ad5625";
242            vref-supply = <&dac_vref>;
243        };
244    };
245  - |
246    spi {
247        #address-cells = <1>;
248        #size-cells = <0>;
249        dac@0 {
250            reg = <0>;
251            compatible = "adi,ad5625r-1v25";
252        };
253    };
254  - |
255    i2c {
256        #address-cells = <1>;
257        #size-cells = <0>;
258        dac@42 {
259            reg = <0x42>;
260            compatible = "adi,ad5024";
261            vrefA-supply = <&dac_vref>;
262            vrefB-supply = <&dac_vref>;
263            vrefC-supply = <&dac_vref2>;
264            vrefD-supply = <&dac_vref2>;
265        };
266    };
267...
268