]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: rsnd: adg: Look up RZ/G3E clkin under audio-clk{a,b,c,i}
authorJohn Madieu <john.madieu.xa@bp.renesas.com>
Mon, 25 May 2026 11:02:26 +0000 (11:02 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 14:30:24 +0000 (15:30 +0100)
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 <john.madieu.xa@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20260525110230.4014435-15-john.madieu.xa@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/adg.c

index 5dce62287d200deeea5d4d7026ef2f6c62ec83fd..483979c243198371c7e8dbb0f9a236bb8177bd23 100644 (file)
@@ -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);
        }
 
        /*