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