phy: phy-rockchip-inno-usb2: make CDP connect to PC

The CDP is a charger type combine with USB host, so allow
gadget work when detect CDP charger type.

Change-Id: I9a6a39cd0b3c22139827c8cee15ba4b32526d5a2
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
This commit is contained in:
Meng Dongyang 2018-03-30 15:54:00 +08:00 committed by Kever Yang
parent 33dccc23db
commit 70878a45d3
1 changed files with 6 additions and 1 deletions

View File

@ -350,7 +350,12 @@ out:
int rockchip_u2phy_vbus_detect(void)
{
return (rockchip_chg_get_type() == POWER_SUPPLY_TYPE_USB) ? 1 : 0;
int chg_type;
chg_type = rockchip_chg_get_type();
return (chg_type == POWER_SUPPLY_TYPE_USB ||
chg_type == POWER_SUPPLY_TYPE_USB_CDP) ? 1 : 0;
}
void otg_phy_init(struct dwc2_udc *dev)