Merge tag 'asoc-v3.15' into asoc-linus
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / sound / simple-card.txt
1 Simple-Card:
2
3 Simple-Card specifies audio DAI connection of SoC <-> codec.
4
5 Required properties:
6
7 - compatible                            : "simple-audio-card"
8
9 Optional properties:
10
11 - simple-audio-card,name                : User specified audio sound card name, one string
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.
17 - simple-audio-card,routing             : A list of the connections between audio components.
18                                           Each entry is a pair of strings, the first being the
19                                           connection's sink, the second being the connection's
20                                           source.
21 - dai-tdm-slot-num                      : Please refer to tdm-slot.txt.
22 - dai-tdm-slot-width                    : Please refer to tdm-slot.txt.
23
24 Required subnodes:
25
26 - simple-audio-card,cpu                 : CPU   sub-node
27 - simple-audio-card,codec               : CODEC sub-node
28
29 Required CPU/CODEC subnodes properties:
30
31 - sound-dai                             : phandle and port of CPU/CODEC
32
33 Optional CPU/CODEC subnodes properties:
34
35 - format                                : CPU/CODEC specific audio format if needed.
36                                           see simple-audio-card,format
37 - frame-master                          : bool property. add this if subnode is frame master
38 - bitclock-master                       : bool property. add this if subnode is bitclock master
39 - bitclock-inversion                    : bool property. add this if subnode has clock inversion
40 - frame-inversion                       : bool property. add this if subnode has frame inversion
41 - clocks / system-clock-frequency       : specify subnode's clock if needed.
42                                           it can be specified via "clocks" if system has
43                                           clock node (= common clock), or "system-clock-frequency"
44                                           (if system doens't support common clock)
45
46 Example:
47
48 sound {
49         compatible = "simple-audio-card";
50         simple-audio-card,name = "VF610-Tower-Sound-Card";
51         simple-audio-card,format = "left_j";
52         simple-audio-card,widgets =
53                 "Microphone", "Microphone Jack",
54                 "Headphone", "Headphone Jack",
55                 "Speaker", "External Speaker";
56         simple-audio-card,routing =
57                 "MIC_IN", "Microphone Jack",
58                 "Headphone Jack", "HP_OUT",
59                 "External Speaker", "LINE_OUT";
60
61         dai-tdm-slot-num = <2>;
62         dai-tdm-slot-width = <8>;
63
64         simple-audio-card,cpu {
65                 sound-dai = <&sh_fsi2 0>;
66         };
67
68         simple-audio-card,codec {
69                 sound-dai = <&ak4648>;
70                 bitclock-master;
71                 frame-master;
72                 clocks = <&osc>;
73         };
74 };
75
76 &i2c0 {
77         ak4648: ak4648@12 {
78                 #sound-dai-cells = <0>;
79                 compatible = "asahi-kasei,ak4648";
80                 reg = <0x12>;
81         };
82 };
83
84 sh_fsi2: sh_fsi2@ec230000 {
85         #sound-dai-cells = <1>;
86         compatible = "renesas,sh_fsi2";
87         reg = <0xec230000 0x400>;
88         interrupt-parent = <&gic>;
89         interrupts = <0 146 0x4>;
90 };