From patchwork Sat Jan 9 02:31:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 7991731 Return-Path: X-Original-To: patchwork-linux-rockchip@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 37BA4BEEE5 for ; Sat, 9 Jan 2016 02:32:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AD50201E4 for ; Sat, 9 Jan 2016 02:32:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D717201DD for ; Sat, 9 Jan 2016 02:32:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHjK7-00076w-Qb; Sat, 09 Jan 2016 02:32:11 +0000 Received: from gloria.sntech.de ([95.129.55.99]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHjK5-00075s-UM; Sat, 09 Jan 2016 02:32:10 +0000 Received: from ip545477c2.speed.planet.nl ([84.84.119.194] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aHjJa-0003Bu-T3; Sat, 09 Jan 2016 03:31:38 +0100 From: Heiko Stuebner To: Caesar Wang Subject: Re: [PATCH v2 03/12] ARM: dts: rockchip: override the clocks in i2s for kylin board Date: Sat, 09 Jan 2016 03:31:33 +0100 Message-ID: <1878139.nbddSBf70A@phil> User-Agent: KMail/4.14.10 (Linux/4.3.0-trunk-amd64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <1452155155-16232-4-git-send-email-wxt@rock-chips.com> References: <1452155155-16232-1-git-send-email-wxt@rock-chips.com> <1452155155-16232-4-git-send-email-wxt@rock-chips.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160108_183210_164642_B1C633A3 X-CRM114-Status: GOOD ( 15.41 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ulf Hansson , Russell King , Pawel Moll , Ian Campbell , Kumar Gala , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , leecam@google.com, linux-arm-kernel@lists.infradead.org, keescook@google.com, leozwang@google.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Hi Caesar, Am Donnerstag, 7. Januar 2016, 16:25:46 schrieb Caesar Wang: > The sysclk seems be incorrect since we use the simple card for kylin > board. > > The simple card call: > > asoc_simple_card_probe -> > asoc_simple_card_dai_link_of -> > asoc_simple_card_sub_parse_of -> > ... > clk = of_clk_get(args.np, 0); > if (!IS_ERR(clk)) > dai->sysclk = clk_get_rate(clk); > > The sysclk come from the first clock, then first clock is hclk_i2s > in i2s for rk3036 dtsi. > So, we can override the clocks to fit the simple card in here. It's not that effective, doing that change on a per-board level - as it would possibly need to be repeated for future boards. The i2s driver doesn't care, as it uses named clocks, so I instead did the swap in the rk3036.dtsi for all boards. Can you check if that is ok for you or if I did overlook something? Thanks Heiko ------- 8< ------- Subject: [PATCH] ARM: dts: rockchip: swap i2s clock ordering on rk3036 For sound setups using the simple-card mechanism, the main clock (sysclk) is expected to be the first element. For the i2s-driver itself it doesn't matter, as it uses named clocks, so we can just swap them. Reported-by: Caesar Wang Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3036.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi index 8f1bb0f..ee457a2 100644 --- a/arch/arm/boot/dts/rk3036.dtsi +++ b/arch/arm/boot/dts/rk3036.dtsi @@ -241,8 +241,8 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; - clock-names = "i2s_hclk", "i2s_clk"; - clocks = <&cru HCLK_I2S>, <&cru SCLK_I2S>; + clock-names = "i2s_clk", "i2s_hclk"; + clocks = <&cru SCLK_I2S>, <&cru HCLK_I2S>; dmas = <&pdma 0>, <&pdma 1>; dma-names = "tx", "rx"; pinctrl-names = "default";