From patchwork Tue Sep 20 13:26:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12982179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87C4FC54EE9 for ; Tue, 20 Sep 2022 13:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yDh6mJQLDhpk6LhVh6n09E+gioERajYsib/teTG7WpA=; b=2amkJGeGV9sekR DH8TtQhuAoYoQtyc2rfzB6KgWyeSuyoem+3V6yGhsNrl1pkshkrUU4mVvFrvNBYuXm4vzlD9f1R8Z Hi/GfjHBuZTOln45qAnNAcX4X+Hpcq0xY+1eLzCvc54p354YkaHwRSfLoiaF3swJ+glyRyaXE5OCf xSNGYDvXwvLJf160m+lKi/vjnP0PRh5JdAgxPHiGS8x+vRkwNDmcupqMAYtmhZQuHvSEMSov/8UfB qQMCpt7S4oU0j2tYTXZQXbkzI1u2/mvyVOg0YwdU5sFFqCuOhZjUN7FgVDXxqx3UTZBkZzmAGJJni RLBHkaseZ/Xf7ZUUyDQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oadJ4-0045Et-La; Tue, 20 Sep 2022 13:28:59 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oadHl-0044e3-Tb for linux-arm-kernel@lists.infradead.org; Tue, 20 Sep 2022 13:27:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 16023CE185D; Tue, 20 Sep 2022 13:27:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 896EBC43142; Tue, 20 Sep 2022 13:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663680451; bh=j3AJ+gvrSPJXkwy4uwzUn+Y5wSHluaeR3mpbyFCwTGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UzwC/fMpcZHK84uKl1WNEWXfZiWlnD4YDAVv6EFoTILb4768oyWqSVjTBD6QHuVK5 xB/Q/fsYK5DxTNoJkfKSwBDNNiuwrFLB8YmCMXAVQtwWk9N20TNplX60AUapFg+ONQ ul6/vQRAB99CN2s6op8JgR0AxQNGhwNmbLqonH3JJluEZSZK97kDfRtuKdFPibwaKj 06Boyk+oJ1B55V+WA/4GHIl9GKFWIXMgWD7FLE7RYAWlXQNRBDTLoEzO40zrYGAacS WVsGGLhnCPVzpwd0WDw+lxu+ZjAm5CrkMxsWaaFZAu5xS/rYcmpOg6tGrnvYb8ahii qDc2/z+ljCZkw== Received: by pali.im (Postfix) id 08B1B2D7D; Tue, 20 Sep 2022 15:27:29 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Liam Girdwood , Mark Brown , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Marcin Wojtas Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] ARM: mvebu: add audio support to Armada 385 DB Date: Tue, 20 Sep 2022 15:26:46 +0200 Message-Id: <20220920132648.2008-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220920132648.2008-1-pali@kernel.org> References: <20220920132648.2008-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_062738_587742_9CF4FDB4 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marcin Wojtas 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 * Disabled by default Signed-off-by: Marcin Wojtas Signed-off-by: Nadav Haklai Tested-by: Star_Automation Tested-by: Lior Amsalem Reviewed-by: Andrew Lunn --- 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 5130eccc32af..2bcec5419b66 100644 --- a/arch/arm/boot/dts/armada-388-db.dts +++ b/arch/arm/boot/dts/armada-388-db.dts @@ -36,6 +36,11 @@ i2c@11000 { status = "okay"; clock-frequency = <100000>; + audio_codec: audio-codec@4a { + #sound-dai-cells = <0>; + compatible = "cirrus,cs42l51"; + reg = <0x4a>; + }; }; i2c@11100 { @@ -99,6 +104,12 @@ no-1-8-v; }; + audio-controller@e8000 { + pinctrl-0 = <&i2s_pins>; + pinctrl-names = "default"; + status = "disabled"; + }; + usb3@f0000 { status = "okay"; }; @@ -128,6 +139,64 @@ }; }; }; + + 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 = "disabled"; + + 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"; + }; }; &spi0 {