wm8958 imx6q sabresd

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wm8958 imx6q sabresd

1,728 Views
spoonik
Contributor I

Hi
I'm developing custom sabresd board with wm8958. 
wm8958 connected via i2s interface with 4 wire (sync mode). AUD3(imx6q) to i2s1(wm8958).
I use imx4.9-imx branch. Enable wm8958 in menuconfig.

In dts use 

sound {
   compatible = "fsl,imx7d-12x12-lpddr3-arm2-wm8958",
   "fsl,imx-audio-wm8958";
   model = "wm8958-audio";
   audio-codec = <&codec>;
   codec-slave;
   cpu-dai = <&ssi2>;

   asrc-controller = <&asrc>;

   mux-int-port = <2>;
   mux-ext-port = <3>;
};



codec: wm8958@1a {
   compatible = "wlf,wm8958";
   reg = <0x1a>;
   /*clocks = <&clks IMX6QDL_CLK_CKO>;*/
   clocks = <&clks 201>;
   clock-names = "mclk1";

   wlf,ldo1ena;
   wlf,ldo2ena;

   i2c-slave;
   status = "okay";
};



pinctrl_audmux: audmuxgrp {
   fsl,pins = <
   MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
   MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
   MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0
   MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
   >;
};



&audmux {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_audmux>;
   status = "okay";
};

‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&ssi2 {
     assigned-clocks = <&clks IMX6QDL_CLK_PLL4>,
                 <&clks IMX6QDL_PLL4_BYPASS>,
                 <&clks IMX6QDL_CLK_SSI2_SEL>;
     assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>,
                     <&clks IMX6QDL_CLK_PLL4>,
                     <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
     assigned-clock-rates = <1179648000>, <0>, <0>;
     status = "okay";
};

I use "fsl,imx7d-12x12-lpddr3-arm2-wm8958" becouse there is problem with gpr in linux. Gpr in u-boot is enabled:

CCM_CCGR5, 0x0FFC00C3

In dmesg I saw that wm8958 init.
   fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
   imx-wm8958 sound: wm8994-aif1 <-> 202c000.ssi mapping ok

ALSA device list:
   #0: Loopback 1
   #1: wm8958-audio

In alsamixer wm8958 is default, and 100% volume, but sound is off.

I think I have a problem with ssi. How to correct dts?

Labels (3)
Tags (2)
0 Kudos
4 Replies

1,268 Views
prasannakulkarni
Contributor IV

Hi,

Did you solve this issue finally??

We are also facing the same issue..

We have used imx-wm8958.c machine driver

Which expects some gpr... From dtsi... What to be passed no info... No reference...

I have skipped this gpr parsing in machine driver...

Then ALSA lists that #0 wm8958-audio in boot log....

But no sound is coming out... Probed in oscilloscope... All voltages clks are up... But no sound....

0 Kudos

1,268 Views
igorpadykov
NXP Employee
NXP Employee

Hi nikita

i.MX7D has not ssi & audmux modules, for ssi & audmux examples on can look

at linux/arch/arm/boot/dts/imx6qdl-sabresd.dtsi

linux-imx.git - i.MX Linux Kernel 

May be useful to look at wm8962 driver description in Linux Manual included in

Linux Documentation

https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_LINUX_DOCS 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,268 Views
spoonik
Contributor I

Thank you for reply.

I use imx6q sabresd board for example. I don't use imx7d. I wrote that I use this config because there is a problem with gpr. Gpr enabled in u-boot.

0 Kudos

1,268 Views
igorpadykov
NXP Employee
NXP Employee

if sound is off, one can check codec signals with oscilloscope and

further debug in codec driver. Refer to Linux Documentation on

i.MX Software|NXP