From patchwork Thu Oct 29 23:27:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7522271 X-Patchwork-Delegate: horms@verge.net.au 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE62F9F750 for ; Thu, 29 Oct 2015 23:29:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BAD72088F for ; Thu, 29 Oct 2015 23:29:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9DD52087B for ; Thu, 29 Oct 2015 23:28:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758004AbbJ2X2s (ORCPT ); Thu, 29 Oct 2015 19:28:48 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:45468 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758203AbbJ2X2d (ORCPT ); Thu, 29 Oct 2015 19:28:33 -0400 Received: from penelope.kanocho.kobe.vergenet.net (121-80-213-238f1.hyg1.eonet.ne.jp [121.80.213.238]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 2B79025BE05; Fri, 30 Oct 2015 10:28:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1446161303; bh=FRnkEn82evivfEuItUUxLS3o5KSvpNiYaiR/Fh2qeKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EpLgWZQz5uye46hKQ/BAVgFk42o2994blVx7wUaDfJWCg5rYqDsaho4aS0AjMWDCU tQZsgfn20SAItaS6/uJY0wnGVIgnswNU+lV6+d6M5NV+FAa1y7MB8DmK0BBWvnbHPe jmTzS6sFgh+kqhfKSDwQevgke953wjfzHHXJ8ISc= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id D972160EB8; Fri, 30 Oct 2015 08:28:19 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Kuninori Morimoto , Simon Horman Subject: [PATCH v5 07/14] arm64: renesas: salvator-x: Sound SSI PIO support Date: Fri, 30 Oct 2015 08:27:53 +0900 Message-Id: <1446161280-23097-8-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446161280-23097-1-git-send-email-horms+renesas@verge.net.au> References: <1446161280-23097-1-git-send-email-horms+renesas@verge.net.au> 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=unavailable 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 This patch adds PIO sound support for Salvator-X board. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 0599b2be90ab..6a7df7e0ef7a 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -30,6 +30,28 @@ /* first 128MB is reserved for secure area. */ reg = <0x0 0x48000000 0x0 0x38000000>; }; + + x12_clk: x12_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; + + rsnd_ak4613: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcpu>; + simple-audio-card,frame-master = <&sndcpu>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4613>; + }; + }; }; &extal_clk { @@ -50,6 +72,16 @@ renesas,groups = "i2c2_a"; renesas,function = "i2c2"; }; + + sound_pins: sound { + renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clkout3_a"; + renesas,function = "audio_clk"; + }; }; &scif1 { @@ -71,4 +103,67 @@ pinctrl-names = "default"; status = "okay"; + + clock-frequency = <100000>; + + ak4613: codec@0x10 { + compatible = "asahi-kasei,ak4613"; + #sound-dai-cells = <0>; + reg = <0x10>; + clocks = <&rcar_sound 3>; + }; + + cs2000: clk_multiplier@4f { + #clock-cells = <0>; + compatible = "cirrus,cs2000-cp"; + reg = <0x4f>; + clocks = <&rcar_sound 0>, <&x12_clk>; + clock-names = "clk_in", "ref_clk"; + clock-frequency = <24576000>; /* 1/1 divide */ + }; +}; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + /* audio_clkout0/1/2/3 */ + #clock-cells = <1>; + clock-frequency = <12288000>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +}; + +&audio_clk_a { + clock-frequency = <22579200>; +}; + +&audio_clk_b { + /* + * It should be below here, but it will be dead-lock + * since cs2000 requests audio_clkout (= <&rcar_sound 0>) + * and, rcar_sound (= audio_clk_b) requests cs2000. + * Here assumes cs2000 outputs fixed clock-frequency + * clocks = <&cs2000>; + */ + clock-frequency = <24576000>; };