Debian Codegraph @

Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
2 # Copyright (C) 2019 Texas Instruments Incorporated
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/sound/ti,tlv320adcx140.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Texas Instruments TLV320ADCX140 Quad Channel Analog-to-Digital Converter
9
10 maintainers:
11 - Andrew Davis <[email protected]>
12
13 description: |
14 The TLV320ADCX140 are multichannel (4-ch analog recording or 8-ch digital
15 PDM microphones recording), high-performance audio, analog-to-digital
16 converter (ADC) with analog inputs supporting up to 2V RMS. The TLV320ADCX140
17 family supports line and microphone Inputs, and offers a programmable
18 microphone bias or supply voltage generation.
19
20 Specifications can be found at:
21 https://www.ti.com/lit/ds/symlink/tlv320adc3140.pdf
22 https://www.ti.com/lit/ds/symlink/tlv320adc5140.pdf
23 https://www.ti.com/lit/ds/symlink/tlv320adc6140.pdf
24
25 properties:
26 compatible:
27 enum:
28 - ti,tlv320adc3140
29 - ti,tlv320adc5140
30 - ti,tlv320adc6140
31
32 reg:
33 maxItems: 1
34 description: |
35 I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
36
37 reset-gpios:
38 maxItems: 1
39 description: |
40 GPIO used for hardware reset.
41
42 areg-supply:
43 description: |
44 External supply of 1.8V. If not defined then the internal regulator is
45 enabled instead.
46
47 avdd-supply: true
48 iovdd-supply: true
49
50 ti,mic-bias-source:
51 description: |
52 Indicates the source for MIC Bias.
53 0 - Mic bias is set to VREF
54 1 - Mic bias is set to VREF × 1.096
55 6 - Mic bias is set to AVDD
56 $ref: /schemas/types.yaml#/definitions/uint32
57 enum: [0, 1, 6]
58
59 ti,vref-source:
60 description: |
61 Indicates the source for MIC Bias.
62 0 - Set VREF to 2.75V
63 1 - Set VREF to 2.5V
64 2 - Set VREF to 1.375V
65 $ref: /schemas/types.yaml#/definitions/uint32
66 enum: [0, 1, 2]
67
68 ti,pdm-edge-select:
69 description: |
70 Defines the PDMCLK sampling edge configuration for the PDM inputs. This
71 array is defined as <PDMIN1 PDMIN2 PDMIN3 PDMIN4>.
72
73 0 - (default) Odd channel is latched on the negative edge and even
74 channel is latched on the positive edge.
75 1 - Odd channel is latched on the positive edge and even channel is
76 latched on the negative edge.
77
78 PDMIN1 - PDMCLK latching edge used for channel 1 and 2 data
79 PDMIN2 - PDMCLK latching edge used for channel 3 and 4 data
80 PDMIN3 - PDMCLK latching edge used for channel 5 and 6 data
81 PDMIN4 - PDMCLK latching edge used for channel 7 and 8 data
82
83 $ref: /schemas/types.yaml#/definitions/uint32-array
84 minItems: 1
85 maxItems: 4
86 items:
87 maximum: 1
88 default: [0, 0, 0, 0]
89
90 ti,gpi-config:
91 description: |
92 Defines the configuration for the general purpose input pins (GPI).
93 The array is defined as <GPI1 GPI2 GPI3 GPI4>.
94
95 0 - (default) disabled
96 1 - GPIX is configured as a general-purpose input (GPI)
97 2 - GPIX is configured as a master clock input (MCLK)
98 3 - GPIX is configured as an ASI input for daisy-chain (SDIN)
99 4 - GPIX is configured as a PDM data input for channel 1 and channel
100 (PDMDIN1)
101 5 - GPIX is configured as a PDM data input for channel 3 and channel
102 (PDMDIN2)
103 6 - GPIX is configured as a PDM data input for channel 5 and channel
104 (PDMDIN3)
105 7 - GPIX is configured as a PDM data input for channel 7 and channel
106 (PDMDIN4)
107
108 $ref: /schemas/types.yaml#/definitions/uint32-array
109 minItems: 1
110 maxItems: 4
111 items:
112 maximum: 7
113 default: [0, 0, 0, 0]
114
115 ti,gpio-config:
116 description: |
117 Defines the configuration and output drive for the General Purpose
118 Input and Output pin (GPIO1). Its value is a pair, the first value is for
119 the configuration type and the second value is for the output drive
120 type. The array is defined as <GPIO1_CFG GPIO1_DRV>
121
122 configuration for the GPIO pin can be one of the following:
123 0 - disabled
124 1 - GPIO1 is configured as a general-purpose output (GPO)
125 2 - (default) GPIO1 is configured as a device interrupt output (IRQ)
126 3 - GPIO1 is configured as a secondary ASI output (SDOUT2)
127 4 - GPIO1 is configured as a PDM clock output (PDMCLK)
128 8 - GPIO1 is configured as an input to control when MICBIAS turns on or
129 off (MICBIAS_EN)
130 9 - GPIO1 is configured as a general-purpose input (GPI)
131 10 - GPIO1 is configured as a master clock input (MCLK)
132 11 - GPIO1 is configured as an ASI input for daisy-chain (SDIN)
133 12 - GPIO1 is configured as a PDM data input for channel 1 and channel 2
134 (PDMDIN1)
135 13 - GPIO1 is configured as a PDM data input for channel 3 and channel 4
136 (PDMDIN2)
137 14 - GPIO1 is configured as a PDM data input for channel 5 and channel 6
138 (PDMDIN3)
139 15 - GPIO1 is configured as a PDM data input for channel 7 and channel 8
140 (PDMDIN4)
141
142 output drive type for the GPIO pin can be one of the following:
143 0 - Hi-Z output
144 1 - Drive active low and active high
145 2 - (default) Drive active low and weak high
146 3 - Drive active low and Hi-Z
147 4 - Drive weak low and active high
148 5 - Drive Hi-Z and active high
149
150 $ref: /schemas/types.yaml#/definitions/uint32-array
151 minItems: 2
152 maxItems: 2
153 items:
154 maximum: 15
155 default: [2, 2]
156
157 ti,asi-tx-drive:
158 type: boolean
159 description: |
160 When set the device will set the Tx ASI output to a Hi-Z state for unused
161 data cycles. Default is to drive the output low on unused ASI cycles.
162
163 patternProperties:
164 '^ti,gpo-config-[1-4]$':
165 $ref: /schemas/types.yaml#/definitions/uint32-array
166 description: |
167 Defines the configuration and output driver for the general purpose
168 output pins (GPO). These values are pairs, the first value is for the
169 configuration type and the second value is for the output drive type.
170 The array is defined as <GPO_CFG GPO_DRV>
171
172 GPO output configuration can be one of the following:
173
174 0 - (default) disabled
175 1 - GPOX is configured as a general-purpose output (GPO)
176 2 - GPOX is configured as a device interrupt output (IRQ)
177 3 - GPOX is configured as a secondary ASI output (SDOUT2)
178 4 - GPOX is configured as a PDM clock output (PDMCLK)
179
180 GPO output drive configuration for the GPO pins can be one of the following:
181
182 0d - (default) Hi-Z output
183 1d - Drive active low and active high
184 2d - Drive active low and weak high
185 3d - Drive active low and Hi-Z
186 4d - Drive weak low and active high
187 5d - Drive Hi-Z and active high
188
189 required:
190 - compatible
191 - reg
192
193 additionalProperties: false
194
195 examples:
196 - |
197 #include <dt-bindings/gpio/gpio.h>
198 i2c {
199 #address-cells = <1>;
200 #size-cells = <0>;
201 codec: codec@4c {
202 compatible = "ti,tlv320adc5140";
203 reg = <0x4c>;
204 ti,mic-bias-source = <6>;
205 ti,pdm-edge-select = <0 1 0 1>;
206 ti,gpi-config = <4 5 6 7>;
207 ti,gpio-config = <10 2>;
208 ti,gpo-config-1 = <0 0>;
209 ti,gpo-config-2 = <0 0>;
210 reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
211 };
212 };