xref: /freebsd/sys/contrib/device-tree/Bindings/iio/dac/adi,ltc2688.yaml (revision 058ac3e8063366dafa634d9107642e12b038bf09)
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
52    properties:
53      reg:
54        description: The channel number representing the DAC output channel.
55        maximum: 15
56
57      adi,toggle-mode:
58        description:
59          Set the channel as a toggle enabled channel. Toggle operation enables
60          fast switching of a DAC output between two different DAC codes without
61          any SPI transaction.
62        type: boolean
63
64      adi,output-range-microvolt:
65        description: Specify the channel output full scale range.
66        oneOf:
67          - items:
68              - const: 0
69              - enum: [5000000, 10000000]
70          - items:
71              - const: -5000000
72              - const: 5000000
73          - items:
74              - const: -10000000
75              - const: 10000000
76          - items:
77              - const: -15000000
78              - const: 15000000
79
80      adi,overrange:
81        description: Enable 5% overrange over the selected full scale range.
82        type: boolean
83
84      clocks:
85        maxItems: 1
86
87      adi,toggle-dither-input:
88        description:
89          Selects the TGPx pin to be associated with this channel. This setting
90          only makes sense for toggle or dither enabled channels. If
91          @adi,toggle-mode is not set and this property is given, the channel is
92          assumed to be a dither capable channel. Note that multiple channels
93          can be mapped to the same pin. If this setting is given, the
94          respective @clock must also be provided. Mappings between this and
95          input pins
96            0 - TGP1
97            1 - TGP2
98            2 - TGP3
99        $ref: /schemas/types.yaml#/definitions/uint32
100        enum: [0, 1, 2]
101
102    dependencies:
103      adi,toggle-dither-input: [ clocks ]
104
105    required:
106      - reg
107
108required:
109  - compatible
110  - reg
111
112additionalProperties: false
113
114examples:
115  - |
116
117    spi {
118          #address-cells = <1>;
119          #size-cells = <0>;
120          ltc2688: ltc2688@0 {
121                  compatible = "adi,ltc2688";
122                  reg = <0>;
123
124                  vcc-supply = <&vcc>;
125                  iovcc-supply = <&vcc>;
126                  vref-supply = <&vref>;
127
128                  #address-cells = <1>;
129                  #size-cells = <0>;
130                  channel@0 {
131                          reg = <0>;
132                          adi,toggle-mode;
133                          adi,overrange;
134                  };
135
136                  channel@1 {
137                          reg = <1>;
138                          adi,output-range-microvolt = <0 10000000>;
139
140                          clocks = <&clock_tgp3>;
141                          adi,toggle-dither-input = <2>;
142                  };
143          };
144    };
145
146...
147