diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-02-01 02:02:22 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-01 11:43:57 +0000 |
commit | c2bc65274a307e11743d0f56a762f8e57f279b9e (patch) | |
tree | 0db8a35cb7fba1274327fbdb3f2ad46b5eec6b87 /sound/soc/sh/rcar/ssiu.c | |
parent | f76fec606d07b43d21475a0dda6294613379e224 (diff) |
ASoC: rsnd: add R-Car Gen4 Sound support
This patch is tested on V4H White Hawk + ARD-AUDIO-DA7212
Signed-off-by: Linh Phung <linh.phung.jy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7qe5ej5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/ssiu.c')
-rw-r--r-- | sound/soc/sh/rcar/ssiu.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c index 281bc20d4c5d..17bd8cc86dd0 100644 --- a/sound/soc/sh/rcar/ssiu.c +++ b/sound/soc/sh/rcar/ssiu.c @@ -29,8 +29,8 @@ struct rsnd_ssiu { i++) /* - * SSI Gen2 Gen3 - * 0 BUSIF0-3 BUSIF0-7 + * SSI Gen2 Gen3 Gen4 + * 0 BUSIF0-3 BUSIF0-7 BUSIF0-7 * 1 BUSIF0-3 BUSIF0-7 * 2 BUSIF0-3 BUSIF0-7 * 3 BUSIF0 BUSIF0-7 @@ -40,10 +40,11 @@ struct rsnd_ssiu { * 7 BUSIF0 BUSIF0 * 8 BUSIF0 BUSIF0 * 9 BUSIF0-3 BUSIF0-7 - * total 22 52 + * total 22 52 8 */ static const int gen2_id[] = { 0, 4, 8, 12, 13, 14, 15, 16, 17, 18 }; static const int gen3_id[] = { 0, 8, 16, 24, 32, 40, 41, 42, 43, 44 }; +static const int gen4_id[] = { 0 }; /* enable busif buffer over/under run interrupt. */ #define rsnd_ssiu_busif_err_irq_enable(mod) rsnd_ssiu_busif_err_irq_ctrl(mod, 1) @@ -152,6 +153,10 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod, /* clear status */ rsnd_ssiu_busif_err_status_clear(mod); + /* Gen4 doesn't have SSI_MODE */ + if (rsnd_is_gen4(priv)) + goto ssi_mode_setting_end; + /* * SSI_MODE0 */ @@ -206,6 +211,7 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod, rsnd_mod_bset(mod, SSI_MODE1, 0x0013001f, val1); rsnd_mod_bset(mod, SSI_MODE2, 0x00000017, val2); +ssi_mode_setting_end: /* * Enable busif buffer over/under run interrupt. * It will be handled from ssi.c @@ -553,6 +559,9 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv) } else if (rsnd_is_gen3(priv)) { list = gen3_id; nr = ARRAY_SIZE(gen3_id); + } else if (rsnd_is_gen4(priv)) { + list = gen4_id; + nr = ARRAY_SIZE(gen4_id); } else { dev_err(dev, "unknown SSIU\n"); return -ENODEV; |