mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 17:42:03 +02:00
arm64: dts: renesas: r9a09g047e57-smarc: Add DA7212 audio codec support
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. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Link: https://patch.msgid.link/20260619083951.3777556-5-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
14d21efe16
commit
3e23d2548d
|
|
@ -32,6 +32,37 @@
|
|||
#include "rzg3e-smarc-som.dtsi"
|
||||
#include "renesas-smarc2.dtsi"
|
||||
|
||||
/*
|
||||
* SSI-DA7212
|
||||
*
|
||||
* These commands are required when Playback/Capture
|
||||
*
|
||||
* amixer -q cset name='Aux Switch' on
|
||||
* amixer -q cset name='Mixin Left Aux Left Switch' on
|
||||
* amixer -q cset name='Mixin Right Aux Right Switch' on
|
||||
* amixer -q cset name='ADC Switch' on
|
||||
* amixer -q cset name='Mixout Right Mixin Right Switch' off
|
||||
* amixer -q cset name='Mixout Left Mixin Left Switch' off
|
||||
* amixer -q cset name='Headphone Volume' 70%
|
||||
* amixer -q cset name='Headphone Switch' on
|
||||
* amixer -q cset name='Mixout Left DAC Left Switch' on
|
||||
* amixer -q cset name='Mixout Right DAC Right Switch' on
|
||||
* amixer -q cset name='DAC Left Source MUX' 'DAI Input Left'
|
||||
* amixer -q cset name='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 = "Renesas SMARC EVK version 2 based on r9a09g047e57";
|
||||
compatible = "renesas,smarc2-evk", "renesas,rzg3e-smarcm",
|
||||
|
|
@ -55,6 +86,22 @@ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd {
|
|||
gpios-states = <0>;
|
||||
states = <3300000 0>, <1800000 1>;
|
||||
};
|
||||
|
||||
sound_card: sound {
|
||||
compatible = "audio-graph-card";
|
||||
|
||||
label = "snd-rzg3e";
|
||||
|
||||
dais = <&rsnd_port0>; /* DA7212 */
|
||||
};
|
||||
};
|
||||
|
||||
&audio_clkb {
|
||||
clock-frequency = <11289600>;
|
||||
};
|
||||
|
||||
&audio_clkc {
|
||||
clock-frequency = <12288000>;
|
||||
};
|
||||
|
||||
&canfd {
|
||||
|
|
@ -99,6 +146,35 @@ &i2c0 {
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
da7212: codec@1a {
|
||||
compatible = "dlg,da7212";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x1a>;
|
||||
|
||||
clocks = <&versa3 1>;
|
||||
clock-names = "mclk";
|
||||
|
||||
dlg,micbias1-lvl = <2500>;
|
||||
dlg,micbias2-lvl = <2500>;
|
||||
dlg,dmic-data-sel = "lrise_rfall";
|
||||
dlg,dmic-samplephase = "between_clkedge";
|
||||
dlg,dmic-clkrate = <3000000>;
|
||||
|
||||
VDDA-supply = <®_1p8v>;
|
||||
VDDSP-supply = <®_3p3v>;
|
||||
VDDMIC-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_1p8v>;
|
||||
|
||||
port {
|
||||
da7212_endpoint: endpoint {
|
||||
remote-endpoint = <&rsnd_endpoint0>;
|
||||
mclk-fs = <256>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&keys {
|
||||
pinctrl-0 = <&nmi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
|
@ -280,6 +356,42 @@ &sdhi1 {
|
|||
vqmmc-supply = <&vqmmc_sd1_pvdd>;
|
||||
};
|
||||
|
||||
&snd_rzg3e {
|
||||
pinctrl-0 = <&sound_clk_pins &sound_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
|
||||
/* audio_clkout */
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <11289600>;
|
||||
|
||||
/* Multi DAI */
|
||||
#sound-dai-cells = <1>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
rsnd_port0: port@0 {
|
||||
reg = <0>;
|
||||
rsnd_endpoint0: endpoint {
|
||||
remote-endpoint = <&da7212_endpoint>;
|
||||
|
||||
dai-format = "i2s";
|
||||
bitclock-master = <&rsnd_endpoint0>;
|
||||
frame-master = <&rsnd_endpoint0>;
|
||||
|
||||
playback = <&ssi3>, <&src1>, <&dvc1>;
|
||||
capture = <&ssi4>, <&src0>, <&dvc0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ssi4 {
|
||||
shared-pin;
|
||||
};
|
||||
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user