From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/6] mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages
Date: Thu, 26 Dec 2013 14:51:31 -0200 [thread overview]
Message-ID: <1388076695-28174-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1388076695-28174-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
Since ROM may modify the LDO ramp up time according to fuse setting,
it is safer to reset the ramp up field to its default value of 00:
00: 64 cycles of 24MHz clock;
01: 128 cycles of 24MHz clock;
02: 256 cycles of 24MHz clock;
03: 512 cycles of 24MHz clock;
Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- None
arch/arm/cpu/armv7/mx6/soc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 6cbade7..13b9e36 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -93,6 +93,20 @@ void init_aips(void)
writel(0x00000000, &aips2->opacr4);
}
+static void clear_ldo_ramp(void)
+{
+ struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
+ int reg;
+
+ /* ROM may modify LDO ramp up time according to fuse setting, so in
+ * order to be in the safe side we neeed to reset these settings to
+ * match the reset value: 0'b00
+ */
+ reg = readl(&anatop->ana_misc2);
+ reg &= ~(0x3f << 24);
+ writel(reg, &anatop->ana_misc2);
+}
+
/*
* Set the VDDSOC
*
@@ -113,6 +127,8 @@ static void set_vddsoc(u32 mv)
else
val = (mv - 700) / 25;
+ clear_ldo_ramp();
+
/*
* Mask out the REG_CORE[22:18] bits (REG2_TRIG)
* and set them to the calculated value (0.7V + val * 0.25V)
--
1.8.1.2
next prev parent reply other threads:[~2013-12-26 16:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 16:51 [U-Boot] [PATCH v2 1/6] mx6: soc: Staticize set_vddsoc() Fabio Estevam
2013-12-26 16:51 ` Fabio Estevam [this message]
2014-01-02 16:18 ` [U-Boot] [PATCH v2 2/6] mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages Stefano Babic
2013-12-26 16:51 ` [U-Boot] [PATCH v2 3/6] mx6: soc: Set the VDDSOC at 1.175 V Fabio Estevam
2014-01-02 16:19 ` Stefano Babic
2013-12-26 16:51 ` [U-Boot] [PATCH v2 4/6] mx6: soc: Introduce set_ldo_voltage() Fabio Estevam
2014-01-02 16:20 ` Stefano Babic
2013-12-26 16:51 ` [U-Boot] [PATCH v2 5/6] mx6: soc: Add the required LDO ramp up delay Fabio Estevam
2014-01-02 16:20 ` Stefano Babic
2013-12-26 16:51 ` [U-Boot] [PATCH v2 6/6] mx6: soc: Disable VDDPU regulator Fabio Estevam
2014-01-02 16:21 ` Stefano Babic
2014-01-09 17:50 ` Otavio Salvador
2014-01-09 19:06 ` Fabio Estevam
2014-01-09 19:11 ` Otavio Salvador
2014-01-09 19:13 ` Fabio Estevam
2014-01-09 19:30 ` Fabio Estevam
2014-01-09 19:39 ` Otavio Salvador
2014-01-09 20:34 ` Fabio Estevam
2014-01-09 21:31 ` Stefano Babic
2014-01-15 17:12 ` Otavio Salvador
2014-01-15 17:33 ` Stefano Babic
2014-01-16 8:40 ` Pierre Aubert
2014-01-16 11:19 ` Fabio Estevam
2014-01-16 11:25 ` Pierre AUBERT
2014-01-02 16:21 ` [U-Boot] [PATCH v2 1/6] mx6: soc: Staticize set_vddsoc() Stefano Babic
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=1388076695-28174-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.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.