From patchwork Fri Jul 7 16:42:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9830749 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 E83B6602BD for ; Fri, 7 Jul 2017 16:43:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D836B28694 for ; Fri, 7 Jul 2017 16:43:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCA51286E4; Fri, 7 Jul 2017 16:43:41 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34FA528694 for ; Fri, 7 Jul 2017 16:43:40 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1F8AE2671EB; Fri, 7 Jul 2017 18:42:55 +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 C8B5F2671E9; Fri, 7 Jul 2017 18:42:51 +0200 (CEST) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by alsa0.perex.cz (Postfix) with ESMTP id F05902671D8 for ; Fri, 7 Jul 2017 18:42:49 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 55CDE260301 From: Sebastian Reichel To: Sebastian Reichel , Liam Girdwood , Mark Brown , Rob Herring , Tony Lindgren Date: Fri, 7 Jul 2017 18:42:29 +0200 Message-Id: <20170707164229.5868-4-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170707164229.5868-1-sebastian.reichel@collabora.co.uk> References: <20170707164229.5868-1-sebastian.reichel@collabora.co.uk> Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org, Sebastian Reichel , linux-omap@vger.kernel.org Subject: [alsa-devel] [PATCH 3/3] ARM: dts: omap4-droid4: add soundcard 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add sound support to Motorola Droid 4 using simple-soundcard and CPCAP's audio codec. This does not yet correctly represent the whole audio routing, since McBSP3 is also connected to Bluetooth and MDM6600 modem (and probably also 4G modem). These extra DAI links are not yet supported and have not been tested. Signed-off-by: Sebastian Reichel --- arch/arm/boot/dts/omap4-droid4-xt894.dts | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index 10ca1c174995..642b7ed1713b 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts @@ -116,6 +116,50 @@ }; }; + + soundcard { + compatible = "simple-audio-card"; + simple-audio-card,name = "Droid 4 Audio"; + + simple-audio-card,widgets = + "Speaker", "Earpiece", + "Speaker", "Loudspeaker", + "Headphone", "Headphone Jack", + "Microphone", "Internal Mic"; + + simple-audio-card,routing = + "Earpiece", "EP", + "Loudspeaker", "SPKR", + "Headphone Jack", "HSL", + "Headphone Jack", "HSR", + "MICR", "Internal Mic"; + + simple-audio-card,dai-link@0 { + format = "i2s"; + frame-master = <&codec0>; + bitclock-master = <&codec0>; + cpu { + sound-dai = <&mcbsp2>; + }; + codec0: codec { + sound-dai = <&cpcap_audio 0>; + }; + }; + + simple-audio-card,dai-link@1 { + format = "dsp_a"; + frame-master = <&codec1>; + bitclock-master = <&codec1>; + bitclock-inversion; + + cpu { + sound-dai = <&mcbsp3>; + }; + codec1: codec { + sound-dai = <&cpcap_audio 1>; + }; + }; + }; }; &dss { @@ -479,6 +523,24 @@ OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5) /* uart4_rts */ >; }; + + mcbsp2_pins: pinmux_mcbsp2_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx */ + OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_dr */ + OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0) /* abe_mcbsp2_dx */ + OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_fsx */ + >; + }; + + mcbsp3_pins: pinmux_mcbsp3_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x106, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_dr */ + OMAP4_IOPAD(0x108, PIN_OUTPUT | MUX_MODE1) /* abe_mcbsp3_dx */ + OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_clkx */ + OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */ + >; + }; }; &omap4_pmx_wkup { @@ -552,3 +614,17 @@ "0", "0", "1"; }; }; + +&mcbsp2 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp2_pins>; + status = "okay"; +}; + +&mcbsp3 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp3_pins>; + status = "okay"; +};