From patchwork Tue Oct 28 16:08:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 5178141 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CD02E9F349 for ; Tue, 28 Oct 2014 16:17:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EABD920219 for ; Tue, 28 Oct 2014 16:17:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C787320117 for ; Tue, 28 Oct 2014 16:17:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CF5A1264F51; Tue, 28 Oct 2014 17:17:27 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id EFAEA2612D3; Tue, 28 Oct 2014 17:11:50 +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 C374C260560; Tue, 28 Oct 2014 17:11:46 +0100 (CET) Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by alsa0.perex.cz (Postfix) with ESMTP id 198F52605DA for ; Tue, 28 Oct 2014 17:09:05 +0100 (CET) Received: by mail.free-electrons.com (Postfix, from userid 106) id C6EEB46E1; Tue, 28 Oct 2014 17:09:05 +0100 (CET) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 211772D39; Tue, 28 Oct 2014 17:09:05 +0100 (CET) From: Thomas Petazzoni To: Mark Brown , Liam Girdwood , alsa-devel@alsa-project.org, Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Date: Tue, 28 Oct 2014 17:08:43 +0100 Message-Id: <1414512524-24466-6-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1414512524-24466-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1414512524-24466-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Lior Amsalem , Thomas Petazzoni , Tawfik Bayouk , Nadav Haklai , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 5/6] ARM: mvebu: use simple-card DT binding for audio on 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-Virus-Scanned: ClamAV using ClamSMTP This commit modifies the Armada 370 and Armada 370 DB Device Tree descriptions to use the simple-card DT binding to describe the audio complex of the Armada 370 DB instead of a custom audio machine driver. To do so, it: - Adds the sound-dai-cells properties to the CS42L51 node, the audio controller node and the SPDIF in/out nodes. - Completely changes the description of the sound complex to use the "simple-audio-card" DT binding instead of the "marvell,a370db-audio" DT binding. - Fixes the indentation to properly use tabs instead of spaces. Signed-off-by: Thomas Petazzoni --- arch/arm/boot/dts/armada-370-db.dts | 56 +++++++++++++++++++++++++++++++++---- arch/arm/boot/dts/armada-370.dtsi | 1 + 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index d505135..0b7bf5e 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -75,6 +75,7 @@ clock-frequency = <100000>; status = "okay"; audio_codec: audio-codec@4a { + #sound-dai-cells = <0>; compatible = "cirrus,cs42l51"; reg = <0x4a>; }; @@ -143,17 +144,60 @@ }; sound { - compatible = "marvell,a370db-audio"; - marvell,audio-controller = <&audio_controller>; - marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>; - status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "Armada 370 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", + "AIN1L", "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 { - compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; }; spdif_in: spdif-in { - compatible = "linux,spdif-dir"; + #sound-dai-cells = <0>; + compatible = "linux,spdif-dir"; }; }; diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 6b3c23b..8d0c451 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -249,6 +249,7 @@ }; audio_controller: audio-controller@30000 { + #sound-dai-cells = <1>; compatible = "marvell,armada370-audio"; reg = <0x30000 0x4000>; interrupts = <93>;