[PATCH 12/22] ASoC: rsnd: Update SSI for RZ/G3E support

From: John Madieu

Date: Thu Mar 19 2026 - 12:04:23 EST


Add SSI support for the Renesas RZ/G3E SoC, which differs from earlier
generations in several ways:

- The SSI block always operates in BUSIF mode; RZ/G3E does not implement
the SSITDR/SSIRDR registers used by R-Car Gen2/Gen3/Gen4 for direct SSI
DMA.
Consequently, all audio data must pass through BUSIF.
- Each SSI instance has its own reset line, exposed using per-SSI names
such as "ssi0", "ssi1", etc., rather than a single shared reset.

To support these differences, update rsnd_ssi_use_busif() to always
return 1 on RZ/G3E, ensuring that the driver consistently selects the
BUSIF DMA path. Also update the reset acquisition logic to request the
appropriate per-SSI reset controller based on the SSI instance name.

Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
---
sound/soc/renesas/rcar/ssi.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/sound/soc/renesas/rcar/ssi.c b/sound/soc/renesas/rcar/ssi.c
index c06cebb36170..e25a4dfae90c 100644
--- a/sound/soc/renesas/rcar/ssi.c
+++ b/sound/soc/renesas/rcar/ssi.c
@@ -123,8 +123,15 @@ int rsnd_ssi_use_busif(struct rsnd_dai_stream *io)
{
struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io);
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
int use_busif = 0;

+ /*
+ * RZ/G3E does not support PIO mode. Always use BUSIF.
+ */
+ if (rsnd_flags_has(priv, RSND_SSI_ALWAYS_BUSIF))
+ return 1;
+
if (!rsnd_ssi_is_dma_mode(mod))
return 0;

@@ -865,6 +872,8 @@ static int rsnd_ssi_common_remove(struct rsnd_mod *mod,
rsnd_flags_del(ssi, RSND_SSI_PROBED);
}

+ rsnd_dma_detach(io, mod, &io->dma);
+
return 0;
}

@@ -1158,6 +1167,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)

int rsnd_ssi_probe(struct rsnd_priv *priv)
{
+ struct reset_control *rstc;
struct device_node *node;
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_mod_ops *ops;
@@ -1207,6 +1217,16 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
goto rsnd_ssi_probe_done;
}

+ /*
+ * RZ/G3E uses per-SSI reset controllers.
+ * R-Car platforms typically don't have SSI reset controls.
+ */
+ rstc = devm_reset_control_get_optional(dev, name);
+ if (IS_ERR(rstc)) {
+ ret = PTR_ERR(rstc);
+ goto rsnd_ssi_probe_done;
+ }
+
if (of_property_read_bool(np, "shared-pin"))
rsnd_flags_set(ssi, RSND_SSI_CLK_PIN_SHARE);

@@ -1225,7 +1245,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
ops = &rsnd_ssi_dma_ops;

ret = rsnd_mod_init(priv, rsnd_mod_get(ssi), ops, clk,
- NULL, RSND_MOD_SSI, i);
+ rstc, RSND_MOD_SSI, i);
if (ret)
goto rsnd_ssi_probe_done;

--
2.25.1