xref: /linux/Documentation/devicetree/bindings/sound/rt5682.txt (revision 8dd855334736f275e9de71096d816c8d9da46bf7)
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
47*8dd85533SBhaskar Chowdhury- realtek,dmic-clk-driving-high : Set the high driving of the DMIC clock out.
4833ee67b4SOder Chiou
490ddce71cSBard LiaoPins on the device (for linking into audio routes) for RT5682:
500ddce71cSBard Liao
510ddce71cSBard Liao  * DMIC L1
520ddce71cSBard Liao  * DMIC R1
530ddce71cSBard Liao  * IN1P
540ddce71cSBard Liao  * HPOL
550ddce71cSBard Liao  * HPOR
560ddce71cSBard Liao
570ddce71cSBard LiaoExample:
580ddce71cSBard Liao
590ddce71cSBard Liaort5682 {
600ddce71cSBard Liao	compatible = "realtek,rt5682i";
610ddce71cSBard Liao	reg = <0x1a>;
620ddce71cSBard Liao	interrupt-parent = <&gpio>;
63abe42b09SKrzysztof Kozlowski	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
640ddce71cSBard Liao	realtek,ldo1-en-gpios =
650ddce71cSBard Liao		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
660ddce71cSBard Liao	realtek,dmic1-data-pin = <1>;
670ddce71cSBard Liao	realtek,dmic1-clk-pin = <1>;
680ddce71cSBard Liao	realtek,jd-src = <1>;
69059c67f1SShuming Fan	realtek,btndet-delay = <16>;
708b59e642SDerek Fang
718b59e642SDerek Fang	#clock-cells = <1>;
728b59e642SDerek Fang	clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
738b59e642SDerek Fang
748b59e642SDerek Fang	clocks = <&osc>;
758b59e642SDerek Fang	clock-names = "mclk";
760ddce71cSBard Liao};
77