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