summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2020-02-10 18:46:27 +0800
committerPeter Chen <peter.chen@nxp.com>2020-05-06 09:42:21 +0800
commit5523f06a19502d08449c1e6ca7e33bfc860f6059 (patch)
tree78321afc1fd7d39a49296dba353d3d1a308c5e05 /drivers/usb/chipidea/core.c
parent746f316b753a83e366bfc5f936cbf0d72d1c2d1d (diff)
usb: chipidea: pull down dp for possible charger detection operation
The bootloader may use device mode, and keep dp up. We need dp to be pulled down before possbile charger detection operation. Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index ea8ac4a54a8d..804c0a5a213b 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1123,8 +1123,11 @@ static int ci_hdrc_probe(struct platform_device *pdev)
if (!ci_otg_is_fsm_mode(ci)) {
/* only update vbus status for peripheral */
- if (ci->role == CI_ROLE_GADGET)
+ if (ci->role == CI_ROLE_GADGET) {
+ /* Pull down DP for possible charger detection */
+ hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
ci_handle_vbus_change(ci);
+ }
ret = ci_role_start(ci, ci->role);
if (ret) {