From patchwork Tue Jun 10 02:34:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4326471 Return-Path: X-Original-To: patchwork-linux-sh@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 25C6F9F390 for ; Tue, 10 Jun 2014 02:34:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CA5020158 for ; Tue, 10 Jun 2014 02:34:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CA3F20154 for ; Tue, 10 Jun 2014 02:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933213AbaFJCeP (ORCPT ); Mon, 9 Jun 2014 22:34:15 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:63890 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933217AbaFJCeO (ORCPT ); Mon, 9 Jun 2014 22:34:14 -0400 Received: by mail-pd0-f175.google.com with SMTP id z10so5578710pdj.20 for ; Mon, 09 Jun 2014 19:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=10RkJtIR++HlswHqt2sj1bLG9NZjHhy7MwDMOjj5tLY=; b=TkPCu03sZFW8QBl6v9Yds0P804z0e0GGjHPTonBNus2gxKjne63FeWz2SI8SomU5xX wfjAHVj2eYXDfGTRCQUa06M9WCMvcgGyl3i5+svuwJo+mIDlHDu5mcrILkC6MmwAHjXj yJrRcnA9/zJqC5TtD7jIse2L09G6vWQnrxABe0tPxG/S0g5a/qbDKYbfUb4h2uiiALnn atjWiA+v6uLjVDszTBuwbSdui5L0TkaumaFejgDrJJwzRiOuKyyqQpT4M20hVvYc161m LEktmN40+XcKZIB4hs+kvpQ2K7AMnK+Okus1whz3OBp9SBVHZe5T+KjeiXgagTmfMyRI dGAA== X-Received: by 10.68.213.34 with SMTP id np2mr7424835pbc.167.1402367654058; Mon, 09 Jun 2014 19:34:14 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id wt6sm5279062pac.29.2014.06.09.19.34.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Jun 2014 19:34:13 -0700 (PDT) Date: Mon, 09 Jun 2014 19:34:13 -0700 (PDT) Message-ID: <87sindcx1v.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3] ARM: shmobile: lager: add sound support on DT User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon Cc: Magnus , linux-sh@vger.kernel.org, Ben Dooks In-Reply-To: <87wqcpcx3w.wl%kuninori.morimoto.gx@gmail.com> References: <87wqcpcx3w.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 From: Kuninori Morimoto It supports PIO transfer at this point Signed-off-by: Kuninori Morimoto --- arch/arm/boot/dts/r8a7790-lager.dts | 70 +++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 + 2 files changed, 71 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 295a60e..51a3e41 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -9,6 +9,18 @@ * kind, whether express or implied. */ +/* + * SSI-AK4643 + * + * SW1: 1: AK4643 + * 2: CN22 + * 3: ADV7511 + * + * this command is required when playback. + * + * # amixer set "LINEOUT Mixer DACL" on + */ + /dts-v1/; #include "r8a7790.dtsi" #include @@ -144,6 +156,22 @@ states = <3300000 1 1800000 0>; }; + + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,cpu { + sound-dai = <&rcar_sound 0>; + }; + + simple-audio-card,codec { + bitclock-master; + frame-master; + sound-dai = <&snd_codec>; + system-clock-frequency = <11289600>; + }; + }; }; &extal_clk { @@ -219,6 +247,16 @@ renesas,groups = "i2c3"; renesas,function = "i2c3"; }; + + sound_pins: sound { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clk_a"; + renesas,function = "audio_clk"; + }; }; ðer { @@ -372,3 +410,35 @@ &i2c3 { status = "ok"; }; + +&i2c2 { + status = "okay"; + snd_codec: ak4643 { + #sound-dai-cells = <0>; + compatible = "asahi-kasei,ak4643"; + reg = <0x12>; + }; +}; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +}; diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 3b28bd8..6fc352a 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -58,6 +58,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select MICREL_PHY if SH_ETH + select SND_SOC_AK4642 if SND_SIMPLE_CARD config MACH_MARZEN bool "MARZEN board"