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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23110C433F5 for ; Sat, 12 Mar 2022 21:08:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231488AbiCLVJJ (ORCPT ); Sat, 12 Mar 2022 16:09:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232680AbiCLVJI (ORCPT ); Sat, 12 Mar 2022 16:09:08 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 935D83B295 for ; Sat, 12 Mar 2022 13:08:02 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id AE00E1F4595D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647119280; bh=wLExJO5a7BmNAEjWa2vEXI65hZUlcnfDKIQubmXYQnc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QYeUEH+ikY/Ro0+JeLJULZFKaxxIFkAzMFLOhDP83klBIXSO/dTzyh02Ta91Msvkz Co7Da98R4PxLxTf2su/UBioVU1YgOlfOenhHw9yjbvlMiP8/WA1Qld7GSG3cGG4J7x EZUrFmknuwGh3ws+Cq61njszuQwOgN+ztZthFrmQDfnJpw6xvxp6h9urLbStLUAE94 sby0sevwi1CxegYfipUaMpooeK8yJl7rIW2Pfy90HqIgLTzifmmpOgC03xlNdjseFg UorG2by37kNYSuDTChgTvPzoOxNyzudZ62M5A8MCmVbQqawTlFPPQSLjS4XE456Bl4 FAnhceRnDkSWg== Message-ID: <4712e128-8a14-e361-0819-911dc3453372@collabora.com> Date: Sun, 13 Mar 2022 00:07:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH v8 09/24] drm/rockchip: dw_hdmi: Add support for niu clk Content-Language: en-US To: Sascha Hauer , "elaine.zhang" , Robin Murphy Cc: devicetree@vger.kernel.org, Benjamin Gaignard , Peter Geis , Sandy Huang , linux-rockchip@lists.infradead.org, Michael Riesch , kernel@pengutronix.de, Andy Yan , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org References: <20220311083323.887372-1-s.hauer@pengutronix.de> <20220311083323.887372-10-s.hauer@pengutronix.de> From: Dmitry Osipenko In-Reply-To: <20220311083323.887372-10-s.hauer@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 3/11/22 11:33, Sascha Hauer wrote: > The rk3568 HDMI has an additional clock that needs to be enabled for the > HDMI controller to work. This clock is not needed for the HDMI > controller itself, but to make the SoC internal bus logic work. From the > reference manual: > >> 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 does not support turning on a clock whenever another > clock is turned on, so this patch adds support for the dependent clock > to the HDMI driver. We call it "NIU", which is for "Native Interface > Unit" This still doesn't make sense to me. You're saying that "pclk_vo_niu, hclk_vo_s_niu" depend on "hclk_vo_niu", but HDMI doesn't use pclk_vo, it uses pclk_hdmi. I don't see how these "niu" clocks are related to HDMI from your description. The pclk_vo should remain being disabled for HDMI. I already said before that the datasheet suggests that hclk_vo needs to be enabled in order to ungate the AHB part of the VO module, which is needed for CPU accesses. Elain, could you please confirm this or clarify more about why hclk_vo needs to be enabled for HDMI? 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 341E6C433EF for ; Sat, 12 Mar 2022 21:08:24 +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-Transfer-Encoding:Content-Type: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=liVuyw8nMbX49rHI0YgK7qfp3anxLbHJYXnpEdkk40I=; b=smFOrI+NmVebcf /EkOHVcatU9TvhLtGp1cJUqd0d52xU+JZAZmpLjjNdi+T9L53op3e2pbSrDHhdnL9Sv2DZxJ5d2kV yBa7yqMgEWb7lu7l1xhDmYnoV/7onPURKbiEg4gGrFYIqFNRqUpBq4jL1yW+8aPPUTPC3FQScs2Sf Q2vxlDj3ewen2Vb/oGHC7h1OpRxaNQ7o5rvhUuXA1Z+MhTVpHTi0mvL+muLhJrbPRFt+qTuFhrt6K ghMSEtx8BWB2SehBDYmhFuNwMylhPKglHiDUS9cKwGQsx0zBr5+tP781f1EyxvkErR+myE93VEn7W JEdyAH0FEAWSZ5kr6egw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nT8yH-001qyR-7P; Sat, 12 Mar 2022 21:08:17 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nT8y4-001qwx-B8; Sat, 12 Mar 2022 21:08:05 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id AE00E1F4595D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647119280; bh=wLExJO5a7BmNAEjWa2vEXI65hZUlcnfDKIQubmXYQnc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QYeUEH+ikY/Ro0+JeLJULZFKaxxIFkAzMFLOhDP83klBIXSO/dTzyh02Ta91Msvkz Co7Da98R4PxLxTf2su/UBioVU1YgOlfOenhHw9yjbvlMiP8/WA1Qld7GSG3cGG4J7x EZUrFmknuwGh3ws+Cq61njszuQwOgN+ztZthFrmQDfnJpw6xvxp6h9urLbStLUAE94 sby0sevwi1CxegYfipUaMpooeK8yJl7rIW2Pfy90HqIgLTzifmmpOgC03xlNdjseFg UorG2by37kNYSuDTChgTvPzoOxNyzudZ62M5A8MCmVbQqawTlFPPQSLjS4XE456Bl4 FAnhceRnDkSWg== Message-ID: <4712e128-8a14-e361-0819-911dc3453372@collabora.com> Date: Sun, 13 Mar 2022 00:07:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH v8 09/24] drm/rockchip: dw_hdmi: Add support for niu clk Content-Language: en-US To: Sascha Hauer , "elaine.zhang" , Robin Murphy Cc: devicetree@vger.kernel.org, Benjamin Gaignard , Peter Geis , Sandy Huang , linux-rockchip@lists.infradead.org, Michael Riesch , kernel@pengutronix.de, Andy Yan , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org References: <20220311083323.887372-1-s.hauer@pengutronix.de> <20220311083323.887372-10-s.hauer@pengutronix.de> From: Dmitry Osipenko In-Reply-To: <20220311083323.887372-10-s.hauer@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220312_130804_615747_7B178F11 X-CRM114-Status: GOOD ( 16.58 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On 3/11/22 11:33, Sascha Hauer wrote: > The rk3568 HDMI has an additional clock that needs to be enabled for the > HDMI controller to work. This clock is not needed for the HDMI > controller itself, but to make the SoC internal bus logic work. From the > reference manual: > >> 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 does not support turning on a clock whenever another > clock is turned on, so this patch adds support for the dependent clock > to the HDMI driver. We call it "NIU", which is for "Native Interface > Unit" This still doesn't make sense to me. You're saying that "pclk_vo_niu, hclk_vo_s_niu" depend on "hclk_vo_niu", but HDMI doesn't use pclk_vo, it uses pclk_hdmi. I don't see how these "niu" clocks are related to HDMI from your description. The pclk_vo should remain being disabled for HDMI. I already said before that the datasheet suggests that hclk_vo needs to be enabled in order to ungate the AHB part of the VO module, which is needed for CPU accesses. Elain, could you please confirm this or clarify more about why hclk_vo needs to be enabled for HDMI? _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A10ADC433EF for ; Sat, 12 Mar 2022 21:08:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D75110E112; Sat, 12 Mar 2022 21:08:03 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28CB810E112 for ; Sat, 12 Mar 2022 21:08:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id AE00E1F4595D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647119280; bh=wLExJO5a7BmNAEjWa2vEXI65hZUlcnfDKIQubmXYQnc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QYeUEH+ikY/Ro0+JeLJULZFKaxxIFkAzMFLOhDP83klBIXSO/dTzyh02Ta91Msvkz Co7Da98R4PxLxTf2su/UBioVU1YgOlfOenhHw9yjbvlMiP8/WA1Qld7GSG3cGG4J7x EZUrFmknuwGh3ws+Cq61njszuQwOgN+ztZthFrmQDfnJpw6xvxp6h9urLbStLUAE94 sby0sevwi1CxegYfipUaMpooeK8yJl7rIW2Pfy90HqIgLTzifmmpOgC03xlNdjseFg UorG2by37kNYSuDTChgTvPzoOxNyzudZ62M5A8MCmVbQqawTlFPPQSLjS4XE456Bl4 FAnhceRnDkSWg== Message-ID: <4712e128-8a14-e361-0819-911dc3453372@collabora.com> Date: Sun, 13 Mar 2022 00:07:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH v8 09/24] drm/rockchip: dw_hdmi: Add support for niu clk Content-Language: en-US To: Sascha Hauer , "elaine.zhang" , Robin Murphy References: <20220311083323.887372-1-s.hauer@pengutronix.de> <20220311083323.887372-10-s.hauer@pengutronix.de> From: Dmitry Osipenko In-Reply-To: <20220311083323.887372-10-s.hauer@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Benjamin Gaignard , kernel@pengutronix.de, Sandy Huang , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Michael Riesch , Peter Geis , Andy Yan , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/11/22 11:33, Sascha Hauer wrote: > The rk3568 HDMI has an additional clock that needs to be enabled for the > HDMI controller to work. This clock is not needed for the HDMI > controller itself, but to make the SoC internal bus logic work. From the > reference manual: > >> 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 does not support turning on a clock whenever another > clock is turned on, so this patch adds support for the dependent clock > to the HDMI driver. We call it "NIU", which is for "Native Interface > Unit" This still doesn't make sense to me. You're saying that "pclk_vo_niu, hclk_vo_s_niu" depend on "hclk_vo_niu", but HDMI doesn't use pclk_vo, it uses pclk_hdmi. I don't see how these "niu" clocks are related to HDMI from your description. The pclk_vo should remain being disabled for HDMI. I already said before that the datasheet suggests that hclk_vo needs to be enabled in order to ungate the AHB part of the VO module, which is needed for CPU accesses. Elain, could you please confirm this or clarify more about why hclk_vo needs to be enabled for HDMI? 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 8DCD8C433EF for ; Sat, 12 Mar 2022 21:09:31 +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-Transfer-Encoding:Content-Type: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=TMRgokaTUo06Sq3Ho/ISJPXJUuoH3JFk9pZuHCeS1cs=; b=U6le1DlxJCeYmM YlcaViBNIhRnPLUdbHt+J1VGFcbwmBZyVpv/anWJDf0JfX1OF1M1X1GbQ2rlb7mEWvg1VY0+Gt8vD 31JBFyECw/aILCHDogi1neaQcCtRKnbi5TKzaF853JEv5kTXycs8mFABjEv//CRR0oXA1RCifvuA8 Y2fX36mpiHiS47h+gOYBlT0G9QW2WE2e+9vbt18KorvQhscVUn3x1wjEnv5h3T2ELmYuHc/KfZM7C mLOyco66LJihSZMVjdrsAPU09yuAiTzRocI07kLLCCcxf/ny2jGV94FfU25UCeowm1uyb/hb7ZdNS mtfv1KcQilTq3+YF7iKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nT8y9-001qxd-7d; Sat, 12 Mar 2022 21:08:09 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nT8y4-001qwx-B8; Sat, 12 Mar 2022 21:08:05 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id AE00E1F4595D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647119280; bh=wLExJO5a7BmNAEjWa2vEXI65hZUlcnfDKIQubmXYQnc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QYeUEH+ikY/Ro0+JeLJULZFKaxxIFkAzMFLOhDP83klBIXSO/dTzyh02Ta91Msvkz Co7Da98R4PxLxTf2su/UBioVU1YgOlfOenhHw9yjbvlMiP8/WA1Qld7GSG3cGG4J7x EZUrFmknuwGh3ws+Cq61njszuQwOgN+ztZthFrmQDfnJpw6xvxp6h9urLbStLUAE94 sby0sevwi1CxegYfipUaMpooeK8yJl7rIW2Pfy90HqIgLTzifmmpOgC03xlNdjseFg UorG2by37kNYSuDTChgTvPzoOxNyzudZ62M5A8MCmVbQqawTlFPPQSLjS4XE456Bl4 FAnhceRnDkSWg== Message-ID: <4712e128-8a14-e361-0819-911dc3453372@collabora.com> Date: Sun, 13 Mar 2022 00:07:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH v8 09/24] drm/rockchip: dw_hdmi: Add support for niu clk Content-Language: en-US To: Sascha Hauer , "elaine.zhang" , Robin Murphy Cc: devicetree@vger.kernel.org, Benjamin Gaignard , Peter Geis , Sandy Huang , linux-rockchip@lists.infradead.org, Michael Riesch , kernel@pengutronix.de, Andy Yan , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org References: <20220311083323.887372-1-s.hauer@pengutronix.de> <20220311083323.887372-10-s.hauer@pengutronix.de> From: Dmitry Osipenko In-Reply-To: <20220311083323.887372-10-s.hauer@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220312_130804_615747_7B178F11 X-CRM114-Status: GOOD ( 16.58 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/11/22 11:33, Sascha Hauer wrote: > The rk3568 HDMI has an additional clock that needs to be enabled for the > HDMI controller to work. This clock is not needed for the HDMI > controller itself, but to make the SoC internal bus logic work. From the > reference manual: > >> 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 does not support turning on a clock whenever another > clock is turned on, so this patch adds support for the dependent clock > to the HDMI driver. We call it "NIU", which is for "Native Interface > Unit" This still doesn't make sense to me. You're saying that "pclk_vo_niu, hclk_vo_s_niu" depend on "hclk_vo_niu", but HDMI doesn't use pclk_vo, it uses pclk_hdmi. I don't see how these "niu" clocks are related to HDMI from your description. The pclk_vo should remain being disabled for HDMI. I already said before that the datasheet suggests that hclk_vo needs to be enabled in order to ungate the AHB part of the VO module, which is needed for CPU accesses. Elain, could you please confirm this or clarify more about why hclk_vo needs to be enabled for HDMI? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel