xref: /linux/Documentation/devicetree/bindings/sound/rt5682.txt (revision abe42b09118914f01246f880dd9029150fdc727c)
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
110ddce71cSBard LiaoOptional properties:
120ddce71cSBard Liao
130ddce71cSBard Liao- interrupts : The CODEC's interrupt output.
140ddce71cSBard Liao
150ddce71cSBard Liao- realtek,dmic1-data-pin
160ddce71cSBard Liao  0: dmic1 is not used
170ddce71cSBard Liao  1: using GPIO2 pin as dmic1 data pin
180ddce71cSBard Liao  2: using GPIO5 pin as dmic1 data pin
190ddce71cSBard Liao
200ddce71cSBard Liao- realtek,dmic1-clk-pin
210ddce71cSBard Liao  0: using GPIO1 pin as dmic1 clock pin
220ddce71cSBard Liao  1: using GPIO3 pin as dmic1 clock pin
230ddce71cSBard Liao
240ddce71cSBard Liao- realtek,jd-src
250ddce71cSBard Liao  0: No JD is used
260ddce71cSBard Liao  1: using JD1 as JD source
270ddce71cSBard Liao
280ddce71cSBard Liao- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
290ddce71cSBard Liao
30059c67f1SShuming Fan- realtek,btndet-delay
31059c67f1SShuming Fan  The debounce delay for push button.
32059c67f1SShuming Fan  The delay time is realtek,btndet-delay value multiple of 8.192 ms.
33059c67f1SShuming Fan  If absent, the default is 16.
34059c67f1SShuming Fan
358b59e642SDerek Fang- #clock-cells : Should be set to '<1>',  wclk and bclk sources provided.
368b59e642SDerek Fang- clock-output-names : Name given for DAI clocks output.
378b59e642SDerek Fang
388b59e642SDerek Fang- clocks : phandle and clock specifier for codec MCLK.
398b59e642SDerek Fang- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
408b59e642SDerek Fang
41235eb700SOder Chiou- realtek,dmic-clk-rate-hz : Set the clock rate (hz) for the requirement of
42235eb700SOder Chiou  the particular DMIC.
43235eb700SOder Chiou
44235eb700SOder Chiou- realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of
45235eb700SOder Chiou  the particular DMIC.
46235eb700SOder Chiou
470ddce71cSBard LiaoPins on the device (for linking into audio routes) for RT5682:
480ddce71cSBard Liao
490ddce71cSBard Liao  * DMIC L1
500ddce71cSBard Liao  * DMIC R1
510ddce71cSBard Liao  * IN1P
520ddce71cSBard Liao  * HPOL
530ddce71cSBard Liao  * HPOR
540ddce71cSBard Liao
550ddce71cSBard LiaoExample:
560ddce71cSBard Liao
570ddce71cSBard Liaort5682 {
580ddce71cSBard Liao	compatible = "realtek,rt5682i";
590ddce71cSBard Liao	reg = <0x1a>;
600ddce71cSBard Liao	interrupt-parent = <&gpio>;
61*abe42b09SKrzysztof Kozlowski	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
620ddce71cSBard Liao	realtek,ldo1-en-gpios =
630ddce71cSBard Liao		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
640ddce71cSBard Liao	realtek,dmic1-data-pin = <1>;
650ddce71cSBard Liao	realtek,dmic1-clk-pin = <1>;
660ddce71cSBard Liao	realtek,jd-src = <1>;
67059c67f1SShuming Fan	realtek,btndet-delay = <16>;
688b59e642SDerek Fang
698b59e642SDerek Fang	#clock-cells = <1>;
708b59e642SDerek Fang	clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
718b59e642SDerek Fang
728b59e642SDerek Fang	clocks = <&osc>;
738b59e642SDerek Fang	clock-names = "mclk";
740ddce71cSBard Liao};
75