[U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source

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@heimpold.de Cc: Marek Vasut marex@denx.de Cc: Otavio Salvador otavio@ossystems.com.br Cc: Fabio Estevam fabio.estevam@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);

Hi Michael,
On Wed, Dec 9, 2015 at 7:30 PM, Michael Heimpold mhei@heimpold.de wrote:
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:
It seems you missed to complete the text here.

On Wednesday, December 09, 2015 at 10:30:46 PM, Michael Heimpold wrote:
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@heimpold.de Cc: Marek Vasut marex@denx.de Cc: Otavio Salvador otavio@ossystems.com.br Cc: Fabio Estevam fabio.estevam@freescale.com
I'm not sure whether the position to set these bits is the best one.
Can we do it without the ifdef ? I don't like that at all. You can probably use a weak function instead.
Best regards, Marek Vasut
participants (3)
-
Fabio Estevam
-
Marek Vasut
-
Michael Heimpold