1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2013-2014 Panasonic Corporation
4 * Copyright (C) 2015-2016 Socionext Inc.
7 #include <linux/delay.h>
11 #include "../sc-regs.h"
13 int uniphier_sld8_dpll_init(const struct uniphier_board_data *bd)
17 * Set DPLL SSC parameters for DPLLCTRL3
20 * [10] FREFSEL_TEST 0x1
25 tmp = readl(SC_DPLLCTRL3);
28 writel(tmp, SC_DPLLCTRL3);
31 * Set DPLL SSC parameters for DPLLCTRL
33 * [29:20] SSC_UPCNT 132 (0x084) 132 (0x084)
34 * [14:0] SSC_dK 6335(0x18bf) 12710(0x31a6)
36 tmp = readl(SC_DPLLCTRL);
38 #ifdef DPLL_SSC_RATE_1PER
43 writel(tmp, SC_DPLLCTRL);
46 * Set DPLL SSC parameters for DPLLCTRL2
49 * [26:20] SSC_M 79 (0x4f)
50 * [19:0] SSC_K 964689 (0xeb851)
52 tmp = readl(SC_DPLLCTRL2);
55 writel(tmp, SC_DPLLCTRL2);
57 /* Wait 500 usec until dpll gets stable */