devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC
@ 2023-05-09 12:42 Aidan MacDonald
  2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aidan MacDonald @ 2023-05-09 12:42 UTC (permalink / raw)
  To: broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt, tsbogend,
	paul
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

The X1000's AIC is similar to the AIC found on other Ingenic SoCs.
It has symmetric playback/capture rates like the JZ4740, but more
flexible clocking when outputting the system or bit clocks.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 sound/soc/jz4740/jz4740-i2s.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 6d9cfe0a5041..7cb563bb8b09 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -329,6 +329,14 @@ static const struct i2s_soc_info jz4760_i2s_soc_info = {
 	.field_i2sdiv_playback	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 3),
 };
 
+static const struct i2s_soc_info x1000_i2s_soc_info = {
+	.dai = &jz4740_i2s_dai,
+	.field_rx_fifo_thresh	= REG_FIELD(JZ_REG_AIC_CONF, 24, 27),
+	.field_tx_fifo_thresh	= REG_FIELD(JZ_REG_AIC_CONF, 16, 20),
+	.field_i2sdiv_capture	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8),
+	.field_i2sdiv_playback	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8),
+};
+
 static struct snd_soc_dai_driver jz4770_i2s_dai = {
 	.probe = jz4740_i2s_dai_probe,
 	.playback = {
@@ -440,6 +448,7 @@ static const struct of_device_id jz4740_of_matches[] = {
 	{ .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info },
 	{ .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info },
 	{ .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info },
+	{ .compatible = "ingenic,x1000-i2s", .data = &x1000_i2s_soc_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, jz4740_of_matches);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-23  9:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 12:42 [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Aidan MacDonald
2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
2023-05-09 12:53   ` Krzysztof Kozlowski
2023-05-09 12:42 ` [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node Aidan MacDonald
2023-05-23  9:08   ` Thomas Bogendoerfer
2023-05-11  6:02 ` (subset) [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).