From patchwork Fri Dec 18 02:29:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7878341 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 9F09F9F1C2 for ; Fri, 18 Dec 2015 02:29:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB62D2040F for ; Fri, 18 Dec 2015 02:29:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD84820444 for ; Fri, 18 Dec 2015 02:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966047AbbLRC3Z (ORCPT ); Thu, 17 Dec 2015 21:29:25 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:38915 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966038AbbLRC3Z (ORCPT ); Thu, 17 Dec 2015 21:29:25 -0500 Received: from reginn.isobedori.kobe.vergenet.net (p1027-ipbfp1401kobeminato.hyogo.ocn.ne.jp [114.152.28.27]) by kirsty.vergenet.net (Postfix) with ESMTPA id 5347C25BE6A; Fri, 18 Dec 2015 13:29:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1450405762; bh=u7MDL6KLFm4LGLZcED6Q8l6TAHoZXfuHOUp/QGUTzdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cdqSYGjlPzfYhkpe+zT1Aa8y6bWQ9zgu6vq2s1CnWIx/EVRo9FBmW5jp+dw8kY1cD QAClbTRgAKmkGq8mnmE4wnDy3VOT3DSoWJFisKIkOooKIf9OAeh98IReHTuscIorVQ FKyIaHUBR8LESNkQ69TxplA+jv+5qxZM/h0Y8xAo= Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id C0942940675; Fri, 18 Dec 2015 11:29:20 +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 02/10] arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B Date: Fri, 18 Dec 2015 11:29:10 +0900 Message-Id: <8a8f181d2cfdbff772ff2cc895f59bb28beafbdf.1450401186.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: 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,T_DKIM_INVALID,T_RP_MATCHES_RCVD,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 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 Signed-off-by: Simon Horman --- 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 beeacfaf18d0..75af5ec5a4d4 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>;