From patchwork Wed Jun 11 06:54:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4333781 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 9A5529F357 for ; Wed, 11 Jun 2014 06:54:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39E12012E for ; Wed, 11 Jun 2014 06:54:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9169200BE for ; Wed, 11 Jun 2014 06:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753354AbaFKGyy (ORCPT ); Wed, 11 Jun 2014 02:54:54 -0400 Received: from mail-pb0-f43.google.com ([209.85.160.43]:57500 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775AbaFKGyx (ORCPT ); Wed, 11 Jun 2014 02:54:53 -0400 Received: by mail-pb0-f43.google.com with SMTP id up15so7077126pbc.16 for ; Tue, 10 Jun 2014 23:54:53 -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=8sx0L0YbIejtBDt2l+ODFbETduXaqTv1GiMQNFjSZVE=; b=B7faEX7oq67RDEUnTkHrrm7MwiodNjC2G+SoOYDZOD7xCVzcABqWUjP1yKNJPzpoFE 3Gw524rX1logR4iRliRpqgTfJ/28EHLk5mZMm9t71wlYqroUeDcUcZJYwcrmL5sWAMA5 xSoYCR6cLxP34JO0Zu4IqAsMZQX/pSEG0wRKZLtJ1O5sVzrjUlkegOHbyaE5GZX8yPtZ M34FXyKpaa7RVrm/KC4dP7+tIcaR7kAaTtDRkgomRkpjfldRJJGKZneUo2kQuVKe4Z3r yXj8EtcZrIR51wifqczk8ZlIoKBYS9EwzDICOFnaEP9WG+wfDSPFeoqLghxuyg2iljHt L8sQ== X-Received: by 10.68.222.196 with SMTP id qo4mr2727771pbc.14.1402469693279; Tue, 10 Jun 2014 23:54:53 -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 ue3sm73113446pbc.49.2014.06.10.23.54.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Jun 2014 23:54:52 -0700 (PDT) Date: Tue, 10 Jun 2014 23:54:52 -0700 (PDT) Message-ID: <87a99kj5q2.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3 v3] ARM: shmobile: lager: add sound support on DT User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , Geert Uytterhoeven Cc: Magnus , linux-sh@vger.kernel.org, Ben Dooks In-Reply-To: <87egywj5tw.wl%kuninori.morimoto.gx@gmail.com> References: <87wqcpcx3w.wl%kuninori.morimoto.gx@gmail.com> <87egywj5tw.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 --- v2 -> v3 - rename ak4643 -> snd_codec - used existing i2c2 arch/arm/boot/dts/r8a7790-lager.dts | 67 +++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 + 2 files changed, 68 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 295a60e..e6bb303 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 { @@ -367,8 +405,37 @@ status = "ok"; pinctrl-0 = <&i2c2_pins>; pinctrl-names = "default"; + + snd_codec: snd_codec { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; }; &i2c3 { status = "ok"; }; + +&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"