Lines Matching +full:i2s +full:- +full:regs

1 // SPDX-License-Identifier: GPL-2.0-only
3 // Freescale MPC5200 PSC in I2S mode
22 * PSC_I2S_RATES: sample rates supported by the I2S
24 * This driver currently only supports the PSC running in I2S slave mode,
32 * PSC_I2S_FORMATS: audio formats supported by the PSC I2S mode
45 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" in psc_i2s_hw_params()
65 dev_dbg(psc_dma->dev, "invalid format\n"); in psc_i2s_hw_params()
66 return -EINVAL; in psc_i2s_hw_params()
68 out_be32(&psc_dma->psc_regs->sicr, psc_dma->sicr | mode); in psc_i2s_hw_params()
91 dev_dbg(psc_dma->dev, "psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\n", in psc_i2s_set_sysclk()
93 return (dir == SND_SOC_CLOCK_IN) ? 0 : -EINVAL; in psc_i2s_set_sysclk()
102 * This driver only supports I2S mode. Return an error if the format is
110 dev_dbg(psc_dma->dev, "psc_i2s_set_fmt(cpu_dai=%p, format=%i)\n", in psc_i2s_set_fmt()
112 return (format == SND_SOC_DAIFMT_I2S) ? 0 : -EINVAL; in psc_i2s_set_fmt()
115 /* ---------------------------------------------------------------------
118 * - Digital Audio Interface (DAI) template
119 * - create/destroy dai hooks
132 .name = "mpc5200-psc-i2s.0",
134 .stream_name = "I2S Playback",
141 .stream_name = "I2S Capture",
151 .name = "mpc5200-i2s",
155 /* ---------------------------------------------------------------------
157 * - Probe/remove operations
158 * - OF device match table
164 struct mpc52xx_psc __iomem *regs; in psc_i2s_of_probe() local
170 rc = snd_soc_register_component(&op->dev, &psc_i2s_component, in psc_i2s_of_probe()
177 psc_dma = dev_get_drvdata(&op->dev); in psc_i2s_of_probe()
178 regs = psc_dma->psc_regs; in psc_i2s_of_probe()
181 psc_dma->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S | in psc_i2s_of_probe()
183 out_be32(&psc_dma->psc_regs->sicr, in psc_i2s_of_probe()
184 psc_dma->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8); in psc_i2s_of_probe()
188 if (!of_get_property(op->dev.of_node, "codec-handle", NULL)) in psc_i2s_of_probe()
196 while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) != 0) in psc_i2s_of_probe()
199 while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) == 0) in psc_i2s_of_probe()
206 out_8(&psc_dma->psc_regs->command, in psc_i2s_of_probe()
216 snd_soc_unregister_component(&op->dev); in psc_i2s_of_remove()
221 { .compatible = "fsl,mpc5200-psc-i2s", },
222 { .compatible = "fsl,mpc5200b-psc-i2s", },
231 .name = "mpc5200-psc-i2s",
239 MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver");