Skip to contentSkip to conversation

clk: meson: g12a: fix gp0 and hifi ranges

PATCH In review Jerome Brunet 2 participants 2 messages May 13, 2019 – May 14, 2019

Subsystems (3)
lore
Share & tools
lore

Jerome Brunet

author maintainer
#0 lore raw

PATCH v2 1/1 clk: meson: g12a: fix gp0 and hifi ranges

While some SoC samples are able to lock with a PLL factor of 55, others samples can't. ATM, a minimum of 60 appears to work on all the samples I have tried.

Even with 60, it sometimes takes a long time for the PLL to eventually lock. The documentation says that the minimum rate of these PLLs DCO should be 3GHz, a factor of 125. Let's use that to be on the safe side.

With factor range changed, the PLL seems to lock quickly (enough) so far. It is still unclear if the range was the only reason for the delay.

Fixes 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
---
 drivers/clk/meson/g12a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/meson/g12a.c +1 -1
index 206fafd299ea..d11606d5ddbd 100644
@@ -463,7 +463,7 @@ static struct clk_regmap g12a_cpu_clk_trace = {
 };
 
 static const struct pll_mult_range g12a_gp0_pll_mult_range = {
-	.min = 55,
+	.min = 125,
 	.max = 255,
 };
 
Signature · 1 line
2.20.1
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Jerome Brunet

While some SoC samples are able to lock with a PLL factor of 55, others samples can't. ATM, a minimum of 60 appears to work on all the samples I have tried.

Even with 60, it sometimes takes a long time for the PLL to eventually lock. The documentation says that the minimum rate of these PLLs DCO should be 3GHz, a factor of 125. Let's use that to be on the safe side.

Quoted 5 lines

With factor range changed, the PLL seems to lock quickly (enough) so far. It is still unclear if the range was the only reason for the delay.

Fixes 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")

this matches with what Amlogic does in their 4.9 vendor kernel from buildroot-openlinux-A113-201901:

$ grep -P "\tPLL_RATE" kernel/aml-4.9/drivers/amlogic/clk/g12a/g12a.h
| cut -d',' -f2 | tr -s " " | sort -u | head -n5
 125
 126
 128
 129
 132

based on that: