blob: 58d81ca434605be574fecf06d75324c0e0bddb7c [file] [log] [blame]
Alexandru Tachiciea52c212020-02-18 14:10:31 +02001# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2020 Analog Devices Inc.
3%YAML 1.2
4---
Fabio Estevambc4be552020-03-27 10:18:25 -03005$id: http://devicetree.org/schemas/iio/dac/adi,ad5770r.yaml#
Alexandru Tachiciea52c212020-02-18 14:10:31 +02006$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
Alexandru Tachici2cf38182020-04-16 14:58:48 +030052 channel@0:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020053 description: Represents an external channel which are
54 connected to the DAC. Channel 0 can act both as a current
55 source and sink.
56 type: object
57
58 properties:
Alexandru Tachici2cf38182020-04-16 14:58:48 +030059 reg:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020060 description: This represents the channel number.
Alexandru Tachici2cf38182020-04-16 14:58:48 +030061 const: 0
Alexandru Tachiciea52c212020-02-18 14:10:31 +020062
63 adi,range-microamp:
64 description: Output range of the channel.
65 oneOf:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020066 - items:
Alexandru Tachici2cf38182020-04-16 14:58:48 +030067 - const: 0
68 - const: 300000
69 - items:
70 - const: -60000
71 - const: 0
72 - items:
73 - const: -60000
74 - const: 300000
Alexandru Tachiciea52c212020-02-18 14:10:31 +020075
Alexandru Tachici2cf38182020-04-16 14:58:48 +030076 channel@1:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020077 description: Represents an external channel which are
78 connected to the DAC.
79 type: object
80
81 properties:
Alexandru Tachici2cf38182020-04-16 14:58:48 +030082 reg:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020083 description: This represents the channel number.
Alexandru Tachici2cf38182020-04-16 14:58:48 +030084 const: 1
Alexandru Tachiciea52c212020-02-18 14:10:31 +020085
86 adi,range-microamp:
87 description: Output range of the channel.
Alexandru Tachici2cf38182020-04-16 14:58:48 +030088 items:
89 - const: 0
90 - enum: [ 140000, 250000 ]
Alexandru Tachiciea52c212020-02-18 14:10:31 +020091
Alexandru Tachici2cf38182020-04-16 14:58:48 +030092 channel@2:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020093 description: Represents an external channel which are
94 connected to the DAC.
95 type: object
96
97 properties:
Alexandru Tachici2cf38182020-04-16 14:58:48 +030098 reg:
Alexandru Tachiciea52c212020-02-18 14:10:31 +020099 description: This represents the channel number.
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300100 const: 2
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200101
102 adi,range-microamp:
103 description: Output range of the channel.
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300104 items:
105 - const: 0
106 - enum: [ 55000, 150000 ]
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200107
108patternProperties:
109 "^channel@([3-5])$":
110 type: object
111 description: Represents the external channels which are connected to the DAC.
112 properties:
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300113 reg:
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200114 description: This represents the channel number.
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300115 minimum: 3
116 maximum: 5
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200117
118 adi,range-microamp:
119 description: Output range of the channel.
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300120 items:
121 - const: 0
122 - enum: [ 45000, 100000 ]
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200123
124required:
125- reg
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300126- channel@0
127- channel@1
128- channel@2
129- channel@3
130- channel@4
131- channel@5
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200132
133examples:
134 - |
135 spi {
136 #address-cells = <1>;
137 #size-cells = <0>;
138
139 ad5770r@0 {
Fabio Estevam7d6243a2020-03-27 10:18:23 -0300140 compatible = "adi,ad5770r";
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200141 reg = <0>;
142 spi-max-frequency = <1000000>;
143 vref-supply = <&vref>;
144 adi,external-resistor;
145 reset-gpios = <&gpio 22 0>;
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300146 #address-cells = <1>;
147 #size-cells = <0>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200148
149 channel@0 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300150 reg = <0>;
151 adi,range-microamp = <0 300000>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200152 };
153
154 channel@1 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300155 reg = <1>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200156 adi,range-microamp = <0 140000>;
157 };
158
159 channel@2 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300160 reg = <2>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200161 adi,range-microamp = <0 55000>;
162 };
163
164 channel@3 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300165 reg = <3>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200166 adi,range-microamp = <0 45000>;
167 };
168
169 channel@4 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300170 reg = <4>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200171 adi,range-microamp = <0 45000>;
172 };
173
174 channel@5 {
Alexandru Tachici2cf38182020-04-16 14:58:48 +0300175 reg = <5>;
Alexandru Tachiciea52c212020-02-18 14:10:31 +0200176 adi,range-microamp = <0 45000>;
177 };
178 };
179 };
180...