From nobody Mon Apr 6 12:17:07 2026 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 373003E8C60; Thu, 19 Mar 2026 15:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773935800; cv=none; b=JSNdUWiuRY6d2Xkbg373Xph3nrUzQga0tJ3M+sx3lq1U3mHHWki5K0Jn1VIFFrUxo9hJ6fYX9h+yfk9B1v0qcMXTTzdO1KqpuZXjB3Nxc9ZytgXwiJUgjeRenbjbN3JPKHmAWGW+orqgzCZF5tKenK2Mrbq79h7cFCubk6qtaMU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773935800; c=relaxed/simple; bh=UBOnLwm3GZOOJiBwqs7ZpyYoqYu152qMXe2ZhHRsgxc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GlPZGM4EuJ8iAmlzzcmqw/vN2b8BIvkR8xkCHAbkiQa0Qabs2+6skoTcwNzfzKRyIX5NAqmaFOD/zRQNuXQ4UbGZrUXWPk4wEu1irKO1HbhOpl8YOqSBQrrEj8ZjorxDMyraBMMfmqfUZx+gMRkrrDE2D3N/5ddZH6Exw12IBbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: 0WIbw9C5QUujz3gxKdxtSQ== X-CSE-MsgGUID: yqDSHeGMQ0ybsMGFn8Ur0Q== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 20 Mar 2026 00:56:37 +0900 Received: from ubuntu.adwin.renesas.com (unknown [10.226.93.35]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6B70D401B641; Fri, 20 Mar 2026 00:56:28 +0900 (JST) From: John Madieu To: Geert Uytterhoeven , Kuninori Morimoto , Vinod Koul , Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Michael Turquette , Stephen Boyd , Conor Dooley , Frank Li , Liam Girdwood , Magnus Damm , Thomas Gleixner , Jaroslav Kysela , Takashi Iwai , Philipp Zabel , Claudiu Beznea , Biju Das , Fabrizio Castro , Lad Prabhakar , John Madieu , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-sound@vger.kernel.org, John Madieu Subject: [PATCH 12/22] ASoC: rsnd: Update SSI for RZ/G3E support Date: Thu, 19 Mar 2026 16:53:24 +0100 Message-ID: <20260319155334.51278-13-john.madieu.xa@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260319155334.51278-1-john.madieu.xa@bp.renesas.com> References: <20260319155334.51278-1-john.madieu.xa@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 =3D rsnd_io_to_mod_ssi(io); struct rsnd_ssi *ssi =3D rsnd_mod_to_ssi(mod); + struct rsnd_priv *priv =3D rsnd_mod_to_priv(mod); int use_busif =3D 0; =20 + /* + * 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; =20 @@ -865,6 +872,8 @@ static int rsnd_ssi_common_remove(struct rsnd_mod *mod, rsnd_flags_del(ssi, RSND_SSI_PROBED); } =20 + rsnd_dma_detach(io, mod, &io->dma); + return 0; } =20 @@ -1158,6 +1167,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) =20 int rsnd_ssi_probe(struct rsnd_priv *priv) { + struct reset_control *rstc; struct device_node *node; struct device *dev =3D 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; } =20 + /* + * RZ/G3E uses per-SSI reset controllers. + * R-Car platforms typically don't have SSI reset controls. + */ + rstc =3D devm_reset_control_get_optional(dev, name); + if (IS_ERR(rstc)) { + ret =3D 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); =20 @@ -1225,7 +1245,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv) ops =3D &rsnd_ssi_dma_ops; =20 ret =3D 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; =20 --=20 2.25.1