2 * Copyright (C) 2016 Socionext Inc.
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <linux/bitops.h>
12 #include "../sc64-regs.h"
13 #include "../sg-regs.h"
15 void uniphier_ld11_clk_init(void)
17 if (readl(SG_PINMON0) & BIT(27)) {
18 /* if booted without stand-by MPU */
20 writel(1, SG_ETPHYPSHUT);
21 writel(1, SG_ETPHYCNT);
23 udelay(1); /* wait for regulator level 1.1V -> 2.5V */
25 writel(3, SG_ETPHYCNT);
26 writel(3, SG_ETPHYPSHUT);
27 writel(7, SG_ETPHYCNT);
30 #ifdef CONFIG_USB_EHCI
32 /* FIXME: the current clk driver can not handle parents */
34 tmp = readl(SC_CLKCTRL4);
35 tmp |= SC_CLKCTRL4_MIO | SC_CLKCTRL4_STDMAC;
36 writel(tmp, SC_CLKCTRL4);