From patchwork Fri Nov 6 06:38:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7566651 X-Patchwork-Delegate: horms@verge.net.au 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72280C05C6 for ; Fri, 6 Nov 2015 06:38:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 792842073E for ; Fri, 6 Nov 2015 06:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 726752073C for ; Fri, 6 Nov 2015 06:38:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754553AbbKFGiI (ORCPT ); Fri, 6 Nov 2015 01:38:08 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:45414 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751002AbbKFGiG (ORCPT ); Fri, 6 Nov 2015 01:38:06 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 06 Nov 2015 15:38:04 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id CB9FC3E543; Fri, 6 Nov 2015 15:38:04 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id AD9CB1806F; Fri, 6 Nov 2015 15:38:04 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 91B381800A; Fri, 6 Nov 2015 15:38:04 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id RAF15839; Fri, 6 Nov 2015 15:38:04 +0900 X-IronPort-AV: E=Sophos;i="5.20,250,1444662000"; d="scan'";a="197995490" Received: from mail-hk2apc01lp0210.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.210]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 06 Nov 2015 15:38:03 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB1017.apcprd06.prod.outlook.com (10.161.9.25) with Microsoft SMTP Server (TLS) id 15.1.318.15; Fri, 6 Nov 2015 06:38:02 +0000 Message-ID: <87611fk582.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 06/12 v6] arm64: renesas: salvator-x: Sound SSI PIO support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: , , Simon Horman CC: Magnus Damm In-Reply-To: <87egg3k5g6.wl%kuninori.morimoto.gx@renesas.com> References: <87egg3k5g6.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 6 Nov 2015 06:38:02 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0010.apcprd02.prod.outlook.com (25.164.90.148) To SG2PR06MB1017.apcprd06.prod.outlook.com (25.161.9.25) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1017; 2:4GxbeXrC98UQXMnYmbaHkvgRtVk1OTcDIgC4zzz3G3mb+vNJqsgkDPf2ZDhWcvwBEPwxxHCDWD9aT6Aqt7GIHB0NFqML5S/eY1BkmGv0LNKJBwUhoQqa59MIaF5EeyaZ1dPKsen7WLNSqWle2JXtuS22+a2VkGV0OXloDTS8rpE=; 3:/jgbhd+LOhRxmqdfSNrQy+5UU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pK3Vr1XbgTSTMf4lNPf27I4VLlGU9kYiEsr0mfG1lsdc9ATvJHJj5LiuIjN8CqxPin1xx0Qzih3xmwVd+NFmPNaz0VIhlwbjLbs6k15heWVZUftedbbKrvaZ7HWzLMX6MW4wGIMBdWBhln64opVtYxTnlVJVdJO21Vkv/QijMJYEbFddTUevjzVQo7hiHSmPT54CiPRp1Lpj20j1uJ3uh1o3mxnw1qH++iGYXNJ7B3ug7tsybDZrSHj0/biKkzwhLdUZh4dzmrC85aPbAGt7v0Ri3xJmGkVaTKt6lb09QqV7zituJuXK1KTQ/+lENCy2Hshc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:SG2PR06MB1017; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1017; X-Forefront-PRVS: 07521929C1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(66066001)(40100003)(4001350100001)(101416001)(76176999)(23726002)(19580395003)(33646002)(97736004)(122386002)(46406003)(81156007)(50986999)(47776003)(5001770100001)(229853001)(83506001)(105586002)(106356001)(53416004)(5007970100001)(2950100001)(19580405001)(54356999)(92566002)(189998001)(36756003)(50466002)(5004730100002)(87976001)(86362001)(69596002)(5001960100002)(77096005)(42186005)(5008740100001)(2101003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1017; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1017; 23:ecasPLWXy6ZTF1RNyqCqxAIzKzlvrDbUOgsTvn2il?= =?us-ascii?Q?4205dN5QCnvgvoXCbkygd5SOgiqXrw1vjzONJmmE9OhOvePf6bpcMoD4PndU?= =?us-ascii?Q?K1Ym5ZAI2ljK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ht?= =?us-ascii?Q?Y/5iocsDnjCB9bqu2BCziIrX7/XUNsC8TY/fd/uInSsltwDvsHoqvTwNgrTT?= =?us-ascii?Q?E5XenOpDpQ5GFxZ9S2poeJxqQhkqFlbXYINs3x+RVo2W4nJwsW+obPWImOWF?= =?us-ascii?Q?HMjOF3Vhu0=3D?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1017; 5:76spwRhQrQj5Lrl1txuOuY0xCvbmoNvw46JQF4gmxDjOaJQZgkZsmtLuU8xokp7xP3l+vI6yJVPBqU4wU97KymwJG/Ve0DLKzCY8TnNceEXBoRNFiVfzxD6dPRaOS6kRmikvvOVA5LIr4onRPlD6vg==; 24:3U8KzxC0mc42myQoZn8ET5CtS6o9JAwH9QeDaureEs3zjTLk2ZCTv4Wda3GKjP1rEWzCiZFb9g4B1lYUZzwJN3lm9f57O2q1XCXNTW8LqLU=; 20:ZguLRalvTPUxA3cih/LCfGJks+kZ3PJtLlzEVeQiQwQhukAnaeChCKsozACFc9lc3IPxet6o528BCywWM9yUfA6M5pdL2Cu7jEI+KtDQr9X2ETItL3YLdMZzcx0JU1vYddzucwKeojhlJWYhL25lsTBpghl1ggLoAWie2AaZsXw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2015 06:38:02.0335 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1017 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 This patch adds PIO sound support for Salvator-X board. It can use 44.1kHz base sound only at this point, since 48kHz base sound needs CS2000, but it is not yet upstreamed. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- v5 -> v6 - remove cs2000 support - tidyup sound pin - tidyup suond clock arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 6a72bf7..da2d2d7 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -31,6 +31,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 { @@ -56,6 +78,17 @@ renesas,groups = "avb_mdc"; renesas,function = "avb"; }; + + sound_pins: sound { + renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", + "audio_clkout_a", "audio_clkout3_a"; + renesas,function = "audio_clk"; + }; }; &scif1 { @@ -77,6 +110,49 @@ pinctrl-names = "default"; status = "okay"; + + clock-frequency = <100000>; + + ak4613: codec@10 { + compatible = "asahi-kasei,ak4613"; + #sound-dai-cells = <0>; + reg = <0x10>; + clocks = <&rcar_sound 3>; + }; +}; + +&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 = <11289600>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +}; + +&audio_clk_a { + clock-frequency = <22579200>; }; &avb {