xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/rt5682.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRT5682 audio CODEC
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis device supports I2C only.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunRequired properties:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun- compatible : "realtek,rt5682" or "realtek,rt5682i"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun- reg : The I2C address of the device.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunOptional properties:
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun- interrupts : The CODEC's interrupt output.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- realtek,dmic1-data-pin
16*4882a593Smuzhiyun  0: dmic1 is not used
17*4882a593Smuzhiyun  1: using GPIO2 pin as dmic1 data pin
18*4882a593Smuzhiyun  2: using GPIO5 pin as dmic1 data pin
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun- realtek,dmic1-clk-pin
21*4882a593Smuzhiyun  0: using GPIO1 pin as dmic1 clock pin
22*4882a593Smuzhiyun  1: using GPIO3 pin as dmic1 clock pin
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun- realtek,jd-src
25*4882a593Smuzhiyun  0: No JD is used
26*4882a593Smuzhiyun  1: using JD1 as JD source
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun- realtek,btndet-delay
31*4882a593Smuzhiyun  The debounce delay for push button.
32*4882a593Smuzhiyun  The delay time is realtek,btndet-delay value multiple of 8.192 ms.
33*4882a593Smuzhiyun  If absent, the default is 16.
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun- #clock-cells : Should be set to '<1>',  wclk and bclk sources provided.
36*4882a593Smuzhiyun- clock-output-names : Name given for DAI clocks output.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun- clocks : phandle and clock specifier for codec MCLK.
39*4882a593Smuzhiyun- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun- realtek,dmic-clk-rate-hz : Set the clock rate (hz) for the requirement of
42*4882a593Smuzhiyun  the particular DMIC.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun- realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of
45*4882a593Smuzhiyun  the particular DMIC.
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunPins on the device (for linking into audio routes) for RT5682:
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  * DMIC L1
50*4882a593Smuzhiyun  * DMIC R1
51*4882a593Smuzhiyun  * IN1P
52*4882a593Smuzhiyun  * HPOL
53*4882a593Smuzhiyun  * HPOR
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunExample:
56*4882a593Smuzhiyun
57*4882a593Smuzhiyunrt5682 {
58*4882a593Smuzhiyun	compatible = "realtek,rt5682i";
59*4882a593Smuzhiyun	reg = <0x1a>;
60*4882a593Smuzhiyun	interrupt-parent = <&gpio>;
61*4882a593Smuzhiyun	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
62*4882a593Smuzhiyun	realtek,ldo1-en-gpios =
63*4882a593Smuzhiyun		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
64*4882a593Smuzhiyun	realtek,dmic1-data-pin = <1>;
65*4882a593Smuzhiyun	realtek,dmic1-clk-pin = <1>;
66*4882a593Smuzhiyun	realtek,jd-src = <1>;
67*4882a593Smuzhiyun	realtek,btndet-delay = <16>;
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun	#clock-cells = <1>;
70*4882a593Smuzhiyun	clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	clocks = <&osc>;
73*4882a593Smuzhiyun	clock-names = "mclk";
74*4882a593Smuzhiyun};
75