From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: lst@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 3/5] ARM: i.MX8MP: configure PLL3 as noc_io parent
Date: Fri, 3 May 2024 12:37:15 +0200 [thread overview]
Message-ID: <20240503103717.1370636-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240503103717.1370636-1-a.fatoum@pengutronix.de>
noc_io is clocked at 24MHz when exiting bootrom, which is a far cry
below the 600MHz it can run at in nominal drive mode.
This doesn't bother us much, because we reconfigure it to 800MHz later
on via assigned-clock-properties, but that frequency is only suitable
when running in overdrive mode (VDD_SOC = 950 mV).
Make switching to nominal mode easier by initializing NOC_IO to
the highest nominal frequency.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
- no change
---
arch/arm/mach-imx/imx8m.c | 7 +++++++
include/mach/imx/imx8m-ccm-regs.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index 211b4f782199..56330cef500c 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -116,6 +116,13 @@ static void __imx8m_early_clock_init(int cpu_type)
clk_pll1416x_early_set_rate(ana + IMX8MM_CCM_ANALOG_SYS_PLL3_GEN_CTRL,
pll3_freq, 25000000UL);
+ if (cpu_type == IMX_CPU_IMX8MP) {
+ /* 8MP ROM already set NOC to 800Mhz, only need to configure NOC_IO clk to 600Mhz */
+ imx8m_clock_set_target_val(IMX8M_NOC_IO_CLK_ROOT,
+ IMX8M_CCM_TARGET_ROOTn_ENABLE |
+ IMX8M_CCM_TARGET_ROOTn_MUX(2));
+ }
+
clrsetbits_le32(ccm + IMX8M_CCM_TARGET_ROOTn(IMX8M_ARM_A53_CLK_ROOT),
IMX8M_CCM_TARGET_ROOTn_MUX(7),
IMX8M_CCM_TARGET_ROOTn_MUX(2));
diff --git a/include/mach/imx/imx8m-ccm-regs.h b/include/mach/imx/imx8m-ccm-regs.h
index 29186eb8a7bc..035cd13ed694 100644
--- a/include/mach/imx/imx8m-ccm-regs.h
+++ b/include/mach/imx/imx8m-ccm-regs.h
@@ -22,6 +22,7 @@
* Applications Processor Reference Manual
*/
#define IMX8M_ARM_A53_CLK_ROOT 0
+#define IMX8M_NOC_IO_CLK_ROOT 27
#define IMX8M_DRAM_SEL_CFG 48
#define IMX8M_DRAM_ALT_CLK_ROOT 64
#define IMX8M_DRAM_APB_CLK_ROOT 65
--
2.39.2
next prev parent reply other threads:[~2024-05-03 10:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 10:37 [PATCH v2 0/5] ARM: i.MX8MP: add nominal drive mode support Ahmad Fatoum
2024-05-03 10:37 ` [PATCH v2 1/5] ARM: i.MX8M: pass cpu_type parameter to __imx8m_early_clock_init Ahmad Fatoum
2024-05-03 10:37 ` [PATCH v2 2/5] ARM: i.MX8MP: configure PLL3 as 600MHz Ahmad Fatoum
2024-05-03 10:37 ` Ahmad Fatoum [this message]
2024-05-03 10:37 ` [PATCH v2 4/5] ARM: i.MX8MP: don't reparent GIC from BootROM default Ahmad Fatoum
2024-05-03 10:37 ` [PATCH v2 5/5] ARM: dts: i.MX8MP: Add optional nominal drive mode DTSI Ahmad Fatoum
2024-05-06 7:05 ` [PATCH v2 0/5] ARM: i.MX8MP: add nominal drive mode support Sascha Hauer
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=20240503103717.1370636-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=lst@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox