263 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2# Copyright 2022 Analog Devices Inc.3%YAML 1.24---5$id: http://devicetree.org/schemas/iio/adc/adi,ad4130.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Analog Devices AD4130 ADC device driver9 10maintainers:11 - Cosmin Tanislav <cosmin.tanislav@analog.com>12 13description: |14 Bindings for the Analog Devices AD4130 ADC. Datasheet can be found here:15 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4130-8.pdf16 17properties:18 compatible:19 enum:20 - adi,ad413021 22 reg:23 maxItems: 124 25 clocks:26 maxItems: 127 description: phandle to the master clock (mclk)28 29 clock-names:30 items:31 - const: mclk32 33 interrupts:34 maxItems: 135 36 interrupt-names:37 description: |38 Specify which interrupt pin should be configured as Data Ready / FIFO39 interrupt.40 Default if not supplied is int.41 enum:42 - int43 - clk44 - p245 - dout46 47 '#address-cells':48 const: 149 50 '#size-cells':51 const: 052 53 '#clock-cells':54 const: 055 56 clock-output-names:57 maxItems: 158 59 refin1-supply:60 description: refin1 supply. Can be used as reference for conversion.61 62 refin2-supply:63 description: refin2 supply. Can be used as reference for conversion.64 65 avdd-supply:66 description: AVDD voltage supply. Can be used as reference for conversion.67 68 iovdd-supply:69 description: IOVDD voltage supply. Used for the chip interface.70 71 spi-max-frequency:72 maximum: 500000073 74 adi,ext-clk-freq-hz:75 description: Specify the frequency of the external clock.76 enum: [76800, 153600]77 default: 7680078 79 adi,bipolar:80 description: Specify if the device should be used in bipolar mode.81 type: boolean82 83 adi,vbias-pins:84 description: Analog inputs to apply a voltage bias of (AVDD − AVSS) / 2 to.85 $ref: /schemas/types.yaml#/definitions/uint32-array86 minItems: 187 maxItems: 1688 items:89 minimum: 090 maximum: 1591 92required:93 - compatible94 - reg95 - interrupts96 97patternProperties:98 "^channel@([0-9a-f])$":99 type: object100 $ref: adc.yaml101 unevaluatedProperties: false102 103 properties:104 reg:105 description: The channel number.106 minimum: 0107 maximum: 15108 109 diff-channels:110 description: |111 Besides the analog inputs available, internal inputs can be used.112 16: Internal temperature sensor.113 17: AVSS114 18: Internal reference115 19: DGND116 20: (AVDD − AVSS)/6+117 21: (AVDD − AVSS)/6-118 22: (IOVDD − DGND)/6+119 23: (IOVDD − DGND)/6-120 24: (ALDO − AVSS)/6+121 25: (ALDO − AVSS)/6-122 26: (DLDO − DGND)/6+123 27: (DLDO − DGND)/6-124 28: V_MV_P125 29: V_MV_M126 items:127 minimum: 0128 maximum: 29129 130 adi,reference-select:131 description: |132 Select the reference source to use when converting on the133 specific channel. Valid values are:134 0: REFIN1(+)/REFIN1(−)135 1: REFIN2(+)/REFIN2(−)136 2: REFOUT/AVSS (Internal reference)137 3: AVDD/AVSS138 If not specified, REFIN1 is used.139 $ref: /schemas/types.yaml#/definitions/uint32140 enum: [0, 1, 2, 3]141 default: 0142 143 adi,excitation-pin-0:144 description: |145 Analog input to apply excitation current to while the channel146 is active.147 $ref: /schemas/types.yaml#/definitions/uint32148 minimum: 0149 maximum: 15150 default: 0151 152 adi,excitation-pin-1:153 description: |154 Analog input to apply excitation current to while this channel155 is active.156 $ref: /schemas/types.yaml#/definitions/uint32157 minimum: 0158 maximum: 15159 default: 0160 161 adi,excitation-current-0-nanoamp:162 description: |163 Excitation current in nanoamps to be applied to pin specified in164 adi,excitation-pin-0 while this channel is active.165 enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]166 default: 0167 168 adi,excitation-current-1-nanoamp:169 description: |170 Excitation current in nanoamps to be applied to pin specified in171 adi,excitation-pin-1 while this channel is active.172 enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]173 default: 0174 175 adi,burnout-current-nanoamp:176 description: |177 Burnout current in nanoamps to be applied for this channel.178 enum: [0, 500, 2000, 4000]179 default: 0180 181 adi,buffered-positive:182 description: Enable buffered mode for positive input.183 type: boolean184 185 adi,buffered-negative:186 description: Enable buffered mode for negative input.187 type: boolean188 189 required:190 - reg191 - diff-channels192 193allOf:194 - $ref: /schemas/spi/spi-peripheral-props.yaml#195 196unevaluatedProperties: false197 198examples:199 - |200 #include <dt-bindings/interrupt-controller/irq.h>201 202 spi {203 #address-cells = <1>;204 #size-cells = <0>;205 206 adc@0 {207 compatible = "adi,ad4130";208 reg = <0>;209 210 #address-cells = <1>;211 #size-cells = <0>;212 213 spi-max-frequency = <5000000>;214 interrupts = <27 IRQ_TYPE_EDGE_FALLING>;215 interrupt-parent = <&gpio>;216 217 channel@0 {218 reg = <0>;219 220 adi,reference-select = <2>;221 222 /* AIN8, AIN9 */223 diff-channels = <8 9>;224 };225 226 channel@1 {227 reg = <1>;228 229 adi,reference-select = <2>;230 231 /* AIN10, AIN11 */232 diff-channels = <10 11>;233 };234 235 channel@2 {236 reg = <2>;237 238 adi,reference-select = <2>;239 240 /* Temperature Sensor, DGND */241 diff-channels = <16 19>;242 };243 244 channel@3 {245 reg = <3>;246 247 adi,reference-select = <2>;248 249 /* Internal reference, DGND */250 diff-channels = <18 19>;251 };252 253 channel@4 {254 reg = <4>;255 256 adi,reference-select = <2>;257 258 /* DGND, DGND */259 diff-channels = <19 19>;260 };261 };262 };263