Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: jz4740-i2s: Add support for X1000 SoC

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
Link: https://lore.kernel.org/r/20230509124238.195191-1-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org

authored by

Aidan MacDonald and committed by
Mark Brown
bb1b282d 850d1746

+9
+9
sound/soc/jz4740/jz4740-i2s.c
··· 329 329 .field_i2sdiv_playback = REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 3), 330 330 }; 331 331 332 + static const struct i2s_soc_info x1000_i2s_soc_info = { 333 + .dai = &jz4740_i2s_dai, 334 + .field_rx_fifo_thresh = REG_FIELD(JZ_REG_AIC_CONF, 24, 27), 335 + .field_tx_fifo_thresh = REG_FIELD(JZ_REG_AIC_CONF, 16, 20), 336 + .field_i2sdiv_capture = REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8), 337 + .field_i2sdiv_playback = REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8), 338 + }; 339 + 332 340 static struct snd_soc_dai_driver jz4770_i2s_dai = { 333 341 .probe = jz4740_i2s_dai_probe, 334 342 .playback = { ··· 448 440 { .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info }, 449 441 { .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info }, 450 442 { .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info }, 443 + { .compatible = "ingenic,x1000-i2s", .data = &x1000_i2s_soc_info }, 451 444 { /* sentinel */ } 452 445 }; 453 446 MODULE_DEVICE_TABLE(of, jz4740_of_matches);