summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2018-10-18 15:07:29 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 09:14:03 +0100
commit231b0b5a42316dd3c23145dcbcd34cd04a4cdf7e (patch)
treecbcfccfe4a45c75cf11c30e865d025ed2a5ce4e3 /drivers/clk/sunxi-ng/ccu-sun50i-a64.c
parentc4509088acdfc8d1018e97ad0350f5edabada984 (diff)
clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock
[ Upstream commit 859783d1390035e29ba850963bded2b4ffdf43b5 ] In the user manual of A64 SoC, the bit 22 and 23 of pll-mipi control register is called "LDO{1,2}_EN", and according to the BSP source code from Allwinner , the LDOs are enabled during the clock's enabling process. The clock failed to generate output if the two LDOs are not enabled. Add the two bits to the clock's gate bits, so that the LDOs are enabled when the PLL is enabled. Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu-sun50i-a64.c')
-rw-r--r--drivers/clk/sunxi-ng/ccu-sun50i-a64.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index 2bb4cabf802f..36a30a3cfad7 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -158,7 +158,12 @@ static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_gpu_clk, "pll-gpu",
#define SUN50I_A64_PLL_MIPI_REG 0x040
static struct ccu_nkm pll_mipi_clk = {
- .enable = BIT(31),
+ /*
+ * The bit 23 and 22 are called "LDO{1,2}_EN" on the SoC's
+ * user manual, and by experiments the PLL doesn't work without
+ * these bits toggled.
+ */
+ .enable = BIT(31) | BIT(23) | BIT(22),
.lock = BIT(28),
.n = _SUNXI_CCU_MULT(8, 4),
.k = _SUNXI_CCU_MULT_MIN(4, 2, 2),