xref: /freebsd/sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.txt (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1Amlogic AXG sound card:
2
3Required properties:
4
5- compatible: "amlogic,axg-sound-card"
6- model : User specified audio sound card name, one string
7
8Optional properties:
9
10- audio-aux-devs : List of phandles pointing to auxiliary devices
11- audio-widgets : Please refer to widgets.txt.
12- audio-routing : A list of the connections between audio components.
13
14Subnodes:
15
16- dai-link: Container for dai-link level properties and the CODEC
17	    sub-nodes. There should be at least one (and probably more)
18	    subnode of this type.
19
20Required dai-link properties:
21
22- sound-dai: phandle and port of the CPU DAI.
23
24Required TDM Backend dai-link properties:
25- dai-format : CPU/CODEC common audio format
26
27Optional TDM Backend dai-link properties:
28- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks
29- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks
30				  When omitted, mask is assumed to have to no
31				  slots. A valid must have at one slot, so at
32				  least one these mask should be provided with
33				  an enabled slot.
34- dai-tdm-slot-num : Please refer to tdm-slot.txt.
35		     If omitted, slot number is set to accommodate the largest
36		     mask provided.
37- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted.
38- mclk-fs : Multiplication factor between stream rate and mclk
39
40Backend dai-link subnodes:
41
42- codec: dai-link representing backend links should have at least one subnode.
43	 One subnode for each codec of the dai-link.
44	 dai-link representing frontend links have no codec, therefore have no
45	 subnodes
46
47Required codec subnodes properties:
48
49- sound-dai: phandle and port of the CODEC DAI.
50
51Optional codec subnodes properties:
52
53- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt.
54- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt.
55
56Example:
57
58sound {
59	compatible = "amlogic,axg-sound-card";
60	model = "AXG-S420";
61	audio-aux-devs = <&tdmin_a>, <&tdmout_c>;
62	audio-widgets = "Line", "Lineout",
63			"Line", "Linein",
64			"Speaker", "Speaker1 Left",
65			"Speaker", "Speaker1 Right";
66			"Speaker", "Speaker2 Left",
67			"Speaker", "Speaker2 Right";
68	audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
69			"SPDIFOUT IN 0", "FRDDR_A OUT 3",
70			"TDM_C Playback", "TDMOUT_C OUT",
71			"TDMIN_A IN 2", "TDM_C Capture",
72			"TDMIN_A IN 5", "TDM_C Loopback",
73			"TODDR_A IN 0", "TDMIN_A OUT",
74			"Lineout", "Lineout AOUTL",
75			"Lineout", "Lineout AOUTR",
76			"Speaker1 Left", "SPK1 OUT_A",
77			"Speaker2 Left", "SPK2 OUT_A",
78			"Speaker1 Right", "SPK1 OUT_B",
79			"Speaker2 Right", "SPK2 OUT_B",
80			"Linein AINL", "Linein",
81			"Linein AINR", "Linein";
82
83	dai-link@0 {
84		sound-dai = <&frddr_a>;
85	};
86
87	dai-link@1 {
88		sound-dai = <&toddr_a>;
89	};
90
91	dai-link@2 {
92		sound-dai = <&tdmif_c>;
93		dai-format = "i2s";
94		dai-tdm-slot-tx-mask-2 = <1 1>;
95		dai-tdm-slot-tx-mask-3 = <1 1>;
96		dai-tdm-slot-rx-mask-1 = <1 1>;
97		mclk-fs = <256>;
98
99		codec@0 {
100			sound-dai = <&lineout>;
101		};
102
103		codec@1 {
104			sound-dai = <&speaker_amp1>;
105		};
106
107		codec@2 {
108			sound-dai = <&speaker_amp2>;
109		};
110
111		codec@3 {
112			sound-dai = <&linein>;
113		};
114
115	};
116
117	dai-link@3 {
118		sound-dai = <&spdifout>;
119
120		codec {
121			sound-dai = <&spdif_dit>;
122		};
123	};
124};
125