From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43CAAC433F5 for ; Wed, 6 Apr 2022 11:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RsHLm+l3qMNF3MAQ7/s0ii8Z05z95i0L60M95Rfl9XE=; b=Ya9sSTck242zHI +dgKDtedGpiQ1aJB1zweKdr/En+ozmdLIG/zhTPrywn+Pg1pwTwqcvCm9DeqJmUN8qyXpR/gzCYrh 78QWMJwxnXe1I/ccs3cHmvsty2iaV4N+TNeyhwfr7ritERtB5Ld/id6GYqrsHXmbAaZA1D0G3mcCG WEip1E3VsGH8ywJ76BX8UuOWWkvqXZPzniveFoGP8LlcILx18KR8/TyrVyDFkF+TlWSAS9IhQNEMy REP1SdOVCkJh3hyhqbG5z6b39kd0V0u/E93ex2K9i0n8a0b01EC41FVW/uH005jrzhW5zWovd2NHL bDIsQ7A/xSQ+0J/aIwow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc3df-005hmR-Ns; Wed, 06 Apr 2022 11:15:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc3db-005hiW-Ok; Wed, 06 Apr 2022 11:15:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D150423A; Wed, 6 Apr 2022 04:15:39 -0700 (PDT) Received: from [10.57.41.19] (unknown [10.57.41.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E042C3F718; Wed, 6 Apr 2022 04:15:37 -0700 (PDT) Message-ID: Date: Wed, 6 Apr 2022 12:15:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v9 01/23] clk: rk3568: Mark hclk_vo as critical Content-Language: en-GB To: Sascha Hauer , dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , =?UTF-8?Q?Heiko_St=c3=bcbner?= , Peter Geis References: <20220328151116.2034635-1-s.hauer@pengutronix.de> <20220328151116.2034635-2-s.hauer@pengutronix.de> From: Robin Murphy In-Reply-To: <20220328151116.2034635-2-s.hauer@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_041547_935637_0086A2EE X-CRM114-Status: GOOD ( 22.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-03-28 16:10, Sascha Hauer wrote: > Whenever pclk_vo is enabled hclk_vo must be enabled as well. This is > described in the Reference Manual as: > > | 2.8.6 NIU Clock gating reliance > | > | A part of niu clocks have a dependence on another niu clock in order to > | sharing the internal bus. When these clocks are in use, another niu > | clock must be opened, and cannot be gated. These clocks and the special > | clock on which they are relied are as following: > | > | Clocks which have dependency The clock which can not be gated > | ----------------------------------------------------------------- > | ... > | pclk_vo_niu, hclk_vo_s_niu hclk_vo_niu > | ... > > The clock framework doesn't offer a way to enable clock B whenever clock A is > enabled, at least not when B is not an ancestor of A. Workaround this by > marking hclk_vo as critical so it is never disabled. This is suboptimal in > terms of power consumption, but a stop gap solution until the clock framework > has a way to deal with this. > > We have this clock tree: > > | aclk_vo 2 2 0 300000000 0 0 50000 Y > | aclk_hdcp 0 0 0 300000000 0 0 50000 N > | pclk_vo 2 3 0 75000000 0 0 50000 Y > | pclk_edp_ctrl 0 0 0 75000000 0 0 50000 N > | pclk_dsitx_1 0 0 0 75000000 0 0 50000 N > | pclk_dsitx_0 1 2 0 75000000 0 0 50000 Y > | pclk_hdmi_host 1 2 0 75000000 0 0 50000 Y > | pclk_hdcp 0 0 0 75000000 0 0 50000 N > | hclk_vo 2 5 0 150000000 0 0 50000 Y > | hclk_hdcp 0 0 0 150000000 0 0 50000 N > | hclk_vop 0 2 0 150000000 0 0 50000 N > > Without this patch the edp, dsitx, hdmi and hdcp driver would enable their > clocks which then enables pclk_vo, but hclk_vo stays disabled and register > accesses just hang. hclk_vo is enabled by the VOP2 driver, so reproducibility > of this issue depends on the probe order. FWIW, Reviewed-by: Robin Murphy > Signed-off-by: Sascha Hauer > --- > > Notes: > Changes since v8: > - new patch > > drivers/clk/rockchip/clk-rk3568.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c > index 63dfbeeeb06d9..62694d95173ab 100644 > --- a/drivers/clk/rockchip/clk-rk3568.c > +++ b/drivers/clk/rockchip/clk-rk3568.c > @@ -1591,6 +1591,7 @@ static const char *const rk3568_cru_critical_clocks[] __initconst = { > "hclk_php", > "pclk_php", > "hclk_usb", > + "hclk_vo", > }; > > static const char *const rk3568_pmucru_critical_clocks[] __initconst = { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel