summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mvf/usb_dr.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-03-18 11:25:11 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-03-18 11:25:11 +0100
commit72249651843f93d50c302833546fb2880052a80f (patch)
tree172a8af74ce161bc276856d7331dc0076055093c /arch/arm/mach-mvf/usb_dr.c
parentaef4075a0bcc7860eafa17be0c6e6cfcecc68206 (diff)
parent50c4c848d6b8743894cfcec166db475ef6140504 (diff)
Merge tag '3.0-vybrid-ts2.13' into colibri_vfColibri_VF_LinuxImageV2.1Beta3_20140318
3.0-vybrid-ts2.13
Diffstat (limited to 'arch/arm/mach-mvf/usb_dr.c')
-rw-r--r--arch/arm/mach-mvf/usb_dr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-mvf/usb_dr.c b/arch/arm/mach-mvf/usb_dr.c
index bbd29f3b45a9..c063193364d1 100644
--- a/arch/arm/mach-mvf/usb_dr.c
+++ b/arch/arm/mach-mvf/usb_dr.c
@@ -90,6 +90,7 @@ static int usb_phy_enable(struct fsl_usb2_platform_data *pdata)
u32 tmp;
void __iomem *phy_reg = MVF_IO_ADDRESS(MVF_USBPHY0_BASE_ADDR);
void __iomem *phy_ctrl;
+ void __iomem *phy_param;
/* Stop then Reset */
UOG_USBCMD &= ~UCMD_RUN_STOP;
@@ -115,6 +116,17 @@ static int usb_phy_enable(struct fsl_usb2_platform_data *pdata)
/* Power up the PHY */
__raw_writel(0, phy_reg + HW_USBPHY_PWD);
+ /*
+ * For USB Certification
+ * TX: set edge rate to max, increase the amplitude
+ * with 2 steps (Level = ~ 437 mV).
+ * RX: reduce transmission envelope detector level with about 20 mV
+ */
+ phy_param = phy_reg + HW_USBPHY_TX;
+ __raw_writel(0x1c060605, phy_param);
+ phy_param = phy_reg + HW_USBPHY_RX;
+ __raw_writel(0x1, phy_param);
+
return 0;
}
/* Notes: configure USB clock*/