From patchwork Wed Feb 25 21:58:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 5884751 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC0EEBF440 for ; Wed, 25 Feb 2015 22:02:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D93C32037A for ; Wed, 25 Feb 2015 22:02:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B01EF2037F for ; Wed, 25 Feb 2015 22:02:09 +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 1YQjzp-0008UY-7K; Wed, 25 Feb 2015 21:59:57 +0000 Received: from mail-lb0-f180.google.com ([209.85.217.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQjyj-0007s0-I3 for linux-arm-kernel@lists.infradead.org; Wed, 25 Feb 2015 21:58:50 +0000 Received: by lbiz11 with SMTP id z11so6970945lbi.5 for ; Wed, 25 Feb 2015 13:58:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vO6cVsRIsOqtVLUUc4YozOZVB5pe0PU8rjswuf3CJeQ=; b=f8Aaq7C/uHlxoGeCI/sIWZq0eHWvoEvKYbYse2o1z/OdlN+9lgc7hXg3RaXYlcP7kC 4km8uvHWOx9c+OkiBQW+Ma/NCSGJgoIGicfHX8W5CZWUnm2q7zcDUwKtLtyjPwutWAac r8tmvsxnK+Qi2SnhnMnDfW4+aIs/KXpKfGC7F4Xjz7k+acYejFaOy1vwT8LGl9vDSt8b 30lE+WRralO73kw8Je0inhHi9uqCfJqV8yXa9RXOLn6lU9SDYJvvra8OOuOtXyAEC+Ak U7Xt/+x224N8o0tSB79Dv+937KrQlVRb3Zk6NljIZdzROX7h1lYhdpzuBZeiGLi9iNVF C+7Q== X-Gm-Message-State: ALoCoQnnDMjFN5k0hAPE5j2gnVys/lM2pshG7gG4GfAUIhAC+SuwEC14S3Fti+z6TMIKGem9c2qd X-Received: by 10.112.25.104 with SMTP id b8mr4678654lbg.69.1424901506998; Wed, 25 Feb 2015 13:58:26 -0800 (PST) Received: from mw-VirtualBox.internet.domowy (ip-37-152-18-238.multi.internet.cyfrowypolsat.pl. [37.152.18.238]) by mx.google.com with ESMTPSA id b6sm8719386laa.14.2015.02.25.13.58.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Feb 2015 13:58:25 -0800 (PST) From: Marcin Wojtas To: lgirdwood@gmail.com, broonie@kernel.org, jason@lakedaemon.net, andrew@lunn.ch, gregory.clement@free-electrons.com, sebastian.hesselbarth@gmail.com Subject: [PATCH 3/4] ARM: mvebu: add audio support to Armada 385 DB Date: Wed, 25 Feb 2015 22:58:01 +0100 Message-Id: <1424901482-3809-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1424901482-3809-1-git-send-email-mw@semihalf.com> References: <1424901482-3809-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150225_135849_804767_0EA6E18A X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: thomas.petazzoni@free-electrons.com, alior@marvell.com, alsa-devel@alsa-project.org, tawfik@marvell.com, jaz@semihalf.com, ezequiel.garcia@free-electrons.com, mw@semihalf.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds the necessary Device Tree information to enable audio support on the Armada 385 DB platform. In details it: * Instantiates the CS42L51 audio codec on the I2C0 bus * Adds simple-card DT binding for audio on Armada 385 DB * Adds description for both analog I2S and S/PDIF I/O Signed-off-by: Marcin Wojtas --- arch/arm/boot/dts/armada-388-db.dts | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts index 16512ef..bf5d9a7 100644 --- a/arch/arm/boot/dts/armada-388-db.dts +++ b/arch/arm/boot/dts/armada-388-db.dts @@ -82,6 +82,11 @@ i2c@11000 { status = "okay"; clock-frequency = <100000>; + audio_codec: audio-codec@4a { + #sound-dai-cells = <0>; + compatible = "cirrus,cs42l51"; + reg = <0x4a>; + }; }; i2c@11100 { @@ -158,6 +163,12 @@ no-1-8-v; }; + audio-controller@e8000 { + pinctrl-0 = <&i2s_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + usb3@f0000 { status = "okay"; }; @@ -183,4 +194,62 @@ }; }; }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "Armada 385 DB Audio"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Headphone", "Out Jack", + "Line", "In Jack"; + simple-audio-card,routing = + "Out Jack", "HPL", + "Out Jack", "HPR", + "AIN1L", "In Jack", + "AIN1R", "In Jack"; + status = "okay"; + + simple-audio-card,dai-link@0 { + format = "i2s"; + cpu { + sound-dai = <&audio_controller 0>; + }; + + codec { + sound-dai = <&audio_codec>; + }; + }; + + simple-audio-card,dai-link@1 { + format = "i2s"; + cpu { + sound-dai = <&audio_controller 1>; + }; + + codec { + sound-dai = <&spdif_out>; + }; + }; + + simple-audio-card,dai-link@2 { + format = "i2s"; + cpu { + sound-dai = <&audio_controller 1>; + }; + + codec { + sound-dai = <&spdif_in>; + }; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; + + spdif_in: spdif-in { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dir"; + }; };