From patchwork Fri Sep 18 02:05:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7212511 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 4D1679F32B for ; Fri, 18 Sep 2015 02:05:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53AB620259 for ; Fri, 18 Sep 2015 02:05:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 592D420225 for ; Fri, 18 Sep 2015 02:05:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbbIRCFy (ORCPT ); Thu, 17 Sep 2015 22:05:54 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:22582 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752472AbbIRCFx (ORCPT ); Thu, 17 Sep 2015 22:05:53 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 18 Sep 2015 11:05:52 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 26BD93D20F; Fri, 18 Sep 2015 11:05:52 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 297328002E; Fri, 18 Sep 2015 11:05:52 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 236A28002D; Fri, 18 Sep 2015 11:05:52 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id MAN08369; Fri, 18 Sep 2015 11:05:52 +0900 X-IronPort-AV: E=Sophos;i="5.17,550,1437404400"; d="scan'";a="194700736" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Sep 2015 11:05:51 +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 HK2PR06MB0595.apcprd06.prod.outlook.com (10.161.187.146) with Microsoft SMTP Server (TLS) id 15.1.268.17; Fri, 18 Sep 2015 02:05:50 +0000 Message-ID: <87y4g4zds1.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 10/18 v3] arm64: renesas: salvator-x: Sound SSI PIO support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Simon CC: Magnus , In-Reply-To: <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> References: <87twqs1osz.wl%kuninori.morimoto.gx@renesas.com> <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> Date: Fri, 18 Sep 2015 02:05:50 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0017.jpnprd01.prod.outlook.com (25.161.131.155) To HK2PR06MB0595.apcprd06.prod.outlook.com (25.161.187.146) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 2:70q/W2Z/o5c48C1b5o6TNjsN2dOsY6uzoVQi7udNn9ThnxDvkCXU2rxC+D3WgWMb5yB+KQ8SiqtskZnmHjRwZHr0eErjvlmcaJgxCwYqqtNC+cWKPXmkR2U06d6JnZJ1cGGfy5wUoWYxPLlSFs587lK6FI1lPORiAYqeWEV5Xog=; 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92FsaRoLVRgru1Ka0+tR2dR7g4ISz0NHa2SKEC7QFpdpaHFL2iKcTTBVwAh5NGoyPY8zsDuMp7GBmkticJnC1AdwJtfCSH+JjLYNoXyrOt9QHIGjPB5pUCfuPHxlfMX4+x5nyKvsnaoEirEDx39MrzUFTFy5TDBNYthKlshKlLL+x4B99vRoNl2K3/L6scQazqN5whdrdizCs+OWjob1crOsZcJJOVtsTholyrGNEhRSJ+d8sScyYA4rWYF+WrgEyo8Rb91GgDHRSFTlCtGtTFcgjQNfgebPOTzWadg/SAH7ncq+WbxDNxA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(520078)(3002001); SRVR:HK2PR06MB0595; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0595; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(66066001)(76176999)(46406003)(33646002)(83506001)(92566002)(50466002)(19580395003)(86362001)(64706001)(101416001)(87976001)(47776003)(54356999)(4001540100001)(40100003)(19580405001)(122386002)(42186005)(69596002)(110136002)(36756003)(229853001)(62966003)(46102003)(53416004)(5001960100002)(189998001)(4001350100001)(77156002)(5001860100001)(77096005)(5004730100002)(5001830100001)(68736005)(50986999)(2950100001)(81156007)(97736004)(5007970100001)(106356001)(23726002)(105586002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0595; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0595; 23:9gBaxcCCdt15GwLR/Mqbz7669aOxgxLTHMv46Q2h1?= =?us-ascii?Q?8Q7t07kCrWscUfLuw66LtMUWnYsxDuOF5UrMg0QIFci8jmMrZDKP0t+hVmzj?= =?us-ascii?Q?de3FbyyCkS7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DoxsRXb?= =?us-ascii?Q?9sutB+9W6QM4qNx7GytIz1zvJalWG6yl303ZXt3DH2pT6KXPKTRz5NRI/PNT?= =?us-ascii?Q?BirpexQpQ4yje219SvidbeCKAmiimApDWjAf34+aYVSBFgrxL/M28yc27aLr?= =?us-ascii?Q?8XGpyqmfcx5Zk33BSPaiIkWPeBhNrfG5DR2l8aBtlJ38qbJOOpoGQkOSGatf?= =?us-ascii?Q?rDIvsZmOg6Vm4Qgc6FySiu5kezhv1Li1ocrm6pZyPvaNNFPhe4HbNQ3cJhJE?= =?us-ascii?Q?U0/eQyyZYAD80YI/sGdsJquYH+ZD+ZYJzgBCR5s?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 5:Kw3yK04kKICjJQ0yo/6ORewNH5Emj3ETu3ZEhIUfosWHEvGEvfHIbmOP4wmX28G6PfadAKVRFmQ2KM6XucqHM3LsjYXRaAO1RwiZ4iOr/ZabB+R5R+qKDl/2LQZhUfaFWFfQgIRTfJ9eeIKHaDMb5w==; 24:AMYmezAJDKzj26CV/1+nfydQ1LMGUCUcVVvEcmBP420gALVj5nvTDw47A5vPujl1RZlegs9YAmp3ffjv+CarfIIVdQlzwdv1XtenmWiHMvo=; 20:gZtrNBqdiu3cz4aPOmw2SDZUYipZk5rl82aoThNV6eDo30fjjmiSwHtIfvQ2qGPKpFLxZD5hOBKkd5IEjxDdImYHpQptLKKP0YFLP2+URdcC/OMLaRBf9irnjY/+q/uBiheJe+ifpDttb3jfseHG+lfP/M+uC0Br47tjb5R/My4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2015 02:05:50.0673 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0595 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 --- v2 -> v3 - no change 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..bb7fe82 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_data_a"; + 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>; };