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