ASoC: simple-card: Fix detect gpio documentation.
[deliverable/linux.git] / Documentation / devicetree / bindings / sound / simple-card.txt
CommitLineData
fa558c28
KM
1Simple-Card:
2
b3ca11ff 3Simple-Card specifies audio DAI connections of SoC <-> codec.
fa558c28
KM
4
5Required properties:
6
7- compatible : "simple-audio-card"
8
9Optional properties:
10
66841345
XL
11- simple-audio-card,name : User specified audio sound card name, one string
12 property.
66841345 13- simple-audio-card,widgets : Please refer to widgets.txt.
8c0b8230 14- simple-audio-card,routing : A list of the connections between audio components.
d4c22094
XL
15 Each entry is a pair of strings, the first being the
16 connection's sink, the second being the connection's
17 source.
2942a0e2
AL
18- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
19 mclk.
872bbb3a 20- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
3fe24032 21 headphones are attached.
872bbb3a 22- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
3fe24032 23 a microphone is attached.
2942a0e2 24
b3ca11ff
JS
25Optional subnodes:
26
27- simple-audio-card,dai-link : Container for dai-link level
28 properties and the CPU and CODEC
29 sub-nodes. This container may be
30 omitted when the card has only one
31 DAI link. See the examples and the
32 section bellow.
33
34Dai-link subnode properties and subnodes:
35
36If dai-link subnode is omitted and the subnode properties are directly
37under "sound"-node the subnode property and subnode names have to be
38prefixed with "simple-audio-card,"-prefix.
d4c22094 39
b3ca11ff 40Required dai-link subnodes:
fa558c28 41
b3ca11ff
JS
42- cpu : CPU sub-node
43- codec : CODEC sub-node
015f630d 44
b3ca11ff
JS
45Optional dai-link subnode properties:
46
47- format : CPU/CODEC common audio format.
48 "i2s", "right_j", "left_j" , "dsp_a"
49 "dsp_b", "ac97", "pdm", "msb", "lsb"
50- frame-master : Indicates dai-link frame master.
51 phandle to a cpu or codec subnode.
52- bitclock-master : Indicates dai-link bit clock master.
53 phandle to a cpu or codec subnode.
54- bitclock-inversion : bool property. Add this if the
55 dai-link uses bit clock inversion.
56- frame-inversion : bool property. Add this if the
57 dai-link uses frame clock inversion.
58
59For backward compatibility the frame-master and bitclock-master
60properties can be used as booleans in codec subnode to indicate if the
61codec is the dai-link frame or bit clock master. In this case there
62should be no dai-link node, the same properties should not be present
63at sound-node level, and the bitclock-inversion and frame-inversion
64properties should also be placed in the codec node if needed.
fa558c28
KM
65
66Required CPU/CODEC subnodes properties:
67
68- sound-dai : phandle and port of CPU/CODEC
69
70Optional CPU/CODEC subnodes properties:
71
b3ca11ff
JS
72- dai-tdm-slot-num : Please refer to tdm-slot.txt.
73- dai-tdm-slot-width : Please refer to tdm-slot.txt.
fa558c28
KM
74- clocks / system-clock-frequency : specify subnode's clock if needed.
75 it can be specified via "clocks" if system has
76 clock node (= common clock), or "system-clock-frequency"
77 (if system doens't support common clock)
78
015f630d 79Example 1 - single DAI link:
fa558c28
KM
80
81sound {
82 compatible = "simple-audio-card";
66841345 83 simple-audio-card,name = "VF610-Tower-Sound-Card";
fa558c28 84 simple-audio-card,format = "left_j";
b3ca11ff
JS
85 simple-audio-card,bitclock-master = <&dailink0_master>;
86 simple-audio-card,frame-master = <&dailink0_master>;
66841345
XL
87 simple-audio-card,widgets =
88 "Microphone", "Microphone Jack",
89 "Headphone", "Headphone Jack",
90 "Speaker", "External Speaker";
bb651b3d 91 simple-audio-card,routing =
66841345 92 "MIC_IN", "Microphone Jack",
d4c22094 93 "Headphone Jack", "HP_OUT",
66841345 94 "External Speaker", "LINE_OUT";
fa558c28
KM
95
96 simple-audio-card,cpu {
97 sound-dai = <&sh_fsi2 0>;
98 };
99
b3ca11ff 100 dailink0_master: simple-audio-card,codec {
fa558c28 101 sound-dai = <&ak4648>;
fa558c28
KM
102 clocks = <&osc>;
103 };
104};
105
106&i2c0 {
107 ak4648: ak4648@12 {
108 #sound-dai-cells = <0>;
109 compatible = "asahi-kasei,ak4648";
110 reg = <0x12>;
111 };
112};
113
114sh_fsi2: sh_fsi2@ec230000 {
115 #sound-dai-cells = <1>;
116 compatible = "renesas,sh_fsi2";
117 reg = <0xec230000 0x400>;
118 interrupt-parent = <&gic>;
119 interrupts = <0 146 0x4>;
120};
015f630d
JFM
121
122Example 2 - many DAI links:
123
124sound {
125 compatible = "simple-audio-card";
126 simple-audio-card,name = "Cubox Audio";
015f630d
JFM
127
128 simple-audio-card,dai-link@0 { /* I2S - HDMI */
b3ca11ff
JS
129 format = "i2s";
130 cpu {
015f630d
JFM
131 sound-dai = <&audio1 0>;
132 };
b3ca11ff 133 codec {
015f630d
JFM
134 sound-dai = <&tda998x 0>;
135 };
136 };
137
138 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
b3ca11ff 139 cpu {
015f630d
JFM
140 sound-dai = <&audio1 1>;
141 };
b3ca11ff 142 codec {
015f630d
JFM
143 sound-dai = <&tda998x 1>;
144 };
145 };
146
147 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
b3ca11ff 148 cpu {
015f630d
JFM
149 sound-dai = <&audio1 1>;
150 };
b3ca11ff 151 codec {
015f630d
JFM
152 sound-dai = <&spdif_codec>;
153 };
154 };
155};
This page took 0.071418 seconds and 5 git commands to generate.