aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/simple-card.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/devicetree/bindings/sound/simple-card.txt')
-rw-r--r--Documentation/devicetree/bindings/sound/simple-card.txt91
1 files changed, 53 insertions, 38 deletions
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 131aa2ad7f1a..c2e9841dfce4 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -1,6 +1,6 @@
1Simple-Card: 1Simple-Card:
2 2
3Simple-Card specifies audio DAI connection of SoC <-> codec. 3Simple-Card specifies audio DAI connections of SoC <-> codec.
4 4
5Required properties: 5Required properties:
6 6
@@ -10,26 +10,54 @@ Optional properties:
10 10
11- simple-audio-card,name : User specified audio sound card name, one string 11- simple-audio-card,name : User specified audio sound card name, one string
12 property. 12 property.
13- simple-audio-card,format : CPU/CODEC common audio format.
14 "i2s", "right_j", "left_j" , "dsp_a"
15 "dsp_b", "ac97", "pdm", "msb", "lsb"
16- simple-audio-card,widgets : Please refer to widgets.txt. 13- simple-audio-card,widgets : Please refer to widgets.txt.
17- simple-audio-card,routing : A list of the connections between audio components. 14- simple-audio-card,routing : A list of the connections between audio components.
18 Each entry is a pair of strings, the first being the 15 Each entry is a pair of strings, the first being the
19 connection's sink, the second being the connection's 16 connection's sink, the second being the connection's
20 source. 17 source.
21- dai-tdm-slot-num : Please refer to tdm-slot.txt. 18- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
22- dai-tdm-slot-width : Please refer to tdm-slot.txt. 19 mclk.
20
21Optional subnodes:
22
23- simple-audio-card,dai-link : Container for dai-link level
24 properties and the CPU and CODEC
25 sub-nodes. This container may be
26 omitted when the card has only one
27 DAI link. See the examples and the
28 section bellow.
29
30Dai-link subnode properties and subnodes:
31
32If dai-link subnode is omitted and the subnode properties are directly
33under "sound"-node the subnode property and subnode names have to be
34prefixed with "simple-audio-card,"-prefix.
23 35
24Required subnodes: 36Required dai-link subnodes:
25 37
26- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes 38- cpu : CPU sub-node
27 This container may be omitted when the 39- codec : CODEC sub-node
28 card has only one DAI link.
29 See the examples.
30 40
31- simple-audio-card,cpu : CPU sub-node 41Optional dai-link subnode properties:
32- simple-audio-card,codec : CODEC sub-node 42
43- format : CPU/CODEC common audio format.
44 "i2s", "right_j", "left_j" , "dsp_a"
45 "dsp_b", "ac97", "pdm", "msb", "lsb"
46- frame-master : Indicates dai-link frame master.
47 phandle to a cpu or codec subnode.
48- bitclock-master : Indicates dai-link bit clock master.
49 phandle to a cpu or codec subnode.
50- bitclock-inversion : bool property. Add this if the
51 dai-link uses bit clock inversion.
52- frame-inversion : bool property. Add this if the
53 dai-link uses frame clock inversion.
54
55For backward compatibility the frame-master and bitclock-master
56properties can be used as booleans in codec subnode to indicate if the
57codec is the dai-link frame or bit clock master. In this case there
58should be no dai-link node, the same properties should not be present
59at sound-node level, and the bitclock-inversion and frame-inversion
60properties should also be placed in the codec node if needed.
33 61
34Required CPU/CODEC subnodes properties: 62Required CPU/CODEC subnodes properties:
35 63
@@ -37,29 +65,21 @@ Required CPU/CODEC subnodes properties:
37 65
38Optional CPU/CODEC subnodes properties: 66Optional CPU/CODEC subnodes properties:
39 67
40- format : CPU/CODEC specific audio format if needed. 68- dai-tdm-slot-num : Please refer to tdm-slot.txt.
41 see simple-audio-card,format 69- dai-tdm-slot-width : Please refer to tdm-slot.txt.
42- frame-master : bool property. add this if subnode is frame master
43- bitclock-master : bool property. add this if subnode is bitclock master
44- bitclock-inversion : bool property. add this if subnode has clock inversion
45- frame-inversion : bool property. add this if subnode has frame inversion
46- clocks / system-clock-frequency : specify subnode's clock if needed. 70- clocks / system-clock-frequency : specify subnode's clock if needed.
47 it can be specified via "clocks" if system has 71 it can be specified via "clocks" if system has
48 clock node (= common clock), or "system-clock-frequency" 72 clock node (= common clock), or "system-clock-frequency"
49 (if system doens't support common clock) 73 (if system doens't support common clock)
50 74
51Note:
52 * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
53 'frame-inversion', the simple card will use the settings of CODEC for both
54 CPU and CODEC sides as we need to keep the settings identical for both ends
55 of the link.
56
57Example 1 - single DAI link: 75Example 1 - single DAI link:
58 76
59sound { 77sound {
60 compatible = "simple-audio-card"; 78 compatible = "simple-audio-card";
61 simple-audio-card,name = "VF610-Tower-Sound-Card"; 79 simple-audio-card,name = "VF610-Tower-Sound-Card";
62 simple-audio-card,format = "left_j"; 80 simple-audio-card,format = "left_j";
81 simple-audio-card,bitclock-master = <&dailink0_master>;
82 simple-audio-card,frame-master = <&dailink0_master>;
63 simple-audio-card,widgets = 83 simple-audio-card,widgets =
64 "Microphone", "Microphone Jack", 84 "Microphone", "Microphone Jack",
65 "Headphone", "Headphone Jack", 85 "Headphone", "Headphone Jack",
@@ -69,17 +89,12 @@ sound {
69 "Headphone Jack", "HP_OUT", 89 "Headphone Jack", "HP_OUT",
70 "External Speaker", "LINE_OUT"; 90 "External Speaker", "LINE_OUT";
71 91
72 dai-tdm-slot-num = <2>;
73 dai-tdm-slot-width = <8>;
74
75 simple-audio-card,cpu { 92 simple-audio-card,cpu {
76 sound-dai = <&sh_fsi2 0>; 93 sound-dai = <&sh_fsi2 0>;
77 }; 94 };
78 95
79 simple-audio-card,codec { 96 dailink0_master: simple-audio-card,codec {
80 sound-dai = <&ak4648>; 97 sound-dai = <&ak4648>;
81 bitclock-master;
82 frame-master;
83 clocks = <&osc>; 98 clocks = <&osc>;
84 }; 99 };
85}; 100};
@@ -105,31 +120,31 @@ Example 2 - many DAI links:
105sound { 120sound {
106 compatible = "simple-audio-card"; 121 compatible = "simple-audio-card";
107 simple-audio-card,name = "Cubox Audio"; 122 simple-audio-card,name = "Cubox Audio";
108 simple-audio-card,format = "i2s";
109 123
110 simple-audio-card,dai-link@0 { /* I2S - HDMI */ 124 simple-audio-card,dai-link@0 { /* I2S - HDMI */
111 simple-audio-card,cpu { 125 format = "i2s";
126 cpu {
112 sound-dai = <&audio1 0>; 127 sound-dai = <&audio1 0>;
113 }; 128 };
114 simple-audio-card,codec { 129 codec {
115 sound-dai = <&tda998x 0>; 130 sound-dai = <&tda998x 0>;
116 }; 131 };
117 }; 132 };
118 133
119 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ 134 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
120 simple-audio-card,cpu { 135 cpu {
121 sound-dai = <&audio1 1>; 136 sound-dai = <&audio1 1>;
122 }; 137 };
123 simple-audio-card,codec { 138 codec {
124 sound-dai = <&tda998x 1>; 139 sound-dai = <&tda998x 1>;
125 }; 140 };
126 }; 141 };
127 142
128 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ 143 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
129 simple-audio-card,cpu { 144 cpu {
130 sound-dai = <&audio1 1>; 145 sound-dai = <&audio1 1>;
131 }; 146 };
132 simple-audio-card,codec { 147 codec {
133 sound-dai = <&spdif_codec>; 148 sound-dai = <&spdif_codec>;
134 }; 149 };
135 }; 150 };