summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2016-05-12 13:20:56 +0200
committerJaehoon Chung <jh80.chung@samsung.com>2016-05-18 15:32:13 +0900
commite1c97cb015dc369b7169339e189390c41945516b (patch)
tree103c16c35a1776d5918add51b875ee8b337293a9
parent4aa197dcd7c7ec5aa0748af5bb31c4c51288f3f1 (diff)
downloadu-boot-e1c97cb015dc369b7169339e189390c41945516b.tar.gz
u-boot-e1c97cb015dc369b7169339e189390c41945516b.tar.bz2
u-boot-e1c97cb015dc369b7169339e189390c41945516b.zip
TPL: TM2: usb3: Use usb3 drd phy configuration from Linux kernel
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
-rw-r--r--drivers/usb/dwc3/samsung_usb_phy.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/samsung_usb_phy.c b/drivers/usb/dwc3/samsung_usb_phy.c
index 4220986548..be65359e09 100644
--- a/drivers/usb/dwc3/samsung_usb_phy.c
+++ b/drivers/usb/dwc3/samsung_usb_phy.c
@@ -9,11 +9,15 @@
*/
#include <common.h>
+#ifdef CONFIG_TPL_TM2
+#include <asm/io.h>
+#endif
#include <asm/arch/power.h>
#include <asm/arch/xhci-exynos.h>
void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy)
{
+#ifndef CONFIG_TPL_TM2
u32 reg;
/* Reset USB 3.0 PHY */
@@ -75,4 +79,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 */
}