From: John Madieu Date: Mon, 25 May 2026 11:02:26 +0000 (+0000) Subject: ASoC: rsnd: adg: Look up RZ/G3E clkin under audio-clk{a,b,c,i} X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16593532c47ad6c1bab3af18fb7b0a5423c05cca;p=thirdparty%2Fkernel%2Flinux.git ASoC: rsnd: adg: Look up RZ/G3E clkin under audio-clk{a,b,c,i} The R-Car Sound ADG block has up to four external master-clock inputs named CLKA, CLKB, CLKC and CLKI by the silicon. On Gen2 R-Car these come from DT under the legacy names "clk_a", "clk_b", "clk_c", "clk_i" defined by renesas,rsnd.yaml. Gen4 collapses them to a single "clkin". The new standalone RZ/G3E sound binding (renesas,r9a09g047-sound.yaml) uses the standard DT naming convention with a vendor-meaningful prefix that matches the SoC datasheet pin labels: "audio-clka", "audio-clkb", "audio-clkc", "audio-clki". Add a third clkin name table for RZ/G3E and dispatch to it from rsnd_adg_get_clkin() in the same style as the existing Gen4 branch. The CLKA/B/C/I enum values, the clkin[] array, and the BRGA/BRGB derivation are unchanged - only the DT lookup names differ. Signed-off-by: John Madieu Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20260525110230.4014435-15-john.madieu.xa@bp.renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/renesas/rcar/adg.c b/sound/soc/renesas/rcar/adg.c index 5dce62287d200..483979c243198 100644 --- a/sound/soc/renesas/rcar/adg.c +++ b/sound/soc/renesas/rcar/adg.c @@ -77,6 +77,13 @@ static const char * const clkin_name_gen2[] = { [CLKI] = "clk_i", }; +static const char * const clkin_name_rzg3e[] = { + [CLKA] = "audio-clka", + [CLKB] = "audio-clkb", + [CLKC] = "audio-clkc", + [CLKI] = "audio-clki", +}; + static const char * const clkout_name_gen2[] = { [CLKOUT] = "audio_clkout", [CLKOUT1] = "audio_clkout1", @@ -574,6 +581,9 @@ static int rsnd_adg_get_clkin(struct rsnd_priv *priv) if (rsnd_is_gen4(priv)) { clkin_name = clkin_name_gen4; clkin_size = ARRAY_SIZE(clkin_name_gen4); + } else if (rsnd_is_rzg3e(priv)) { + clkin_name = clkin_name_rzg3e; + clkin_size = ARRAY_SIZE(clkin_name_rzg3e); } /*