Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

How to add Codec DA7213 in RZG2L-SMARC-EVK WS1

$
0
0

Hi,

I am working on Codec DA7213 interface with RZG2L-SMARC-EVK WS1 board.

I have Codec DA7213 EVK board, where I can access I2C and I2S lines.

I disable the WM8978 codec present in RZG2L-SMARC-EVK WS1 and added DA723 details in rzg2l-smarc.dtsi file.

Also change the SSI0 channel to SSI1 because SSI1 is available on PMOD connector.

I am using I2C3 channel form Pin 3 and 4 of PMOD1 and I2S channel form Pin 4,3,2,1 of PMOD0.

Please find below changes done in rzg2l-smarc.dtsi file.

1. Added snd_rzg2l:sound

2. Added DA7213 in I2C3

3. Select Pins for SSI1.

4. Remove RSPI1, because of pin conflict.

    snd_rzg2l: sound {
        compatible = "simple-audio-card";
        simple-audio-card,format = "i2s";
        simple-audio-card,bitclock-master = <&cpu_dai>;
        simple-audio-card,frame-master = <&cpu_dai>;
        
        simple-audio-card,widgets =
            "Microphone", "Microphone Jack",
            "Headphone", "Headphone Jack",
            "Speaker", "Speaker Out";
        simple-audio-card,routing =
            "MIC1", "Mic Bias",
            "MIC2", "Mic Bias",
            "Mic Bias", "Microphone Jack",
            "Headphone Jack", "HPL",
            "Headphone Jack", "HPR",
            "Speaker Out", "LINE";
        cpu_dai: simple-audio-card,cpu {
            sound-dai = <&ssi1>;
        };

        codec_dai: simple-audio-card,codec {
            sound-dai = <&da7213>;
            clocks = <&versa3 0>;
        };
    };

    sound_card {
        compatible = "audio-graph-card";
        dais = <&ssi0>;
    };

&i2c3 {
    pinctrl-0 = <&i2c3_pins>;
    pinctrl-names = "default";

    clock-frequency = <400000>;
    status = "okay";

    versa3: versa3@68 {
        compatible = "renesas,5p35023";
        reg = <0x68>;
        #clock-cells = <1>;
        clocks = <&x1_clk>;
        clock-names = "x1";
        assigned-clocks = <&versa3 0>,
                   <&versa3 1>,
                   <&versa3 2>,
                   <&versa3 3>,
                   <&versa3 4>,
                   <&versa3 5>;
        assigned-clock-rates =    <12288000>, <25000000>,
                    <12000000>, <11289600>,
                    <11289600>, <24000000>;
        clock-divider-read-only = <1>, <1>, <1>, <1>, <1>;
        clock-flags = <2176>, <2176>, <2176>, <2052>, <2176>, <2048>;
    };
    
    da7213: da7213@1a {
        compatible = "dlg,da7213";
        #sound-dai-cells = <0>;
        reg = <0x1a>;
        dlg,micbias1-lvl = <2500>;
        dlg,micbias2-lvl = <2500>;
        dlg,dmic-data-sel = "lrise_rfall";
        dlg,dmic-samplephase = "between_clkedge";
        dlg,dmic-clkrate = <3000000>;
    };

    wm8978: codec@1a {
        compatible = "wlf,wm8978";
        #sound-dai-cells = <0>;
        reg = <0x1a>;
        status = "disabled";
    };
};

    ssi1_pins: ssi1 {
        groups = "ssi1_ctrl_c", "ssi1_data_c";
        function = "ssi1";
    };

    /*spi1_pins: rspi1 {
        groups = "rspi1_clk_b", "rspi1_data_b", "rspi1_ssl_b";
        function = "rspi1";
    };*/

Also I made change in defconfig as follows

CONFIG_SND_SOC_WM8978=n
CONFIG_SND_SOC_DA7213=y

After that i use bitbake linux-renesas -fc compile and  bitbake linux-renesas -fc deploy commands to compile it.

Can you please guide us on the same.

How I will conform that, This DA7213 is added or not??

What I have done is correct or any thing I gave to do??

Thanks & Regards

Pravin Raut


Viewing all articles
Browse latest Browse all 1583

Trending Articles