blob: e9e20ec67d62b349d021099a755bbd5eca2a6b2a [file] [log] [blame]
Kuninori Morimotofa558c22013-11-20 15:25:02 +09001Simple-Card:
2
3Simple-Card specifies audio DAI connection of SoC <-> codec.
4
5Required properties:
6
7- compatible : "simple-audio-card"
8
9Optional properties:
10
11- simple-audio-card,format : CPU/CODEC common audio format.
Xiubo Lid4c22092013-12-23 12:57:01 +080012 "i2s", "right_j", "left_j" , "dsp_a"
13 "dsp_b", "ac97", "pdm", "msb", "lsb"
Xiubo Li8c0b8232014-01-07 09:15:16 +080014- simple-audio-card,routing : A list of the connections between audio components.
Xiubo Lid4c22092013-12-23 12:57:01 +080015 Each entry is a pair of strings, the first being the
16 connection's sink, the second being the connection's
17 source.
18
Kuninori Morimotofa558c22013-11-20 15:25:02 +090019Required subnodes:
20
21- simple-audio-card,cpu : CPU sub-node
22- simple-audio-card,codec : CODEC sub-node
23
24Required CPU/CODEC subnodes properties:
25
26- sound-dai : phandle and port of CPU/CODEC
27
28Optional 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
41Example:
42
43sound {
44 compatible = "simple-audio-card";
45 simple-audio-card,format = "left_j";
Xiubo Lid4c22092013-12-23 12:57:01 +080046 simple-audio-routing =
47 "MIC_IN", "Mic Jack",
48 "Headphone Jack", "HP_OUT",
49 "Ext Spk", "LINE_OUT";
Kuninori Morimotofa558c22013-11-20 15:25:02 +090050
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
71sh_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};