From patchwork Thu Sep 17 04:33:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7201911 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 0319C9F40A for ; Thu, 17 Sep 2015 04:33:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09CE520774 for ; Thu, 17 Sep 2015 04:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BFFB2076F for ; Thu, 17 Sep 2015 04:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbbIQEdS (ORCPT ); Thu, 17 Sep 2015 00:33:18 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:16220 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751418AbbIQEdR (ORCPT ); Thu, 17 Sep 2015 00:33:17 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 17 Sep 2015 13:33:16 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id D0E1250DD1; Thu, 17 Sep 2015 13:33:16 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id C10FD1806F; Thu, 17 Sep 2015 13:33:16 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id BD1621800A; Thu, 17 Sep 2015 13:33:16 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id PAA14630; Thu, 17 Sep 2015 13:33:16 +0900 X-IronPort-AV: E=Sophos;i="5.17,543,1437404400"; d="scan'";a="195830935" Received: from mail-hk2apc01lp0212.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.212]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 17 Sep 2015 13:33:16 +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 SIXPR06MB0606.apcprd06.prod.outlook.com (10.160.237.148) with Microsoft SMTP Server (TLS) id 15.1.274.16; Thu, 17 Sep 2015 04:33:13 +0000 Message-ID: <87d1xh7joz.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 14/20 v2] arm64: renesas: salvator-x: add PIO sound support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Simon , Magnus , Linux-SH In-Reply-To: <87vbb97kci.wl%kuninori.morimoto.gx@renesas.com> References: <87vbb97kci.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 17 Sep 2015 04:33:13 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0009.jpnprd01.prod.outlook.com (25.161.131.147) To SIXPR06MB0606.apcprd06.prod.outlook.com (25.160.237.148) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0606; 2:3Wk0VXYSiJzdVwWLgVY0FSgWkHg0d8JL54q1Ig+8s5WtzEMBPuyg3DLPLC/fLlj0GxySNJZZYhQLSevofNUV6AApObbqP4GP5qUv/CjjE9oDZ+3pf61GOuY8/2Np48E17mmfv8E/59fSJ5rUOoURcmLsYTqgoTSeGThLedWiZ0g=; 3:rNoI+jeja2sv1k6pte7WZIsbiuFZEU+xrpCfCOYo+6rVMF5Nv846od2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y5mproDCdIdkyFkzfA9rL2SVIZYMz8z7+VH80a10+W3+ktan648r2M+S1KYJwD8xIXWvaDIRpektFBuX9SyKeVIR70Fni+CzGPKXHrgpYJuz0tmMKJVPRfJDCN4RZEb/y3X8ogMfeujaXn8quesT85Bk/L9FWWzH5KkhnVmX2WLZeLKDQ8WQ3zcopL8QYd0jCQleORHiUSwDyxcPYi/DshtrBDL9S32YqM5iKq1ZUrgY+SViS5f/fPkT6D4EaykQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520078)(8121501046)(3002001); SRVR:SIXPR06MB0606; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0606; X-Forefront-PRVS: 07025866F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(86362001)(42186005)(83506001)(19580405001)(189998001)(229853001)(19580395003)(77096005)(36756003)(33646002)(5007970100001)(5004730100002)(122386002)(101416001)(5001960100002)(107886002)(87976001)(92566002)(64706001)(68736005)(40100003)(76176999)(50986999)(2950100001)(46102003)(66066001)(50466002)(62966003)(81156007)(47776003)(69596002)(4001350100001)(5001770100001)(54356999)(97736004)(53416004)(105586002)(46406003)(4001540100001)(77156002)(5001830100001)(106356001)(23726002)(5001860100001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0606; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0606; 23:FPCjDqeAXiY72akCoI3TUq5pf1SUTruiQk2Jh5R3O?= =?us-ascii?Q?6hlX6hlrINWHHXUhG81qSGLJoabtPIvoVWDgtd2UBDwInYzVWpNphi7bDx+c?= =?us-ascii?Q?ZKWbRyADgEXQqv7ks6ta4Cy/XJtrnIhITLMlLFwlsbvkk929c4pjvAd1JzNs?= =?us-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i9P1hoD0S66h304WH2s/T?= =?us-ascii?Q?eWcpBRFa6MrTT+gutQzi5Dvgt9UWkrx4UBNhg4K6jxuL6qtJViM/esWhCeci?= =?us-ascii?Q?+EnuVJVR8/Srsai32bo1Zgzd+X3On+dnIM7NbFzTBkCL9rZBjuszV/dVEqSU?= =?us-ascii?Q?BtV4DXKfiaWieo2+dfta4UODftiElowcsZ72YRNzph1jTwRwbPkrlZPSXCI3?= =?us-ascii?Q?+fOEiKDgqSWksT+5XwgtrpVzaG+4BOOM6QTsrxh?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0606; 5:LvkFqD81ZgkmgXq2Fy+jwS19ssmYvIvSS1himpt86JQ5Wd563ohslbIl3NQSpmXhnv1zcArMLlBpCzGnTUeN4KV2Vh0DDMrsGcS5BFFxC5Nz91oQB2i4lci5xApxmQQ8zkWzLa73yoG2p1u9ebxbTw==; 24:uwcBoCGYXD2jhbuZnCG2HUiHi6xITgHlfZea3tsG9wU+aZcvsPCT0TjGL8xbAcnRBU3UPPZv9cTBja3GdbkOb3vyT/YyUA2IMTs5/WV3szM=; 20:yYWAL/PGleJ72bV9AYcDZrMDDaX7UtG5o+y1gBrAB+8NMM6cyK9sW2Dg/XUEi7F1hXvPwWoo/tlyIN4PM28+SOpHjPBqxBP9QbWu7oj1TXVeVvT8SjjRuTtHF0XJgXCb+UYh6wJnBUFgABtZSz5Ycmk1hM8dZ46CLdDtTLgoboY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 04:33:13.9214 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0606 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. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - i2c has clock-frequency = <> 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 de7561e5..0a85934 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -62,6 +62,28 @@ }; }; }; + + 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>; + }; + }; }; &du { @@ -103,6 +125,16 @@ renesas,groups = "i2c2_a"; renesas,function = "i2c2"; }; + + sound_pins: sound { + renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_a_data"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clkout3_a"; + renesas,function = "audio_clk"; + }; }; &scif1 { @@ -152,4 +184,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>; };