From patchwork Thu Oct 30 08:27:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5194601 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57F47C11AC for ; Thu, 30 Oct 2014 08:27:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A69A22027D for ; Thu, 30 Oct 2014 08:27:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED2F72034C for ; Thu, 30 Oct 2014 08:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758380AbaJ3I1Y (ORCPT ); Thu, 30 Oct 2014 04:27:24 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:40491 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751319AbaJ3I1U (ORCPT ); Thu, 30 Oct 2014 04:27:20 -0400 Received: by mail-pd0-f172.google.com with SMTP id r10so4696926pdi.17 for ; Thu, 30 Oct 2014 01:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=Nd45paGbsgKfBOYkf6bxnHqowzgSzFvP3b6tWy6nJ/g=; b=u2ZD0MuJg/6G7irSql+38P2Be31i1/ydtbdbq1AIEAqGERxOEfTs0nw0Mi8j6OUR7N AbMMrlmp+9jwQKgfH0NwdTB4rOKyWIezi+3Arp1v8bFA4oJ8llysqRWUqJ9Jl65d40XD k5B9qzJ15XKkidXf3tqNrdPy5rxmv0PXIIxWiCGE54r+LCOPKGYEHrrpEfmAEYJi3ilo yIEOrkUjyiPjpcI5Sh0bNTfdbZgLkL0IRg/Sk6N5uwIHtdWeuZIRl+9jt9Pp441OVDMD QroUgJ7A1KynmGi6bj0XRCsoepd0GHjbV75BLLocgrskQQdMUa23d9PNmWrK+1vlOSyq /5Jg== X-Received: by 10.66.189.101 with SMTP id gh5mr15918122pac.44.1414657639891; Thu, 30 Oct 2014 01:27:19 -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 c1sm6383672pbu.23.2014.10.30.01.27.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Oct 2014 01:27:19 -0700 (PDT) Date: Thu, 30 Oct 2014 01:27:19 -0700 (PDT) Message-ID: <87d29ax8rf.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 05/11] ARM: shmobile: lager: Sound PIO support on DTS User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto In-Reply-To: <87k33ix8tm.wl%kuninori.morimoto.gx@gmail.com> References: <1414628894-24460-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <87k33ix8tm.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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 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 830f2e8..c4c9ce4 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/Capture + * + * amixer set "LINEOUT Mixer DACL" on + */ + /dts-v1/; #include "r8a7790.dtsi" #include @@ -146,6 +158,23 @@ 1800000 0>; }; + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + system-clock-frequency = <11289600>; + }; + }; + vga-encoder { compatible = "adi,adv7123"; @@ -292,6 +321,16 @@ renesas,groups = "vin1_data8", "vin1_clk"; renesas,function = "vin1"; }; + + 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 { @@ -429,6 +468,12 @@ pinctrl-0 = <&iic2_pins>; pinctrl-names = "default"; + ak4643: sound-codec@12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; + composite-in@20 { compatible = "adi,adv7180"; reg = <0x20>; @@ -511,3 +556,28 @@ }; }; }; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + #sound-dai-cells = <0>; + + 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 7cb0a48..55d84b6 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -77,6 +77,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"