diff options
author | Jens Kuske <jenskuske@gmail.com> | 2016-08-19 13:40:46 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-08-26 16:58:37 +0200 |
commit | d5ac6eef91965b519d8f15f17febfa0ea2ee0adc (patch) | |
tree | cba94fb97afcef4df858fc6d136fd2a0b4b8a2e4 /arch/arm/mach-sunxi | |
parent | 421c98d7d2ebf929debf907e75ec04419cf07dbe (diff) | |
download | u-boot-imx-d5ac6eef91965b519d8f15f17febfa0ea2ee0adc.zip u-boot-imx-d5ac6eef91965b519d8f15f17febfa0ea2ee0adc.tar.gz u-boot-imx-d5ac6eef91965b519d8f15f17febfa0ea2ee0adc.tar.bz2 |
sunxi: Tune H3 DRAM PLL to improve lock time
The H3 PLL5 used for DRAM barely manages to lock to the required
frequency before DRAM controller starts, sometimes leading to wrong
delay-line calibration results.
This patch changes the PLL tuning parameters to the same values as
boot0 used, which speeds up the locking and fixes the problem.
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch/arm/mach-sunxi')
-rw-r--r-- | arch/arm/mach-sunxi/clock_sun6i.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c index 15272c9..ed8cd9b 100644 --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c @@ -148,6 +148,12 @@ void clock_set_pll5(unsigned int clk, bool sigma_delta_enable) const int max_n = 32; int k = 1, m = 2; +#ifdef CONFIG_MACH_SUN8I_H3 + clrsetbits_le32(&ccm->pll5_tuning_cfg, CCM_PLL5_TUN_LOCK_TIME_MASK | + CCM_PLL5_TUN_INIT_FREQ_MASK, + CCM_PLL5_TUN_LOCK_TIME(2) | CCM_PLL5_TUN_INIT_FREQ(16)); +#endif + if (sigma_delta_enable) writel(CCM_PLL5_PATTERN, &ccm->pll5_pattern_cfg); |