From patchwork Wed Jul 23 02:44:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4608361 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 8392A9F295 for ; Wed, 23 Jul 2014 02:44:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4BF6201B4 for ; Wed, 23 Jul 2014 02:44:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C337C20170 for ; Wed, 23 Jul 2014 02:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756743AbaGWCoM (ORCPT ); Tue, 22 Jul 2014 22:44:12 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:33839 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756683AbaGWCoL (ORCPT ); Tue, 22 Jul 2014 22:44:11 -0400 Received: by mail-pd0-f174.google.com with SMTP id fp1so699044pdb.5 for ; Tue, 22 Jul 2014 19:44:10 -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=ineEOmgslWq4LOeFJnRpoRiv3ZI9D0RJ1qTtrvvJ28A=; b=cTUUmT7QZrJhqTG/BkETZ3bPkcAvzuvsUZli+nr11ZZmLcrHFBv7wpOzF0kW5eCkbA 72Oigd2V1i9j5THEz6ORIlF3mdgXx+/C9G2ErXm078jUN1QdPUP9A8CxCw+WU0MgIX6U dts6n/UaXXFcruh1MQ/uJzQgolwMDIdKuSWJeGlQiUaJVQXcRLfPZvpipvavSgtQv+wq 9XFIyMngw1c1OaZju1/Yg/atWwMalb6jJIvTkAUjmUEkIQvel4lzTcdRe1te544Bi4c0 xlVBosdENXJ0g1szt6FHn1/epNM5rW4YKjViCcWli+9Dn1sHQbXd8ewNUTPh5v9FpfOs Oc6g== X-Received: by 10.68.193.164 with SMTP id hp4mr27720172pbc.87.1406083450684; Tue, 22 Jul 2014 19:44:10 -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 nh7sm938728pdb.94.2014.07.22.19.44.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Jul 2014 19:44:10 -0700 (PDT) Date: Tue, 22 Jul 2014 19:44:10 -0700 (PDT) Message-ID: <87wqb4u747.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 05/11][RFC] ARM: shmobile: lager: Sound PIO support on DTS User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , Laurent Cc: Magnus , Linux-SH In-Reply-To: <874my8vlqq.wl%kuninori.morimoto.gx@gmail.com> References: <874my8vlqq.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=-6.8 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 Signed-off-by: Kuninori Morimoto --- arch/arm/boot/dts/r8a7790-lager.dts | 68 +++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 + 2 files changed, 69 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 856b423..6fec81a 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,23 @@ states = <3300000 1 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 0>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + system-clock-frequency = <11289600>; + }; + }; }; &extal_clk { @@ -234,6 +263,16 @@ renesas,groups = "usb2"; renesas,function = "usb2"; }; + + 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 { @@ -366,6 +405,12 @@ status = "ok"; pinctrl-0 = <&iic2_pins>; pinctrl-names = "default"; + + ak4643: sound_codec { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; }; &iic3 { @@ -401,3 +446,26 @@ pinctrl-0 = <&usb2_pins>; pinctrl-names = "default"; }; + +&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 4508643..3d07811 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -56,6 +56,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"