0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 # Copyright 2020 Analog Devices Inc.
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/iio/dac/adi,ad5770r.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007
0008 title: Analog Devices AD5770R DAC device driver
0009
0010 maintainers:
0011 - Alexandru Tachici <alexandru.tachici@analog.com>
0012
0013 description: |
0014 Bindings for the Analog Devices AD5770R current DAC device. Datasheet can be
0015 found here:
0016 https://www.analog.com/media/en/technical-documentation/data-sheets/AD5770R.pdf
0017
0018 properties:
0019 compatible:
0020 enum:
0021 - adi,ad5770r
0022
0023 reg:
0024 maxItems: 1
0025
0026 avdd-supply:
0027 description:
0028 AVdd voltage supply. Represents two different supplies in the datasheet
0029 that are in fact the same.
0030
0031 iovdd-supply:
0032 description:
0033 Voltage supply for the chip interface.
0034
0035 vref-supply:
0036 description: Specify the voltage of the external reference used.
0037 Available reference options are 1.25 V or 2.5 V. If no
0038 external reference declared then the device will use the
0039 internal reference of 1.25 V.
0040
0041 adi,external-resistor:
0042 description: Specify if an external 2.5k ohm resistor is used. If not
0043 specified the device will use an internal 2.5k ohm resistor.
0044 The precision resistor is used for reference current generation.
0045 type: boolean
0046
0047 reset-gpios:
0048 description: GPIO spec for the RESET pin. If specified, it will be
0049 asserted during driver probe.
0050 maxItems: 1
0051
0052 spi-max-frequency: true
0053
0054 '#address-cells':
0055 const: 1
0056
0057 '#size-cells':
0058 const: 0
0059
0060 channel@0:
0061 description: Represents an external channel which are
0062 connected to the DAC. Channel 0 can act both as a current
0063 source and sink.
0064 type: object
0065
0066 properties:
0067 reg:
0068 description: This represents the channel number.
0069 const: 0
0070
0071 adi,range-microamp:
0072 description: Output range of the channel.
0073 oneOf:
0074 - items:
0075 - const: 0
0076 - const: 300000
0077 - items:
0078 - const: -60000
0079 - const: 0
0080 - items:
0081 - const: -60000
0082 - const: 300000
0083
0084 channel@1:
0085 description: Represents an external channel which are
0086 connected to the DAC.
0087 type: object
0088
0089 properties:
0090 reg:
0091 description: This represents the channel number.
0092 const: 1
0093
0094 adi,range-microamp:
0095 description: Output range of the channel.
0096 items:
0097 - const: 0
0098 - enum: [140000, 250000]
0099
0100 channel@2:
0101 description: Represents an external channel which are
0102 connected to the DAC.
0103 type: object
0104
0105 properties:
0106 reg:
0107 description: This represents the channel number.
0108 const: 2
0109
0110 adi,range-microamp:
0111 description: Output range of the channel.
0112 items:
0113 - const: 0
0114 - enum: [55000, 150000]
0115
0116 patternProperties:
0117 "^channel@([3-5])$":
0118 type: object
0119 description: Represents the external channels which are connected to the DAC.
0120 properties:
0121 reg:
0122 description: This represents the channel number.
0123 minimum: 3
0124 maximum: 5
0125
0126 adi,range-microamp:
0127 description: Output range of the channel.
0128 items:
0129 - const: 0
0130 - enum: [45000, 100000]
0131
0132 required:
0133 - reg
0134 - channel@0
0135 - channel@1
0136 - channel@2
0137 - channel@3
0138 - channel@4
0139 - channel@5
0140
0141 additionalProperties: false
0142
0143 examples:
0144 - |
0145 spi {
0146 #address-cells = <1>;
0147 #size-cells = <0>;
0148
0149 ad5770r@0 {
0150 compatible = "adi,ad5770r";
0151 reg = <0>;
0152 spi-max-frequency = <1000000>;
0153 vref-supply = <&vref>;
0154 adi,external-resistor;
0155 reset-gpios = <&gpio 22 0>;
0156 #address-cells = <1>;
0157 #size-cells = <0>;
0158
0159 channel@0 {
0160 reg = <0>;
0161 adi,range-microamp = <0 300000>;
0162 };
0163
0164 channel@1 {
0165 reg = <1>;
0166 adi,range-microamp = <0 140000>;
0167 };
0168
0169 channel@2 {
0170 reg = <2>;
0171 adi,range-microamp = <0 55000>;
0172 };
0173
0174 channel@3 {
0175 reg = <3>;
0176 adi,range-microamp = <0 45000>;
0177 };
0178
0179 channel@4 {
0180 reg = <4>;
0181 adi,range-microamp = <0 45000>;
0182 };
0183
0184 channel@5 {
0185 reg = <5>;
0186 adi,range-microamp = <0 45000>;
0187 };
0188 };
0189 };
0190 ...