From patchwork Wed Feb 12 17:21:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 3639501 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BC26BF13A for ; Wed, 12 Feb 2014 17:25:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 30B9B2018E for ; Wed, 12 Feb 2014 17:25:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0119E20127 for ; Wed, 12 Feb 2014 17:25:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1C40C265342; Wed, 12 Feb 2014 18:25:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, NO_DNS_FOR_FROM,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 052442625DB; Wed, 12 Feb 2014 18:21:23 +0100 (CET) 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 9577226516D; Wed, 12 Feb 2014 18:21:21 +0100 (CET) Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by alsa0.perex.cz (Postfix) with ESMTP id 1AB9126163C for ; Wed, 12 Feb 2014 18:21:07 +0100 (CET) Received: by mail.free-electrons.com (Postfix, from userid 106) id 34B1C931; Wed, 12 Feb 2014 18:21:15 +0100 (CET) Received: from localhost (AToulouse-651-1-134-190.w109-222.abo.wanadoo.fr [109.222.213.190]) by mail.free-electrons.com (Postfix) with ESMTPSA id DF22E7BA; Wed, 12 Feb 2014 18:21:14 +0100 (CET) From: Thomas Petazzoni To: Liam Girdwood , Mark Brown , Jason Cooper , Gregory Clement , Andrew Lunn , Sebastian Hesselbarth Date: Wed, 12 Feb 2014 18:21:00 +0100 Message-Id: <1392225662-20431-6-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392225662-20431-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1392225662-20431-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Lior Amsalem , alsa-devel@alsa-project.org, Tawfik Bayouk , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH v2 5/7] ARM: mvebu: add audio support to Armada 370 DB 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-Spam-Level: * X-Virus-Scanned: ClamAV using ClamSMTP This commit adds the necessary Device Tree informations to enable audio support on the Armada 370 DB platform. In details it: * Instantiates the CS42L51 audio codec on the I2C0 bus, and configures this bus with the appropriate pin-muxing configuration. * Enables the I2S audio controller, and configures it with the appropriate pin-muxing configuration. * Through hog pins, ensures that the other pins possibly used for I2S are muxed with another function than I2S. Signed-off-by: Thomas Petazzoni --- arch/arm/boot/dts/armada-370-db.dts | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 08a56bc..7df1866 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -64,6 +64,22 @@ phy-mode = "rgmii-id"; }; + i2c@11000 { + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + audio_codec: audio-codec@4a { + compatible = "cirrus,cs42l51"; + reg = <0x4a>; + }; + }; + + audio-controller@30000 { + pinctrl-0 = <&i2s_pins2>; + pinctrl-names = "default"; + status = "okay"; + }; + mvsdio@d4000 { pinctrl-0 = <&sdio_pins1>; pinctrl-names = "default"; @@ -80,6 +96,30 @@ broken-cd; }; + pinctrl { + /* + * These pins might be muxed as I2S by + * the bootloader, but it conflicts + * with the real I2S pins that are + * muxed using i2s_pins. We must mux + * those pins to a function other than + * I2S. + */ + pinctrl-0 = <&hog_pins1 &hog_pins2>; + pinctrl-names = "default"; + + hog_pins1: hog-pins1 { + marvell,pins = "mpp6", "mpp8", "mpp10", + "mpp12", "mpp13"; + marvell,function = "gpio"; + }; + + hog_pins2: hog-pins2 { + marvell,pins = "mpp5", "mpp7", "mpp9"; + marvell,function = "gpo"; + }; + }; + usb@50000 { status = "okay"; }; @@ -112,10 +152,18 @@ /* Port 0, Lane 0 */ status = "okay"; }; + pcie@2,0 { /* Port 1, Lane 0 */ status = "okay"; }; }; }; + + sound { + compatible = "marvell,a370db-audio"; + marvell,audio-controller = <&audio_controller>; + marvell,audio-codec = <&audio_codec>; + status = "okay"; + }; };