public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source
@ 2015-12-09 21:30 Michael Heimpold
  2015-12-09 21:33 ` Fabio Estevam
  2015-12-09 21:35 ` Marek Vasut
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Heimpold @ 2015-12-09 21:30 UTC (permalink / raw)
  To: u-boot

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);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source
  2015-12-09 21:30 [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source Michael Heimpold
@ 2015-12-09 21:33 ` Fabio Estevam
  2015-12-09 21:35 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2015-12-09 21:33 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source
  2015-12-09 21:30 [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source Michael Heimpold
  2015-12-09 21:33 ` Fabio Estevam
@ 2015-12-09 21:35 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2015-12-09 21:35 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-09 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09 21:30 [U-Boot] [PATCH] ARM: mxs: allow boards to select DC-DC switching clock source Michael Heimpold
2015-12-09 21:33 ` Fabio Estevam
2015-12-09 21:35 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox