From patchwork Sat Oct 4 00:15:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 5030781 Return-Path: X-Original-To: patchwork-linux-arm@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 9985D9F327 for ; Sat, 4 Oct 2014 00:20:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5A3C20251 for ; Sat, 4 Oct 2014 00:20: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 A718A2022A for ; Sat, 4 Oct 2014 00:20: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 1XaD2S-00084q-3M; Sat, 04 Oct 2014 00:17:32 +0000 Received: from mout.perfora.net ([74.208.4.194]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XaD2O-0007xM-QC for linux-arm-kernel@lists.infradead.org; Sat, 04 Oct 2014 00:17:29 +0000 Received: from localhost.net (190-191.5-85.cust.bluewin.ch [85.5.191.190]) by mrelay.perfora.net (node=mreueus002) with ESMTP (Nemesis) id 0MY5Qs-1XnQPo0hiS-00Uoxl; Sat, 04 Oct 2014 02:16:48 +0200 From: Marcel Ziswiler To: alsa-devel@alsa-project.org Subject: [PATCH v3 2/3] ARM: tegra: apalis/colibri t30: integrate audio support Date: Sat, 4 Oct 2014 02:15:44 +0200 Message-Id: <1202a8ec8e82b72399a3f8fdc25cbdda88302622.1412381377.git.marcel@ziswiler.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: X-Provags-ID: V02:K0:RJO8z4uM/rt+APliGs5d0nOg+/4hi/cHpAEw6tGAIY9 ZafI7eq71VatjCP/tsB4ki2eXkMD/hKvgI4nxpZTmxJ30S32Ji S0VDRY5GJojH90GXwcAJAGbxtHlwtfRgs+1DygyiF+t1VtC0Ko tKps2r7xbFFYmm4Uboxk1QNiCfc2B3dupm2PjtvKgNLSSkGUcU 9zd02Hp6PtfJA+Lle8H6YB89fs9nb1POKFI2/BUwd+ToKE+Gew v3UPguFlpxsyf7/n4eYZzN7BezeSxpnRZmXHoXWk5t9Z1K7lM0 X0XbO3ud8vSryMESb6Gtkbh3oI6KbhQraquwjHQsvpA6428Jfz nUXGjhBM0PEqx9SZICuKZtP3MkFez/n7ty3IHW2DI48N2WmeZJ vprbo9qC9a2C74r5RqfGR3a7/jxxvqa+zeQZ+4YiUugLL2D0O3 53cEZ X-UI-Out-Filterresults: notjunk:1; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141003_171729_017928_A3CB9893 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) 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 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 Integrate Freescale SGTL5000 analogue audio codec support. Signed-off-by: Marcel Ziswiler Reviewed-by: Stephen Warren --- Changes in v3: - Revert to not using simple-audio-card being incompatible with tegra. - Rebased to for-next. Changes in v2: - Using simple-audio-card as suggested by Fabio. arch/arm/boot/dts/tegra30-apalis.dtsi | 49 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/tegra30-colibri.dtsi | 49 ++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi index a5446cb..9fe3e4d 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,15 @@ status = "okay"; clock-frequency = <100000>; + /* SGTL5000 audio codec */ + sgtl5000: codec@0a { + 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 +662,12 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + status = "okay"; + }; + }; + sdhci@78000600 { status = "okay"; bus-width = <8>; @@ -684,4 +717,20 @@ regulator-always-on; }; }; + + sound { + compatible = "toradex,tegra-audio-sgtl5000-apalis_t30", + "nvidia,tegra-audio-sgtl5000"; + nvidia,model = "Toradex Apalis T30"; + nvidia,audio-routing = + "Headphone Jack", "HP_OUT", + "LINE_IN", "Line In Jack", + "MIC_IN", "Mic Jack"; + nvidia,i2s-controller = <&tegra_i2s2>; + nvidia,audio-codec = <&sgtl5000>; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA30_CLK_EXTERN1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + }; }; diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi index c4ed1be..e8ac72e 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,15 @@ status = "okay"; clock-frequency = <100000>; + /* SGTL5000 audio codec */ + sgtl5000: codec@0a { + 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 +358,12 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + status = "okay"; + }; + }; + emmc: sdhci@78000600 { status = "okay"; bus-width = <8>; @@ -383,4 +416,20 @@ regulator-always-on; }; }; + + sound { + compatible = "toradex,tegra-audio-sgtl5000-colibri_t30", + "nvidia,tegra-audio-sgtl5000"; + nvidia,model = "Toradex Colibri T30"; + nvidia,audio-routing = + "Headphone Jack", "HP_OUT", + "LINE_IN", "Line In Jack", + "MIC_IN", "Mic Jack"; + nvidia,i2s-controller = <&tegra_i2s2>; + nvidia,audio-codec = <&sgtl5000>; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA30_CLK_EXTERN1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + }; };