blob: 7746deb72d1d1067ac1ca28d0313d2473e54ec34 [file] [log] [blame]
Masahiro Yamadac72f4d42016-09-22 07:42:19 +09001/*
2 * Copyright (C) 2016 Socionext Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <linux/io.h>
9
10#include "../init.h"
11#include "../sc64-regs.h"
12#include "pll.h"
13
14void uniphier_ld11_pll_init(void)
15{
16 uniphier_ld20_sscpll_init(SC_CPLLCTRL, 1960, 1, 2); /* 2000MHz -> 1960MHz */
17 /* do nothing for SPLL */
18 uniphier_ld20_sscpll_init(SC_MPLLCTRL, 1600, 1, 2); /* 1500MHz -> 1600MHz */
19 uniphier_ld20_sscpll_init(SC_VSPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 2);
20
21 mdelay(1);
22
23 uniphier_ld20_sscpll_ssc_en(SC_CPLLCTRL);
24 uniphier_ld20_sscpll_ssc_en(SC_MPLLCTRL);
25 uniphier_ld20_sscpll_ssc_en(SC_VSPLLCTRL);
Masahiro Yamada6c227422016-10-08 13:25:23 +090026 uniphier_ld20_sscpll_ssc_en(SC_DPLLCTRL);
Masahiro Yamadac72f4d42016-09-22 07:42:19 +090027
28 uniphier_ld20_vpll27_init(SC_VPLL27FCTRL);
29 uniphier_ld20_vpll27_init(SC_VPLL27ACTRL);
30
31 writel(0, SC_CA53_GEARSET); /* Gear0: CPLL/2 */
32 writel(SC_CA_GEARUPD, SC_CA53_GEARUPD);
33}