From patchwork Tue Jun 10 08:10:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4327071 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 64B6B9F390 for ; Tue, 10 Jun 2014 08:10:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8524C20274 for ; Tue, 10 Jun 2014 08:10:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B89720272 for ; Tue, 10 Jun 2014 08:10:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751012AbaFJIKa (ORCPT ); Tue, 10 Jun 2014 04:10:30 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:63402 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbaFJIK2 (ORCPT ); Tue, 10 Jun 2014 04:10:28 -0400 Received: by mail-pb0-f53.google.com with SMTP id md12so5950733pbc.40 for ; Tue, 10 Jun 2014 01:10:28 -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:mime-version:to:cc :in-reply-to:references:content-type; bh=H9s9oqHkod5e3elc8IY2XmBN0MdqgOwv4oDL8Q1f7oc=; b=l4vCeWfQ/H+SEos8OlyJXv0U93mDMc/J/U9noMteQuJr7ucPO+YqT5+gKYlg+PAU47 tZVv04lki13i8UiLXg07mA/44J5ZxdQsplpHkrXrzZCOOPoNzngzJNNPqJovjwH7RyHd erC7NHvmg+Gd2Akw+b5yO3KvDLQjULOiiPUDOhGh5hhdS5IOsGtbP3gD4d/gdZRgkoKK LqkCTJn76CAY1ypUAWvGA7XDy4sgh4aR5POmRbKsyiMHlHnUw8z5WkNIrioA+dIeBRm6 UwGfnBbzaoFTu4k4bQtV3z8/MJdvFqr+6AppjfCvDMgXNAl4kIKhtXSG1hn1xrkciTfO 2cWQ== X-Received: by 10.66.145.233 with SMTP id sx9mr3573105pab.151.1402387828370; Tue, 10 Jun 2014 01:10:28 -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 jq6sm67964867pbb.76.2014.06.10.01.10.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Jun 2014 01:10:27 -0700 (PDT) Date: Tue, 10 Jun 2014 01:10:27 -0700 (PDT) Message-ID: <87a99lchhh.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3 v2] ARM: shmobile: lager: add sound support on DT User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") To: Simon , Geert Uytterhoeven Cc: Magnus , linux-sh@vger.kernel.org, Ben Dooks In-Reply-To: <87egyxchjj.wl%kuninori.morimoto.gx@renesas.com> References: <87wqcpcx3w.wl%kuninori.morimoto.gx@gmail.com> <87egyxchjj.wl%kuninori.morimoto.gx@renesas.com> 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 It supports PIO transfer at this point Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change 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"