xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/rt5663.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRT5663 audio CODEC
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis device supports I2C only.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunRequired properties:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun- compatible : "realtek,rt5663".
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun- reg : The I2C address of the device.
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun- interrupts : The CODEC's interrupt output.
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun- avdd-supply: Power supply for AVDD, providing 1.8V.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- cpvdd-supply: Power supply for CPVDD, providing 3.5V.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunOptional properties:
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun- "realtek,dc_offset_l_manual"
20*4882a593Smuzhiyun- "realtek,dc_offset_r_manual"
21*4882a593Smuzhiyun- "realtek,dc_offset_l_manual_mic"
22*4882a593Smuzhiyun- "realtek,dc_offset_r_manual_mic"
23*4882a593Smuzhiyun  Based on the different PCB layout, add the manual offset value to
24*4882a593Smuzhiyun  compensate the DC offset for each L and R channel, and they are different
25*4882a593Smuzhiyun  between headphone and headset.
26*4882a593Smuzhiyun- "realtek,impedance_sensing_num"
27*4882a593Smuzhiyun  The matrix row number of the impedance sensing table.
28*4882a593Smuzhiyun  If the value is 0, it means the impedance sensing is not supported.
29*4882a593Smuzhiyun- "realtek,impedance_sensing_table"
30*4882a593Smuzhiyun  The matrix rows of the impedance sensing table are consisted by impedance
31*4882a593Smuzhiyun  minimum, impedance maximun, volume, DC offset w/o and w/ mic of each L and
32*4882a593Smuzhiyun  R channel accordingly. Example is shown as following.
33*4882a593Smuzhiyun  <   0    300  7  0xffd160  0xffd1c0  0xff8a10  0xff8ab0
34*4882a593Smuzhiyun    301  65535  4  0xffe470  0xffe470  0xffb8e0  0xffb8e0>
35*4882a593Smuzhiyun  The first and second column are defined for the impedance range. If the
36*4882a593Smuzhiyun  detected impedance value is in the range, then the volume value of the
37*4882a593Smuzhiyun  third column will be set to codec. In our codec design, each volume value
38*4882a593Smuzhiyun  should compensate different DC offset to avoid the pop sound, and it is
39*4882a593Smuzhiyun  also different between headphone and headset. In the example, the
40*4882a593Smuzhiyun  "realtek,impedance_sensing_num" is 2. It means that there are 2 ranges of
41*4882a593Smuzhiyun  impedance in the impedance sensing function.
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunPins on the device (for linking into audio routes) for RT5663:
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun  * IN1P
46*4882a593Smuzhiyun  * IN1N
47*4882a593Smuzhiyun  * IN2P
48*4882a593Smuzhiyun  * IN2N
49*4882a593Smuzhiyun  * HPOL
50*4882a593Smuzhiyun  * HPOR
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunExample:
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunrt5663: codec@12 {
55*4882a593Smuzhiyun	compatible = "realtek,rt5663";
56*4882a593Smuzhiyun	reg = <0x12>;
57*4882a593Smuzhiyun	interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
58*4882a593Smuzhiyun	avdd-supply = <&pp1800_a_alc5662>;
59*4882a593Smuzhiyun	cpvdd-supply = <&pp3500_a_alc5662>;
60*4882a593Smuzhiyun};
61