xref: /openbmc/linux/sound/soc/uniphier/aio-ld11.c (revision 89621b57eef451592553227a781d12aa1a6a2556)
1db4cb3d0SKatsuhiro Suzuki // SPDX-License-Identifier: GPL-2.0
2db4cb3d0SKatsuhiro Suzuki //
3db4cb3d0SKatsuhiro Suzuki // Socionext UniPhier AIO ALSA driver for LD11/LD20.
4db4cb3d0SKatsuhiro Suzuki //
5db4cb3d0SKatsuhiro Suzuki // Copyright (c) 2016-2018 Socionext Inc.
6db4cb3d0SKatsuhiro Suzuki 
7db4cb3d0SKatsuhiro Suzuki #include <linux/module.h>
8db4cb3d0SKatsuhiro Suzuki 
9db4cb3d0SKatsuhiro Suzuki #include "aio.h"
10db4cb3d0SKatsuhiro Suzuki 
11db4cb3d0SKatsuhiro Suzuki static const struct uniphier_aio_spec uniphier_aio_ld11[] = {
12db4cb3d0SKatsuhiro Suzuki 	/* for HDMI PCM In, Pin:AI1Dx */
13db4cb3d0SKatsuhiro Suzuki 	{
14db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMIN1,
15db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_HDMI,
16db4cb3d0SKatsuhiro Suzuki 		.swm = {
17db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_I2S,
18db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_INPUT,
19db4cb3d0SKatsuhiro Suzuki 			.rb    = { 21, 14, },
20db4cb3d0SKatsuhiro Suzuki 			.ch    = { 21, 14, },
21db4cb3d0SKatsuhiro Suzuki 			.iif   = { 5, 3, },
22db4cb3d0SKatsuhiro Suzuki 			.iport = { 0, AUD_HW_PCMIN1, },
23db4cb3d0SKatsuhiro Suzuki 		},
24db4cb3d0SKatsuhiro Suzuki 	},
25db4cb3d0SKatsuhiro Suzuki 
26db4cb3d0SKatsuhiro Suzuki 	/* for SIF In, Pin:AI2Dx */
27db4cb3d0SKatsuhiro Suzuki 	{
28db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMIN2,
29db4cb3d0SKatsuhiro Suzuki 		.swm = {
30db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_I2S,
31db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_INPUT,
32db4cb3d0SKatsuhiro Suzuki 			.rb    = { 22, 15, },
33db4cb3d0SKatsuhiro Suzuki 			.ch    = { 22, 15, },
34db4cb3d0SKatsuhiro Suzuki 			.iif   = { 6, 4, },
35db4cb3d0SKatsuhiro Suzuki 			.iport = { 1, AUD_HW_PCMIN2, },
36db4cb3d0SKatsuhiro Suzuki 		},
37db4cb3d0SKatsuhiro Suzuki 	},
38db4cb3d0SKatsuhiro Suzuki 
39db4cb3d0SKatsuhiro Suzuki 	/* for Line In, Pin:AI3Dx */
40db4cb3d0SKatsuhiro Suzuki 	{
41db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMIN3,
42db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_LINE,
43db4cb3d0SKatsuhiro Suzuki 		.swm = {
44db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_EVE,
45db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_INPUT,
46db4cb3d0SKatsuhiro Suzuki 			.rb    = { 23, 16, },
47db4cb3d0SKatsuhiro Suzuki 			.ch    = { 23, 16, },
48db4cb3d0SKatsuhiro Suzuki 			.iif   = { 7, 5, },
49db4cb3d0SKatsuhiro Suzuki 			.iport = { 2, AUD_HW_PCMIN3, },
50db4cb3d0SKatsuhiro Suzuki 		},
51db4cb3d0SKatsuhiro Suzuki 	},
52db4cb3d0SKatsuhiro Suzuki 
53db4cb3d0SKatsuhiro Suzuki 	/* for S/PDIF In, Pin:AI1IEC */
54db4cb3d0SKatsuhiro Suzuki 	{
55db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_IECIN1,
56db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_IEC,
57db4cb3d0SKatsuhiro Suzuki 		.swm = {
58db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_SPDIF,
59db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_INPUT,
60db4cb3d0SKatsuhiro Suzuki 			.rb    = { 26, 17, },
61db4cb3d0SKatsuhiro Suzuki 			.ch    = { 26, 17, },
62db4cb3d0SKatsuhiro Suzuki 			.iif   = { 10, 6, },
63db4cb3d0SKatsuhiro Suzuki 			.iport = { 3, AUD_HW_IECIN1, },
64db4cb3d0SKatsuhiro Suzuki 		},
65db4cb3d0SKatsuhiro Suzuki 	},
66db4cb3d0SKatsuhiro Suzuki 
67db4cb3d0SKatsuhiro Suzuki 	/* for Speaker, Pin:AO1Dx */
68db4cb3d0SKatsuhiro Suzuki 	{
69db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_HPCMOUT1,
70db4cb3d0SKatsuhiro Suzuki 		.swm = {
71db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_I2S,
72db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
73db4cb3d0SKatsuhiro Suzuki 			.rb    = { 0, 0, },
74db4cb3d0SKatsuhiro Suzuki 			.ch    = { 0, 0, },
75db4cb3d0SKatsuhiro Suzuki 			.oif   = { 0, 0, },
76db4cb3d0SKatsuhiro Suzuki 			.oport = { 0, AUD_HW_HPCMOUT1, },
77db4cb3d0SKatsuhiro Suzuki 		},
78db4cb3d0SKatsuhiro Suzuki 	},
79db4cb3d0SKatsuhiro Suzuki 
80db4cb3d0SKatsuhiro Suzuki 	/* for HDMI PCM, Pin:AO2Dx */
81db4cb3d0SKatsuhiro Suzuki 	{
82db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMOUT1,
83db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_HDMI,
84db4cb3d0SKatsuhiro Suzuki 		.swm = {
85db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_I2S,
86db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
87db4cb3d0SKatsuhiro Suzuki 			.rb    = { 0, 0, },
88db4cb3d0SKatsuhiro Suzuki 			.ch    = { 0, 0, },
89db4cb3d0SKatsuhiro Suzuki 			.oif   = { 0, 0, },
90db4cb3d0SKatsuhiro Suzuki 			.oport = { 3, AUD_HW_PCMOUT1, },
91db4cb3d0SKatsuhiro Suzuki 		},
92db4cb3d0SKatsuhiro Suzuki 	},
93db4cb3d0SKatsuhiro Suzuki 
94db4cb3d0SKatsuhiro Suzuki 	/* for Line Out, Pin:LO2_x */
95db4cb3d0SKatsuhiro Suzuki 	{
96db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMOUT2,
97db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_LINE,
98db4cb3d0SKatsuhiro Suzuki 		.swm = {
99db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_EVE,
100db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
101db4cb3d0SKatsuhiro Suzuki 			.rb    = { 2, 2, },
102db4cb3d0SKatsuhiro Suzuki 			.ch    = { 2, 2, },
103db4cb3d0SKatsuhiro Suzuki 			.oif   = { 2, 2, },
104db4cb3d0SKatsuhiro Suzuki 			.oport = { 1, AUD_HW_PCMOUT2, },
105db4cb3d0SKatsuhiro Suzuki 		},
106db4cb3d0SKatsuhiro Suzuki 	},
107db4cb3d0SKatsuhiro Suzuki 
108db4cb3d0SKatsuhiro Suzuki 	/* for Headphone, Pin:HP1_x */
109db4cb3d0SKatsuhiro Suzuki 	{
110db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_PCMOUT3,
111db4cb3d0SKatsuhiro Suzuki 		.swm = {
112db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_EVE,
113db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
114db4cb3d0SKatsuhiro Suzuki 			.rb    = { 3, 3, },
115db4cb3d0SKatsuhiro Suzuki 			.ch    = { 3, 3, },
116db4cb3d0SKatsuhiro Suzuki 			.oif   = { 3, 3, },
117db4cb3d0SKatsuhiro Suzuki 			.oport = { 2, AUD_HW_PCMOUT3, },
118db4cb3d0SKatsuhiro Suzuki 		},
119db4cb3d0SKatsuhiro Suzuki 	},
120db4cb3d0SKatsuhiro Suzuki 
121db4cb3d0SKatsuhiro Suzuki 	/* for HW Sampling Rate Converter */
122db4cb3d0SKatsuhiro Suzuki 	{
123db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_EPCMOUT2,
124db4cb3d0SKatsuhiro Suzuki 		.swm = {
125db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_CONV,
126db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
127db4cb3d0SKatsuhiro Suzuki 			.rb    = { 7, 5, },
128db4cb3d0SKatsuhiro Suzuki 			.ch    = { 7, 5, },
129db4cb3d0SKatsuhiro Suzuki 			.oif   = { 7, 5, },
130db4cb3d0SKatsuhiro Suzuki 			.oport = { 6, AUD_HW_EPCMOUT2, },
131db4cb3d0SKatsuhiro Suzuki 			.och   = { 17, 12, },
132db4cb3d0SKatsuhiro Suzuki 			.iif   = { 1, 1, },
133db4cb3d0SKatsuhiro Suzuki 		},
134db4cb3d0SKatsuhiro Suzuki 	},
135db4cb3d0SKatsuhiro Suzuki 
136db4cb3d0SKatsuhiro Suzuki 	/* for HW Sampling Rate Converter 2 */
137db4cb3d0SKatsuhiro Suzuki 	{
138db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_EPCMOUT3,
139db4cb3d0SKatsuhiro Suzuki 		.swm = {
140db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_CONV,
141db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
142db4cb3d0SKatsuhiro Suzuki 			.rb    = { 8, 6, },
143db4cb3d0SKatsuhiro Suzuki 			.ch    = { 8, 6, },
144db4cb3d0SKatsuhiro Suzuki 			.oif   = { 8, 6, },
145db4cb3d0SKatsuhiro Suzuki 			.oport = { 7, AUD_HW_EPCMOUT3, },
146db4cb3d0SKatsuhiro Suzuki 			.och   = { 18, 13, },
147db4cb3d0SKatsuhiro Suzuki 			.iif   = { 2, 2, },
148db4cb3d0SKatsuhiro Suzuki 		},
149db4cb3d0SKatsuhiro Suzuki 	},
150db4cb3d0SKatsuhiro Suzuki 
151db4cb3d0SKatsuhiro Suzuki 	/* for S/PDIF Out, Pin:AO1IEC */
152db4cb3d0SKatsuhiro Suzuki 	{
153db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_HIECOUT1,
154db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_IEC,
155db4cb3d0SKatsuhiro Suzuki 		.swm = {
156db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_SPDIF,
157db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
158db4cb3d0SKatsuhiro Suzuki 			.rb    = { 1, 1, },
159db4cb3d0SKatsuhiro Suzuki 			.ch    = { 1, 1, },
160db4cb3d0SKatsuhiro Suzuki 			.oif   = { 1, 1, },
161db4cb3d0SKatsuhiro Suzuki 			.oport = { 12, AUD_HW_HIECOUT1, },
162db4cb3d0SKatsuhiro Suzuki 		},
163db4cb3d0SKatsuhiro Suzuki 	},
164db4cb3d0SKatsuhiro Suzuki 
165db4cb3d0SKatsuhiro Suzuki 	/* for S/PDIF Out, Pin:AO1IEC, Compress */
166db4cb3d0SKatsuhiro Suzuki 	{
167db4cb3d0SKatsuhiro Suzuki 		.name = AUD_NAME_HIECCOMPOUT1,
168db4cb3d0SKatsuhiro Suzuki 		.gname = AUD_GNAME_IEC,
169db4cb3d0SKatsuhiro Suzuki 		.swm = {
170db4cb3d0SKatsuhiro Suzuki 			.type  = PORT_TYPE_SPDIF,
171db4cb3d0SKatsuhiro Suzuki 			.dir   = PORT_DIR_OUTPUT,
172db4cb3d0SKatsuhiro Suzuki 			.rb    = { 1, 1, },
173db4cb3d0SKatsuhiro Suzuki 			.ch    = { 1, 1, },
174db4cb3d0SKatsuhiro Suzuki 			.oif   = { 1, 1, },
175db4cb3d0SKatsuhiro Suzuki 			.oport = { 12, AUD_HW_HIECOUT1, },
176db4cb3d0SKatsuhiro Suzuki 		},
177db4cb3d0SKatsuhiro Suzuki 	},
178db4cb3d0SKatsuhiro Suzuki };
179db4cb3d0SKatsuhiro Suzuki 
180db4cb3d0SKatsuhiro Suzuki static const struct uniphier_aio_pll uniphier_aio_pll_ld11[] = {
181db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_A1]   = { .enable = true, },
182db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_F1]   = { .enable = true, },
183db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_A2]   = { .enable = true, },
184db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_F2]   = { .enable = true, },
185db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_APLL] = { .enable = true, },
186db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_RX0]  = { .enable = true, },
187db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_USB0] = { .enable = true, },
188db4cb3d0SKatsuhiro Suzuki 	[AUD_PLL_HSC0] = { .enable = true, },
189db4cb3d0SKatsuhiro Suzuki };
190db4cb3d0SKatsuhiro Suzuki 
191db4cb3d0SKatsuhiro Suzuki static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
192db4cb3d0SKatsuhiro Suzuki 	{
193db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_GNAME_HDMI,
194db4cb3d0SKatsuhiro Suzuki 		.playback = {
195db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMOUT1,
196db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
197db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
198db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
199db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
200db4cb3d0SKatsuhiro Suzuki 		},
201db4cb3d0SKatsuhiro Suzuki 		.capture = {
202db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMIN1,
203db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
204db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000 |
205db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_44100 |
206db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_32000,
207db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
208db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
209db4cb3d0SKatsuhiro Suzuki 		},
210*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
211db4cb3d0SKatsuhiro Suzuki 	},
212db4cb3d0SKatsuhiro Suzuki 	{
213db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_PCMIN2,
214db4cb3d0SKatsuhiro Suzuki 		.capture = {
215db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMIN2,
216db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
217db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
218db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
219db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
220db4cb3d0SKatsuhiro Suzuki 		},
221*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
222db4cb3d0SKatsuhiro Suzuki 	},
223db4cb3d0SKatsuhiro Suzuki 	{
224db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_GNAME_LINE,
225db4cb3d0SKatsuhiro Suzuki 		.playback = {
226db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMOUT2,
227db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
228db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
229db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
230db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
231db4cb3d0SKatsuhiro Suzuki 		},
232db4cb3d0SKatsuhiro Suzuki 		.capture = {
233db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMIN3,
234db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
235db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
236db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
237db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
238db4cb3d0SKatsuhiro Suzuki 		},
239*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
240db4cb3d0SKatsuhiro Suzuki 	},
241db4cb3d0SKatsuhiro Suzuki 	{
242db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_HPCMOUT1,
243db4cb3d0SKatsuhiro Suzuki 		.playback = {
244db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_HPCMOUT1,
245db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
246db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
247db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
2488fc9983dSKatsuhiro Suzuki 			.channels_max = 8,
249db4cb3d0SKatsuhiro Suzuki 		},
250*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
251db4cb3d0SKatsuhiro Suzuki 	},
252db4cb3d0SKatsuhiro Suzuki 	{
253db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_PCMOUT3,
254db4cb3d0SKatsuhiro Suzuki 		.playback = {
255db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_PCMOUT3,
256db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
257db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
258db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
259db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
260db4cb3d0SKatsuhiro Suzuki 		},
261*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
262db4cb3d0SKatsuhiro Suzuki 	},
263db4cb3d0SKatsuhiro Suzuki 	{
264db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_HIECOUT1,
265db4cb3d0SKatsuhiro Suzuki 		.playback = {
266db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_HIECOUT1,
267db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
268db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000,
269db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
270db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
271db4cb3d0SKatsuhiro Suzuki 		},
272*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_spdif_ld11_ops,
273db4cb3d0SKatsuhiro Suzuki 	},
274db4cb3d0SKatsuhiro Suzuki 	{
275db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_EPCMOUT2,
276db4cb3d0SKatsuhiro Suzuki 		.playback = {
277db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_EPCMOUT2,
278db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
279db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000 |
280db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_44100 |
281db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_32000,
282db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
283db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
284db4cb3d0SKatsuhiro Suzuki 		},
285*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
286db4cb3d0SKatsuhiro Suzuki 	},
287db4cb3d0SKatsuhiro Suzuki 	{
288db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_EPCMOUT3,
289db4cb3d0SKatsuhiro Suzuki 		.playback = {
290db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_EPCMOUT3,
291db4cb3d0SKatsuhiro Suzuki 			.formats     = SNDRV_PCM_FMTBIT_S32_LE,
292db4cb3d0SKatsuhiro Suzuki 			.rates       = SNDRV_PCM_RATE_48000 |
293db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_44100 |
294db4cb3d0SKatsuhiro Suzuki 				SNDRV_PCM_RATE_32000,
295db4cb3d0SKatsuhiro Suzuki 			.channels_min = 2,
296db4cb3d0SKatsuhiro Suzuki 			.channels_max = 2,
297db4cb3d0SKatsuhiro Suzuki 		},
298*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_i2s_ld11_ops,
299db4cb3d0SKatsuhiro Suzuki 	},
300db4cb3d0SKatsuhiro Suzuki 	{
301db4cb3d0SKatsuhiro Suzuki 		.name    = AUD_NAME_HIECCOMPOUT1,
302db4cb3d0SKatsuhiro Suzuki 		.playback = {
303db4cb3d0SKatsuhiro Suzuki 			.stream_name = AUD_NAME_HIECCOMPOUT1,
304db4cb3d0SKatsuhiro Suzuki 			.channels_min = 1,
305db4cb3d0SKatsuhiro Suzuki 			.channels_max = 1,
306db4cb3d0SKatsuhiro Suzuki 		},
307*89621b57SKuninori Morimoto 		.ops = &uniphier_aio_spdif_ld11_ops2,
308db4cb3d0SKatsuhiro Suzuki 	},
309db4cb3d0SKatsuhiro Suzuki };
310db4cb3d0SKatsuhiro Suzuki 
311db4cb3d0SKatsuhiro Suzuki static const struct uniphier_aio_chip_spec uniphier_aio_ld11_spec = {
312db4cb3d0SKatsuhiro Suzuki 	.specs     = uniphier_aio_ld11,
313db4cb3d0SKatsuhiro Suzuki 	.num_specs = ARRAY_SIZE(uniphier_aio_ld11),
314db4cb3d0SKatsuhiro Suzuki 	.dais      = uniphier_aio_dai_ld11,
315db4cb3d0SKatsuhiro Suzuki 	.num_dais  = ARRAY_SIZE(uniphier_aio_dai_ld11),
316db4cb3d0SKatsuhiro Suzuki 	.plls      = uniphier_aio_pll_ld11,
317db4cb3d0SKatsuhiro Suzuki 	.num_plls  = ARRAY_SIZE(uniphier_aio_pll_ld11),
318db4cb3d0SKatsuhiro Suzuki 	.addr_ext  = 0,
319db4cb3d0SKatsuhiro Suzuki };
320db4cb3d0SKatsuhiro Suzuki 
321db4cb3d0SKatsuhiro Suzuki static const struct uniphier_aio_chip_spec uniphier_aio_ld20_spec = {
322db4cb3d0SKatsuhiro Suzuki 	.specs     = uniphier_aio_ld11,
323db4cb3d0SKatsuhiro Suzuki 	.num_specs = ARRAY_SIZE(uniphier_aio_ld11),
324db4cb3d0SKatsuhiro Suzuki 	.dais      = uniphier_aio_dai_ld11,
325db4cb3d0SKatsuhiro Suzuki 	.num_dais  = ARRAY_SIZE(uniphier_aio_dai_ld11),
326db4cb3d0SKatsuhiro Suzuki 	.plls      = uniphier_aio_pll_ld11,
327db4cb3d0SKatsuhiro Suzuki 	.num_plls  = ARRAY_SIZE(uniphier_aio_pll_ld11),
328db4cb3d0SKatsuhiro Suzuki 	.addr_ext  = 1,
329db4cb3d0SKatsuhiro Suzuki };
330db4cb3d0SKatsuhiro Suzuki 
331c0b7cf59SKrzysztof Kozlowski static const struct of_device_id uniphier_aio_of_match[] __maybe_unused = {
332db4cb3d0SKatsuhiro Suzuki 	{
333db4cb3d0SKatsuhiro Suzuki 		.compatible = "socionext,uniphier-ld11-aio",
334db4cb3d0SKatsuhiro Suzuki 		.data = &uniphier_aio_ld11_spec,
335db4cb3d0SKatsuhiro Suzuki 	},
336db4cb3d0SKatsuhiro Suzuki 	{
337db4cb3d0SKatsuhiro Suzuki 		.compatible = "socionext,uniphier-ld20-aio",
338db4cb3d0SKatsuhiro Suzuki 		.data = &uniphier_aio_ld20_spec,
339db4cb3d0SKatsuhiro Suzuki 	},
340db4cb3d0SKatsuhiro Suzuki 	{},
341db4cb3d0SKatsuhiro Suzuki };
342db4cb3d0SKatsuhiro Suzuki MODULE_DEVICE_TABLE(of, uniphier_aio_of_match);
343db4cb3d0SKatsuhiro Suzuki 
344db4cb3d0SKatsuhiro Suzuki static struct platform_driver uniphier_aio_driver = {
345db4cb3d0SKatsuhiro Suzuki 	.driver = {
3468413b9e0SKatsuhiro Suzuki 		.name = "snd-uniphier-aio-ld11",
347db4cb3d0SKatsuhiro Suzuki 		.of_match_table = of_match_ptr(uniphier_aio_of_match),
348db4cb3d0SKatsuhiro Suzuki 	},
349db4cb3d0SKatsuhiro Suzuki 	.probe    = uniphier_aio_probe,
350db4cb3d0SKatsuhiro Suzuki 	.remove   = uniphier_aio_remove,
351db4cb3d0SKatsuhiro Suzuki };
352db4cb3d0SKatsuhiro Suzuki module_platform_driver(uniphier_aio_driver);
353db4cb3d0SKatsuhiro Suzuki 
354db4cb3d0SKatsuhiro Suzuki MODULE_AUTHOR("Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>");
355db4cb3d0SKatsuhiro Suzuki MODULE_DESCRIPTION("UniPhier LD11/LD20 AIO driver.");
356db4cb3d0SKatsuhiro Suzuki MODULE_LICENSE("GPL v2");
357