From patchwork Sun May 1 18:27:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 8989111 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1AFC99F372 for ; Sun, 1 May 2016 18:27:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 198012024C for ; Sun, 1 May 2016 18:27:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 18DF220219 for ; Sun, 1 May 2016 18:27:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7C8A82651DB; Sun, 1 May 2016 20:27:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 42F7526068F; Sun, 1 May 2016 20:27:43 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B38582606C7; Sun, 1 May 2016 20:27:41 +0200 (CEST) Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) by alsa0.perex.cz (Postfix) with ESMTP id BCC5B2604DF for ; Sun, 1 May 2016 20:27:34 +0200 (CEST) Received: by mail-ig0-f171.google.com with SMTP id bi2so67290453igb.0 for ; Sun, 01 May 2016 11:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=gSr3fvux/TctzWl+qQ0OvDhyB9ZyHuGpnaHUB4NQEtk=; b=cPziWCxQOjByVAdmqro5wS6wRZH9pCW92Olw7J1Fm/w7CIUidq6XxrcZjYmTYTbEEo Ab4YDTxq9/2JtcUsoMWUSNNUE86gOPshCCV9m7g+VTjEtM92U179oF2mBYpgD5DeWxdT N7fQfixc69TKECJ5dP4I2mP2U3ShSNadz29sabX9zyq1X2x4C/cferLjQs8Kim8GCLi2 ltg1sIG/46RqBSrcxfBIXDr5xGLoOoGFfGJWogsE0YP+QQJ272pJ56y3uVb4W2UAdfOv W3VN7QH3Eet+xc1FMrZsmLbMraejXls9JfniPg/fdMLwzsf67TlxdPhuqbegeCYMqDvT WM3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=gSr3fvux/TctzWl+qQ0OvDhyB9ZyHuGpnaHUB4NQEtk=; b=cgiXp1e+ujxsotNWRCnFNOqR2murgHGBS15ZCTchT6j98ujdHYtiV23T7IwOimXOoj 8Pq0esJQ9zK6ZwL8bwZii9mQygMshcsCtzwTWWQEj2ZvioqgnxxpA69eGz54rjmslXp1 SLf5r5kMG6X5qCEnkZ27KcJ05tYPtUAIdqsg0i8rNfwRNT9VWzHUmxpCAj+qnWTh1Snd Eq1sM/9luqN5fvaaCluyT1s3rOlAQvmHATPve4zgmhznrilKolpLbtq36aDIpgT1aHTc rz4ZtQdz4Mme5lbPnHjcQGQwaMQgZTdA/na4Zxf9OaqW3h4LgmcOcxkuba81rKTWw8JL dzog== X-Gm-Message-State: AOPr4FXMvspXUJgygWW7bYLPyZ9sxnZQGSVBmKwh3OgfEQ9nlE40duTCdiuVMSsARvIsgHJiQ28Y7RoLZB7dAQ== MIME-Version: 1.0 X-Received: by 10.50.249.49 with SMTP id yr17mr15985542igc.28.1462127253745; Sun, 01 May 2016 11:27:33 -0700 (PDT) Received: by 10.79.101.194 with HTTP; Sun, 1 May 2016 11:27:33 -0700 (PDT) In-Reply-To: References: <50f27095-3304-03fa-7209-3f05baccb346@jikos.cz> Date: Sun, 1 May 2016 15:27:33 -0300 Message-ID: From: Fabio Estevam To: Petr Kulhavy Cc: Nicolin Chen , "alsa-devel@alsa-project.org" , Timur Tabi Subject: Re: [alsa-devel] iMX6UL EVK with kernel 4.6 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, May 1, 2016 at 11:49 AM, Fabio Estevam wrote: > On Sat, Apr 30, 2016 at 8:18 AM, Petr Kulhavy 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: 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,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 = <®_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>; + 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