From patchwork Thu Aug 10 00:13:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13348639 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 EF94AC001B0 for ; Thu, 10 Aug 2023 00:14:15 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SF1QWvYP8KfJR+DHmOL66UPg2Q+VG4MeRss+DFbO2Cw=; b=HbWWTpm5gn+SQK sEnexQk3BTkrDrBQir7NFmLseycan0K4BjOPifQquZeN2HGYFEReJrGWvhymaAefTPaXZj2REXxkO 4YQYXh5kucE68ID9N8RpKGZWhDAq3HprvVPepLj75SCE298R0NOnt4o1pXyGP2y7l++lt3dGtNCCj p774f4K5/OogJ35RRWtu9pMDpbCASNYd4cnxP1J2R/vVvjS4mrYlNWGc/+yQXYyqRanUWn3GO48hX d+FuAwZsATx0EiPM1WtLrMHE//WR4Py7/g10mW1a6V2PUVTplDOk2BIrQpiTLDJHB25lCi7FQ2kkm VB9tovZ/qw4V0TUaM8tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTtJC-0068pd-1t; Thu, 10 Aug 2023 00:13:46 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTtJ7-0068op-0y for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2023 00:13:45 +0000 Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 0CCCA860F1; Thu, 10 Aug 2023 02:13:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1691626416; bh=G43sbks2Yr21y2TJAqQdzhxP8jBBJ/21oycX/OOnKS0=; h=From:To:Cc:Subject:Date:From; b=AvBpUKLNreeYtZvg8PLWXKehVmz0s3ZCS1WhY8FM+uTgArBRLXkdE3SNEPQbN8KTC 2GZfNRvJX++gbMGI3o4Bilo7TQpQbyqpHdE1t0AUVl+dMVV3jfyRxlGFxgH8OswGCZ D9G/cOCockW9HvJ7P+t2+JlZpOwrCuRRdfBSpyurr9NyeVTJSh8kuH3GnmLCmglOVL wph2bAQg8gEjEMtWIP5itT1QvbVlVel5alyS6nBfFRE8CF+p520zOKF6Ac3U1iRIx1 Hmbva+snFuMsA2NUecbyKHK8J7q3JD2QPU9pkcTMkFbcakq92+rg6CfpI3omeCihjU vSy9BSYsK0B3A== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Adam Ford , Alexander Stein , Conor Dooley , Fabio Estevam , Frank Li , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Subject: [PATCH] arm64: dts: imx8mp: Improve VPU clock configuration Date: Thu, 10 Aug 2023 02:13:20 +0200 Message-Id: <20230810001320.626744-1-marex@denx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_171341_837584_F007AFA8 X-CRM114-Status: GOOD ( 10.34 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Update VPU clock according to reference manual to improve performance. i.MX 8M Plus Applications Processor Reference Manual, Rev. 1, 06/2021 Table 5-1. Clock Root Table (continued) reads as follows: Clock Root ............... Max Freq (MHz) VPU_BUS_CLK_ROOT ......... 800 VPU_G1_CLK_ROOT .......... 800 VPU_G2_CLK_ROOT .......... 700 5.1.5.1 Input Clocks Input Clock .............. Frequency (MHz) VPU_PLL_CLK .............. 800 The VPU G1 and VPU bus is now supplied from PLL1 which provides 800 MHz on one of its outputs, the VPU G2 is supplied from VPU PLL with 700 MHz which is a perfect fit for this setup. This also matches the NXP kernel fork configuration. Signed-off-by: Marek Vasut Reviewed-by: Adam Ford --- Cc: Adam Ford Cc: Alexander Stein Cc: Conor Dooley Cc: Fabio Estevam Cc: Frank Li Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: NXP Linux Team Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 6f2f50e1639c3..77974bd6da63a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1928,8 +1928,8 @@ vpu_g1: video-codec@38300000 { interrupts = ; clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>; assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>; - assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>; - assigned-clock-rates = <600000000>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>; + assigned-clock-rates = <800000000>; power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>; }; @@ -1939,8 +1939,8 @@ vpu_g2: video-codec@38310000 { interrupts = ; clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>; assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>; - assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>; - assigned-clock-rates = <500000000>; + assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>; + assigned-clock-rates = <700000000>; power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>; }; @@ -1956,8 +1956,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 { <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>; clock-names = "g1", "g2", "vc8000e"; assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>, <&clk IMX8MP_VPU_PLL>; - assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>; - assigned-clock-rates = <600000000>, <600000000>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>; + assigned-clock-rates = <800000000>, <700000000>; interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>, <&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>, <&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;