xref: /linux/Documentation/devicetree/bindings/sound/rt5682.txt (revision 9354fa7f6ee4ef721351c29316b59eb8f724ca49)
10ddce71cSBard LiaoRT5682 audio CODEC
20ddce71cSBard Liao
30ddce71cSBard LiaoThis device supports I2C only.
40ddce71cSBard Liao
50ddce71cSBard LiaoRequired properties:
60ddce71cSBard Liao
70ddce71cSBard Liao- compatible : "realtek,rt5682" or "realtek,rt5682i"
80ddce71cSBard Liao
90ddce71cSBard Liao- reg : The I2C address of the device.
100ddce71cSBard Liao
114d3c884cSNícolas F. R. A. Prado- AVDD-supply: phandle to the regulator supplying analog power through the
124d3c884cSNícolas F. R. A. Prado  AVDD pin
134d3c884cSNícolas F. R. A. Prado
144d3c884cSNícolas F. R. A. Prado- MICVDD-supply: phandle to the regulator supplying power for the microphone
154d3c884cSNícolas F. R. A. Prado  bias through the MICVDD pin. Either MICVDD or VBAT should be present.
164d3c884cSNícolas F. R. A. Prado
174d3c884cSNícolas F. R. A. Prado- VBAT-supply: phandle to the regulator supplying battery power through the
184d3c884cSNícolas F. R. A. Prado  VBAT pin. Either MICVDD or VBAT should be present.
194d3c884cSNícolas F. R. A. Prado
20*9354fa7fSNícolas F. R. A. Prado- DBVDD-supply: phandle to the regulator supplying I/O power through the DBVDD
21*9354fa7fSNícolas F. R. A. Prado  pin.
22*9354fa7fSNícolas F. R. A. Prado
23*9354fa7fSNícolas F. R. A. Prado- LDO1-IN-supply: phandle to the regulator supplying power to the digital core
24*9354fa7fSNícolas F. R. A. Prado  and charge pump through the LDO1_IN pin.
25*9354fa7fSNícolas F. R. A. Prado
260ddce71cSBard LiaoOptional properties:
270ddce71cSBard Liao
280ddce71cSBard Liao- interrupts : The CODEC's interrupt output.
290ddce71cSBard Liao
300ddce71cSBard Liao- realtek,dmic1-data-pin
310ddce71cSBard Liao  0: dmic1 is not used
320ddce71cSBard Liao  1: using GPIO2 pin as dmic1 data pin
330ddce71cSBard Liao  2: using GPIO5 pin as dmic1 data pin
340ddce71cSBard Liao
350ddce71cSBard Liao- realtek,dmic1-clk-pin
360ddce71cSBard Liao  0: using GPIO1 pin as dmic1 clock pin
370ddce71cSBard Liao  1: using GPIO3 pin as dmic1 clock pin
380ddce71cSBard Liao
390ddce71cSBard Liao- realtek,jd-src
400ddce71cSBard Liao  0: No JD is used
410ddce71cSBard Liao  1: using JD1 as JD source
420ddce71cSBard Liao
430ddce71cSBard Liao- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
440ddce71cSBard Liao
45059c67f1SShuming Fan- realtek,btndet-delay
46059c67f1SShuming Fan  The debounce delay for push button.
47059c67f1SShuming Fan  The delay time is realtek,btndet-delay value multiple of 8.192 ms.
48059c67f1SShuming Fan  If absent, the default is 16.
49059c67f1SShuming Fan
508b59e642SDerek Fang- #clock-cells : Should be set to '<1>',  wclk and bclk sources provided.
518b59e642SDerek Fang- clock-output-names : Name given for DAI clocks output.
528b59e642SDerek Fang
538b59e642SDerek Fang- clocks : phandle and clock specifier for codec MCLK.
548b59e642SDerek Fang- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
558b59e642SDerek Fang
56235eb700SOder Chiou- realtek,dmic-clk-rate-hz : Set the clock rate (hz) for the requirement of
57235eb700SOder Chiou  the particular DMIC.
58235eb700SOder Chiou
59235eb700SOder Chiou- realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of
60235eb700SOder Chiou  the particular DMIC.
61235eb700SOder Chiou
628dd85533SBhaskar Chowdhury- realtek,dmic-clk-driving-high : Set the high driving of the DMIC clock out.
6333ee67b4SOder Chiou
6407b16192SNícolas F. R. A. Prado- #sound-dai-cells: Should be set to '<1>'.
650adccaf1SNícolas F. R. A. Prado
660ddce71cSBard LiaoPins on the device (for linking into audio routes) for RT5682:
670ddce71cSBard Liao
680ddce71cSBard Liao  * DMIC L1
690ddce71cSBard Liao  * DMIC R1
700ddce71cSBard Liao  * IN1P
710ddce71cSBard Liao  * HPOL
720ddce71cSBard Liao  * HPOR
730ddce71cSBard Liao
740ddce71cSBard LiaoExample:
750ddce71cSBard Liao
760ddce71cSBard Liaort5682 {
770ddce71cSBard Liao	compatible = "realtek,rt5682i";
780ddce71cSBard Liao	reg = <0x1a>;
790ddce71cSBard Liao	interrupt-parent = <&gpio>;
80abe42b09SKrzysztof Kozlowski	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
810ddce71cSBard Liao	realtek,ldo1-en-gpios =
820ddce71cSBard Liao		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
830ddce71cSBard Liao	realtek,dmic1-data-pin = <1>;
840ddce71cSBard Liao	realtek,dmic1-clk-pin = <1>;
850ddce71cSBard Liao	realtek,jd-src = <1>;
86059c67f1SShuming Fan	realtek,btndet-delay = <16>;
878b59e642SDerek Fang
888b59e642SDerek Fang	#clock-cells = <1>;
898b59e642SDerek Fang	clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
908b59e642SDerek Fang
918b59e642SDerek Fang	clocks = <&osc>;
928b59e642SDerek Fang	clock-names = "mclk";
934d3c884cSNícolas F. R. A. Prado
944d3c884cSNícolas F. R. A. Prado	AVDD-supply = <&avdd_reg>;
954d3c884cSNícolas F. R. A. Prado	MICVDD-supply = <&micvdd_reg>;
96*9354fa7fSNícolas F. R. A. Prado	DBVDD-supply = <&dbvdd_reg>;
97*9354fa7fSNícolas F. R. A. Prado	LDO1-IN-supply = <&ldo1_in_reg>;
980ddce71cSBard Liao};
99