From patchwork Mon Sep 18 11:28:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 9956537 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 C0F14601E9 for ; Mon, 18 Sep 2017 11:37:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD8562811A for ; Mon, 18 Sep 2017 11:37:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F71128A75; Mon, 18 Sep 2017 11:37:38 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 041D52811A for ; Mon, 18 Sep 2017 11:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DqSaBqvYqOvic0JegP0HoD//3aCV1Oe4aqOssiZqJJQ=; b=YXRi8fsB3MQwlRESgyUx/EfNgc uPDjpT2pM/qZZATqgGVpfccP/2f2JAPQWwBtuWT1mlkd4ZKTdB96ut67cNoKtfmdreXIEfyi1sRBA pmwojbO4WYxYkVngdJkQNvlSi3Vf3YPGXuRWbJ73cNH5q4MrjNFTpZ6j8hG5kO6cbNJntByiHWze6 +psdHWwMHu2sbqOTjgls7huxpuHFAJBRSVqcQKnjQgreNoMxutI0YvdFg/V/pW41KGy7oAvBL9oXe u5IV/No7HFACsSiewhu+KDYIGac+CZTusWUtNKl3yKlOrJLoTE2YN60KPw/Ico6HKaDmARqWVHpq/ 36o4qBRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dtuMl-0007Ng-3n; Mon, 18 Sep 2017 11:37:31 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dtuLr-0006eF-OV for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 11:36:44 +0000 Received: by mail-pg0-x242.google.com with SMTP id j16so100995pga.2 for ; Mon, 18 Sep 2017 04:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G04PeUKk/DRYJC4etZsQKTekfYpNZoHaOKMiY/XiCzI=; b=J7JtWH7xHyR8OmHDFlZCDMI+o3F4dLdbFdKw05PlA7fXfSJDJnV5NNnuIdm6zQTMc9 iD5UNFMpK4b+FMdn30v4f/ZQE6emzYDL9au6m1no/q8feT1h+BMTsbYeNIVzkCXy/YK+ edS3sC6JfM6sRPfMTBvCeOgN6jSPJdme7xJPmVAP+XVSzs3XlgfhIKrryZRdHF+zHdim 7CW56weDF0cm4fjtsbdc+10YFDhZYd/a5DqFoqfiKcis2qgWYj8uMm7Y1VCLYOXvOUod i8Oms/bzn66X4BH5F947gBjeERiQVR86MyV0p/0cutn6PPs51e6/o/Dar6iNSKYRa8qm g8Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G04PeUKk/DRYJC4etZsQKTekfYpNZoHaOKMiY/XiCzI=; b=dMx8JGVMFfV9HxOA7SZ4dYzBTwa9620BRyOFmEdiN/f2CRyX/Pyrm4Oq/CqkLzdoYR h9axq6WX5ELbxf5Xbx6IMRnUiXVkA4gW0h/UQ6OpXoEhcVIhhNjr8gvTddFgz9QA63MB jf5+kBnC3Tv/380sP82B4xJcx0KaZidE8J62zfzKiN6wf7+owIs28eBXTRNw2TYMg/nu cFI6nw+G4fszzCuZyqlCTw+vTDKlUCOqS1GUFbOhCDZt/wzYVgI+zquRIKU2vdDoE+aT WemyUWb4e3wJnBiY+vM9b3OavxwOP5C1uap07WwfI5wKg0MPkVaU5yJw3MBuV9ZO2FSu GjVw== X-Gm-Message-State: AHPjjUgTFHRrS+Bt5j1aaOJSGHOE01cMw9Akbv7iguiwezGQ0i6gSZpw 7W6UO5Tc54dIMQ== X-Google-Smtp-Source: AOwi7QCk1RShYZT+eGqXMNKrj6KochUbQ5EwNY18/hcjaod28LjCkXgDg+xWa5g0C2RoqwmBnCSpgA== X-Received: by 10.159.218.67 with SMTP id x3mr7290512plv.336.1505734575161; Mon, 18 Sep 2017 04:36:15 -0700 (PDT) Received: from localhost.localdomain ([115.97.191.18]) by smtp.gmail.com with ESMTPSA id z22sm13517562pfi.166.2017.09.18.04.36.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 04:36:14 -0700 (PDT) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Shawn Guo Subject: [PATCH v5 3/5] ARM: dts: imx6qdl-icore-rqs: Switch to use simple-audio-card Date: Mon, 18 Sep 2017 16:58:31 +0530 Message-Id: <1505734113-9708-3-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505734113-9708-1-git-send-email-jteki@openedev.com> References: <1505734113-9708-1-git-send-email-jteki@openedev.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_043636_549404_42C621CB X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Matteo Lisi , linux-kernel@vger.kernel.org, Jagan Teki , Sascha Hauer , Fabio Estevam , Michael Trimarchi , linux-arm-kernel@lists.infradead.org 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 From: Jagan Teki This patch replace fsl,imx-audio-sgtl5000 and use simple-audio-card for Engicam i.CoreM6 RQS QDL platform boards. This patch also fix, pinctrl_adumux. Cc: Shawn Guo Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- Changes for v5: - Update commit message - Add adumux - Update simple-audio-card,widgets - Add ssi1 fsl,mode - Add #sound-dai-cells in codec Changes for v4: - None Changes for v3: - Newly added arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 60 +++++++++++++++++++++++++------- arch/arm/boot/dts/imx6qdl-icore.dtsi | 4 +-- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi b/arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi index e196d1b..e97002b 100644 --- a/arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi +++ b/arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi @@ -41,6 +41,7 @@ #include #include +#include / { memory { @@ -120,28 +121,61 @@ }; sound { - compatible = "fsl,imx-audio-sgtl5000"; - model = "imx-audio-sgtl5000"; - ssi-controller = <&ssi1>; - audio-codec = <&sgtl5000>; - audio-routing = + compatible = "simple-audio-card"; + simple-audio-card,name = "imx6qdl-icore-rqs-sgtl5000"; + 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", + "Headphone", "Headphone Jack", + "Line", "Line In 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 = <1>; - mux-ext-port = <4>; - }; -}; -&clks { - assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; - assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; + simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; }; &audmux { 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_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_PORT1_SSI0) + >; + }; +}; + +&clks { + assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; + assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; }; &fec { @@ -189,6 +223,7 @@ status = "okay"; sgtl5000: codec@a { + #sound-dai-cells = <0>; compatible = "fsl,sgtl5000"; reg = <0x0a>; clocks = <&clks IMX6QDL_CLK_CKO>; @@ -206,6 +241,7 @@ }; &ssi1 { + fsl,mode = "i2s-slave"; status = "okay"; }; diff --git a/arch/arm/boot/dts/imx6qdl-icore.dtsi b/arch/arm/boot/dts/imx6qdl-icore.dtsi index 9682ae2..a1b469c 100644 --- a/arch/arm/boot/dts/imx6qdl-icore.dtsi +++ b/arch/arm/boot/dts/imx6qdl-icore.dtsi @@ -269,8 +269,8 @@ pinctrl_audmux: audmux { fsl,pins = < MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 - MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 - MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 + MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 + MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 >; };