Masahiro Yamada | c72f4d4 | 2016-09-22 07:42:19 +0900 | [diff] [blame] | 1 | /* |
| 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 | |
| 14 | void 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 Yamada | 6c22742 | 2016-10-08 13:25:23 +0900 | [diff] [blame] | 26 | uniphier_ld20_sscpll_ssc_en(SC_DPLLCTRL); |
Masahiro Yamada | c72f4d4 | 2016-09-22 07:42:19 +0900 | [diff] [blame] | 27 | |
| 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 | } |