mirror of https://gitee.com/openkylin/linux.git
usb: phy: ab8500-usb: fix eye diagram for ab8500 v2.0
AB8500 v2.0 has eye diagram issues when drawing more than 100mA from VBUS. Force charging current to 100mA in case of standard host. Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
7124631aa8
commit
c2a0ab6bd5
|
@ -485,6 +485,19 @@ static void ab8500_usb_phy_disable_work(struct work_struct *work)
|
||||||
ab8500_usb_peri_phy_dis(ab);
|
ab8500_usb_peri_phy_dis(ab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned ab8500_eyediagram_workaroud(struct ab8500_usb *ab, unsigned mA)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* AB8500 V2 has eye diagram issues when drawing more than 100mA from
|
||||||
|
* VBUS. Set charging current to 100mA in case of standard host
|
||||||
|
*/
|
||||||
|
if (is_ab8500_2p0_or_earlier(ab->ab8500))
|
||||||
|
if (mA > 100)
|
||||||
|
mA = 100;
|
||||||
|
|
||||||
|
return mA;
|
||||||
|
}
|
||||||
|
|
||||||
static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA)
|
static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA)
|
||||||
{
|
{
|
||||||
struct ab8500_usb *ab;
|
struct ab8500_usb *ab;
|
||||||
|
@ -494,6 +507,8 @@ static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA)
|
||||||
|
|
||||||
ab = phy_to_ab(phy);
|
ab = phy_to_ab(phy);
|
||||||
|
|
||||||
|
mA = ab8500_eyediagram_workaroud(ab, mA);
|
||||||
|
|
||||||
ab->vbus_draw = mA;
|
ab->vbus_draw = mA;
|
||||||
|
|
||||||
if (mA)
|
if (mA)
|
||||||
|
|
Loading…
Reference in New Issue