e9e20ec67d62b349d021099a755bbd5eca2a6b2a
[platform/adaptation/renesas_rcar/renesas_kernel.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,format              : CPU/CODEC common audio format.
12                                           "i2s", "right_j", "left_j" , "dsp_a"
13                                           "dsp_b", "ac97", "pdm", "msb", "lsb"
14 - simple-audio-card,routing             : A list of the connections between audio components.
15                                           Each entry is a pair of strings, the first being the
16                                           connection's sink, the second being the connection's
17                                           source.
18
19 Required subnodes:
20
21 - simple-audio-card,cpu                 : CPU   sub-node
22 - simple-audio-card,codec               : CODEC sub-node
23
24 Required CPU/CODEC subnodes properties:
25
26 - sound-dai                             : phandle and port of CPU/CODEC
27
28 Optional CPU/CODEC subnodes properties:
29
30 - format                                : CPU/CODEC specific audio format if needed.
31                                           see simple-audio-card,format
32 - frame-master                          : bool property. add this if subnode is frame master
33 - bitclock-master                       : bool property. add this if subnode is bitclock master
34 - bitclock-inversion                    : bool property. add this if subnode has clock inversion
35 - frame-inversion                       : bool property. add this if subnode has frame inversion
36 - clocks / system-clock-frequency       : specify subnode's clock if needed.
37                                           it can be specified via "clocks" if system has
38                                           clock node (= common clock), or "system-clock-frequency"
39                                           (if system doens't support common clock)
40
41 Example:
42
43 sound {
44         compatible = "simple-audio-card";
45         simple-audio-card,format = "left_j";
46         simple-audio-routing =
47                 "MIC_IN", "Mic Jack",
48                 "Headphone Jack", "HP_OUT",
49                 "Ext Spk", "LINE_OUT";
50
51         simple-audio-card,cpu {
52                 sound-dai = <&sh_fsi2 0>;
53         };
54
55         simple-audio-card,codec {
56                 sound-dai = <&ak4648>;
57                 bitclock-master;
58                 frame-master;
59                 clocks = <&osc>;
60         };
61 };
62
63 &i2c0 {
64         ak4648: ak4648@12 {
65                 #sound-dai-cells = <0>;
66                 compatible = "asahi-kasei,ak4648";
67                 reg = <0x12>;
68         };
69 };
70
71 sh_fsi2: sh_fsi2@ec230000 {
72         #sound-dai-cells = <1>;
73         compatible = "renesas,sh_fsi2";
74         reg = <0xec230000 0x400>;
75         interrupt-parent = <&gic>;
76         interrupts = <0 146 0x4>;
77 };