Commit bb1b282d authored by Aidan MacDonald's avatar Aidan MacDonald Committed by Mark Brown

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
parent 850d1746
...@@ -329,6 +329,14 @@ static const struct i2s_soc_info jz4760_i2s_soc_info = { ...@@ -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), .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 = { static struct snd_soc_dai_driver jz4770_i2s_dai = {
.probe = jz4740_i2s_dai_probe, .probe = jz4740_i2s_dai_probe,
.playback = { .playback = {
...@@ -440,6 +448,7 @@ static const struct of_device_id jz4740_of_matches[] = { ...@@ -440,6 +448,7 @@ static const struct of_device_id jz4740_of_matches[] = {
{ .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info }, { .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info },
{ .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info }, { .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info },
{ .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info }, { .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info },
{ .compatible = "ingenic,x1000-i2s", .data = &x1000_i2s_soc_info },
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, jz4740_of_matches); MODULE_DEVICE_TABLE(of, jz4740_of_matches);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment