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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7AB8C433EF for ; Wed, 3 Nov 2021 14:51:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A745C60FC4 for ; Wed, 3 Nov 2021 14:51:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A745C60FC4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GrPPKPOTqzsvDaVrR1sfI+GCuddvBBBxIGSoRxANF6E=; b=hyHrub0wgiUCk0 Icu1w8Aqq1x7W+p9dI2mggApVKixMWdE0zw5skWehFsCsHPIWY6Kr44cFJzFd0ar945f5NMLgADyO wsegoN0y5S+Pxo++xZCAXRlFW57VvInnYImdbZG8/nfkfO1ldIiG4Z9wjaxF0HY/R0A6p2uQGaIA0 JiyHbX72l2cCdwS5JDM2fClXz3lAwhCG5YTArvuxojKgH/3APDZCI/sgRAMC1fFppM0vs+l6iC1g3 X8ejYIej6O/KJbXfqsZX8aRoLD1K//YQzdNP/GWEoi6l1syJSOCpDXyMs5tsrJT0Q9c9AwftdVfCK V0xZ5SHaadpW1P32qkHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1miHaf-005TiD-L7; Wed, 03 Nov 2021 14:50:13 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1miHac-005Tgf-AC for linux-arm-kernel@lists.infradead.org; Wed, 03 Nov 2021 14:50:12 +0000 Received: by mail-ed1-x52d.google.com with SMTP id g14so10343617edz.2 for ; Wed, 03 Nov 2021 07:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Z6Ffr3auqY5aQvzV5hOlatJdK1wDtUKhp272cbbCL0s=; b=lhSUM+kKjh5byxhg6ghIYZIUwkxQ+7/6dumA5dTZCqdf/9fRdz8Yn8RXsXPKFxwMj8 4H0QJq4Y33O5yGFDw6iu+vgPQkGQlrqiSm206XrsvIV4HQTyFYxcaO/WNlI9xOA3GibA GbgNLjvuCawDk6K2gAnF/BxUt2j3F7Fbc09Q96JAVixFX1Zr0C4sCrG3nIdI/aMbr3yS xA252AcKguMDyjTZJDUmMGd95x2J4PmA6n3ihr/fkhb5F9OeHg0l7MxIov9A92PtTS70 NZrTH7+TQLMt3qyxVpOVQ6UP20ZOoJETrKTgMf1/vrnVi2DRxHoPyUKcbBNCL2p8jWsf BGcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Z6Ffr3auqY5aQvzV5hOlatJdK1wDtUKhp272cbbCL0s=; b=vVQ8Q4eYT86zU1xk7oUGrJx7ATjAIUp5c43bWiYzL9Sjuk40KKMs1UQwZWul9new3g ERcRzqoewGT5TVHCtB5t3978VUYQUC89evvDcPUQsHzqsAyRE2ox/Ac51Gx5LCuwgmi6 OtNQXMF9il6v67HIBAblfz2KsYQcfTwuzyN7hISMOjDiF9PP0KvvkJxNGC/6afc1pKWM cC36GVMNKoUjCpRXQfeaNhY9npNzub2L/Rhg70IFrY9mVItHKYpllm2I+C2Q+q4Xb0dm A9ho1HOpwKIpW5EONSZ5pfQwou46jEegNnMxf/roXLFSxfGJhzd40uIReCR9ePIR7GfL vJoQ== X-Gm-Message-State: AOAM531KBUlRzUNzkv7R57+6HDdtFKUWAADK7o+hj3oc77dqj6iLJfkY KbsJcyahatSLMVWbzqP4tt8= X-Google-Smtp-Source: ABdhPJzFfm3p+KwmX8t+yzKQvlYXrlx7PQjbJMi3mCIEHpD6IzWZqzkOnlHWTb9vAtAB0+UQCOfDjg== X-Received: by 2002:a05:6402:3552:: with SMTP id f18mr15452251edd.129.1635951006129; Wed, 03 Nov 2021 07:50:06 -0700 (PDT) Received: from tom-desktop (net-188-153-110-208.cust.vodafonedsl.it. [188.153.110.208]) by smtp.gmail.com with ESMTPSA id i8sm1441241edq.80.2021.11.03.07.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 07:50:05 -0700 (PDT) Date: Wed, 3 Nov 2021 15:50:02 +0100 From: Tommaso Merciai To: Adam Ford Cc: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Lucas Stach , Joakim Zhang , Krzysztof Kozlowski , Frieder Schrempf , Peng Fan , Alice Guo , devicetree , arm-soc , Linux Kernel Mailing List , Abel Vesa Subject: Re: [PATCH] arm64: dts: imx8mm: Add NOC node Message-ID: <20211103145002.GA224875@tom-desktop> References: <20211103124329.171124-1-tomm.merciai@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211103_075010_403000_AE939571 X-CRM114-Status: GOOD ( 32.66 ) 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 Wed, Nov 03, 2021 at 08:19:34AM -0500, Adam Ford wrote: > On Wed, Nov 3, 2021 at 7:43 AM Tommaso Merciai wrote: > > > > Add support for dynamic frequency scaling of the main NOC configuration > > on imx8mm. > > > > References: > > - i.MX 8M Mini Applications Processor RM, Rev. 3, 11/2020 > > - f18e6d573b80 arm64: dts: imx8mq: Add NOC node > > - 912b9dacf3f0 arm64: dts: imx8mq: increase NOC clock to 800 MHz > > --- > > + Abel > > > arch/arm64/boot/dts/freescale/imx8mm.dtsi | 25 +++++++++++++++++++++++ > > 1 file changed, 25 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > index c2f3f118f82e..c5f64abcecff 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > @@ -719,6 +719,31 @@ pgc_mipi: power-domain@11 { > > }; > > }; > > > > + noc: interconnect@32700000 { > > + compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc"; > > + reg = <0x32700000 0x100000>; > > + clocks = <&clk IMX8MM_CLK_NOC>; > > + fsl,ddrc = <&ddrc>; > > + #interconnect-cells = <1>; > > + operating-points-v2 = <&noc_opp_table>; > > + > > + noc_opp_table: opp-table { > > + compatible = "operating-points-v2"; > > + > > + opp-133M { > > + opp-hz = /bits/ 64 <133333333>; > > + }; > > + > > + opp-400M { > > + opp-hz = /bits/ 64 <400000000>; > > + }; > > + > > + opp-800M { > > + opp-hz = /bits/ 64 <800000000>; > > + }; > > When I look at the opp table from the NXP's custom kernel [1] , they > have a different opp table with a max frequency of 750MHz instead of > 800MHz. The i.MX8MM Ref manual shows there is something at 3270_0000, > but it doesn't go into details of the registers there. However the max > speed of the NOC clock does appear to be 800MHz and not the 750 MHz > listed in the NXP kernel. > > However, In the clk node of imx8mm.dtsi file, the IMX8MM_CLK_NOC > parent is set to IMX8MM_SYS_PLL3_OUT and IMX8MM_SYS_PLL3_OUT is set to > 750MHz, so I think setting the IMX8MM_CLK_NOC to 800MHz is likely not > what we want if we're setting this clock parent and clock rate to > 750MHz. However if the NOC operates correctly at 800MHz when the > parent is set to IMX8MM_SYS_PLL1_800M, it might make sense. Looking > at the imx8mq.dtsi file, it appears that the NOC node is referencing > the ddrc node, and the imx8mq is able to operate the ddrc at 800MHz, > while I beleive the 8MM is capped at 750M. > > Since I do not know if the NOC is tied to the processor speed, the > DRAM speed, or it runs independently, I can't say with any confidence > what it should be and/or how to test it, but I would assume that with > the ddrc node capped at 750MHz, the opp table in the NXP kernel is > probably the correct one. > > [1] - https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y > > adam Hi Adam, Thanks for your review. Tommaso > > > + }; > > + }; > > + > > aips2: bus@30400000 { > > compatible = "fsl,aips-bus", "simple-bus"; > > reg = <0x30400000 0x400000>; > > -- > > 2.25.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel