summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-09-22 14:28:04 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:10 +0200
commit9bd7c9e53254e920bb83b67aa67b771f4bec4d8f (patch)
tree9f646032b11791d4477f8907d696bbd7246e85d5
parent6163e81fd431c7dcbeb1b8e2be25f5e0456dc186 (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> Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
-rw-r--r--drivers/usb/otg/ab8500-usb.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c
index 657c0834240..9bce140eb8f 100644
--- a/drivers/usb/otg/ab8500-usb.c
+++ b/drivers/usb/otg/ab8500-usb.c
@@ -184,9 +184,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 {
@@ -833,7 +855,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,