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,ad3552r.yaml# 6$schema: http://devicetree.org/meta-schemas/core.yaml# 7 8title: Analog Devices AD2552R DAC device driver 9 10maintainers: 11 - Nuno Sá <nuno.sa@analog.com> 12 13description: | 14 Bindings for the Analog Devices AD3552R DAC device and similar. 15 Datasheet can be found here: 16 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3541r.pdf 17 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf 18 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf 19 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf 20 21properties: 22 compatible: 23 enum: 24 - adi,ad3541r 25 - adi,ad3542r 26 - adi,ad3551r 27 - adi,ad3552r 28 29 reg: 30 maxItems: 1 31 32 spi-max-frequency: 33 maximum: 66000000 34 35 reset-gpios: 36 maxItems: 1 37 38 ldac-gpios: 39 description: | 40 LDAC pin to be used as a hardware trigger to update the DAC channels. 41 maxItems: 1 42 43 vref-supply: 44 description: 45 The regulator to use as an external reference. If it does not exists the 46 internal reference will be used. External reference must be 2.5V 47 48 adi,vref-out-en: 49 description: Vref I/O driven by internal vref to 2.5V. If not set, Vref pin 50 will be floating. 51 type: boolean 52 53 adi,sdo-drive-strength: 54 description: | 55 Configure SDIO0 and SDIO1 strength levels: 56 - 0: low SDO drive strength. 57 - 1: medium low SDO drive strength. 58 - 2: medium high SDO drive strength. 59 - 3: high SDO drive strength 60 $ref: /schemas/types.yaml#/definitions/uint32 61 enum: [0, 1, 2, 3] 62 63 io-backends: 64 description: The iio backend reference. 65 Device can be optionally connected to the "axi-ad3552r IP" fpga-based 66 QSPI + DDR (Double Data Rate) controller to reach high speed transfers. 67 maxItems: 1 68 69 '#address-cells': 70 const: 1 71 72 '#size-cells': 73 const: 0 74 75patternProperties: 76 "^channel@([0-1])$": 77 type: object 78 description: Configurations of the DAC Channels 79 80 additionalProperties: false 81 82 properties: 83 reg: 84 description: Channel number 85 enum: [0, 1] 86 87 adi,output-range-microvolt: true 88 89 custom-output-range-config: 90 type: object 91 additionalProperties: false 92 description: Configuration of custom range when 93 adi,output-range-microvolt is not present. 94 The formulas for calculation the output voltages are 95 Vout_fs = 2.5 + [(GainN + Offset/1024) * 2.5 * Rfbx * 1.03] 96 Vout_zs = 2.5 - [(GainP + Offset/1024) * 2.5 * Rfbx * 1.03] 97 98 properties: 99 adi,gain-offset: 100 description: Gain offset used in the above formula 101 $ref: /schemas/types.yaml#/definitions/int32 102 maximum: 511 103 minimum: -511 104 105 adi,gain-scaling-p: 106 description: GainP = 1 / ( 2 ^ adi,gain-scaling-p) 107 $ref: /schemas/types.yaml#/definitions/uint32 108 enum: [0, 1, 2, 3] 109 110 adi,gain-scaling-n: 111 description: GainN = 1 / ( 2 ^ adi,gain-scaling-n) 112 $ref: /schemas/types.yaml#/definitions/uint32 113 enum: [0, 1, 2, 3] 114 115 adi,rfb-ohms: 116 description: Feedback Resistor 117 118 required: 119 - adi,gain-offset 120 - adi,gain-scaling-p 121 - adi,gain-scaling-n 122 - adi,rfb-ohms 123 124 required: 125 - reg 126 127 oneOf: 128 # If adi,output-range-microvolt is missing, 129 # custom-output-range-config must be used 130 - required: 131 - adi,output-range-microvolt 132 133 - required: 134 - custom-output-range-config 135 136allOf: 137 - $ref: /schemas/spi/spi-peripheral-props.yaml# 138 - if: 139 properties: 140 compatible: 141 contains: 142 enum: 143 - adi,ad3541r 144 - adi,ad3542r 145 then: 146 patternProperties: 147 "^channel@([0-1])$": 148 type: object 149 properties: 150 adi,output-range-microvolt: 151 description: | 152 Voltage output range of the channel as <minimum, maximum> 153 Required connections: 154 Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V; 155 Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V; 156 oneOf: 157 - items: 158 - const: 0 159 - enum: [2500000, 3000000, 5000000, 10000000] 160 - items: 161 - const: -2500000 162 - const: 7500000 163 - items: 164 - const: -5000000 165 - const: 5000000 166 167 required: 168 - adi,output-range-microvolt 169 170 - if: 171 properties: 172 compatible: 173 contains: 174 enum: 175 - adi,ad3551r 176 - adi,ad3552r 177 then: 178 patternProperties: 179 "^channel@([0-1])$": 180 type: object 181 properties: 182 adi,output-range-microvolt: 183 description: | 184 Voltage output range of the channel as <minimum, maximum> 185 Required connections: 186 Rfb1x for: 0 to 2.5 V; 0 to 5 V; 187 Rfb2x for: 0 to 10 V; -5 to 5 V; 188 Rfb4x for: -10 to 10V 189 oneOf: 190 - items: 191 - const: 0 192 - enum: [2500000, 5000000, 10000000] 193 - items: 194 - const: -5000000 195 - const: 5000000 196 - items: 197 - const: -10000000 198 - const: 10000000 199 200 - if: 201 properties: 202 compatible: 203 contains: 204 enum: 205 - adi,ad3541r 206 - adi,ad3551r 207 then: 208 properties: 209 channel@1: false 210 channel@0: 211 properties: 212 reg: 213 const: 0 214 215required: 216 - compatible 217 - reg 218 - spi-max-frequency 219 220additionalProperties: false 221 222examples: 223 - | 224 spi { 225 #address-cells = <1>; 226 #size-cells = <0>; 227 ad3552r@0 { 228 compatible = "adi,ad3552r"; 229 reg = <0>; 230 spi-max-frequency = <20000000>; 231 #address-cells = <1>; 232 #size-cells = <0>; 233 channel@0 { 234 reg = <0>; 235 adi,output-range-microvolt = <0 10000000>; 236 }; 237 channel@1 { 238 reg = <1>; 239 custom-output-range-config { 240 adi,gain-offset = <5>; 241 adi,gain-scaling-p = <1>; 242 adi,gain-scaling-n = <2>; 243 adi,rfb-ohms = <1>; 244 }; 245 }; 246 }; 247 }; 248... 249