From patchwork Tue Dec 1 05:36:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7732791 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 2865B9F387 for ; Tue, 1 Dec 2015 05:36:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4681F206B8 for ; Tue, 1 Dec 2015 05:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B3C3206BC for ; Tue, 1 Dec 2015 05:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750722AbbLAFgi (ORCPT ); Tue, 1 Dec 2015 00:36:38 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:54576 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750721AbbLAFgh (ORCPT ); Tue, 1 Dec 2015 00:36:37 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 01 Dec 2015 14:36:36 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 9E39B44F2D; Tue, 1 Dec 2015 14:36:36 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 8D815480A4; Tue, 1 Dec 2015 14:36:36 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 86404480A3; Tue, 1 Dec 2015 14:36:36 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id QAY17708; Tue, 1 Dec 2015 14:36:36 +0900 X-IronPort-AV: E=Sophos;i="5.20,367,1444662000"; d="scan'";a="199611712" Received: from mail-sg2apc01lp0246.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.246]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 01 Dec 2015 14:36:35 +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 HK2PR06MB1009.apcprd06.prod.outlook.com (10.161.183.28) with Microsoft SMTP Server (TLS) id 15.1.331.20; Tue, 1 Dec 2015 05:36:34 +0000 Message-ID: <87k2oyybp2.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/2] arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Simon CC: Magnus , In-Reply-To: <87lh9eybq9.wl%kuninori.morimoto.gx@renesas.com> References: <87lh9eybq9.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 1 Dec 2015 05:36:34 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0010.apcprd06.prod.outlook.com (25.164.91.20) To HK2PR06MB1009.apcprd06.prod.outlook.com (25.161.183.28) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1009; 2:son1sKtZ5sJ1D7l0OCpH7+TIcthORu9UIBmGL8K2XSM3o4H2qGVj+akMM3j52uBYmQv3Arlc+fXnpHCFVj/Kc0x54mVTMt9iGlgNge1xCv20tyWT4CDZGMrOLp8socx75IHYvglk3PrbcgmR45th/Q==; 3:srnpX4yzKyo7Dny8lQsu1/eZ7K+XjYp50x65TnqYDcJToI2F/wpMcaj+RNgbSAGBhEiLIpY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ByXeyryQzgL2nQDzGsK1eQrDbDzXfSPz5Z3i+kF2iaAJ6dJQehkmGpeA6x4LbxtzhB2vs8ZK+g5qxs0auopCr4WgQi06TQuFgyQwLDHi+MV6cYKSxLRuMqeSXRJ9P85rXz4xb4tkioahPluk/qcg7pBEGePwvsXUhEseNQlxlkdsfr5ViuB3URN6fd7TGFtgYeFNth7M6nBFxt6/Alz7F6arVpCLPfeVW5+A2Ow4gC4Mz/DweXJETY25a2zyW1UwpLkAjdfS/UOtn1x20YsrHfGe0+In98h ZtLhKV03k1wO4yvGf7IFINMmI3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001); SRVR:HK2PR06MB1009; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1009; X-Forefront-PRVS: 07778E4001 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(77096005)(66066001)(101416001)(586003)(40100003)(53416004)(189998001)(5004730100002)(97736004)(106356001)(105586002)(42186005)(69596002)(6116002)(86362001)(87976001)(3846002)(229853001)(46406003)(83506001)(54356999)(2950100001)(36756003)(110136002)(92566002)(575784001)(19580405001)(23726003)(19580395003)(33646002)(5001960100002)(1096002)(47776003)(5008740100001)(4001350100001)(50986999)(76176999)(50466002)(81156007)(122386002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1009; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1009; 23:bp5BbNaCxJmHYZAXPV9lsH3Eqhzeq7WgAYBhlfQ7f?= =?us-ascii?Q?TfqBsA1cSYWRZ6uogkF/tSthgKfp4clasy0s2xFh+BNG3Uss1MMIW+LRhZHC?= =?us-ascii?Q?18PcV7brtx3eOeeN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DwcEGkxW?= =?us-ascii?Q?VR7XItynmz2I8iU6hvheWG+2vErW6NbzPvggOgREWuYyjOl3GRSejCAvp2hM?= =?us-ascii?Q?mZCNzjCv1eYiTwLQMx1JnfbLxJgY3KRNGSd0iKXb4xJtOLjQ6ogpiZa8KMkA?= =?us-ascii?Q?b54cT1BknrVUKce8tTj7HxyR0J5Aqe6?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1009; 5:a3BDDfOcihw8OaAj5YssgPTcOuju7aIA9QpSBUocqGP8/HCqko7Fcoxr7srroE9Aleegt9FDZ73dEd48dWwHCKeC7+pomuOTLaAB5VXpLqL5hLL+fQwfBIORoXXPfj6m1rKPBJmWjLEly4C2mVkQQA==; 24:fbjARD+ebW3WMUr98pWRygzXKD6GcqfEKF3YAYr/LoCha37pXnSFPKa5OSvZ6R5aXwNH5UPNTlLRkebtXk8T2q57hfPGyXV/HPuVb0Zf+Kg=; 20:itB17zMGUBVdVCSk+S2fWP/f46x8xYecJTHE71t5Nd0BQYvDgsO8US/EkQEadYeHhPf+lXzWU07/WMV0XTQSCSGjw+NhwvjdOcaukwAkPRniyuzkbyWG1ckqWSGiIF9UiJi7Y4ZjJMm40A0IEir+6NKzaETU8YY8GuLoj94Th2c= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2015 05:36:34.2309 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1009 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 CS2000 needs AUDIO_CLKOUT as master clock which is generated by Renesas sound, and Renesas sound needs CS2000 as ADUIO_CLK_B. Because of this relationship, it will be dead-lock when driver probe. cs2000: clk_multiplier@4f { ... clocks = <&rcar_sound 0>, <&x12_clk>; ... }; &rcar_sound { ... assigned-clocks = <&cs2000>; ... }; This patch is using dummy audio_clkout to avoid this issue. Signed-off-by: Kuninori Morimoto --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index beeacfa..75af5ec 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -61,6 +61,16 @@ clock-frequency = <24576000>; }; + audio_clkout: audio_clkout { + /* + * This is same as <&rcar_sound 0> + * but needed to avoid cs2000/rcar_sound probe dead-lock + */ + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + }; + rsnd_ak4613: sound { compatible = "simple-audio-card"; @@ -151,6 +161,17 @@ asahi-kasei,out5-single-end; asahi-kasei,out6-single-end; }; + + cs2000: clk_multiplier@4f { + #clock-cells = <0>; + compatible = "cirrus,cs2000-cp"; + reg = <0x4f>; + clocks = <&audio_clkout>, <&x12_clk>; + clock-names = "clk_in", "ref_clk"; + + assigned-clocks = <&cs2000>; + assigned-clock-rates = <24576000>; /* 1/1 divide */ + }; }; &rcar_sound { @@ -166,6 +187,23 @@ status = "okay"; + /* update to */ + clocks = <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, + <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, + <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, + <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, + <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, + <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, + <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, + <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, + <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, + <&audio_clk_a>, <&cs2000>, + <&audio_clk_c>, + <&cpg CPG_CORE R8A7795_CLK_S0D4>; + rcar_sound,dai { dai0 { playback = <&ssi0 &src0 &dvc0>;