242 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2# Copyright 2020 Analog Devices Inc.3%YAML 1.24---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 driver9 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.pdf17 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf18 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf19 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf20 21properties:22 compatible:23 enum:24 - adi,ad3541r25 - adi,ad3542r26 - adi,ad3551r27 - adi,ad3552r28 29 reg:30 maxItems: 131 32 spi-max-frequency:33 maximum: 3000000034 35 reset-gpios:36 maxItems: 137 38 ldac-gpios:39 description: |40 LDAC pin to be used as a hardware trigger to update the DAC channels.41 maxItems: 142 43 vref-supply:44 description:45 The regulator to use as an external reference. If it does not exists the46 internal reference will be used. External reference must be 2.5V47 48 adi,vref-out-en:49 description: Vref I/O driven by internal vref to 2.5V. If not set, Vref pin50 will be floating.51 type: boolean52 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 strength60 $ref: /schemas/types.yaml#/definitions/uint3261 enum: [0, 1, 2, 3]62 63 '#address-cells':64 const: 165 66 '#size-cells':67 const: 068 69patternProperties:70 "^channel@([0-1])$":71 type: object72 description: Configurations of the DAC Channels73 74 additionalProperties: false75 76 properties:77 reg:78 description: Channel number79 enum: [0, 1]80 81 adi,output-range-microvolt: true82 83 custom-output-range-config:84 type: object85 additionalProperties: false86 description: Configuration of custom range when87 adi,output-range-microvolt is not present.88 The formulas for calculation the output voltages are89 Vout_fs = 2.5 + [(GainN + Offset/1024) * 2.5 * Rfbx * 1.03]90 Vout_zs = 2.5 - [(GainP + Offset/1024) * 2.5 * Rfbx * 1.03]91 92 properties:93 adi,gain-offset:94 description: Gain offset used in the above formula95 $ref: /schemas/types.yaml#/definitions/int3296 maximum: 51197 minimum: -51198 99 adi,gain-scaling-p:100 description: GainP = 1 / ( 2 ^ adi,gain-scaling-p)101 $ref: /schemas/types.yaml#/definitions/uint32102 enum: [0, 1, 2, 3]103 104 adi,gain-scaling-n:105 description: GainN = 1 / ( 2 ^ adi,gain-scaling-n)106 $ref: /schemas/types.yaml#/definitions/uint32107 enum: [0, 1, 2, 3]108 109 adi,rfb-ohms:110 description: Feedback Resistor111 112 required:113 - adi,gain-offset114 - adi,gain-scaling-p115 - adi,gain-scaling-n116 - adi,rfb-ohms117 118 required:119 - reg120 121 oneOf:122 # If adi,output-range-microvolt is missing,123 # custom-output-range-config must be used124 - required:125 - adi,output-range-microvolt126 127 - required:128 - custom-output-range-config129 130allOf:131 - if:132 properties:133 compatible:134 contains:135 enum:136 - adi,ad3541r137 - adi,ad3542r138 then:139 patternProperties:140 "^channel@([0-1])$":141 type: object142 properties:143 adi,output-range-microvolt:144 description: |145 Voltage output range of the channel as <minimum, maximum>146 Required connections:147 Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V;148 Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V;149 oneOf:150 - items:151 - const: 0152 - enum: [2500000, 3000000, 5000000, 10000000]153 - items:154 - const: -2500000155 - const: 7500000156 - items:157 - const: -5000000158 - const: 5000000159 160 required:161 - adi,output-range-microvolt162 163 - if:164 properties:165 compatible:166 contains:167 enum:168 - adi,ad3551r169 - adi,ad3552r170 then:171 patternProperties:172 "^channel@([0-1])$":173 type: object174 properties:175 adi,output-range-microvolt:176 description: |177 Voltage output range of the channel as <minimum, maximum>178 Required connections:179 Rfb1x for: 0 to 2.5 V; 0 to 5 V;180 Rfb2x for: 0 to 10 V; -5 to 5 V;181 Rfb4x for: -10 to 10V182 oneOf:183 - items:184 - const: 0185 - enum: [2500000, 5000000, 10000000]186 - items:187 - const: -5000000188 - const: 5000000189 - items:190 - const: -10000000191 - const: 10000000192 193 - if:194 properties:195 compatible:196 contains:197 enum:198 - adi,ad3541r199 - adi,ad3551r200 then:201 properties:202 channel@1: false203 channel@0:204 properties:205 reg:206 const: 0207 208required:209 - compatible210 - reg211 - spi-max-frequency212 213additionalProperties: false214 215examples:216 - |217 spi {218 #address-cells = <1>;219 #size-cells = <0>;220 ad3552r@0 {221 compatible = "adi,ad3552r";222 reg = <0>;223 spi-max-frequency = <20000000>;224 #address-cells = <1>;225 #size-cells = <0>;226 channel@0 {227 reg = <0>;228 adi,output-range-microvolt = <0 10000000>;229 };230 channel@1 {231 reg = <1>;232 custom-output-range-config {233 adi,gain-offset = <5>;234 adi,gain-scaling-p = <1>;235 adi,gain-scaling-n = <2>;236 adi,rfb-ohms = <1>;237 };238 };239 };240 };241...242