1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2# Copyright 2020 Analog Devices Inc. 3%YAML 1.2 4--- 5$id: http://devicetree.org/schemas/iio/dac/adi,ad5770r.yaml# 6$schema: http://devicetree.org/meta-schemas/core.yaml# 7 8title: Analog Devices AD5770R DAC device driver 9 10maintainers: 11 - Alexandru Tachici <alexandru.tachici@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 52 '#address-cells': 53 const: 1 54 55 '#size-cells': 56 const: 0 57 58 channel@0: 59 description: Represents an external channel which are 60 connected to the DAC. Channel 0 can act both as a current 61 source and sink. 62 type: object 63 64 properties: 65 reg: 66 description: This represents the channel number. 67 const: 0 68 69 adi,range-microamp: 70 description: Output range of the channel. 71 oneOf: 72 - items: 73 - const: 0 74 - const: 300000 75 - items: 76 - const: -60000 77 - const: 0 78 - items: 79 - const: -60000 80 - const: 300000 81 82 channel@1: 83 description: Represents an external channel which are 84 connected to the DAC. 85 type: object 86 87 properties: 88 reg: 89 description: This represents the channel number. 90 const: 1 91 92 adi,range-microamp: 93 description: Output range of the channel. 94 items: 95 - const: 0 96 - enum: [140000, 250000] 97 98 channel@2: 99 description: Represents an external channel which are 100 connected to the DAC. 101 type: object 102 103 properties: 104 reg: 105 description: This represents the channel number. 106 const: 2 107 108 adi,range-microamp: 109 description: Output range of the channel. 110 items: 111 - const: 0 112 - enum: [55000, 150000] 113 114patternProperties: 115 "^channel@([3-5])$": 116 type: object 117 description: Represents the external channels which are connected to the DAC. 118 properties: 119 reg: 120 description: This represents the channel number. 121 minimum: 3 122 maximum: 5 123 124 adi,range-microamp: 125 description: Output range of the channel. 126 items: 127 - const: 0 128 - enum: [45000, 100000] 129 130required: 131 - reg 132 - channel@0 133 - channel@1 134 - channel@2 135 - channel@3 136 - channel@4 137 - channel@5 138 139allOf: 140 - $ref: /schemas/spi/spi-peripheral-props.yaml# 141 142unevaluatedProperties: false 143 144examples: 145 - | 146 spi { 147 #address-cells = <1>; 148 #size-cells = <0>; 149 150 ad5770r@0 { 151 compatible = "adi,ad5770r"; 152 reg = <0>; 153 spi-max-frequency = <1000000>; 154 vref-supply = <&vref>; 155 adi,external-resistor; 156 reset-gpios = <&gpio 22 0>; 157 #address-cells = <1>; 158 #size-cells = <0>; 159 160 channel@0 { 161 reg = <0>; 162 adi,range-microamp = <0 300000>; 163 }; 164 165 channel@1 { 166 reg = <1>; 167 adi,range-microamp = <0 140000>; 168 }; 169 170 channel@2 { 171 reg = <2>; 172 adi,range-microamp = <0 55000>; 173 }; 174 175 channel@3 { 176 reg = <3>; 177 adi,range-microamp = <0 45000>; 178 }; 179 180 channel@4 { 181 reg = <4>; 182 adi,range-microamp = <0 45000>; 183 }; 184 185 channel@5 { 186 reg = <5>; 187 adi,range-microamp = <0 45000>; 188 }; 189 }; 190 }; 191... 192