summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/sound/simple-scu-card.txt
blob: d6fe47ed09af4bfb22698f92c9f77499581f8832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
ASoC simple SCU Sound Card

Simple-Card specifies audio DAI connections of SoC <-> codec.

Required properties:

- compatible				: "simple-scu-audio-card"
					  "renesas,rsrc-card"

Optional properties:

- simple-audio-card,name		: User specified audio sound card name, one string
					  property.
- simple-audio-card,cpu			: CPU   sub-node
- simple-audio-card,codec		: CODEC sub-node

Optional subnode properties:

- simple-audio-card,format		: CPU/CODEC common audio format.
					  "i2s", "right_j", "left_j" , "dsp_a"
					  "dsp_b", "ac97", "pdm", "msb", "lsb"
- simple-audio-card,frame-master	: Indicates dai-link frame master.
					  phandle to a cpu or codec subnode.
- simple-audio-card,bitclock-master	: Indicates dai-link bit clock master.
					  phandle to a cpu or codec subnode.
- simple-audio-card,bitclock-inversion	: bool property. Add this if the
					  dai-link uses bit clock inversion.
- simple-audio-card,frame-inversion	: bool property. Add this if the
					  dai-link uses frame clock inversion.
- simple-audio-card,convert-rate	: platform specified sampling rate convert
- simple-audio-card,convert-channels	: platform specified converted channel size (2 - 8 ch)
- simple-audio-card,prefix		: see audio-routing
- simple-audio-card,routing		: A list of the connections between audio components.
					  Each entry is a pair of strings, the first being the connection's sink,
					  the second being the connection's source. Valid names for sources.
					  use audio-prefix if some components is using same sink/sources naming.
					  it can be used if compatible was "renesas,rsrc-card";

Required CPU/CODEC subnodes properties:

- sound-dai				: phandle and port of CPU/CODEC

Optional CPU/CODEC subnodes properties:

- clocks / system-clock-frequency	: specify subnode's clock if needed.
					  it can be specified via "clocks" if system has
					  clock node (= common clock), or "system-clock-frequency"
					  (if system doens't support common clock)
					  If a clock is specified, it is
					  enabled with clk_prepare_enable()
					  in dai startup() and disabled with
					  clk_disable_unprepare() in dai
					  shutdown().

Example 1. Sampling Rate Covert

sound {
	compatible = "simple-scu-audio-card";

	simple-audio-card,name = "rsnd-ak4643";
	simple-audio-card,format = "left_j";
	simple-audio-card,format = "left_j";
	simple-audio-card,bitclock-master = <&sndcodec>;
	simple-audio-card,frame-master = <&sndcodec>;

	simple-audio-card,convert-rate = <48000>; /* see audio_clk_a */

	simple-audio-card,prefix = "ak4642";
	simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
			"DAI0 Capture", "ak4642 Capture";

	sndcpu: simple-audio-card,cpu {
		sound-dai = <&rcar_sound>;
	};

	sndcodec: simple-audio-card,codec {
		sound-dai = <&ak4643>;
		system-clock-frequency = <11289600>;
	};
};

Example 2. 2 CPU 1 Codec

sound {
	compatible = "renesas,rsrc-card";

	card-name = "rsnd-ak4643";
	format = "left_j";
	bitclock-master = <&dpcmcpu>;
	frame-master = <&dpcmcpu>;

	convert-rate = <48000>;  /* see audio_clk_a */

	audio-prefix = "ak4642";
	audio-routing = "ak4642 Playback", "DAI0 Playback",
			"ak4642 Playback", "DAI1 Playback";

	dpcmcpu: cpu@0 {
		sound-dai = <&rcar_sound 0>;
	};

	cpu@1 {
		sound-dai = <&rcar_sound 1>;
	};

	codec {
		sound-dai = <&ak4643>;
		clocks = <&audio_clock>;
	};
};