xref: /openbmc/linux/Documentation/devicetree/bindings/sound/rt5645.txt (revision b181f7029bd71238ac2754ce7052dffd69432085)
1fb5ab0e7SOder ChiouRT5650/RT5645 audio CODEC
2fb5ab0e7SOder Chiou
3fb5ab0e7SOder ChiouThis device supports I2C only.
4fb5ab0e7SOder Chiou
5fb5ab0e7SOder ChiouRequired properties:
6fb5ab0e7SOder Chiou
7fb5ab0e7SOder Chiou- compatible : One of "realtek,rt5645" or "realtek,rt5650".
8fb5ab0e7SOder Chiou
9fb5ab0e7SOder Chiou- reg : The I2C address of the device.
10fb5ab0e7SOder Chiou
11fb5ab0e7SOder Chiou- interrupts : The CODEC's interrupt output.
12fb5ab0e7SOder Chiou
1326aa1917SMatthias Brugger- avdd-supply: Power supply for AVDD, providing 1.8V.
1426aa1917SMatthias Brugger
1526aa1917SMatthias Brugger- cpvdd-supply: Power supply for CPVDD, providing 3.5V.
1626aa1917SMatthias Brugger
17fb5ab0e7SOder ChiouOptional properties:
18fb5ab0e7SOder Chiou
19fb5ab0e7SOder Chiou- hp-detect-gpios:
20fb5ab0e7SOder Chiou  a GPIO spec for the external headphone detect pin. If jd-mode = 0,
21fb5ab0e7SOder Chiou  we will get the JD status by getting the value of hp-detect-gpios.
22fb5ab0e7SOder Chiou
23*b642f447SDerek Fang- cbj-sleeve-gpios:
24*b642f447SDerek Fang  a GPIO spec to control the external combo jack circuit to tie the sleeve/ring2
25*b642f447SDerek Fang  contacts to the ground or floating. It could avoid some electric noise from the
26*b642f447SDerek Fang  active speaker jacks.
27*b642f447SDerek Fang
28fb5ab0e7SOder Chiou- realtek,in2-differential
29fb5ab0e7SOder Chiou  Boolean. Indicate MIC2 input are differential, rather than single-ended.
30fb5ab0e7SOder Chiou
31fb5ab0e7SOder Chiou- realtek,dmic1-data-pin
32fb5ab0e7SOder Chiou  0: dmic1 is not used
33fb5ab0e7SOder Chiou  1: using IN2P pin as dmic1 data pin
34fb5ab0e7SOder Chiou  2: using GPIO6 pin as dmic1 data pin
35fb5ab0e7SOder Chiou  3: using GPIO10 pin as dmic1 data pin
36fb5ab0e7SOder Chiou  4: using GPIO12 pin as dmic1 data pin
37fb5ab0e7SOder Chiou
38fb5ab0e7SOder Chiou- realtek,dmic2-data-pin
39fb5ab0e7SOder Chiou  0: dmic2 is not used
40fb5ab0e7SOder Chiou  1: using IN2N pin as dmic2 data pin
41fb5ab0e7SOder Chiou  2: using GPIO5 pin as dmic2 data pin
42fb5ab0e7SOder Chiou  3: using GPIO11 pin as dmic2 data pin
43fb5ab0e7SOder Chiou
44fb5ab0e7SOder Chiou-- realtek,jd-mode : The JD mode of rt5645/rt5650
45fb5ab0e7SOder Chiou   0 : rt5645/rt5650 JD function is not used
46fb5ab0e7SOder Chiou   1 : Mode-0 (VDD=3.3V), two port jack detection
47fb5ab0e7SOder Chiou   2 : Mode-1 (VDD=3.3V), one port jack detection
48fb5ab0e7SOder Chiou   3 : Mode-2 (VDD=1.8V), one port jack detection
49fb5ab0e7SOder Chiou
50fb5ab0e7SOder ChiouPins on the device (for linking into audio routes) for RT5645/RT5650:
51fb5ab0e7SOder Chiou
52fb5ab0e7SOder Chiou  * DMIC L1
53fb5ab0e7SOder Chiou  * DMIC R1
54fb5ab0e7SOder Chiou  * DMIC L2
55fb5ab0e7SOder Chiou  * DMIC R2
56fb5ab0e7SOder Chiou  * IN1P
57fb5ab0e7SOder Chiou  * IN1N
58fb5ab0e7SOder Chiou  * IN2P
59fb5ab0e7SOder Chiou  * IN2N
60fb5ab0e7SOder Chiou  * Haptic Generator
61fb5ab0e7SOder Chiou  * HPOL
62fb5ab0e7SOder Chiou  * HPOR
63fb5ab0e7SOder Chiou  * LOUTL
64fb5ab0e7SOder Chiou  * LOUTR
65fb5ab0e7SOder Chiou  * PDM1L
66fb5ab0e7SOder Chiou  * PDM1R
67fb5ab0e7SOder Chiou  * SPOL
68fb5ab0e7SOder Chiou  * SPOR
69fb5ab0e7SOder Chiou
70fb5ab0e7SOder ChiouExample:
71fb5ab0e7SOder Chiou
72fb5ab0e7SOder Chioucodec: rt5650@1a {
73fb5ab0e7SOder Chiou	compatible = "realtek,rt5650";
74fb5ab0e7SOder Chiou	reg = <0x1a>;
75fb5ab0e7SOder Chiou	hp-detect-gpios = <&gpio 19 0>;
76*b642f447SDerek Fang	cbj-sleeve-gpios = <&gpio 20 0>;
77fb5ab0e7SOder Chiou	interrupt-parent = <&gpio>;
78fb5ab0e7SOder Chiou	interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
79fb5ab0e7SOder Chiou	realtek,dmic-en = "true";
80fb5ab0e7SOder Chiou	realtek,en-jd-func = "true";
81fb5ab0e7SOder Chiou	realtek,jd-mode = <3>;
82fb5ab0e7SOder Chiou};
83