ARM: uniphier: setup EHCI PHY paramters for LD11
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Apr 2017 02:30:05 +0000 (11:30 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 20 Apr 2017 14:49:50 +0000 (23:49 +0900)
Set the same PHY parameters as the Boot ROM uses.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/clk/clk-ld11.c
arch/arm/mach-uniphier/sg-regs.h

index a4dcde743b01a3085ea601aec86a8d1be0e76111..36aa7879846ef0c0b08bf6268f71ec6cb8cab69e 100644 (file)
@@ -37,9 +37,18 @@ void uniphier_ld11_clk_init(void)
        {
                /* FIXME: the current clk driver can not handle parents */
                u32 tmp;
+               int ch;
+
                tmp = readl(SC_CLKCTRL4);
                tmp |= SC_CLKCTRL4_MIO | SC_CLKCTRL4_STDMAC;
                writel(tmp, SC_CLKCTRL4);
+
+               for (ch = 0; ch < 3; ch++) {
+                       void __iomem *phyctrl = (void __iomem *)SG_USBPHYCTRL;
+
+                       writel(0x82280600, phyctrl + 8 * ch);
+                       writel(0x00000106, phyctrl + 8 * ch + 4);
+               }
        }
 #endif
 }
index 4d7e6f7fa3ca8359091143d3299a94b9d3fbbebd..dc94084c899593d493398c7e7c09c9ffd048b143 100644 (file)
@@ -55,6 +55,7 @@
 
 #define SG_MEMCONF_SPARSEMEM           (0x1 << 4)
 
+#define SG_USBPHYCTRL                  (SG_CTRL_BASE | 0x500)
 #define SG_ETPHYPSHUT                  (SG_CTRL_BASE | 0x554)
 #define SG_ETPHYCNT                    (SG_CTRL_BASE | 0x550)