From patchwork Sat Jun 11 05:02:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9170955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87970604DB for ; Sat, 11 Jun 2016 05:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 681EB2766D for ; Sat, 11 Jun 2016 05:06:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48D232835D; Sat, 11 Jun 2016 05:06:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F7592766D for ; Sat, 11 Jun 2016 05:06:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bBb4m-0006KK-5n; Sat, 11 Jun 2016 05:03:16 +0000 Received: from smtp33.i.mail.ru ([94.100.177.93]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bBb4b-00067l-Sq for linux-arm-kernel@lists.infradead.org; Sat, 11 Jun 2016 05:03:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=g5bDxpaf70Lzp3XnIa8gPhNINkvTlOl1laNT10Nogj8=; b=RZjVtJ6dnBGrFZYVlEEirj6wkbCGkTC/OxvP+cj21m3M8ssxv+ULdYuYd44GdckD1py5rAFmtOo2G7K3jK6KA1kdiz7zNxnSvwnd4HLpFpqNs1ywjFY54WbSrys+HQmUAbCv9lxcCymdT43B/3HWdhKaL4DepZLeq5mSuTgKJ1Q=; Received: from [5.18.96.7] (port=61335 helo=shc.zet) by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1bBb4D-0007T3-HB; Sat, 11 Jun 2016 08:02:41 +0300 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] ARM: dts: imx51-babbage: Switch using simple-audio-card for audio support Date: Sat, 11 Jun 2016 08:02:20 +0300 Message-Id: <1465621345-12597-2-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 2.4.9 In-Reply-To: <1465621345-12597-1-git-send-email-shc_work@mail.ru> References: <1465621345-12597-1-git-send-email-shc_work@mail.ru> X-Mras: OK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160610_220306_608251_9D4B5F08 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Shiyan , Shawn Guo , Russell King , Sascha Hauer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The sound support can be handled by "simple-audio-card" instead of use a private driver. Signed-off-by: Alexander Shiyan Tested-by: Sascha Hauer --- arch/arm/boot/dts/imx51-babbage.dts | 51 +++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 018d24e..54c38ce 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -11,6 +11,8 @@ */ /dts-v1/; +#include + #include "imx51.dtsi" / { @@ -141,17 +143,29 @@ }; sound { - compatible = "fsl,imx51-babbage-sgtl5000", - "fsl,imx-audio-sgtl5000"; - model = "imx51-babbage-sgtl5000"; - ssi-controller = <&ssi2>; - audio-codec = <&sgtl5000>; - audio-routing = + compatible = "simple-audio-card"; + simple-audio-card,name = "imx51-babbage-sgtl5000"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&master>; + simple-audio-card,frame-master = <&master>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Line", "Line In Jack", + "Headphone", "Headphone Jack", + "Speaker", "Line Out Jack", + "Speaker", "Ext Spk"; + simple-audio-card,routing = "MIC_IN", "Mic Jack", "Mic Jack", "Mic Bias", "Headphone Jack", "HP_OUT"; - mux-int-port = <2>; - mux-ext-port = <3>; + + simple-audio-card,cpu { + sound-dai = <&ssi2>; + }; + + master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; }; usbphy { @@ -173,6 +187,26 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; status = "okay"; + + audmux_ssi1 { + fsl,audmux-port = ; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(MX51_AUDMUX_PORT3) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(MX51_AUDMUX_PORT3) | + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT3) + >; + }; + + audmux_aud3 { + fsl,audmux-port = ; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT2_SSI1) + >; + }; }; &ecspi1 { @@ -339,6 +373,7 @@ status = "okay"; sgtl5000: codec@0a { + #sound-dai-cells = <0>; compatible = "fsl,sgtl5000"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_clkcodec>;