diff options
author | Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com> | 2014-08-15 09:31:43 -0500 |
---|---|---|
committer | Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com> | 2014-09-10 16:18:31 -0500 |
commit | fd572f16430d383a6c237f9fe9e96546c957a042 (patch) | |
tree | 6e1e94e6cf8299de1636554436f7ebec27bc6fbb /arch/arm | |
parent | e36a66415f63621417c7fa1c7865ef5b56dca547 (diff) | |
download | u-boot-imx-fd572f16430d383a6c237f9fe9e96546c957a042.zip u-boot-imx-fd572f16430d383a6c237f9fe9e96546c957a042.tar.gz u-boot-imx-fd572f16430d383a6c237f9fe9e96546c957a042.tar.bz2 |
ENGR00327364 iMX6: Ensure that the bandgap self-bias circuit is disabled after boot.
The self-bias circuit is used by the bandgap during startup.
Once the bandgap has stabilized, the self-bias circuit should be
disabled for best noise performance of analog blocks.
Also this bit should be disabled before the chip enters STOP mode or
when ever the regular bandgap is disabled.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index a9b38cc..8b6b7c1 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -376,6 +376,24 @@ static void clear_mmdc_ch_mask(void) writel(0, &mxc_ccm->ccdr); } +static void init_bandgap(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + + /* + * Ensure the bandgap has stabilized. + */ + while (!(readl(&mxc_ccm->ana_misc0) & 0x80)) + ; + /* + * For best noise performance of the analog blocks using the + * outputs of the bandgap, the reftop_selfbiasoff bit should + * be set. + */ + writel(BM_ANADIG_ANA_MISC0_REFTOP_SELBIASOFF, &mxc_ccm->ana_misc0_set); +} + + #ifdef CONFIG_MX6SX void vadc_power_up(void) { @@ -506,6 +524,12 @@ int arch_cpu_init(void) clear_mmdc_ch_mask(); /* + * Disable self-bias circuit in the analog bandap. + * The self-bias circuit is used by the bandgap during startup. + * This bit should be set after the bandgap has initialized. + */ + init_bandgap(); + /* * When low freq boot is enabled, ROM will not set AHB * freq, so we need to ensure AHB freq is 132MHz in such * scenario. |