xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/rockchip,multicodecs.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1ROCKCHIP multicodecs audio
2
3Required properties:
4- compatible: "rockchip,multicodecs-card"
5- rockchip,cpu: The phandle of the Rockchip I2S/PDM controller that's
6  connected to the CODEC
7- rockchip,codec: The phandle of audio codecs
8
9Optional properties:
10- rockchip,card-name: User specified audio sound card name, one string property.
11- rockchip,codec-hp-det : Detect the headphone via internal codec.
12- rockchip,wait-card-locked : This is a variable length array, user specified
13			      these sound cards need to be prepared and locked,
14			      otherwise the local slave card can be probed.
15- rockchip,audio-routing : sound card dapm routing.
16- hp-det-gpio : headphone detect gpio.
17- io-channels : headset mic/key detect adc channel.
18- io-channel-names : headset mic/key adc channel name.
19- spk-con-gpio : speaker enable/disabled gpio.
20- hp-con-gpio : headphone enable/disabled gpio.
21- keyup-threshold-microvolt: keyup-threshold-microvolt uV.
22- poll-interval : headset adc key poller internal ms.
23- play-pause-key : PLAYPAUSE key, can define the other key like vol+/vol- and so on.
24
25
26Optional dai-link subnode properties:
27- rockchip,format			: CPU/CODEC common audio format.
28					  "i2s", "right_j", "left_j" , "dsp_a"
29					  "dsp_b", "ac97", "pdm", "msb", "lsb".
30- rockchip,frame-master			: Indicates dai-link frame master.
31					  phandle to a cpu or codec subnode.
32- rockchip,bitclock-master		: Indicates dai-link bit clock master.
33					  phandle to a cpu or codec subnode.
34- rockchip,bitclock-inversion		: bool property. Add this if the
35					  dai-link uses bit clock inversion.
36- rockchip,frame-inversion		: bool property. Add this if the
37					  dai-link uses frame clock inversion.
38- rockchip,mclk-fs     			: Multiplication factor between stream
39					  rate and codec mclk, applied only for
40					  the dai-link.
41
42Example:
43
44sound {
45	compatible = "rockchip,multicodecs-card";
46	rockchip,mclk-fs = <256>;
47	rockchip,cpu = <&i2s0_8ch>;
48	rockchip,codec = <&codec>, <&vad>;
49};
50
51Example 2 :
52
53es8388_sound: es8388-sound {
54	status = "okay";
55	compatible = "rockchip,multicodecs-card";
56	rockchip,card-name = "rockchip-es8388";
57	hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
58	io-channels = <&saradc 3>;
59	io-channel-names = "adc-detect";
60	spk-con-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
61	hp-con-gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
62	rockchip,format = "i2s";
63	rockchip,mclk-fs = <256>;
64	rockchip,cpu = <&i2s0_8ch>;
65	rockchip,codec = <&es8388>;
66	rockchip,audio-routing =
67                        "Headphone", "LOUT1",
68                        "Headphone", "ROUT1",
69                        "Speaker", "LOUT2",
70                        "Speaker", "ROUT2",
71                        "Headphone", "Headphone Power",
72                        "Headphone", "Headphone Power",
73                        "Speaker", "Speaker Power",
74                        "Speaker", "Speaker Power",
75                        "LINPUT1", "Main Mic",
76                        "LINPUT2", "Main Mic",
77                        "RINPUT1", "Headset Mic",
78                        "RINPUT2", "Headset Mic";
79        pinctrl-names = "default";
80        pinctrl-0 = <&hp_det>;
81        keyup-threshold-microvolt = <1800000>;
82        poll-interval = <100>;
83        play-pause-key{
84                label = "playpause";
85                linux,code = <KEY_PLAYPAUSE>;
86                press-threshold-microvolt = <2000>;
87	};
88};
89