diff options
author | Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> | 2011-09-22 14:28:04 +0530 |
---|---|---|
committer | Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 2011-09-27 08:43:00 +0200 |
commit | 4500fc647f2853b01c82c6b3940b58b6009d9d5b (patch) | |
tree | df629ce455e64faf2e02a9e49bc1ae2b6100e422 | |
parent | b75313d0a9177ea4e43a99dffe001485871652ba (diff) |
ux500: USB: Set the charging cur to 300mA for ABV3
In case of AB-V3, the eye diagram related issues are resolved.
So, set the device charging current to 300mA when connected to
standard host. Also, add the USB PHY tuning values to improve
the USB eye diagram.
This votage setting for v-initcore is missing as part of the
patch:http://gerrit.lud.stericsson.com/gerrit/#change,30031
Adding the missing information from this patch
ST-Ericsson ID: 330203
ST-Ericsson Linux next: ER 330203
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Id17fd6c1b6ac1f77890659c4d78eaece941b037a
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31849
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r-- | drivers/usb/otg/ab8500-usb.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index c48e9605754..9126408b69e 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c @@ -187,9 +187,31 @@ static void ab8500_usb_load(struct work_struct *work) static void ab8500_usb_regulator_ctrl(struct ab8500_usb *ab, bool sel_host, bool enable) { + int ret = 0, volt = 0; + if (enable) { regulator_enable(ab->v_ape); + if (ab->rev >= 0x30) { + ret = regulator_set_voltage(ab->v_ulpi, + 1300000, 1350000); + if (ret < 0) + dev_err(ab->dev, "Failed to set the Vintcore" + " to 1.3V, ret=%d\n", ret); + ret = regulator_set_optimum_mode(ab->v_ulpi, + 28000); + if (ret < 0) + dev_err(ab->dev, "Failed to set optimum mode" + " (ret=%d)\n", ret); + + } regulator_enable(ab->v_ulpi); + if (ab->rev >= 0x30) { + volt = regulator_get_voltage(ab->v_ulpi); + if ((volt != 1300000) && (volt != 1350000)) + dev_err(ab->dev, "Vintcore is not" + " set to 1.3V" + " volt=%d\n", volt); + } regulator_enable(ab->v_musb); } else { @@ -825,7 +847,7 @@ static int __devinit ab8500_usb_probe(struct platform_device *pdev) } /* Write Phy tuning values */ - if (ab->rev == 0x30) { + if (ab->rev >= 0x30) { /* Enable the PBT/Bank 0x12 access */ ret = abx500_set_register_interruptible(ab->dev, AB8500_DEVELOPMENT, |