xref: /linux/Documentation/devicetree/bindings/iio/dac/adi,ltc2688.yaml (revision e291c116f60f3c1ca98090f0f8e7c77e658562fb)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/dac/adi,ltc2688.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices LTC2688 DAC
8
9maintainers:
10  - Nuno Sá <nuno.sa@analog.com>
11
12description: |
13  Analog Devices LTC2688 16 channel, 16 bit, +-15V DAC
14  https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2688.pdf
15
16properties:
17  compatible:
18    enum:
19      - adi,ltc2688
20
21  reg:
22    maxItems: 1
23
24  vcc-supply:
25    description: Analog Supply Voltage Input.
26
27  iovcc-supply:
28    description: Digital Input/Output Supply Voltage.
29
30  vref-supply:
31    description:
32      Reference Input/Output. The voltage at the REF pin sets the full-scale
33      range of all channels. If not provided the internal reference is used and
34      also provided on the VREF pin".
35
36  clr-gpios:
37    description:
38      If specified, it will be asserted during driver probe. As the line is
39      active low, it should be marked GPIO_ACTIVE_LOW.
40    maxItems: 1
41
42  '#address-cells':
43    const: 1
44
45  '#size-cells':
46    const: 0
47
48patternProperties:
49  "^channel@([0-9]|1[0-5])$":
50    type: object
51    additionalProperties: false
52
53    properties:
54      reg:
55        description: The channel number representing the DAC output channel.
56        maximum: 15
57
58      adi,toggle-mode:
59        description:
60          Set the channel as a toggle enabled channel. Toggle operation enables
61          fast switching of a DAC output between two different DAC codes without
62          any SPI transaction.
63        type: boolean
64
65      adi,output-range-microvolt:
66        description: Specify the channel output full scale range.
67        oneOf:
68          - items:
69              - const: 0
70              - enum: [5000000, 10000000]
71          - items:
72              - const: -5000000
73              - const: 5000000
74          - items:
75              - const: -10000000
76              - const: 10000000
77          - items:
78              - const: -15000000
79              - const: 15000000
80
81      adi,overrange:
82        description: Enable 5% overrange over the selected full scale range.
83        type: boolean
84
85      clocks:
86        maxItems: 1
87
88      adi,toggle-dither-input:
89        description:
90          Selects the TGPx pin to be associated with this channel. This setting
91          only makes sense for toggle or dither enabled channels. If
92          @adi,toggle-mode is not set and this property is given, the channel is
93          assumed to be a dither capable channel. Note that multiple channels
94          can be mapped to the same pin. If this setting is given, the
95          respective @clock must also be provided. Mappings between this and
96          input pins
97            0 - TGP1
98            1 - TGP2
99            2 - TGP3
100        $ref: /schemas/types.yaml#/definitions/uint32
101        enum: [0, 1, 2]
102
103    dependencies:
104      adi,toggle-dither-input: [ clocks ]
105
106    required:
107      - reg
108
109required:
110  - compatible
111  - reg
112
113additionalProperties: false
114
115examples:
116  - |
117
118    spi {
119          #address-cells = <1>;
120          #size-cells = <0>;
121          ltc2688: ltc2688@0 {
122                  compatible = "adi,ltc2688";
123                  reg = <0>;
124
125                  vcc-supply = <&vcc>;
126                  iovcc-supply = <&vcc>;
127                  vref-supply = <&vref>;
128
129                  #address-cells = <1>;
130                  #size-cells = <0>;
131                  channel@0 {
132                          reg = <0>;
133                          adi,toggle-mode;
134                          adi,overrange;
135                  };
136
137                  channel@1 {
138                          reg = <1>;
139                          adi,output-range-microvolt = <0 10000000>;
140
141                          clocks = <&clock_tgp3>;
142                          adi,toggle-dither-input = <2>;
143                  };
144          };
145    };
146
147...
148