From patchwork Sat Jun 11 05:02:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9170965 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 70722604DB for ; Sat, 11 Jun 2016 05:06:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6508528325 for ; Sat, 11 Jun 2016 05:06:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59BC028356; Sat, 11 Jun 2016 05:06:31 +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 79A532766D for ; Sat, 11 Jun 2016 05:06:30 +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 1bBb5L-0006ch-Qx; Sat, 11 Jun 2016 05:03:51 +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-00069h-Sp for linux-arm-kernel@lists.infradead.org; Sat, 11 Jun 2016 05:03:09 +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=Hdv26l0B2Qyj/vhFzXSlwAyHVFAFFPxjBTgHsL6HSdw=; b=tp/REYH5AYJy/OD9RJjDLqgaTrlpFvLM0ll+eCz/aG2b/fmT4bIU6PvPds3M3tLuI8UaYuTyRAE+sEBSh0opfQm3W5CHn5SICa1x28QVXjy73eo3IHmoHC/IVSjYdiCC+sGrFgJ02Hb+Kz9kLP+pYB3i+ZHpsoxKWTLWjShTJYU=; Received: from [5.18.96.7] (port=61335 helo=shc.zet) by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1bBb4G-0007T3-Aw; Sat, 11 Jun 2016 08:02:44 +0300 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/7] ARM: dts: imx53-tx53: Switch using simple-audio-card for audio support Date: Sat, 11 Jun 2016 08:02:24 +0300 Message-Id: <1465621345-12597-6-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_636646_7A88FB66 X-CRM114-Status: GOOD ( 12.79 ) 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 --- arch/arm/boot/dts/imx53-tx53-x03x.dts | 1 + arch/arm/boot/dts/imx53-tx53-x13x.dts | 1 + arch/arm/boot/dts/imx53-tx53.dtsi | 57 ++++++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts index 0ecb43d..b3e742a 100644 --- a/arch/arm/boot/dts/imx53-tx53-x03x.dts +++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts @@ -204,6 +204,7 @@ status = "okay"; sgtl5000: codec@0a { + #sound-dai-cells = <0>; compatible = "fsl,sgtl5000"; reg = <0x0a>; VDDA-supply = <®_2v5>; diff --git a/arch/arm/boot/dts/imx53-tx53-x13x.dts b/arch/arm/boot/dts/imx53-tx53-x13x.dts index 3cf682a..90c0611 100644 --- a/arch/arm/boot/dts/imx53-tx53-x13x.dts +++ b/arch/arm/boot/dts/imx53-tx53-x13x.dts @@ -111,6 +111,7 @@ status = "okay"; sgtl5000: codec@0a { + #sound-dai-cells = <0>; compatible = "fsl,sgtl5000"; reg = <0x0a>; VDDA-supply = <®_2v5>; diff --git a/arch/arm/boot/dts/imx53-tx53.dtsi b/arch/arm/boot/dts/imx53-tx53.dtsi index bd3dfef..97e630b 100644 --- a/arch/arm/boot/dts/imx53-tx53.dtsi +++ b/arch/arm/boot/dts/imx53-tx53.dtsi @@ -12,8 +12,10 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include "imx53.dtsi" #include +#include + +#include "imx53.dtsi" / { model = "Ka-Ro electronics TX53 module"; @@ -124,17 +126,29 @@ }; sound { - compatible = "karo,tx53-audio-sgtl5000", "fsl,imx-audio-sgtl5000"; - model = "tx53-audio-sgtl5000"; - ssi-controller = <&ssi1>; - audio-codec = <&sgtl5000>; - audio-routing = + compatible = "simple-audio-card"; + simple-audio-card,name = "tx53-audio-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"; - /* '1' based port numbers according to datasheet names */ - mux-int-port = <1>; - mux-ext-port = <5>; + + simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; }; }; @@ -142,6 +156,26 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ssi1>; status = "okay"; + + audmux_ssi0 { + fsl,audmux-port = ; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT4) + >; + }; + + audmux_aud4 { + fsl,audmux-port = ; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT2_SSI0) + >; + }; }; &can1 { @@ -502,14 +536,9 @@ }; &ssi1 { - codec-handle = <&sgtl5000>; status = "okay"; }; -&ssi2 { - status = "disabled"; -}; - &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>;