Re: iMX6UL EVK with kernel 4.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 01/05/16 20:27, Fabio Estevam wrote:
On Sun, May 1, 2016 at 11:49 AM, Fabio Estevam <festevam@xxxxxxxxx> wrote:
On Sat, Apr 30, 2016 at 8:18 AM, Petr Kulhavy <brain@xxxxxxxx> wrote:
Hi,

I'm trying to run the latest mainline kernel 4.6 on the iMX6UL EVK. The
board mostly works and the only problem is audio.
Even though the sound card is detected and the ALSA mixer can be controlled
there is no MCLK coming out of the SAI2 interface.
Also, have you tried setting bit 20 (SAI2_MCLK_DIR) of register IOMUXC_GPR_GPR1?

You can set this bit in the bootloader for a quick test.
So I tried it myself and here are the changes I did:

Hi Fabio,

and did that work for you?
In my DTS file I made a few more changes, see below.

Petr
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dts
b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
index 7207280..8c20783 100644
--- a/arch/arm/boot/dts/imx6ul-14x14-evk.dts
+++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
@@ -36,6 +36,23 @@
              enable-active-high;
          };
      };
+
+    sound {
+        compatible = "simple-audio-card";
+        simple-audio-card,name = "mx6ul-evk-sound-card";
+        simple-audio-card,format = "i2s";
+        simple-audio-card,bitclock-master = <&dailink_master>;
+        simple-audio-card,frame-master = <&dailink_master>;

                simple-audio-card,widgets =
                        "Microphone", "Mic Jack",
                        "Line", "Line In",
                        "Line", "Line Out",
                        "Speaker", "Speaker",
                        "Headphone", "Headphone Jack";
                simple-audio-card,routing =
                        "Headphone Jack", "HP_L",
                        "Headphone Jack", "HP_R",
                        "Speaker", "SPK_LP",
                        "Speaker", "SPK_LN",
                        "Speaker", "SPK_RP",
                        "Speaker", "SPK_RN",

                        "LINPUT1", "Mic Jack",
                        "LINPUT3", "Mic Jack",
                        "RINPUT1", "Mic Jack",
                        "RINPUT2", "Mic Jack";
+
+        simple-audio-card,cpu {
+            sound-dai = <&sai2>;
+        };
+
+        dailink_master: simple-audio-card,codec {
+            sound-dai = <&codec>;
+            clocks = <&clks IMX6UL_CLK_SAI2>;
+        };
+    };
  };

  &cpu0 {
@@ -43,6 +60,20 @@
      soc-supply = <&reg_soc>;
  };

+&i2c2 {
+    clock_frequency = <100000>;
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_i2c2>;
+    status = "okay";
+
+    codec: wm8960@1a {
+        #sound-dai-cells = <0>;
+        compatible = "wlf,wm8960";
+        reg = <0x1a>;
                clocks = <&clks IMX6UL_CLK_SAI2>;
                clock-names = "mclk";

+        wlf,shared-lrclk;
+    };
+};
+
  &fec1 {
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_enet1>;
@@ -86,6 +117,18 @@
      };
  };

+&sai2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_sai2>;
+
+    assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
+              <&clks IMX6UL_CLK_SAI2>;
+    assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+    assigned-clock-rates = <0>, <12288000>;
+
+    status = "okay";
+};
+
  &snvs_poweroff {
      status = "okay";
  };
@@ -272,6 +315,17 @@
          >;
      };

+    pinctrl_sai2: sai2grp {
+        fsl,pins = <
+            MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK    0x17088
+            MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC    0x17088
+            MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA    0x11088
+            MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA    0x11088
+            MX6UL_PAD_JTAG_TMS__SAI2_MCLK        0x17088
+            MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04    0x17059
+        >;
+    };
+
      pinctrl_pwm1: pwm1grp {
          fsl,pins = <
              MX6UL_PAD_GPIO1_IO08__PWM1_OUT   0x110b0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux