From nobody Mon Apr 6 12:17:07 2026 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E5073EC2C2; Thu, 19 Mar 2026 15:58:14 +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=1773935896; cv=none; b=WpAR+IG0kBgAO5OZh3ozLHZgTRDcBGzoIYVoLDL3Iaq6WwsdBWrKqdDSICQcg2zNVPhWdzIWwf3iNAe9Ih8xjaZLpRqKFRKOUEaDSbEzM6JQtQ4O4YqPjAgm3PTRw6r9bhKn+Lyucs0Eb68okNf2FybtMGwy8fw1EQbk7010Okk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773935896; c=relaxed/simple; bh=uduAbXx87Jb0f2ifVp148BdHVKrVEd7tXV03EPjNuAU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZgCqV6yIWCSjLCuTLwKPmX5imbvjFQL9N5wjyW5EDSoG6NheeMf60lT+enLcqMwNKW3ogsOWkVIrYCLzVYUVHACrhpfdt24PFkg4+OnN2xUXVtYhj/1ioGoIz2gsxQD/aF12lgEsDOw3+NKh+lxUpCujFfWk2e0hLQwq6pOxVsU= 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: zPZ+kk9pS+a8dOmMTwAFPA== X-CSE-MsgGUID: pRnLTKOCToKUWKyKadyiXQ== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 20 Mar 2026 00:58:13 +0900 Received: from ubuntu.adwin.renesas.com (unknown [10.226.93.35]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id ABB26401BC51; Fri, 20 Mar 2026 00:58:04 +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 22/22] arm64: dts: renesas: r9a09g047e57-smarc: add DA7212 audio codec support Date: Thu, 19 Mar 2026 16:53:34 +0100 Message-ID: <20260319155334.51278-23-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" 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 --- .../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 696903dc7a63..62bc8e2a178a 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"; @@ -248,6 +326,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