Skip to content

Commit 455b1d4

Browse files
mripardbroonie
authored andcommitted
ASoC: sunxi: Revert initial A83t support
This reverts commit 3e9acd7 (ASoC: sun4i-i2s: Remove duplicated quirks structure"). It turns out that while one I2S controller is described in the A83t datasheet, the driver supports another, undocumented, one that has been inherited from the older SoCs, while the documented one uses the new design. Fixes: 3e9acd7 ("ASoC: sun4i-i2s: Remove duplicated quirks structure") Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://lore.kernel.org/r/20190827093206.17919-1-mripard@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9573820 commit 455b1d4

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

‎sound/soc/sunxi/sun4i-i2s.c‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,11 @@ static const struct sun4i_i2s_quirks sun6i_a31_i2s_quirks = {
10971097
.set_fmt = sun4i_i2s_set_soc_fmt,
10981098
};
10991099

1100+
/*
1101+
* This doesn't describe the TDM controller documented in the A83t
1102+
* datasheet, but the three undocumented I2S controller that use the
1103+
* older design.
1104+
*/
11001105
static const struct sun4i_i2s_quirks sun8i_a83t_i2s_quirks = {
11011106
.has_reset = true,
11021107
.reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG,
@@ -1115,6 +1120,24 @@ static const struct sun4i_i2s_quirks sun8i_a83t_i2s_quirks = {
11151120
.set_fmt = sun8i_i2s_set_soc_fmt,
11161121
};
11171122

1123+
static const struct sun4i_i2s_quirks sun8i_h3_i2s_quirks = {
1124+
.has_reset = true,
1125+
.reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG,
1126+
.sun4i_i2s_regmap = &sun8i_i2s_regmap_config,
1127+
.field_clkdiv_mclk_en = REG_FIELD(SUN4I_I2S_CLK_DIV_REG, 8, 8),
1128+
.field_fmt_wss = REG_FIELD(SUN4I_I2S_FMT0_REG, 0, 2),
1129+
.field_fmt_sr = REG_FIELD(SUN4I_I2S_FMT0_REG, 4, 6),
1130+
.bclk_dividers = sun8i_i2s_clk_div,
1131+
.num_bclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div),
1132+
.mclk_dividers = sun8i_i2s_clk_div,
1133+
.num_mclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div),
1134+
.get_bclk_parent_rate = sun8i_i2s_get_bclk_parent_rate,
1135+
.get_sr = sun8i_i2s_get_sr_wss,
1136+
.get_wss = sun8i_i2s_get_sr_wss,
1137+
.set_chan_cfg = sun8i_i2s_set_chan_cfg,
1138+
.set_fmt = sun8i_i2s_set_soc_fmt,
1139+
};
1140+
11181141
static const struct sun4i_i2s_quirks sun50i_a64_codec_i2s_quirks = {
11191142
.has_reset = true,
11201143
.reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG,
@@ -1296,7 +1319,7 @@ static const struct of_device_id sun4i_i2s_match[] = {
12961319
},
12971320
{
12981321
.compatible = "allwinner,sun8i-h3-i2s",
1299-
.data = &sun8i_a83t_i2s_quirks,
1322+
.data = &sun8i_h3_i2s_quirks,
13001323
},
13011324
{
13021325
.compatible = "allwinner,sun50i-a64-codec-i2s",

0 commit comments

Comments
 (0)