Masahiro Yamada | 682e09f | 2016-09-17 03:33:11 +0900 | [diff] [blame] | 1 | /* |
| 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 Yamada | a314a24 | 2017-01-15 14:59:02 +0900 | [diff] [blame] | 14 | void uniphier_ld20_pll_init(void) |
Masahiro Yamada | 682e09f | 2016-09-17 03:33:11 +0900 | [diff] [blame] | 15 | { |
Masahiro Yamada | 682e09f | 2016-09-17 03:33:11 +0900 | [diff] [blame] | 16 | 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 Yamada | 2953262 | 2016-10-27 23:47:00 +0900 | [diff] [blame] | 25 | 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 Yamada | 682e09f | 2016-09-17 03:33:11 +0900 | [diff] [blame] | 33 | |
| 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 Yamada | 682e09f | 2016-09-17 03:33:11 +0900 | [diff] [blame] | 39 | } |