From ce924a53db49cb570f7b481981d488ba8e270828 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Mon, 18 Nov 2013 09:24:08 +0800 Subject: usb: certification: several fixes - change PHY TX/RX parameters accoording to Richard's email - Disable OTG descripor - Add Freescale VID/PID Signed-off-by: Peter Chen --- arch/arm/mach-mvf/usb_dr2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-mvf/usb_dr2.c') diff --git a/arch/arm/mach-mvf/usb_dr2.c b/arch/arm/mach-mvf/usb_dr2.c index 67e3fcdbc921..8a83ac1ea360 100644 --- a/arch/arm/mach-mvf/usb_dr2.c +++ b/arch/arm/mach-mvf/usb_dr2.c @@ -85,6 +85,7 @@ static int usb_phy_enable(struct fsl_usb2_platform_data *pdata) u32 tmp; void __iomem *phy_reg = MVF_IO_ADDRESS(MVF_USBPHY1_BASE_ADDR); void __iomem *phy_ctrl; + void __iomem *phy_param; /* Stop then Reset */ UOG2_USBCMD &= ~UCMD_RUN_STOP; @@ -117,6 +118,17 @@ static int usb_phy_enable(struct fsl_usb2_platform_data *pdata) phy_reg + HW_USBPHY_CTRL_SET); } + /* + * 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*/ -- cgit v1.2.3