]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ENGR00174734-2 usb: fix bugs that dp and dm are floating at device mode
authorPeter Chen <peter.chen@freescale.com>
Fri, 17 Feb 2012 07:22:07 +0000 (15:22 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:07 +0000 (08:34 +0200)
commitd94b5bdb0c04c8a039649c41cf363904babf203d
treeee516ae18a321ea38ac5769fba81a53d4c49c26a
parent371a2465e83a09044b73f49f0b759116dbfeaff0
ENGR00174734-2 usb: fix bugs that dp and dm are floating at device mode

At i.mx6x, the data line (dp and dm) are floating at device mode,
that is to say data line will be any values (0-3.6v).
So if the usb wakeup is enabled, there will be a wakeup interrupt
that causes usb to active mode.

In order to fix this problem well, we need to do below things:
- Need to discharge both dp and dm
- It needs to discharge data line when we switch to device mode and
usb cable is disconnected from the host, but not to disable discharge
after line state is SE0, the reason is that if we do not pulldown
the data line, the line state will be floating again, and possible cause
the wakeup interrupt.
- It needs to disable discharge data line when the usb cable connects at
device mode and usb device is connected at host mode, otherwise it will
affect signal quality.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
drivers/usb/gadget/arcotg_udc.c
drivers/usb/otg/fsl_otg.c