blob: 121a3690e83439c47b8a4b66cda02547bd3d808c [file] [log] [blame]
Masahiro Yamadad11b0b72016-09-17 03:33:11 +09001/*
2 * Copyright (C) 2016 Socionext Inc.
3 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9
10#include "../init.h"
11#include "../sc64-regs.h"
12#include "pll.h"
13
Masahiro Yamada52b14bf2017-01-15 14:59:02 +090014void uniphier_ld20_pll_init(void)
Masahiro Yamadad11b0b72016-09-17 03:33:11 +090015{
Masahiro Yamadad11b0b72016-09-17 03:33:11 +090016 uniphier_ld20_sscpll_init(SC_CPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 4);
17 /* do nothing for SPLL */
18 uniphier_ld20_sscpll_init(SC_SPLL2CTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 4);
19 uniphier_ld20_sscpll_init(SC_MPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 2);
20 uniphier_ld20_sscpll_init(SC_VPPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 4);
21 uniphier_ld20_sscpll_init(SC_GPPLLCTRL, UNIPHIER_PLL_FREQ_DEFAULT, 0, 2);
22
23 mdelay(1);
24
Masahiro Yamadacc9fca12016-10-27 23:47:00 +090025 uniphier_ld20_sscpll_ssc_en(SC_CPLLCTRL);
26 uniphier_ld20_sscpll_ssc_en(SC_SPLL2CTRL);
27 uniphier_ld20_sscpll_ssc_en(SC_MPLLCTRL);
28 uniphier_ld20_sscpll_ssc_en(SC_VPPLLCTRL);
29 uniphier_ld20_sscpll_ssc_en(SC_GPPLLCTRL);
30 uniphier_ld20_sscpll_ssc_en(SC_DPLL0CTRL);
31 uniphier_ld20_sscpll_ssc_en(SC_DPLL1CTRL);
32 uniphier_ld20_sscpll_ssc_en(SC_DPLL2CTRL);
Masahiro Yamadad11b0b72016-09-17 03:33:11 +090033
34 uniphier_ld20_vpll27_init(SC_VPLL27FCTRL);
35 uniphier_ld20_vpll27_init(SC_VPLL27ACTRL);
36
37 uniphier_ld20_dspll_init(SC_VPLL8KCTRL);
38 uniphier_ld20_dspll_init(SC_A2PLLCTRL);
Masahiro Yamadad11b0b72016-09-17 03:33:11 +090039}