From patchwork Wed Aug 10 15:12:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_M=C3=BCller-Klieser?= X-Patchwork-Id: 9273169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D08DA600CB for ; Wed, 10 Aug 2016 15:12:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C13B326785 for ; Wed, 10 Aug 2016 15:12:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B56F328407; Wed, 10 Aug 2016 15:12:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B41D826785 for ; Wed, 10 Aug 2016 15:12:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A944A2667CD; Wed, 10 Aug 2016 17:12:31 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A76A42667CD; Wed, 10 Aug 2016 17:12:24 +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 DC1C32667CD; Wed, 10 Aug 2016 17:12:22 +0200 (CEST) Received: from root.phytec.de (mail.x-arc.de [217.6.246.34]) by alsa0.perex.cz (Postfix) with ESMTP id F2BF22660C2 for ; Wed, 10 Aug 2016 17:12:15 +0200 (CEST) Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id E72D2A00432; Wed, 10 Aug 2016 17:12:18 +0200 (CEST) Received: from lws-mklieser.phytec.de ([172.16.10.21]) by idefix.phytec.de (IBM Domino Release 9.0.1FP5 HF413) with ESMTP id 2016081017121539-42892 ; Wed, 10 Aug 2016 17:12:15 +0200 From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= To: linux-arm-kernel@lists.infradead.org Date: Wed, 10 Aug 2016 17:12:15 +0200 Message-Id: <1470841935-14190-1-git-send-email-s.mueller-klieser@phytec.de> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on Idefix/Phytec(Release 9.0.1FP5 HF413|March 21, 2016) at 10.08.2016 17:12:15, Serialize by Router on Idefix/Phytec(Release 9.0.1FP5 HF413|March 21, 2016) at 10.08.2016 17:12:15 X-TNEFEvaluated: 1 Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tony@atomide.com, peter.ujfalusi@ti.com, robh+dt@kernel.org, linux-omap@vger.kernel.org Subject: [alsa-devel] [PATCH] ARM: dts: am335x-wega: Add 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The wega board has a TLV320AIC3007 connected via McASP0. In the default configuration, no external crystal is mounted. We run a system clock of 25 MHz, so we use the audio codec PLL for audio clock generation. Signed-off-by: Stefan Müller-Klieser Reviewed-by: Peter Ujfalusi --- arch/arm/boot/dts/am335x-wega.dtsi | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm/boot/dts/am335x-wega.dtsi b/arch/arm/boot/dts/am335x-wega.dtsi index 282f6d4..7f5f8ed 100644 --- a/arch/arm/boot/dts/am335x-wega.dtsi +++ b/arch/arm/boot/dts/am335x-wega.dtsi @@ -11,6 +11,10 @@ model = "Phytec AM335x phyBOARD-WEGA"; compatible = "phytec,am335x-wega", "phytec,am335x-phycore-som", "ti,am33xx"; + sound: sound_iface { + compatible = "ti,da830-evm-audio"; + }; + regulators { compatible = "simple-bus"; @@ -24,6 +28,58 @@ }; }; +/* Audio */ +&am33xx_pinmux { + mcasp0_pins: pinmux_mcasp0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9AC, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_ahclkx.mcasp0_ahclkx */ + AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */ + AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */ + AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr0.mcasp0_axr0 */ + AM33XX_IOPAD(0x9A8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr1.mcasp0_axr1 */ + >; + }; +}; + +&i2c0 { + tlv320aic3007: tlv320aic3007@18 { + compatible = "ti,tlv320aic3007"; + reg = <0x18>; + AVDD-supply = <&vcc3v3>; + IOVDD-supply = <&vcc3v3>; + DRVDD-supply = <&vcc3v3>; + DVDD-supply = <&vdig1_reg>; + status = "okay"; + }; +}; + +&mcasp0 { + pinctrl-names = "default"; + pinctrl-0 = <&mcasp0_pins>; + op-mode = <0>; /* DAVINCI_MCASP_IIS_MODE */ + tdm-slots = <2>; + serial-dir = < + 2 1 0 0 /* # 0: INACTIVE, 1: TX, 2: RX */ + >; + tx-num-evt = <16>; + rt-num-evt = <16>; + status = "okay"; +}; + +&sound { + ti,model = "AM335x-Wega"; + ti,audio-codec = <&tlv320aic3007>; + ti,mcasp-controller = <&mcasp0>; + ti,audio-routing = + "Line Out", "LLOUT", + "Line Out", "RLOUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + clocks = <&mcasp0_fck>; + clock-names = "mclk"; + status = "okay"; +}; + /* CAN Busses */ &am33xx_pinmux { dcan1_pins: pinmux_dcan1 { @@ -99,6 +155,12 @@ status = "okay"; }; +/* Power */ +&vdig1_reg { + regulator-boot-on; + regulator-always-on; +}; + /* UARTs */ &am33xx_pinmux { uart0_pins: pinmux_uart0 {