xref: /freebsd/sys/contrib/device-tree/Bindings/sound/tlv320aic3x.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1Texas Instruments - tlv320aic3x Codec module
2
3The tlv320aic3x serial control bus communicates through both I2C and SPI bus protocols
4
5Required properties:
6
7- compatible - "string" - One of:
8    "ti,tlv320aic3x" - Generic TLV320AIC3x device
9    "ti,tlv320aic33" - TLV320AIC33
10    "ti,tlv320aic3007" - TLV320AIC3007
11    "ti,tlv320aic3106" - TLV320AIC3106
12    "ti,tlv320aic3104" - TLV320AIC3104
13
14
15- reg - <int> -  I2C slave address
16
17
18Optional properties:
19
20- reset-gpios - GPIO specification for the active low RESET input.
21- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
22				    - Not supported on tlv320aic3104
23- ai3x-micbias-vg - MicBias Voltage required.
24	1 - MICBIAS output is powered to 2.0V,
25	2 - MICBIAS output is powered to 2.5V,
26	3 - MICBIAS output is connected to AVDD,
27	If this node is not mentioned or if the value is incorrect, then MicBias
28	is powered down.
29- ai3x-ocmv - Output Common-Mode Voltage selection:
30	0 - 1.35V,
31	1 - 1.5V,
32	2 - 1.65V,
33	3 - 1.8V
34- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
35  device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
36
37Deprecated properties:
38
39- gpio-reset - gpio pin number used for codec reset
40
41CODEC output pins:
42  * LLOUT
43  * RLOUT
44  * MONO_LOUT
45  * HPLOUT
46  * HPROUT
47  * HPLCOM
48  * HPRCOM
49
50CODEC input pins for TLV320AIC3104:
51  * MIC2L
52  * MIC2R
53  * LINE1L
54  * LINE1R
55
56CODEC input pins for other compatible codecs:
57  * MIC3L
58  * MIC3R
59  * LINE1L
60  * LINE2L
61  * LINE1R
62  * LINE2R
63
64The pins can be used in referring sound node's audio-routing property.
65
66I2C example:
67
68#include <dt-bindings/gpio/gpio.h>
69
70tlv320aic3x: tlv320aic3x@1b {
71	compatible = "ti,tlv320aic3x";
72	reg = <0x1b>;
73
74	reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
75
76	AVDD-supply = <&regulator>;
77	IOVDD-supply = <&regulator>;
78	DRVDD-supply = <&regulator>;
79	DVDD-supply = <&regulator>;
80};
81
82SPI example:
83
84spi0: spi@f0000000 {
85	tlv320aic3x: codec@0 {
86		compatible = "ti,tlv320aic3x";
87		reg = <0>; /* CS number */
88		#sound-dai-cells = <0>;
89		spi-max-frequency = <1000000>;
90
91		AVDD-supply = <&regulator>;
92		IOVDD-supply = <&regulator>;
93		DRVDD-supply = <&regulator>;
94		DVDD-supply = <&regulator>;
95		ai3x-ocmv = <0>;
96	};
97};
98