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