]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-uniphier/clk/dpll-sld8.c
7faa5e85b6ddecbd683679592b175a1ad9ef0f5e
2 * Copyright (C) 2013-2014 Panasonic Corporation
3 * Copyright (C) 2015-2016 Socionext Inc.
5 * SPDX-License-Identifier: GPL-2.0+
12 #include "../sc-regs.h"
14 int uniphier_sld8_dpll_init(const struct uniphier_board_data
*bd
)
18 * Set DPLL SSC parameters for DPLLCTRL3
21 * [10] FREFSEL_TEST 0x1
26 tmp
= readl(SC_DPLLCTRL3
);
29 writel(tmp
, SC_DPLLCTRL3
);
32 * Set DPLL SSC parameters for DPLLCTRL
34 * [29:20] SSC_UPCNT 132 (0x084) 132 (0x084)
35 * [14:0] SSC_dK 6335(0x18bf) 12710(0x31a6)
37 tmp
= readl(SC_DPLLCTRL
);
39 #ifdef DPLL_SSC_RATE_1PER
44 writel(tmp
, SC_DPLLCTRL
);
47 * Set DPLL SSC parameters for DPLLCTRL2
50 * [26:20] SSC_M 79 (0x4f)
51 * [19:0] SSC_K 964689 (0xeb851)
53 tmp
= readl(SC_DPLLCTRL2
);
56 writel(tmp
, SC_DPLLCTRL2
);
58 /* Wait 500 usec until dpll gets stable */