18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause) 28c2ecf20Sopenharmony_ci# Copyright (C) 2019 Texas Instruments Incorporated 38c2ecf20Sopenharmony_ci%YAML 1.2 48c2ecf20Sopenharmony_ci--- 58c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/sound/tlv320adcx140.yaml# 68c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cititle: Texas Instruments TLV320ADCX140 Quad Channel Analog-to-Digital Converter 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cimaintainers: 118c2ecf20Sopenharmony_ci - Dan Murphy <dmurphy@ti.com> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cidescription: | 148c2ecf20Sopenharmony_ci The TLV320ADCX140 are multichannel (4-ch analog recording or 8-ch digital 158c2ecf20Sopenharmony_ci PDM microphones recording), high-performance audio, analog-to-digital 168c2ecf20Sopenharmony_ci converter (ADC) with analog inputs supporting up to 2V RMS. The TLV320ADCX140 178c2ecf20Sopenharmony_ci family supports line and microphone Inputs, and offers a programmable 188c2ecf20Sopenharmony_ci microphone bias or supply voltage generation. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci Specifications can be found at: 218c2ecf20Sopenharmony_ci https://www.ti.com/lit/ds/symlink/tlv320adc3140.pdf 228c2ecf20Sopenharmony_ci https://www.ti.com/lit/ds/symlink/tlv320adc5140.pdf 238c2ecf20Sopenharmony_ci https://www.ti.com/lit/ds/symlink/tlv320adc6140.pdf 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciproperties: 268c2ecf20Sopenharmony_ci compatible: 278c2ecf20Sopenharmony_ci oneOf: 288c2ecf20Sopenharmony_ci - const: ti,tlv320adc3140 298c2ecf20Sopenharmony_ci - const: ti,tlv320adc5140 308c2ecf20Sopenharmony_ci - const: ti,tlv320adc6140 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci reg: 338c2ecf20Sopenharmony_ci maxItems: 1 348c2ecf20Sopenharmony_ci description: | 358c2ecf20Sopenharmony_ci I2C addresss of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci reset-gpios: 388c2ecf20Sopenharmony_ci description: | 398c2ecf20Sopenharmony_ci GPIO used for hardware reset. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci areg-supply: 428c2ecf20Sopenharmony_ci description: | 438c2ecf20Sopenharmony_ci Regulator with AVDD at 3.3V. If not defined then the internal regulator 448c2ecf20Sopenharmony_ci is enabled. 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci ti,mic-bias-source: 478c2ecf20Sopenharmony_ci description: | 488c2ecf20Sopenharmony_ci Indicates the source for MIC Bias. 498c2ecf20Sopenharmony_ci 0 - Mic bias is set to VREF 508c2ecf20Sopenharmony_ci 1 - Mic bias is set to VREF × 1.096 518c2ecf20Sopenharmony_ci 6 - Mic bias is set to AVDD 528c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 538c2ecf20Sopenharmony_ci enum: [0, 1, 6] 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci ti,vref-source: 568c2ecf20Sopenharmony_ci description: | 578c2ecf20Sopenharmony_ci Indicates the source for MIC Bias. 588c2ecf20Sopenharmony_ci 0 - Set VREF to 2.75V 598c2ecf20Sopenharmony_ci 1 - Set VREF to 2.5V 608c2ecf20Sopenharmony_ci 2 - Set VREF to 1.375V 618c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 628c2ecf20Sopenharmony_ci enum: [0, 1, 2] 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci ti,pdm-edge-select: 658c2ecf20Sopenharmony_ci description: | 668c2ecf20Sopenharmony_ci Defines the PDMCLK sampling edge configuration for the PDM inputs. This 678c2ecf20Sopenharmony_ci array is defined as <PDMIN1 PDMIN2 PDMIN3 PDMIN4>. 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci 0 - (default) Odd channel is latched on the negative edge and even 708c2ecf20Sopenharmony_ci channel is latched on the the positive edge. 718c2ecf20Sopenharmony_ci 1 - Odd channel is latched on the positive edge and even channel is 728c2ecf20Sopenharmony_ci latched on the the negative edge. 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci PDMIN1 - PDMCLK latching edge used for channel 1 and 2 data 758c2ecf20Sopenharmony_ci PDMIN2 - PDMCLK latching edge used for channel 3 and 4 data 768c2ecf20Sopenharmony_ci PDMIN3 - PDMCLK latching edge used for channel 5 and 6 data 778c2ecf20Sopenharmony_ci PDMIN4 - PDMCLK latching edge used for channel 7 and 8 data 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32-array 808c2ecf20Sopenharmony_ci minItems: 1 818c2ecf20Sopenharmony_ci maxItems: 4 828c2ecf20Sopenharmony_ci items: 838c2ecf20Sopenharmony_ci maximum: 1 848c2ecf20Sopenharmony_ci default: [0, 0, 0, 0] 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci ti,gpi-config: 878c2ecf20Sopenharmony_ci description: | 888c2ecf20Sopenharmony_ci Defines the configuration for the general purpose input pins (GPI). 898c2ecf20Sopenharmony_ci The array is defined as <GPI1 GPI2 GPI3 GPI4>. 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci 0 - (default) disabled 928c2ecf20Sopenharmony_ci 1 - GPIX is configured as a general-purpose input (GPI) 938c2ecf20Sopenharmony_ci 2 - GPIX is configured as a master clock input (MCLK) 948c2ecf20Sopenharmony_ci 3 - GPIX is configured as an ASI input for daisy-chain (SDIN) 958c2ecf20Sopenharmony_ci 4 - GPIX is configured as a PDM data input for channel 1 and channel 968c2ecf20Sopenharmony_ci (PDMDIN1) 978c2ecf20Sopenharmony_ci 5 - GPIX is configured as a PDM data input for channel 3 and channel 988c2ecf20Sopenharmony_ci (PDMDIN2) 998c2ecf20Sopenharmony_ci 6 - GPIX is configured as a PDM data input for channel 5 and channel 1008c2ecf20Sopenharmony_ci (PDMDIN3) 1018c2ecf20Sopenharmony_ci 7 - GPIX is configured as a PDM data input for channel 7 and channel 1028c2ecf20Sopenharmony_ci (PDMDIN4) 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32-array 1058c2ecf20Sopenharmony_ci minItems: 1 1068c2ecf20Sopenharmony_ci maxItems: 4 1078c2ecf20Sopenharmony_ci items: 1088c2ecf20Sopenharmony_ci maximum: 7 1098c2ecf20Sopenharmony_ci default: [0, 0, 0, 0] 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci ti,asi-tx-drive: 1128c2ecf20Sopenharmony_ci type: boolean 1138c2ecf20Sopenharmony_ci description: | 1148c2ecf20Sopenharmony_ci When set the device will set the Tx ASI output to a Hi-Z state for unused 1158c2ecf20Sopenharmony_ci data cycles. Default is to drive the output low on unused ASI cycles. 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_cipatternProperties: 1188c2ecf20Sopenharmony_ci '^ti,gpo-config-[1-4]$': 1198c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32-array 1208c2ecf20Sopenharmony_ci description: | 1218c2ecf20Sopenharmony_ci Defines the configuration and output driver for the general purpose 1228c2ecf20Sopenharmony_ci output pins (GPO). These values are pairs, the first value is for the 1238c2ecf20Sopenharmony_ci configuration type and the second value is for the output drive type. 1248c2ecf20Sopenharmony_ci The array is defined as <GPO_CFG GPO_DRV> 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci GPO output configuration can be one of the following: 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci 0 - (default) disabled 1298c2ecf20Sopenharmony_ci 1 - GPOX is configured as a general-purpose output (GPO) 1308c2ecf20Sopenharmony_ci 2 - GPOX is configured as a device interrupt output (IRQ) 1318c2ecf20Sopenharmony_ci 3 - GPOX is configured as a secondary ASI output (SDOUT2) 1328c2ecf20Sopenharmony_ci 4 - GPOX is configured as a PDM clock output (PDMCLK) 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci GPO output drive configuration for the GPO pins can be one of the following: 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci 0d - (default) Hi-Z output 1378c2ecf20Sopenharmony_ci 1d - Drive active low and active high 1388c2ecf20Sopenharmony_ci 2d - Drive active low and weak high 1398c2ecf20Sopenharmony_ci 3d - Drive active low and Hi-Z 1408c2ecf20Sopenharmony_ci 4d - Drive weak low and active high 1418c2ecf20Sopenharmony_ci 5d - Drive Hi-Z and active high 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci ti,gpio-config: 1448c2ecf20Sopenharmony_ci description: | 1458c2ecf20Sopenharmony_ci Defines the configuration and output drive for the General Purpose 1468c2ecf20Sopenharmony_ci Input and Output pin (GPIO1). Its value is a pair, the first value is for 1478c2ecf20Sopenharmony_ci the configuration type and the second value is for the output drive 1488c2ecf20Sopenharmony_ci type. The array is defined as <GPIO1_CFG GPIO1_DRV> 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci configuration for the GPIO pin can be one of the following: 1518c2ecf20Sopenharmony_ci 0 - disabled 1528c2ecf20Sopenharmony_ci 1 - GPIO1 is configured as a general-purpose output (GPO) 1538c2ecf20Sopenharmony_ci 2 - (default) GPIO1 is configured as a device interrupt output (IRQ) 1548c2ecf20Sopenharmony_ci 3 - GPIO1 is configured as a secondary ASI output (SDOUT2) 1558c2ecf20Sopenharmony_ci 4 - GPIO1 is configured as a PDM clock output (PDMCLK) 1568c2ecf20Sopenharmony_ci 8 - GPIO1 is configured as an input to control when MICBIAS turns on or 1578c2ecf20Sopenharmony_ci off (MICBIAS_EN) 1588c2ecf20Sopenharmony_ci 9 - GPIO1 is configured as a general-purpose input (GPI) 1598c2ecf20Sopenharmony_ci 10 - GPIO1 is configured as a master clock input (MCLK) 1608c2ecf20Sopenharmony_ci 11 - GPIO1 is configured as an ASI input for daisy-chain (SDIN) 1618c2ecf20Sopenharmony_ci 12 - GPIO1 is configured as a PDM data input for channel 1 and channel 2 1628c2ecf20Sopenharmony_ci (PDMDIN1) 1638c2ecf20Sopenharmony_ci 13 - GPIO1 is configured as a PDM data input for channel 3 and channel 4 1648c2ecf20Sopenharmony_ci (PDMDIN2) 1658c2ecf20Sopenharmony_ci 14 - GPIO1 is configured as a PDM data input for channel 5 and channel 6 1668c2ecf20Sopenharmony_ci (PDMDIN3) 1678c2ecf20Sopenharmony_ci 15 - GPIO1 is configured as a PDM data input for channel 7 and channel 8 1688c2ecf20Sopenharmony_ci (PDMDIN4) 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci output drive type for the GPIO pin can be one of the following: 1718c2ecf20Sopenharmony_ci 0 - Hi-Z output 1728c2ecf20Sopenharmony_ci 1 - Drive active low and active high 1738c2ecf20Sopenharmony_ci 2 - (default) Drive active low and weak high 1748c2ecf20Sopenharmony_ci 3 - Drive active low and Hi-Z 1758c2ecf20Sopenharmony_ci 4 - Drive weak low and active high 1768c2ecf20Sopenharmony_ci 5 - Drive Hi-Z and active high 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci allOf: 1798c2ecf20Sopenharmony_ci - $ref: /schemas/types.yaml#/definitions/uint32-array 1808c2ecf20Sopenharmony_ci - minItems: 2 1818c2ecf20Sopenharmony_ci maxItems: 2 1828c2ecf20Sopenharmony_ci items: 1838c2ecf20Sopenharmony_ci maximum: 15 1848c2ecf20Sopenharmony_ci default: [2, 2] 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_cirequired: 1878c2ecf20Sopenharmony_ci - compatible 1888c2ecf20Sopenharmony_ci - reg 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ciadditionalProperties: false 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ciexamples: 1938c2ecf20Sopenharmony_ci - | 1948c2ecf20Sopenharmony_ci #include <dt-bindings/gpio/gpio.h> 1958c2ecf20Sopenharmony_ci i2c0 { 1968c2ecf20Sopenharmony_ci #address-cells = <1>; 1978c2ecf20Sopenharmony_ci #size-cells = <0>; 1988c2ecf20Sopenharmony_ci codec: codec@4c { 1998c2ecf20Sopenharmony_ci compatible = "ti,tlv320adc5140"; 2008c2ecf20Sopenharmony_ci reg = <0x4c>; 2018c2ecf20Sopenharmony_ci ti,mic-bias-source = <6>; 2028c2ecf20Sopenharmony_ci ti,pdm-edge-select = <0 1 0 1>; 2038c2ecf20Sopenharmony_ci ti,gpi-config = <4 5 6 7>; 2048c2ecf20Sopenharmony_ci ti,gpio-config = <10 2>; 2058c2ecf20Sopenharmony_ci ti,gpo-config-1 = <0 0>; 2068c2ecf20Sopenharmony_ci ti,gpo-config-2 = <0 0>; 2078c2ecf20Sopenharmony_ci reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 2088c2ecf20Sopenharmony_ci }; 2098c2ecf20Sopenharmony_ci }; 210