[U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source
Michael Heimpold
mhei at heimpold.de
Wed Dec 9 22:30:46 CET 2015
For some board designs, it might be useful to switch the DC-DC
clock source to something else rather the default 24 MHz, e.g.
for EMI reasons.
For this, use something like this in your board configuration:
Signed-off-by: Michael Heimpold <mhei at heimpold.de>
Cc: Marek Vasut <marex at denx.de>
Cc: Otavio Salvador <otavio at ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam at freescale.com>
---
I'm not sure whether the position to set these bits is the best one.
Regards,
Michael
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index 1972de8..410cf0b 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -260,6 +260,15 @@ static void mxs_src_power_init(void)
debug("SPL: Pre-Configuring power block\n");
+#ifdef CONFIG_SYS_MXS_DCDC_FREQSEL
+ /* Select clocksource for DC-DC converter */
+ clrsetbits_le32(&power_regs->hw_power_misc,
+ POWER_MISC_FREQSEL_MASK,
+ CONFIG_SYS_MXS_DCDC_FREQSEL);
+ setbits_le32(&power_regs->hw_power_misc,
+ POWER_MISC_SEL_PLLCLK);
+#endif
+
/* Improve efficieny and reduce transient ripple */
writel(POWER_LOOPCTRL_TOGGLE_DIF | POWER_LOOPCTRL_EN_CM_HYST |
POWER_LOOPCTRL_EN_DF_HYST, &power_regs->hw_power_loopctrl_set);
--
2.5.0
More information about the U-Boot
mailing list