blob: 53f9feff137ba601cc5f3515e397ec17f2df1438 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2022 Analog Devices Inc.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/iio/adc/adi,max11410.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Analog Devices MAX11410 ADC device driver
9
10maintainers:
11 - Ibrahim Tilki <Ibrahim.Tilki@analog.com>
12
13description: |
14 Bindings for the Analog Devices MAX11410 ADC device. Datasheet can be
15 found here:
16 https://datasheets.maximintegrated.com/en/ds/MAX11410.pdf
17
18properties:
19 compatible:
20 enum:
21 - adi,max11410
22
23 reg:
24 maxItems: 1
25
26 interrupts:
27 minItems: 1
28 maxItems: 2
29
30 interrupt-names:
31 description: Name of the gpio pin of max11410 used for IRQ
32 minItems: 1
33 items:
34 - enum: [gpio0, gpio1]
35 - const: gpio1
36
37 '#address-cells':
38 const: 1
39
40 '#size-cells':
41 const: 0
42
43 avdd-supply:
44 description: Optional avdd supply. Used as reference when no explicit reference supplied.
45
46 vref0p-supply:
47 description: vref0p supply can be used as reference for conversion.
48
49 vref1p-supply:
50 description: vref1p supply can be used as reference for conversion.
51
52 vref2p-supply:
53 description: vref2p supply can be used as reference for conversion.
54
55 vref0n-supply:
56 description: vref0n supply can be used as reference for conversion.
57
58 vref1n-supply:
59 description: vref1n supply can be used as reference for conversion.
60
61 vref2n-supply:
62 description: vref2n supply can be used as reference for conversion.
63
64 spi-max-frequency:
65 maximum: 8000000
66
67patternProperties:
68 "^channel(@[0-9])?$":
69 $ref: adc.yaml
70 type: object
71 description: Represents the external channels which are connected to the ADC.
72
73 properties:
74 reg:
75 description: The channel number in single-ended mode.
76 minimum: 0
77 maximum: 9
78
79 adi,reference:
80 description: |
81 Select the reference source to use when converting on
82 the specific channel. Valid values are:
83 0: VREF0P/VREF0N
84 1: VREF1P/VREF1N
85 2: VREF2P/VREF2N
86 3: AVDD/AGND
87 4: VREF0P/AGND
88 5: VREF1P/AGND
89 6: VREF2P/AGND
90 If this field is left empty, AVDD/AGND is selected.
91 $ref: /schemas/types.yaml#/definitions/uint32
92 enum: [0, 1, 2, 3, 4, 5, 6]
93 default: 3
94
95 adi,input-mode:
96 description: |
97 Select signal path of input channels. Valid values are:
98 0: Buffered, low-power, unity-gain path (default)
99 1: Bypass path
100 2: PGA path
101 $ref: /schemas/types.yaml#/definitions/uint32
102 enum: [0, 1, 2]
103 default: 0
104
105 diff-channels: true
106
107 bipolar: true
108
109 settling-time-us: true
110
111 adi,buffered-vrefp:
112 description: Enable buffered mode for positive reference.
113 type: boolean
114
115 adi,buffered-vrefn:
116 description: Enable buffered mode for negative reference.
117 type: boolean
118
119 required:
120 - reg
121
122 additionalProperties: false
123
124required:
125 - compatible
126 - reg
127
128allOf:
129 - $ref: /schemas/spi/spi-peripheral-props.yaml#
130
131unevaluatedProperties: false
132
133examples:
134 - |
135 #include <dt-bindings/interrupt-controller/irq.h>
136 spi {
137 #address-cells = <1>;
138 #size-cells = <0>;
139
140 adc@0 {
141 reg = <0>;
142 compatible = "adi,max11410";
143 spi-max-frequency = <8000000>;
144
145 interrupt-parent = <&gpio>;
146 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
147 interrupt-names = "gpio1";
148
149 avdd-supply = <&adc_avdd>;
150
151 vref1p-supply = <&adc_vref1p>;
152 vref1n-supply = <&adc_vref1n>;
153
154 #address-cells = <1>;
155 #size-cells = <0>;
156
157 channel@0 {
158 reg = <0>;
159 };
160
161 channel@1 {
162 reg = <1>;
163 diff-channels = <2 3>;
164 adi,reference = <1>;
165 bipolar;
166 settling-time-us = <100000>;
167 };
168
169 channel@2 {
170 reg = <2>;
171 diff-channels = <7 9>;
172 adi,reference = <5>;
173 adi,input-mode = <2>;
174 settling-time-us = <50000>;
175 };
176 };
177 };