From nobody Mon Apr 6 12:12:11 2026 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5EFD36F42C; Thu, 2 Apr 2026 09:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775121048; cv=none; b=d6TXIHm2EfvPYOgHV1XJN9qSzgrB6tjqz+bVy/0Te0UpELK3Okc/QxLFeqKR79/es+hSSPa7wShobzy7f1D2SqX1CVUFg6ttYt2UfWbzy6BW09CEsTA43LoHnhmiXdBTQGCT7msxACCfVTP0osOClP17P3A1SVmZlWbeHe47cyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775121048; c=relaxed/simple; bh=QW8cZbfDDiUr80rG6B5tOV1+EyT4O9IB3pA0VtBwJ2E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PD38Uf2mBDCfisW6bBPUv3cD0dEC/KjVKmnY9h4KP7oFg4njUldeipLYWqjc3OwSBGYU7/96YCDVpuOlpaYUTgnfjZUNkZJhCR5Fxr1EM9dDjJd0bmrlVqigp1eOTN+oIR8KGpgioFm5APFXe+7/IeAyPi2z8R/KVDSO004PzDQ= 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.171 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: JOsPZ5AVSH6Bp/A0rTPYtg== X-CSE-MsgGUID: OBsxnicMSCukZfqs3gLNEg== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 02 Apr 2026 18:10:45 +0900 Received: from ubuntu.adwin.renesas.com (unknown [10.226.92.136]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id DBE9C40E1DDD; Thu, 2 Apr 2026 18:10:36 +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 v2 24/24] arm64: dts: renesas: r9a09g047e57-smarc: add DA7212 audio codec support Date: Thu, 2 Apr 2026 11:05:23 +0200 Message-ID: <20260402090524.9137-25-john.madieu.xa@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260402090524.9137-1-john.madieu.xa@bp.renesas.com> References: <20260402090524.9137-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" RZ/G3E SMARC board has a DA7212 audio codec connected via I2C1 for sound input/output using SSI3/SSI4 where: - The codec receives its master clock from the Versa3 clock generator present on the SoM - SSI4 shares clock pins with SSI3 to provide a separate data line for full-duplex audio capture. Enable audio support on RZ/G3E SMARC2 EVK boards with a DA7212 audio codec. Signed-off-by: John Madieu --- Changes: v2: No changes .../boot/dts/renesas/r9a09g047e57-smarc.dts | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts b/arch/arm6= 4/boot/dts/renesas/r9a09g047e57-smarc.dts index 9be57785d9d5..2f4795e5e82b 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts @@ -32,6 +32,37 @@ #include "rzg3e-smarc-som.dtsi" #include "renesas-smarc2.dtsi" =20 +/* + * SSI-DA7212 + * + * These commands are required when Playback/Capture + * + * amixer -q cset name=3D'Aux Switch' on + * amixer -q cset name=3D'Mixin Left Aux Left Switch' on + * amixer -q cset name=3D'Mixin Right Aux Right Switch' on + * amixer -q cset name=3D'ADC Switch' on + * amixer -q cset name=3D'Mixout Right Mixin Right Switch' off + * amixer -q cset name=3D'Mixout Left Mixin Left Switch' off + * amixer -q cset name=3D'Headphone Volume' 70% + * amixer -q cset name=3D'Headphone Switch' on + * amixer -q cset name=3D'Mixout Left DAC Left Switch' on + * amixer -q cset name=3D'Mixout Right DAC Right Switch' on + * amixer -q cset name=3D'DAC Left Source MUX' 'DAI Input Left' + * amixer -q cset name=3D'DAC Right Source MUX' 'DAI Input Right' + * amixer -q sset 'Mic 1 Amp Source MUX' 'MIC_P' + * amixer -q sset 'Mic 2 Amp Source MUX' 'MIC_P' + * amixer -q sset 'Mixin Left Mic 1' on + * amixer -q sset 'Mixin Right Mic 2' on + * amixer -q sset 'Mic 1' 90% on + * amixer -q sset 'Mic 2' 90% on + * amixer -q sset 'Lineout' 80% on + * amixer -q set "Headphone" 100% on + * + * When Capture chained with DVC, use this command to amplify sound + * amixer set 'DVC In',0 80% + * For playback, use: amixer set 'DVC Out',0 80% + */ + / { model =3D "Renesas SMARC EVK version 2 based on r9a09g047e57"; compatible =3D "renesas,smarc2-evk", "renesas,rzg3e-smarcm", @@ -55,6 +86,22 @@ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd { gpios-states =3D <0>; states =3D <3300000 0>, <1800000 1>; }; + + sound_card: sound { + compatible =3D "audio-graph-card"; + + label =3D "snd-rzg3e"; + + dais =3D <&rsnd_port0>; /* DA7212 */ + }; +}; + +&audio_clkb { + clock-frequency =3D <11289600>; +}; + +&audio_clkc { + clock-frequency =3D <12288000>; }; =20 &canfd { @@ -99,6 +146,37 @@ &i2c0 { pinctrl-names =3D "default"; }; =20 +&i2c1 { + da7212: codec@1a { + compatible =3D "dlg,da7212"; + #sound-dai-cells =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0x1a>; + + clocks =3D <&versa3 1>; + clock-names =3D "mclk"; + + dlg,micbias1-lvl =3D <2500>; + dlg,micbias2-lvl =3D <2500>; + dlg,dmic-data-sel =3D "lrise_rfall"; + dlg,dmic-samplephase =3D "between_clkedge"; + dlg,dmic-clkrate =3D <3000000>; + + VDDA-supply =3D <®_1p8v>; + VDDSP-supply =3D <®_3p3v>; + VDDMIC-supply =3D <®_3p3v>; + VDDIO-supply =3D <®_1p8v>; + + port { + da7212_endpoint: endpoint { + remote-endpoint =3D <&rsnd_endpoint0>; + mclk-fs =3D <256>; + }; + }; + }; +}; + &keys { pinctrl-0 =3D <&nmi_pins>; pinctrl-names =3D "default"; @@ -280,6 +358,42 @@ &sdhi1 { vqmmc-supply =3D <&vqmmc_sd1_pvdd>; }; =20 +&snd_rzg3e { + pinctrl-0 =3D <&sound_clk_pins &sound_pins>; + pinctrl-names =3D "default"; + + status =3D "okay"; + + /* audio_clkout */ + #clock-cells =3D <0>; + clock-frequency =3D <11289600>; + + /* Multi DAI */ + #sound-dai-cells =3D <1>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + rsnd_port0: port@0 { + reg =3D <0>; + rsnd_endpoint0: endpoint { + remote-endpoint =3D <&da7212_endpoint>; + + dai-format =3D "i2s"; + bitclock-master =3D <&rsnd_endpoint0>; + frame-master =3D <&rsnd_endpoint0>; + + playback =3D <&ssi3>, <&src1>, <&dvc1>; + capture =3D <&ssi4>, <&src0>, <&dvc0>; + }; + }; + }; +}; + +&ssi4 { + shared-pin; +}; + &xhci { pinctrl-0 =3D <&usb3_pins>; pinctrl-names =3D "default"; --=20 2.25.1