From patchwork Wed Sep 10 20:54:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 4880761 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 690DC9F32E for ; Wed, 10 Sep 2014 20:57:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A26A201C8 for ; Wed, 10 Sep 2014 20:57:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1A1A520173 for ; Wed, 10 Sep 2014 20:57:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2599A2655E9; Wed, 10 Sep 2014 22:57:13 +0200 (CEST) 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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B5C0E265615; Wed, 10 Sep 2014 22:56:54 +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 BE970265624; Wed, 10 Sep 2014 22:56:53 +0200 (CEST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by alsa0.perex.cz (Postfix) with ESMTP id D33792655E9 for ; Wed, 10 Sep 2014 22:56:19 +0200 (CEST) Received: from localhost.net (190-191.5-85.cust.bluewin.ch [85.5.191.190]) by mrelay.perfora.net (node=mreueus001) with ESMTP (Nemesis) id 0M3TZW-1YIY0W4B2u-00r3RN; Wed, 10 Sep 2014 22:56:09 +0200 From: Marcel Ziswiler To: alsa-devel@alsa-project.org Date: Wed, 10 Sep 2014 22:54:55 +0200 Message-Id: <00f249b3d648d3a8d550c5db0737f3aa6d93f07e.1410362950.git.marcel@ziswiler.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: X-Provags-ID: V02:K0:D9axrhrHDYt7aiU/KVYgtFB0Ho8wJi6byXaLkNoYjNZ Lfjk5lm6TW/NLfWsT2ddH0EEBvUdApX8ZrByXl26cXvjs5V+bU G75RU2iwLY4h80SnkJyUO6Qx3X8m50Hs4HiSuJxOQWClXak6vs uu9uTPNCFf4hTGccb8a2OhMRK+qmwlvfoxP/k5nQxmfbUXmsNR 6///PdHInhouSDgOKnNsMLceUmQDNRNq1VIxl6N+YwZlmz1viC PV2iFed08OSyXI8de1URgQN7s9pnwpLCXZr+f03cJ/YqaZqWfz cQJygDOGf0VE3kCp3GO6vvcz8B6VW2eQ6A/WN5uHbfICVTTr4E 8pZ/YWxaBLX7y1gj+/+QuPKHnidpceRdQ/H17HCDpcoVyIeaKY GYOunF4GNCd4EdqdfZTCBXGwFSgykljI4sZHGoT/f07nkLADdt hwAOn X-UI-Out-Filterresults: notjunk:1; Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk, Stephen Warren , Liam Girdwood , stefan@agner.ch, linux-kernel@vger.kernel.org, Mark Brown , Marcel Ziswiler , linux-tegra@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH v2 1/2] ARM: tegra: apalis/colibri t30: integrate audio support 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 Integrate Freescale SGTL5000 analogue audio codec support. Signed-off-by: Marcel Ziswiler Reviewed-by: Stephen Warren --- Changes in v2: - Using simple-audio-card as suggested by Fabio. arch/arm/boot/dts/tegra30-apalis.dtsi | 65 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/tegra30-colibri.dtsi | 65 ++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi index a5446cb..fa3bc92 100644 --- a/arch/arm/boot/dts/tegra30-apalis.dtsi +++ b/arch/arm/boot/dts/tegra30-apalis.dtsi @@ -47,6 +47,24 @@ pinctrl-0 = <&state_default>; state_default: pinmux { + /* Apalis Analogue Audio */ + clk1_out_pw4 { + nvidia,pins = "clk1_out_pw4"; + nvidia,function = "extperiph1"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + dap3_fs_pp0 { + nvidia,pins = "dap3_fs_pp0", + "dap3_sclk_pp3", + "dap3_din_pp1", + "dap3_dout_pp2"; + nvidia,function = "i2s2"; + nvidia,pull = ; + nvidia,tristate = ; + }; + /* Apalis BKL1_ON */ pv2 { nvidia,pins = "pv2"; @@ -404,6 +422,16 @@ status = "okay"; clock-frequency = <100000>; + /* SGTL5000 audio codec */ + sgtl5000: codec@0a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <&sys_3v3_reg>; + VDDIO-supply = <&sys_3v3_reg>; + clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + pmic: tps65911@2d { compatible = "ti,tps65911"; reg = <0x2d>; @@ -635,6 +663,13 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + #sound-dai-cells = <0>; + status = "okay"; + }; + }; + sdhci@78000600 { status = "okay"; bus-width = <8>; @@ -684,4 +719,34 @@ regulator-always-on; }; }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Toradex Apalis T30"; + simple-audio-card,routing = + "Headphone Jack", "HP_OUT", + "LINE_IN", "Line In Jack", + "MIC_IN", "Microphone Jack"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line In", "Line In Jack", + "Microphone", "Microphone Jack"; + + simple-audio-card,codec { + bitclock-master; + clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; + frame-master; + sound-dai = <&sgtl5000>; + }; + + simple-audio-card,cpu { + bitclock-master; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>; + frame-master; + master-clkdir-out; + sound-dai = <&tegra_i2s2>; + }; + }; }; diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi index c4ed1be..1f97348 100644 --- a/arch/arm/boot/dts/tegra30-colibri.dtsi +++ b/arch/arm/boot/dts/tegra30-colibri.dtsi @@ -29,6 +29,24 @@ pinctrl-0 = <&state_default>; state_default: pinmux { + /* Colibri Analogue Audio */ + clk1_out_pw4 { + nvidia,pins = "clk1_out_pw4"; + nvidia,function = "extperiph1"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + dap3_fs_pp0 { + nvidia,pins = "dap3_fs_pp0", + "dap3_sclk_pp3", + "dap3_din_pp1", + "dap3_dout_pp2"; + nvidia,function = "i2s2"; + nvidia,pull = ; + nvidia,tristate = ; + }; + /* Colibri BL_ON */ pv2 { nvidia,pins = "pv2"; @@ -182,6 +200,16 @@ status = "okay"; clock-frequency = <100000>; + /* SGTL5000 audio codec */ + sgtl5000: codec@0a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <&sys_3v3_reg>; + VDDIO-supply = <&sys_3v3_reg>; + clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; + }; + pmic: tps65911@2d { compatible = "ti,tps65911"; reg = <0x2d>; @@ -331,6 +359,13 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + #sound-dai-cells = <0>; + status = "okay"; + }; + }; + emmc: sdhci@78000600 { status = "okay"; bus-width = <8>; @@ -383,4 +418,34 @@ regulator-always-on; }; }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Toradex Colibri T30"; + simple-audio-card,routing = + "Headphone Jack", "HP_OUT", + "LINE_IN", "Line In Jack", + "MIC_IN", "Microphone Jack"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line In", "Line In Jack", + "Microphone", "Microphone Jack"; + + simple-audio-card,codec { + bitclock-master; + clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; + frame-master; + sound-dai = <&sgtl5000>; + }; + + simple-audio-card,cpu { + bitclock-master; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>; + frame-master; + master-clkdir-out; + sound-dai = <&tegra_i2s2>; + }; + }; };