Masahiro Yamada | 090785d | 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 | |
Masahiro Yamada | f366d38 | 2017-02-21 23:00:35 +0900 | [diff] [blame^] | 21 | uniphier_ld20_sscpll_set_regi(SC_MPLLCTRL, 5); |
| 22 | |
Masahiro Yamada | 090785d | 2016-09-22 07:42:19 +0900 | [diff] [blame] | 23 | mdelay(1); |
| 24 | |
| 25 | uniphier_ld20_sscpll_ssc_en(SC_CPLLCTRL); |
| 26 | uniphier_ld20_sscpll_ssc_en(SC_MPLLCTRL); |
| 27 | uniphier_ld20_sscpll_ssc_en(SC_VSPLLCTRL); |
Masahiro Yamada | 0335cce | 2016-10-08 13:25:23 +0900 | [diff] [blame] | 28 | uniphier_ld20_sscpll_ssc_en(SC_DPLLCTRL); |
Masahiro Yamada | 090785d | 2016-09-22 07:42:19 +0900 | [diff] [blame] | 29 | |
| 30 | uniphier_ld20_vpll27_init(SC_VPLL27FCTRL); |
| 31 | uniphier_ld20_vpll27_init(SC_VPLL27ACTRL); |
| 32 | |
| 33 | writel(0, SC_CA53_GEARSET); /* Gear0: CPLL/2 */ |
| 34 | writel(SC_CA_GEARUPD, SC_CA53_GEARUPD); |
| 35 | } |