All of lore.kernel.org
 help / color / mirror / Atom feed
From: peng.fan at nxp.com <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [PATCH 02/11] imx8m: configure NoC clk
Date: Thu,  9 Jul 2020 16:40:33 +0800	[thread overview]
Message-ID: <20200709084042.8234-3-peng.fan@nxp.com> (raw)
In-Reply-To: <20200709084042.8234-1-peng.fan@nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Configure NoC clk for better system performance

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 6ab75f0e2c..0a8208606d 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -353,11 +353,24 @@ int clock_init(void)
 	/* Bypass CCM A53 ROOT, Switch to ARM PLL -> MUX-> CPU */
 	clock_set_target_val(CORE_SEL_CFG, CLK_ROOT_SOURCE_SEL(1));
 
+	if (is_imx8mn() || is_imx8mp())
+		intpll_configure(ANATOP_SYSTEM_PLL3, MHZ(600));
+	else
+		intpll_configure(ANATOP_SYSTEM_PLL3, MHZ(750));
+
+#ifdef CONFIG_IMX8MP
+	/* 8MP ROM already set NOC to 800Mhz, only need to configure NOC_IO clk to 600Mhz */
+	/* 8MP ROM already set GIC to 400Mhz, system_pll1_800m with div = 2 */
+	clock_set_target_val(NOC_IO_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(2));
+#else
+	clock_set_target_val(NOC_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(2));
+
 	/* config GIC to sys_pll2_100m */
 	clock_enable(CCGR_GIC, 0);
 	clock_set_target_val(GIC_CLK_ROOT, CLK_ROOT_ON |
 			     CLK_ROOT_SOURCE_SEL(3));
 	clock_enable(CCGR_GIC, 1);
+#endif
 
 	clock_set_target_val(NAND_USDHC_BUS_CLK_ROOT, CLK_ROOT_ON |
 			     CLK_ROOT_SOURCE_SEL(1));
-- 
2.16.4

  parent reply	other threads:[~2020-07-09  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  8:40 [PATCH 00/11] imx8m: soc/clk update peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 01/11] imx8m: configure arm clk sources from PLL peng.fan at nxp.com
2020-07-09  8:40 ` peng.fan at nxp.com [this message]
2020-07-09  8:40 ` [PATCH 03/11] imx8m: add sdhc/nand/ecspi clk api peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 04/11] imx8m: add eqos clk peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 05/11] imx8m: workaround ROM serror peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 06/11] imx8mp: Add fused parts support peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 07/11] imx8m: power down fused cores peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 08/11] imx8mn/imx8mp: override env_get_offset and env_get_location peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 09/11] imx8m: disable nodes before kernel/mfgtool boot for fused part peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 10/11] clk: imx8m: drop clk settings peng.fan at nxp.com
2020-07-09  8:40 ` [PATCH 11/11] imx8m: Refactor the OPTEE memory removal peng.fan at nxp.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200709084042.8234-3-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.