From b57557d26ee3f541d9c48797e73c730ce06730ae Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Thu, 12 May 2016 13:20:56 +0200 Subject: [PATCH] TPL: TM2: usb3: Use usb3 drd phy configuration from Linux kernel Signed-off-by: Lukasz Majewski --- drivers/usb/dwc3/samsung_usb_phy.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/usb/dwc3/samsung_usb_phy.c b/drivers/usb/dwc3/samsung_usb_phy.c index 6770614..7f4a3a7 100644 --- a/drivers/usb/dwc3/samsung_usb_phy.c +++ b/drivers/usb/dwc3/samsung_usb_phy.c @@ -8,11 +8,15 @@ */ #include +#ifdef CONFIG_TPL_TM2 +#include +#endif #include #include void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy) { +#ifndef CONFIG_TPL_TM2 u32 reg; /* Reset USB 3.0 PHY */ @@ -74,4 +78,25 @@ void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy) reg &= ~PHYCLKRST_PORTRESET; writel(reg, &phy->phy_clk_rst); +#else + void *base = phy; + /* copied from Linux kernel register dump */ + writel(0x0, base + 0x14); + writel(0x0, base + 0x34); + writel(0x8000040, base + 0x4); + writel(0x24d466e4, base + 0x1c); + writel(0x4, base + 0x30); + writel(0x24d466e4, base + 0x1c); + writel(0x3fff81c, base + 0x20); + writel(0x40, base + 0x8); + writel(0x0, base + 0x28); + writel(0xc41805bf, base + 0x10); + udelay(10); + writel(0xc41805bd, base + 0x10); + writel(0x3fff81c, base + 0x20); + writel(0x0, base + 0x28); + writel(0xc41b40bf, base + 0x10); + udelay(10); + writel(0xc41b40bd, base + 0x10); +#endif /* CONFIG_TPL_TM2 */ } -- 2.7.4