linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support
@ 2014-03-05 10:13 Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 01/14] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
                   ` (14 more replies)
  0 siblings, 15 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, David Brown, Daniel Walker, Bryan Huntsman,
	Russell King, Felipe Balbi, Grant Likely
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, devicetree, linux-doc,
	linux-kernel, linux-arm-msm, linux-usb

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Hi,

This is a fifth version of patches posted earlier here [1].

They have been tested on AP8074 DragonBoard. Only gadget
mode utilized for now.

CV Test Suite engine "Chapter 9 tests" are passing except
"Halt Endpoint Test".

usbtest driver report following failure:
test 13 --> 32 (Broken pipe)    ep 81 couldn't set halt, -32

Changes since v4:
 - Drop patch [1/15] usb: phy: msm: Move mach dependent code to platform data
   it is already merged.
 - Address comments regarding devicetree bindings.

[1] https://lkml.org/lkml/2013/11/12/298

Ivan T. Ivanov (14):
  usb: phy: msm: Move global regulators variables to driver state
  usb: phy: msm: Migrate to Managed Device Resource allocation
  usb: phy: msm: Remove unnecessarily check for valid regulators.
  usb: phy: msm: Fix checkpatch.pl warnings
  usb: phy: msm: Replace custom enum usb_mode_type with enum
    usb_dr_mode
  usb: phy: msm: Remove unused pclk_src_name
  usb: phy: msm: Remove HSUSB prefix from regulator names
  usb: phy: msm: Properly check result from platform_get_irq()
  usb: phy: msm: Add device tree support and binding information
  usb: phy: msm: Use reset framework for LINK and PHY resets
  usb: phy: msm: Add support for secondary PHY control
  usb: phy: msm: Correct USB PHY Reset sequence for newer platform
  usb: phy: msm: Handle disconnect events
  usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX

 .../devicetree/bindings/usb/msm-hsusb.txt          |   78 +++
 arch/arm/mach-msm/board-msm7x30.c                  |    2 +-
 arch/arm/mach-msm/board-qsd8x50.c                  |    2 +-
 drivers/usb/phy/phy-msm-usb.c                      |  674 +++++++++++---------
 include/linux/usb/msm_hsusb.h                      |   39 +-
 include/linux/usb/msm_hsusb_hw.h                   |    6 +
 6 files changed, 474 insertions(+), 327 deletions(-)

--
1.7.9.5


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v5 01/14] usb: phy: msm: Move global regulators variables to driver state
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 02/14] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |   82 ++++++++++++++++++++---------------------
 include/linux/usb/msm_hsusb.h |    3 ++
 2 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index d204f74..410ef99 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -58,47 +58,43 @@
 #define USB_PHY_VDD_DIG_VOL_MIN	1000000 /* uV */
 #define USB_PHY_VDD_DIG_VOL_MAX	1320000 /* uV */

-static struct regulator *hsusb_3p3;
-static struct regulator *hsusb_1p8;
-static struct regulator *hsusb_vddcx;
-
 static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 {
 	int ret = 0;

 	if (init) {
-		hsusb_vddcx = regulator_get(motg->phy.dev, "HSUSB_VDDCX");
-		if (IS_ERR(hsusb_vddcx)) {
+		motg->vddcx = regulator_get(motg->phy.dev, "HSUSB_VDDCX");
+		if (IS_ERR(motg->vddcx)) {
 			dev_err(motg->phy.dev, "unable to get hsusb vddcx\n");
-			return PTR_ERR(hsusb_vddcx);
+			return PTR_ERR(motg->vddcx);
 		}

-		ret = regulator_set_voltage(hsusb_vddcx,
+		ret = regulator_set_voltage(motg->vddcx,
 				USB_PHY_VDD_DIG_VOL_MIN,
 				USB_PHY_VDD_DIG_VOL_MAX);
 		if (ret) {
 			dev_err(motg->phy.dev, "unable to set the voltage "
 					"for hsusb vddcx\n");
-			regulator_put(hsusb_vddcx);
+			regulator_put(motg->vddcx);
 			return ret;
 		}

-		ret = regulator_enable(hsusb_vddcx);
+		ret = regulator_enable(motg->vddcx);
 		if (ret) {
 			dev_err(motg->phy.dev, "unable to enable hsusb vddcx\n");
-			regulator_put(hsusb_vddcx);
+			regulator_put(motg->vddcx);
 		}
 	} else {
-		ret = regulator_set_voltage(hsusb_vddcx, 0,
+		ret = regulator_set_voltage(motg->vddcx, 0,
 			USB_PHY_VDD_DIG_VOL_MAX);
 		if (ret)
 			dev_err(motg->phy.dev, "unable to set the voltage "
 					"for hsusb vddcx\n");
-		ret = regulator_disable(hsusb_vddcx);
+		ret = regulator_disable(motg->vddcx);
 		if (ret)
 			dev_err(motg->phy.dev, "unable to disable hsusb vddcx\n");

-		regulator_put(hsusb_vddcx);
+		regulator_put(motg->vddcx);
 	}

 	return ret;
@@ -109,38 +105,38 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init)
 	int rc = 0;

 	if (init) {
-		hsusb_3p3 = regulator_get(motg->phy.dev, "HSUSB_3p3");
-		if (IS_ERR(hsusb_3p3)) {
+		motg->v3p3 = regulator_get(motg->phy.dev, "HSUSB_3p3");
+		if (IS_ERR(motg->v3p3)) {
 			dev_err(motg->phy.dev, "unable to get hsusb 3p3\n");
-			return PTR_ERR(hsusb_3p3);
+			return PTR_ERR(motg->v3p3);
 		}

-		rc = regulator_set_voltage(hsusb_3p3, USB_PHY_3P3_VOL_MIN,
+		rc = regulator_set_voltage(motg->v3p3, USB_PHY_3P3_VOL_MIN,
 				USB_PHY_3P3_VOL_MAX);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to set voltage level "
 					"for hsusb 3p3\n");
 			goto put_3p3;
 		}
-		rc = regulator_enable(hsusb_3p3);
+		rc = regulator_enable(motg->v3p3);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to enable the hsusb 3p3\n");
 			goto put_3p3;
 		}
-		hsusb_1p8 = regulator_get(motg->phy.dev, "HSUSB_1p8");
-		if (IS_ERR(hsusb_1p8)) {
+		motg->v1p8 = regulator_get(motg->phy.dev, "HSUSB_1p8");
+		if (IS_ERR(motg->v1p8)) {
 			dev_err(motg->phy.dev, "unable to get hsusb 1p8\n");
-			rc = PTR_ERR(hsusb_1p8);
+			rc = PTR_ERR(motg->v1p8);
 			goto disable_3p3;
 		}
-		rc = regulator_set_voltage(hsusb_1p8, USB_PHY_1P8_VOL_MIN,
+		rc = regulator_set_voltage(motg->v1p8, USB_PHY_1P8_VOL_MIN,
 				USB_PHY_1P8_VOL_MAX);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to set voltage level "
 					"for hsusb 1p8\n");
 			goto put_1p8;
 		}
-		rc = regulator_enable(hsusb_1p8);
+		rc = regulator_enable(motg->v1p8);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to enable the hsusb 1p8\n");
 			goto put_1p8;
@@ -149,54 +145,54 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init)
 		return 0;
 	}

-	regulator_disable(hsusb_1p8);
+	regulator_disable(motg->v1p8);
 put_1p8:
-	regulator_put(hsusb_1p8);
+	regulator_put(motg->v1p8);
 disable_3p3:
-	regulator_disable(hsusb_3p3);
+	regulator_disable(motg->v3p3);
 put_3p3:
-	regulator_put(hsusb_3p3);
+	regulator_put(motg->v3p3);
 	return rc;
 }

-static int msm_hsusb_ldo_set_mode(int on)
+static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on)
 {
 	int ret = 0;

-	if (!hsusb_1p8 || IS_ERR(hsusb_1p8)) {
+	if (!motg->v1p8 || IS_ERR(motg->v1p8)) {
 		pr_err("%s: HSUSB_1p8 is not initialized\n", __func__);
 		return -ENODEV;
 	}

-	if (!hsusb_3p3 || IS_ERR(hsusb_3p3)) {
+	if (!motg->v3p3 || IS_ERR(motg->v3p3)) {
 		pr_err("%s: HSUSB_3p3 is not initialized\n", __func__);
 		return -ENODEV;
 	}

 	if (on) {
-		ret = regulator_set_optimum_mode(hsusb_1p8,
+		ret = regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_HPM_LOAD);
 		if (ret < 0) {
 			pr_err("%s: Unable to set HPM of the regulator "
 				"HSUSB_1p8\n", __func__);
 			return ret;
 		}
-		ret = regulator_set_optimum_mode(hsusb_3p3,
+		ret = regulator_set_optimum_mode(motg->v3p3,
 				USB_PHY_3P3_HPM_LOAD);
 		if (ret < 0) {
 			pr_err("%s: Unable to set HPM of the regulator "
 				"HSUSB_3p3\n", __func__);
-			regulator_set_optimum_mode(hsusb_1p8,
+			regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_LPM_LOAD);
 			return ret;
 		}
 	} else {
-		ret = regulator_set_optimum_mode(hsusb_1p8,
+		ret = regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_LPM_LOAD);
 		if (ret < 0)
 			pr_err("%s: Unable to set LPM of the regulator "
 				"HSUSB_1p8\n", __func__);
-		ret = regulator_set_optimum_mode(hsusb_3p3,
+		ret = regulator_set_optimum_mode(motg->v3p3,
 				USB_PHY_3P3_LPM_LOAD);
 		if (ret < 0)
 			pr_err("%s: Unable to set LPM of the regulator "
@@ -417,7 +413,7 @@ static int msm_otg_reset(struct usb_phy *phy)
 #ifdef CONFIG_PM

 #define USB_PHY_SUSP_DIG_VOL  500000
-static int msm_hsusb_config_vddcx(int high)
+static int msm_hsusb_config_vddcx(struct msm_otg *motg, int high)
 {
 	int max_vol = USB_PHY_VDD_DIG_VOL_MAX;
 	int min_vol;
@@ -428,7 +424,7 @@ static int msm_hsusb_config_vddcx(int high)
 	else
 		min_vol = USB_PHY_SUSP_DIG_VOL;

-	ret = regulator_set_voltage(hsusb_vddcx, min_vol, max_vol);
+	ret = regulator_set_voltage(motg->vddcx, min_vol, max_vol);
 	if (ret) {
 		pr_err("%s: unable to set the voltage for regulator "
 			"HSUSB_VDDCX\n", __func__);
@@ -518,8 +514,8 @@ static int msm_otg_suspend(struct msm_otg *motg)

 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
 			motg->pdata->otg_control == OTG_PMIC_CONTROL) {
-		msm_hsusb_ldo_set_mode(0);
-		msm_hsusb_config_vddcx(0);
+		msm_hsusb_ldo_set_mode(motg, 0);
+		msm_hsusb_config_vddcx(motg, 0);
 	}

 	if (device_may_wakeup(phy->dev))
@@ -555,8 +551,8 @@ static int msm_otg_resume(struct msm_otg *motg)

 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
 			motg->pdata->otg_control == OTG_PMIC_CONTROL) {
-		msm_hsusb_ldo_set_mode(1);
-		msm_hsusb_config_vddcx(1);
+		msm_hsusb_ldo_set_mode(motg, 1);
+		msm_hsusb_config_vddcx(motg, 1);
 		writel(readl(USB_PHY_CTRL) & ~PHY_RETEN, USB_PHY_CTRL);
 	}

@@ -1520,7 +1516,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "hsusb vreg configuration failed\n");
 		goto vddcx_exit;
 	}
-	ret = msm_hsusb_ldo_set_mode(1);
+	ret = msm_hsusb_ldo_set_mode(motg, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "hsusb vreg enable failed\n");
 		goto ldo_exit;
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 3275483..8705b01 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -183,6 +183,9 @@ struct msm_otg {
 	enum usb_chg_state chg_state;
 	enum usb_chg_type chg_type;
 	u8 dcd_retries;
+	struct regulator *v3p3;
+	struct regulator *v1p8;
+	struct regulator *vddcx;
 };

 #endif
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 02/14] usb: phy: msm: Migrate to Managed Device Resource allocation
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 01/14] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 03/14] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Move memory, regulators, clocks and irq allocation to
devm_* variants. Properly check for valid clk handles.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |  192 ++++++++++++++++-------------------------
 1 file changed, 74 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 410ef99..3f8d3bc 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -63,27 +63,18 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 	int ret = 0;

 	if (init) {
-		motg->vddcx = regulator_get(motg->phy.dev, "HSUSB_VDDCX");
-		if (IS_ERR(motg->vddcx)) {
-			dev_err(motg->phy.dev, "unable to get hsusb vddcx\n");
-			return PTR_ERR(motg->vddcx);
-		}
-
 		ret = regulator_set_voltage(motg->vddcx,
 				USB_PHY_VDD_DIG_VOL_MIN,
 				USB_PHY_VDD_DIG_VOL_MAX);
 		if (ret) {
 			dev_err(motg->phy.dev, "unable to set the voltage "
 					"for hsusb vddcx\n");
-			regulator_put(motg->vddcx);
 			return ret;
 		}

 		ret = regulator_enable(motg->vddcx);
-		if (ret) {
+		if (ret)
 			dev_err(motg->phy.dev, "unable to enable hsusb vddcx\n");
-			regulator_put(motg->vddcx);
-		}
 	} else {
 		ret = regulator_set_voltage(motg->vddcx, 0,
 			USB_PHY_VDD_DIG_VOL_MAX);
@@ -93,8 +84,6 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 		ret = regulator_disable(motg->vddcx);
 		if (ret)
 			dev_err(motg->phy.dev, "unable to disable hsusb vddcx\n");
-
-		regulator_put(motg->vddcx);
 	}

 	return ret;
@@ -105,53 +94,38 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init)
 	int rc = 0;

 	if (init) {
-		motg->v3p3 = regulator_get(motg->phy.dev, "HSUSB_3p3");
-		if (IS_ERR(motg->v3p3)) {
-			dev_err(motg->phy.dev, "unable to get hsusb 3p3\n");
-			return PTR_ERR(motg->v3p3);
-		}
-
 		rc = regulator_set_voltage(motg->v3p3, USB_PHY_3P3_VOL_MIN,
 				USB_PHY_3P3_VOL_MAX);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to set voltage level "
 					"for hsusb 3p3\n");
-			goto put_3p3;
+			goto exit;
 		}
 		rc = regulator_enable(motg->v3p3);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to enable the hsusb 3p3\n");
-			goto put_3p3;
-		}
-		motg->v1p8 = regulator_get(motg->phy.dev, "HSUSB_1p8");
-		if (IS_ERR(motg->v1p8)) {
-			dev_err(motg->phy.dev, "unable to get hsusb 1p8\n");
-			rc = PTR_ERR(motg->v1p8);
-			goto disable_3p3;
+			goto exit;
 		}
 		rc = regulator_set_voltage(motg->v1p8, USB_PHY_1P8_VOL_MIN,
 				USB_PHY_1P8_VOL_MAX);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to set voltage level "
 					"for hsusb 1p8\n");
-			goto put_1p8;
+			goto disable_3p3;
 		}
 		rc = regulator_enable(motg->v1p8);
 		if (rc) {
 			dev_err(motg->phy.dev, "unable to enable the hsusb 1p8\n");
-			goto put_1p8;
+			goto disable_3p3;
 		}

 		return 0;
 	}

 	regulator_disable(motg->v1p8);
-put_1p8:
-	regulator_put(motg->v1p8);
 disable_3p3:
 	regulator_disable(motg->v3p3);
-put_3p3:
-	regulator_put(motg->v3p3);
+exit:
 	return rc;
 }

@@ -506,7 +480,7 @@ static int msm_otg_suspend(struct msm_otg *motg)

 	clk_disable_unprepare(motg->pclk);
 	clk_disable_unprepare(motg->clk);
-	if (motg->core_clk)
+	if (!IS_ERR(motg->core_clk))
 		clk_disable_unprepare(motg->core_clk);

 	if (!IS_ERR(motg->pclk_src))
@@ -546,7 +520,7 @@ static int msm_otg_resume(struct msm_otg *motg)

 	clk_prepare_enable(motg->pclk);
 	clk_prepare_enable(motg->clk);
-	if (motg->core_clk)
+	if (!IS_ERR(motg->core_clk))
 		clk_prepare_enable(motg->core_clk);

 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
@@ -1415,13 +1389,14 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}

-	motg = kzalloc(sizeof(struct msm_otg), GFP_KERNEL);
+	motg = devm_kzalloc(&pdev->dev, sizeof(struct msm_otg), GFP_KERNEL);
 	if (!motg) {
 		dev_err(&pdev->dev, "unable to allocate msm_otg\n");
 		return -ENOMEM;
 	}

-	motg->phy.otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL);
+	motg->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
+				     GFP_KERNEL);
 	if (!motg->phy.otg) {
 		dev_err(&pdev->dev, "unable to allocate msm_otg\n");
 		return -ENOMEM;
@@ -1431,20 +1406,17 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	phy = &motg->phy;
 	phy->dev = &pdev->dev;

-	motg->phy_reset_clk = clk_get(&pdev->dev, "usb_phy_clk");
+	motg->phy_reset_clk = devm_clk_get(&pdev->dev, "usb_phy_clk");
 	if (IS_ERR(motg->phy_reset_clk)) {
 		dev_err(&pdev->dev, "failed to get usb_phy_clk\n");
-		ret = PTR_ERR(motg->phy_reset_clk);
-		goto free_motg;
+		return PTR_ERR(motg->phy_reset_clk);
 	}

-	motg->clk = clk_get(&pdev->dev, "usb_hs_clk");
+	motg->clk = devm_clk_get(&pdev->dev, "usb_hs_clk");
 	if (IS_ERR(motg->clk)) {
 		dev_err(&pdev->dev, "failed to get usb_hs_clk\n");
-		ret = PTR_ERR(motg->clk);
-		goto put_phy_reset_clk;
+		return PTR_ERR(motg->clk);
 	}
-	clk_set_rate(motg->clk, 60000000);

 	/*
 	 * If USB Core is running its protocol engine based on CORE CLK,
@@ -1453,22 +1425,18 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	 * CORE CLK. For such USB cores, vote for maximum clk frequency
 	 * on pclk source
 	 */
+	 motg->pclk_src = ERR_PTR(-ENOENT);
 	 if (motg->pdata->pclk_src_name) {
-		motg->pclk_src = clk_get(&pdev->dev,
-			motg->pdata->pclk_src_name);
+		motg->pclk_src = devm_clk_get(&pdev->dev,
+					motg->pdata->pclk_src_name);
 		if (IS_ERR(motg->pclk_src))
-			goto put_clk;
-		clk_set_rate(motg->pclk_src, INT_MAX);
-		clk_prepare_enable(motg->pclk_src);
-	} else
-		motg->pclk_src = ERR_PTR(-ENOENT);
-
+			return PTR_ERR(motg->pclk_src);
+	}

-	motg->pclk = clk_get(&pdev->dev, "usb_hs_pclk");
+	motg->pclk = devm_clk_get(&pdev->dev, "usb_hs_pclk");
 	if (IS_ERR(motg->pclk)) {
 		dev_err(&pdev->dev, "failed to get usb_hs_pclk\n");
-		ret = PTR_ERR(motg->pclk);
-		goto put_pclk_src;
+		return PTR_ERR(motg->pclk);
 	}

 	/*
@@ -1476,65 +1444,78 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	 * clock is introduced to remove the dependency on AXI
 	 * bus frequency.
 	 */
-	motg->core_clk = clk_get(&pdev->dev, "usb_hs_core_clk");
-	if (IS_ERR(motg->core_clk))
-		motg->core_clk = NULL;
+	motg->core_clk = devm_clk_get(&pdev->dev, "usb_hs_core_clk");

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get platform resource mem\n");
-		ret = -ENODEV;
-		goto put_core_clk;
-	}
+	motg->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+	if (IS_ERR(motg->regs))
+		return PTR_ERR(motg->regs);

-	motg->regs = ioremap(res->start, resource_size(res));
-	if (!motg->regs) {
-		dev_err(&pdev->dev, "ioremap failed\n");
-		ret = -ENOMEM;
-		goto put_core_clk;
-	}
 	dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);

 	motg->irq = platform_get_irq(pdev, 0);
 	if (!motg->irq) {
 		dev_err(&pdev->dev, "platform_get_irq failed\n");
-		ret = -ENODEV;
-		goto free_regs;
+		return motg->irq;
+	}
+
+	motg->vddcx = devm_regulator_get(motg->phy.dev, "HSUSB_VDDCX");
+	if (IS_ERR(motg->vddcx)) {
+		dev_err(motg->phy.dev, "unable to get hsusb vddcx\n");
+		return PTR_ERR(motg->vddcx);
+	}
+
+	motg->v3p3 = devm_regulator_get(motg->phy.dev, "HSUSB_3p3");
+	if (IS_ERR(motg->v3p3)) {
+		dev_err(motg->phy.dev, "unable to get hsusb 3p3\n");
+		return PTR_ERR(motg->v3p3);
+	}
+
+	motg->v1p8 = devm_regulator_get(motg->phy.dev, "HSUSB_1p8");
+	if (IS_ERR(motg->v1p8)) {
+		dev_err(motg->phy.dev, "unable to get hsusb 1p8\n");
+		return PTR_ERR(motg->v1p8);
+	}
+
+	clk_set_rate(motg->clk, 60000000);
+	if (!IS_ERR(motg->pclk_src)) {
+		clk_set_rate(motg->pclk_src, INT_MAX);
+		clk_prepare_enable(motg->pclk_src);
 	}

 	clk_prepare_enable(motg->clk);
 	clk_prepare_enable(motg->pclk);

+	if (!IS_ERR(motg->core_clk))
+		clk_prepare_enable(motg->core_clk);
+
 	ret = msm_hsusb_init_vddcx(motg, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "hsusb vddcx configuration failed\n");
-		goto free_regs;
+		goto disable_clks;
 	}

 	ret = msm_hsusb_ldo_init(motg, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "hsusb vreg configuration failed\n");
-		goto vddcx_exit;
+		goto disable_vddcx;
 	}
 	ret = msm_hsusb_ldo_set_mode(motg, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "hsusb vreg enable failed\n");
-		goto ldo_exit;
+		goto disable_ldo;
 	}

-	if (motg->core_clk)
-		clk_prepare_enable(motg->core_clk);
-
 	writel(0, USB_USBINTR);
 	writel(0, USB_OTGSC);

 	INIT_WORK(&motg->sm_work, msm_otg_sm_work);
 	INIT_DELAYED_WORK(&motg->chg_work, msm_chg_detect_work);
-	ret = request_irq(motg->irq, msm_otg_irq, IRQF_SHARED,
+	ret = devm_request_irq(&pdev->dev, motg->irq, msm_otg_irq, IRQF_SHARED,
 					"msm_otg", motg);
 	if (ret) {
 		dev_err(&pdev->dev, "request irq failed\n");
-		goto disable_clks;
+		goto disable_ldo;
 	}

 	phy->init = msm_otg_reset;
@@ -1549,7 +1530,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	ret = usb_add_phy(&motg->phy, USB_PHY_TYPE_USB2);
 	if (ret) {
 		dev_err(&pdev->dev, "usb_add_phy failed\n");
-		goto free_irq;
+		goto disable_ldo;
 	}

 	platform_set_drvdata(pdev, motg);
@@ -1567,33 +1548,18 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);

 	return 0;
-free_irq:
-	free_irq(motg->irq, motg);
+
+disable_ldo:
+	msm_hsusb_ldo_init(motg, 0);
+disable_vddcx:
+	msm_hsusb_init_vddcx(motg, 0);
 disable_clks:
 	clk_disable_unprepare(motg->pclk);
 	clk_disable_unprepare(motg->clk);
-ldo_exit:
-	msm_hsusb_ldo_init(motg, 0);
-vddcx_exit:
-	msm_hsusb_init_vddcx(motg, 0);
-free_regs:
-	iounmap(motg->regs);
-put_core_clk:
-	if (motg->core_clk)
-		clk_put(motg->core_clk);
-	clk_put(motg->pclk);
-put_pclk_src:
-	if (!IS_ERR(motg->pclk_src)) {
+	if (!IS_ERR(motg->core_clk))
+		clk_disable_unprepare(motg->core_clk);
+	if (!IS_ERR(motg->pclk_src))
 		clk_disable_unprepare(motg->pclk_src);
-		clk_put(motg->pclk_src);
-	}
-put_clk:
-	clk_put(motg->clk);
-put_phy_reset_clk:
-	clk_put(motg->phy_reset_clk);
-free_motg:
-	kfree(motg->phy.otg);
-	kfree(motg);
 	return ret;
 }

@@ -1616,7 +1582,7 @@ static int msm_otg_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);

 	usb_remove_phy(phy);
-	free_irq(motg->irq, motg);
+	disable_irq(motg->irq);

 	/*
 	 * Put PHY in low power mode.
@@ -1636,26 +1602,15 @@ static int msm_otg_remove(struct platform_device *pdev)

 	clk_disable_unprepare(motg->pclk);
 	clk_disable_unprepare(motg->clk);
-	if (motg->core_clk)
+	if (!IS_ERR(motg->core_clk))
 		clk_disable_unprepare(motg->core_clk);
-	if (!IS_ERR(motg->pclk_src)) {
+	if (!IS_ERR(motg->pclk_src))
 		clk_disable_unprepare(motg->pclk_src);
-		clk_put(motg->pclk_src);
-	}
+
 	msm_hsusb_ldo_init(motg, 0);

-	iounmap(motg->regs);
 	pm_runtime_set_suspended(&pdev->dev);

-	clk_put(motg->phy_reset_clk);
-	clk_put(motg->pclk);
-	clk_put(motg->clk);
-	if (motg->core_clk)
-		clk_put(motg->core_clk);
-
-	kfree(motg->phy.otg);
-	kfree(motg);
-
 	return 0;
 }

@@ -1735,6 +1690,7 @@ static const struct dev_pm_ops msm_otg_dev_pm_ops = {
 };

 static struct platform_driver msm_otg_driver = {
+	.probe = msm_otg_probe,
 	.remove = msm_otg_remove,
 	.driver = {
 		.name = DRIVER_NAME,
@@ -1743,7 +1699,7 @@ static struct platform_driver msm_otg_driver = {
 	},
 };

-module_platform_driver_probe(msm_otg_driver, msm_otg_probe);
+module_platform_driver(msm_otg_driver);

 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("MSM USB transceiver driver");
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 03/14] usb: phy: msm: Remove unnecessarily check for valid regulators.
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 01/14] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 02/14] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 04/14] usb: phy: msm: Fix checkpatch.pl warnings Ivan T. Ivanov
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Whether regulators are available or not is checked at driver
probe. If they are not available driver will refuse to load,
so no need to check them again.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 3f8d3bc..4f4b0c6 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -133,16 +133,6 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on)
 {
 	int ret = 0;

-	if (!motg->v1p8 || IS_ERR(motg->v1p8)) {
-		pr_err("%s: HSUSB_1p8 is not initialized\n", __func__);
-		return -ENODEV;
-	}
-
-	if (!motg->v3p3 || IS_ERR(motg->v3p3)) {
-		pr_err("%s: HSUSB_3p3 is not initialized\n", __func__);
-		return -ENODEV;
-	}
-
 	if (on) {
 		ret = regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_HPM_LOAD);
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 04/14] usb: phy: msm: Fix checkpatch.pl warnings
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (2 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 03/14] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 05/14] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode Ivan T. Ivanov
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

This fixes following:

WARNING: quoted string split across lines
WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |   39 ++++++++++++++-------------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 4f4b0c6..beafe84 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -67,8 +67,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 				USB_PHY_VDD_DIG_VOL_MIN,
 				USB_PHY_VDD_DIG_VOL_MAX);
 		if (ret) {
-			dev_err(motg->phy.dev, "unable to set the voltage "
-					"for hsusb vddcx\n");
+			dev_err(motg->phy.dev, "Cannot set vddcx voltage\n");
 			return ret;
 		}

@@ -79,8 +78,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 		ret = regulator_set_voltage(motg->vddcx, 0,
 			USB_PHY_VDD_DIG_VOL_MAX);
 		if (ret)
-			dev_err(motg->phy.dev, "unable to set the voltage "
-					"for hsusb vddcx\n");
+			dev_err(motg->phy.dev, "Cannot set vddcx voltage\n");
 		ret = regulator_disable(motg->vddcx);
 		if (ret)
 			dev_err(motg->phy.dev, "unable to disable hsusb vddcx\n");
@@ -97,8 +95,7 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init)
 		rc = regulator_set_voltage(motg->v3p3, USB_PHY_3P3_VOL_MIN,
 				USB_PHY_3P3_VOL_MAX);
 		if (rc) {
-			dev_err(motg->phy.dev, "unable to set voltage level "
-					"for hsusb 3p3\n");
+			dev_err(motg->phy.dev, "Cannot set v3p3 voltage\n");
 			goto exit;
 		}
 		rc = regulator_enable(motg->v3p3);
@@ -109,8 +106,7 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init)
 		rc = regulator_set_voltage(motg->v1p8, USB_PHY_1P8_VOL_MIN,
 				USB_PHY_1P8_VOL_MAX);
 		if (rc) {
-			dev_err(motg->phy.dev, "unable to set voltage level "
-					"for hsusb 1p8\n");
+			dev_err(motg->phy.dev, "Cannot set v1p8 voltage\n");
 			goto disable_3p3;
 		}
 		rc = regulator_enable(motg->v1p8);
@@ -137,15 +133,13 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on)
 		ret = regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_HPM_LOAD);
 		if (ret < 0) {
-			pr_err("%s: Unable to set HPM of the regulator "
-				"HSUSB_1p8\n", __func__);
+			pr_err("Could not set HPM for v1p8\n");
 			return ret;
 		}
 		ret = regulator_set_optimum_mode(motg->v3p3,
 				USB_PHY_3P3_HPM_LOAD);
 		if (ret < 0) {
-			pr_err("%s: Unable to set HPM of the regulator "
-				"HSUSB_3p3\n", __func__);
+			pr_err("Could not set HPM for v3p3\n");
 			regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_LPM_LOAD);
 			return ret;
@@ -154,13 +148,11 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on)
 		ret = regulator_set_optimum_mode(motg->v1p8,
 				USB_PHY_1P8_LPM_LOAD);
 		if (ret < 0)
-			pr_err("%s: Unable to set LPM of the regulator "
-				"HSUSB_1p8\n", __func__);
+			pr_err("Could not set LPM for v1p8\n");
 		ret = regulator_set_optimum_mode(motg->v3p3,
 				USB_PHY_3P3_LPM_LOAD);
 		if (ret < 0)
-			pr_err("%s: Unable to set LPM of the regulator "
-				"HSUSB_3p3\n", __func__);
+			pr_err("Could not set LPM for v3p3\n");
 	}

 	pr_debug("reg (%s)\n", on ? "HPM" : "LPM");
@@ -390,8 +382,7 @@ static int msm_hsusb_config_vddcx(struct msm_otg *motg, int high)

 	ret = regulator_set_voltage(motg->vddcx, min_vol, max_vol);
 	if (ret) {
-		pr_err("%s: unable to set the voltage for regulator "
-			"HSUSB_VDDCX\n", __func__);
+		dev_err(motg->phy.dev, "Cannot set vddcx voltage\n");
 		return ret;
 	}

@@ -546,8 +537,7 @@ static int msm_otg_resume(struct msm_otg *motg)
 		 * PHY. USB state can not be restored. Re-insertion
 		 * of USB cable is the only way to get USB working.
 		 */
-		dev_err(phy->dev, "Unable to resume USB."
-				"Re-plugin the cable\n");
+		dev_err(phy->dev, "Unable to resume USB. Re-plugin the cable\n");
 		msm_otg_reset(phy);
 	}

@@ -1242,13 +1232,13 @@ static int msm_otg_mode_show(struct seq_file *s, void *unused)

 	switch (otg->phy->state) {
 	case OTG_STATE_A_HOST:
-		seq_printf(s, "host\n");
+		seq_puts(s, "host\n");
 		break;
 	case OTG_STATE_B_PERIPHERAL:
-		seq_printf(s, "peripheral\n");
+		seq_puts(s, "peripheral\n");
 		break;
 	default:
-		seq_printf(s, "none\n");
+		seq_puts(s, "none\n");
 		break;
 	}

@@ -1530,8 +1520,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 			motg->pdata->otg_control == OTG_USER_CONTROL) {
 		ret = msm_otg_debugfs_init(motg);
 		if (ret)
-			dev_dbg(&pdev->dev, "mode debugfs file is"
-					"not available\n");
+			dev_dbg(&pdev->dev, "Can not create mode change file\n");
 	}

 	pm_runtime_set_active(&pdev->dev);
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 05/14] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (3 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 04/14] usb: phy: msm: Fix checkpatch.pl warnings Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 06/14] usb: phy: msm: Remove unused pclk_src_name Ivan T. Ivanov
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: David Brown, Daniel Walker, Bryan Huntsman, Russell King, Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-arm-msm, linux-kernel,
	linux-usb

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Use enum usb_dr_mode and drop default usb_dr_mode from platform data.

USB DT bindings states: dr_mode: "...In case this attribute isn't
passed via DT, USB DRD controllers should default to OTG...",
so remove redundand field.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Acked-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/board-msm7x30.c |    2 +-
 arch/arm/mach-msm/board-qsd8x50.c |    2 +-
 drivers/usb/phy/phy-msm-usb.c     |   41 +++++++++++++++----------------------
 include/linux/usb/msm_hsusb.h     |   20 +-----------------
 4 files changed, 20 insertions(+), 45 deletions(-)

diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 46de789..0c4c200 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -95,7 +95,7 @@ static int hsusb_phy_clk_reset(struct clk *phy_clk)
 
 static struct msm_otg_platform_data msm_otg_pdata = {
 	.phy_init_seq		= hsusb_phy_init_seq,
-	.mode                   = USB_PERIPHERAL,
+	.mode                   = USB_DR_MODE_PERIPHERAL,
 	.otg_control		= OTG_PHY_CONTROL,
 	.link_clk_reset		= hsusb_link_clk_reset,
 	.phy_clk_reset		= hsusb_phy_clk_reset,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 9169ec3..4c74861 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -116,7 +116,7 @@ static int hsusb_phy_clk_reset(struct clk *phy_clk)
 
 static struct msm_otg_platform_data msm_otg_pdata = {
 	.phy_init_seq		= hsusb_phy_init_seq,
-	.mode                   = USB_PERIPHERAL,
+	.mode                   = USB_DR_MODE_PERIPHERAL,
 	.otg_control		= OTG_PHY_CONTROL,
 	.link_clk_reset		= hsusb_link_clk_reset,
 	.phy_clk_reset		= hsusb_phy_clk_reset,
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index beafe84..dac2e8d 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -348,10 +348,10 @@ static int msm_otg_reset(struct usb_phy *phy)
 
 	if (pdata->otg_control == OTG_PHY_CONTROL) {
 		val = readl(USB_OTGSC);
-		if (pdata->mode == USB_OTG) {
+		if (pdata->mode == USB_DR_MODE_OTG) {
 			ulpi_val = ULPI_INT_IDGRD | ULPI_INT_SESS_VALID;
 			val |= OTGSC_IDIE | OTGSC_BSVIE;
-		} else if (pdata->mode == USB_PERIPHERAL) {
+		} else if (pdata->mode == USB_DR_MODE_PERIPHERAL) {
 			ulpi_val = ULPI_INT_SESS_VALID;
 			val |= OTGSC_BSVIE;
 		}
@@ -637,7 +637,7 @@ static int msm_otg_set_host(struct usb_otg *otg, struct usb_bus *host)
 	 * Fail host registration if this board can support
 	 * only peripheral configuration.
 	 */
-	if (motg->pdata->mode == USB_PERIPHERAL) {
+	if (motg->pdata->mode == USB_DR_MODE_PERIPHERAL) {
 		dev_info(otg->phy->dev, "Host mode is not supported\n");
 		return -ENODEV;
 	}
@@ -666,7 +666,7 @@ static int msm_otg_set_host(struct usb_otg *otg, struct usb_bus *host)
 	 * Kick the state machine work, if peripheral is not supported
 	 * or peripheral is already registered with us.
 	 */
-	if (motg->pdata->mode == USB_HOST || otg->gadget) {
+	if (motg->pdata->mode == USB_DR_MODE_HOST || otg->gadget) {
 		pm_runtime_get_sync(otg->phy->dev);
 		schedule_work(&motg->sm_work);
 	}
@@ -710,7 +710,7 @@ static int msm_otg_set_peripheral(struct usb_otg *otg,
 	 * Fail peripheral registration if this board can support
 	 * only host configuration.
 	 */
-	if (motg->pdata->mode == USB_HOST) {
+	if (motg->pdata->mode == USB_DR_MODE_HOST) {
 		dev_info(otg->phy->dev, "Peripheral mode is not supported\n");
 		return -ENODEV;
 	}
@@ -735,7 +735,7 @@ static int msm_otg_set_peripheral(struct usb_otg *otg,
 	 * Kick the state machine work, if host is not supported
 	 * or host is already registered with us.
 	 */
-	if (motg->pdata->mode == USB_PERIPHERAL || otg->host) {
+	if (motg->pdata->mode == USB_DR_MODE_PERIPHERAL || otg->host) {
 		pm_runtime_get_sync(otg->phy->dev);
 		schedule_work(&motg->sm_work);
 	}
@@ -1056,7 +1056,7 @@ static void msm_otg_init_sm(struct msm_otg *motg)
 	u32 otgsc = readl(USB_OTGSC);
 
 	switch (pdata->mode) {
-	case USB_OTG:
+	case USB_DR_MODE_OTG:
 		if (pdata->otg_control == OTG_PHY_CONTROL) {
 			if (otgsc & OTGSC_ID)
 				set_bit(ID, &motg->inputs);
@@ -1068,21 +1068,14 @@ static void msm_otg_init_sm(struct msm_otg *motg)
 			else
 				clear_bit(B_SESS_VLD, &motg->inputs);
 		} else if (pdata->otg_control == OTG_USER_CONTROL) {
-			if (pdata->default_mode == USB_HOST) {
-				clear_bit(ID, &motg->inputs);
-			} else if (pdata->default_mode == USB_PERIPHERAL) {
-				set_bit(ID, &motg->inputs);
-				set_bit(B_SESS_VLD, &motg->inputs);
-			} else {
 				set_bit(ID, &motg->inputs);
 				clear_bit(B_SESS_VLD, &motg->inputs);
-			}
 		}
 		break;
-	case USB_HOST:
+	case USB_DR_MODE_HOST:
 		clear_bit(ID, &motg->inputs);
 		break;
-	case USB_PERIPHERAL:
+	case USB_DR_MODE_PERIPHERAL:
 		set_bit(ID, &motg->inputs);
 		if (otgsc & OTGSC_BSV)
 			set_bit(B_SESS_VLD, &motg->inputs);
@@ -1258,7 +1251,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
 	char buf[16];
 	struct usb_otg *otg = motg->phy.otg;
 	int status = count;
-	enum usb_mode_type req_mode;
+	enum usb_dr_mode req_mode;
 
 	memset(buf, 0x00, sizeof(buf));
 
@@ -1268,18 +1261,18 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
 	}
 
 	if (!strncmp(buf, "host", 4)) {
-		req_mode = USB_HOST;
+		req_mode = USB_DR_MODE_HOST;
 	} else if (!strncmp(buf, "peripheral", 10)) {
-		req_mode = USB_PERIPHERAL;
+		req_mode = USB_DR_MODE_PERIPHERAL;
 	} else if (!strncmp(buf, "none", 4)) {
-		req_mode = USB_NONE;
+		req_mode = USB_DR_MODE_UNKNOWN;
 	} else {
 		status = -EINVAL;
 		goto out;
 	}
 
 	switch (req_mode) {
-	case USB_NONE:
+	case USB_DR_MODE_UNKNOWN:
 		switch (otg->phy->state) {
 		case OTG_STATE_A_HOST:
 		case OTG_STATE_B_PERIPHERAL:
@@ -1290,7 +1283,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
 			goto out;
 		}
 		break;
-	case USB_PERIPHERAL:
+	case USB_DR_MODE_PERIPHERAL:
 		switch (otg->phy->state) {
 		case OTG_STATE_B_IDLE:
 		case OTG_STATE_A_HOST:
@@ -1301,7 +1294,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
 			goto out;
 		}
 		break;
-	case USB_HOST:
+	case USB_DR_MODE_HOST:
 		switch (otg->phy->state) {
 		case OTG_STATE_B_IDLE:
 		case OTG_STATE_B_PERIPHERAL:
@@ -1516,7 +1509,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, motg);
 	device_init_wakeup(&pdev->dev, 1);
 
-	if (motg->pdata->mode == USB_OTG &&
+	if (motg->pdata->mode == USB_DR_MODE_OTG &&
 			motg->pdata->otg_control == OTG_USER_CONTROL) {
 		ret = msm_otg_debugfs_init(motg);
 		if (ret)
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 8705b01..72c5830 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -23,21 +23,6 @@
 #include <linux/clk.h>
 
 /**
- * Supported USB modes
- *
- * USB_PERIPHERAL       Only peripheral mode is supported.
- * USB_HOST             Only host mode is supported.
- * USB_OTG              OTG mode is supported.
- *
- */
-enum usb_mode_type {
-	USB_NONE = 0,
-	USB_PERIPHERAL,
-	USB_HOST,
-	USB_OTG,
-};
-
-/**
  * OTG control
  *
  * OTG_NO_CONTROL	Id/VBUS notifications not required. Useful in host
@@ -121,8 +106,6 @@ enum usb_chg_type {
  * @power_budget: VBUS power budget in mA (0 will be treated as 500mA).
  * @mode: Supported mode (OTG/peripheral/host).
  * @otg_control: OTG switch controlled by user/Id pin
- * @default_mode: Default operational mode. Applicable only if
- *              OTG switch is controller by user.
  * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k
  *              dfab_usb_hs_clk in case of 8660 and 8960.
  */
@@ -130,9 +113,8 @@ struct msm_otg_platform_data {
 	int *phy_init_seq;
 	void (*vbus_power)(bool on);
 	unsigned power_budget;
-	enum usb_mode_type mode;
+	enum usb_dr_mode mode;
 	enum otg_control_type otg_control;
-	enum usb_mode_type default_mode;
 	enum msm_usb_phy_type phy_type;
 	void (*setup_gpio)(enum usb_otg_state state);
 	char *pclk_src_name;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 06/14] usb: phy: msm: Remove unused pclk_src_name
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (4 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 05/14] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 07/14] usb: phy: msm: Remove HSUSB prefix from regulator names Ivan T. Ivanov
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

There are no references to 'pclk_src_name' in plaform code,
so it is unused.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |   26 +-------------------------
 include/linux/usb/msm_hsusb.h |    5 -----
 2 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index dac2e8d..193d6bc 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -464,9 +464,6 @@ static int msm_otg_suspend(struct msm_otg *motg)
 	if (!IS_ERR(motg->core_clk))
 		clk_disable_unprepare(motg->core_clk);

-	if (!IS_ERR(motg->pclk_src))
-		clk_disable_unprepare(motg->pclk_src);
-
 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
 			motg->pdata->otg_control == OTG_PMIC_CONTROL) {
 		msm_hsusb_ldo_set_mode(motg, 0);
@@ -496,9 +493,6 @@ static int msm_otg_resume(struct msm_otg *motg)
 	if (!atomic_read(&motg->in_lpm))
 		return 0;

-	if (!IS_ERR(motg->pclk_src))
-		clk_prepare_enable(motg->pclk_src);
-
 	clk_prepare_enable(motg->pclk);
 	clk_prepare_enable(motg->clk);
 	if (!IS_ERR(motg->core_clk))
@@ -1395,17 +1389,8 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	 * If USB Core is running its protocol engine based on CORE CLK,
 	 * CORE CLK  must be running at >55Mhz for correct HSUSB
 	 * operation and USB core cannot tolerate frequency changes on
-	 * CORE CLK. For such USB cores, vote for maximum clk frequency
-	 * on pclk source
+	 * CORE CLK.
 	 */
-	 motg->pclk_src = ERR_PTR(-ENOENT);
-	 if (motg->pdata->pclk_src_name) {
-		motg->pclk_src = devm_clk_get(&pdev->dev,
-					motg->pdata->pclk_src_name);
-		if (IS_ERR(motg->pclk_src))
-			return PTR_ERR(motg->pclk_src);
-	}
-
 	motg->pclk = devm_clk_get(&pdev->dev, "usb_hs_pclk");
 	if (IS_ERR(motg->pclk)) {
 		dev_err(&pdev->dev, "failed to get usb_hs_pclk\n");
@@ -1451,10 +1436,6 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	}

 	clk_set_rate(motg->clk, 60000000);
-	if (!IS_ERR(motg->pclk_src)) {
-		clk_set_rate(motg->pclk_src, INT_MAX);
-		clk_prepare_enable(motg->pclk_src);
-	}

 	clk_prepare_enable(motg->clk);
 	clk_prepare_enable(motg->pclk);
@@ -1530,8 +1511,6 @@ disable_clks:
 	clk_disable_unprepare(motg->clk);
 	if (!IS_ERR(motg->core_clk))
 		clk_disable_unprepare(motg->core_clk);
-	if (!IS_ERR(motg->pclk_src))
-		clk_disable_unprepare(motg->pclk_src);
 	return ret;
 }

@@ -1576,9 +1555,6 @@ static int msm_otg_remove(struct platform_device *pdev)
 	clk_disable_unprepare(motg->clk);
 	if (!IS_ERR(motg->core_clk))
 		clk_disable_unprepare(motg->core_clk);
-	if (!IS_ERR(motg->pclk_src))
-		clk_disable_unprepare(motg->pclk_src);
-
 	msm_hsusb_ldo_init(motg, 0);

 	pm_runtime_set_suspended(&pdev->dev);
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 72c5830..262ed80 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -106,8 +106,6 @@ enum usb_chg_type {
  * @power_budget: VBUS power budget in mA (0 will be treated as 500mA).
  * @mode: Supported mode (OTG/peripheral/host).
  * @otg_control: OTG switch controlled by user/Id pin
- * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k
- *              dfab_usb_hs_clk in case of 8660 and 8960.
  */
 struct msm_otg_platform_data {
 	int *phy_init_seq;
@@ -117,7 +115,6 @@ struct msm_otg_platform_data {
 	enum otg_control_type otg_control;
 	enum msm_usb_phy_type phy_type;
 	void (*setup_gpio)(enum usb_otg_state state);
-	char *pclk_src_name;
 	int (*link_clk_reset)(struct clk *link_clk, bool assert);
 	int (*phy_clk_reset)(struct clk *phy_clk);
 };
@@ -129,7 +126,6 @@ struct msm_otg_platform_data {
  * @irq: IRQ number assigned for HSUSB controller.
  * @clk: clock struct of usb_hs_clk.
  * @pclk: clock struct of usb_hs_pclk.
- * @pclk_src: pclk source for voting.
  * @phy_reset_clk: clock struct of usb_phy_clk.
  * @core_clk: clock struct of usb_hs_core_clk.
  * @regs: ioremapped register base address.
@@ -150,7 +146,6 @@ struct msm_otg {
 	int irq;
 	struct clk *clk;
 	struct clk *pclk;
-	struct clk *pclk_src;
 	struct clk *phy_reset_clk;
 	struct clk *core_clk;
 	void __iomem *regs;
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 07/14] usb: phy: msm: Remove HSUSB prefix from regulator names
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (5 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 06/14] usb: phy: msm: Remove unused pclk_src_name Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 08/14] usb: phy: msm: Properly check result from platform_get_irq() Ivan T. Ivanov
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Prefix did not bring any useful information. Currently none
of the MSM platforms define these regulators, so it is safe
to rename them.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 193d6bc..c2048c7 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1417,19 +1417,19 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 		return motg->irq;
 	}

-	motg->vddcx = devm_regulator_get(motg->phy.dev, "HSUSB_VDDCX");
+	motg->vddcx = devm_regulator_get(motg->phy.dev, "vddcx");
 	if (IS_ERR(motg->vddcx)) {
 		dev_err(motg->phy.dev, "unable to get hsusb vddcx\n");
 		return PTR_ERR(motg->vddcx);
 	}

-	motg->v3p3 = devm_regulator_get(motg->phy.dev, "HSUSB_3p3");
+	motg->v3p3 = devm_regulator_get(motg->phy.dev, "v3p3");
 	if (IS_ERR(motg->v3p3)) {
 		dev_err(motg->phy.dev, "unable to get hsusb 3p3\n");
 		return PTR_ERR(motg->v3p3);
 	}

-	motg->v1p8 = devm_regulator_get(motg->phy.dev, "HSUSB_1p8");
+	motg->v1p8 = devm_regulator_get(motg->phy.dev, "v1p8");
 	if (IS_ERR(motg->v1p8)) {
 		dev_err(motg->phy.dev, "unable to get hsusb 1p8\n");
 		return PTR_ERR(motg->v1p8);
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 08/14] usb: phy: msm: Properly check result from platform_get_irq()
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (6 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 07/14] usb: phy: msm: Remove HSUSB prefix from regulator names Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 09/14] usb: phy: msm: Add device tree support and binding information Ivan T. Ivanov
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Function return negative code on error.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index c2048c7..31fb916 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1412,7 +1412,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);

 	motg->irq = platform_get_irq(pdev, 0);
-	if (!motg->irq) {
+	if (motg->irq < 0) {
 		dev_err(&pdev->dev, "platform_get_irq failed\n");
 		return motg->irq;
 	}
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 09/14] usb: phy: msm: Add device tree support and binding information
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (7 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 08/14] usb: phy: msm: Properly check result from platform_get_irq() Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets Ivan T. Ivanov
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, Felipe Balbi, Grant Likely
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, David Brown, devicetree,
	linux-doc, linux-kernel, linux-usb, linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Allows MSM OTG controller to be specified via device tree.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 .../devicetree/bindings/usb/msm-hsusb.txt          |   67 ++++++++++++
 drivers/usb/phy/phy-msm-usb.c                      |  108 ++++++++++++++++----
 include/linux/usb/msm_hsusb.h                      |    6 +-
 3 files changed, 159 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index 5ea26c6..ee4123d 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -15,3 +15,70 @@ Example EHCI controller device node:
 		usb-phy = <&usb_otg>;
 	};

+USB PHY with optional OTG:
+
+Required properties:
+- compatible:   Should contain:
+  "qcom,usb-otg-ci" for chipsets with ChipIdea 45nm PHY
+  "qcom,usb-otg-snps" for chipsets with Synopsys 28nm PHY
+
+- regs:         Offset and length of the register set in the memory map
+- interrupts:   interrupt-specifier for the OTG interrupt.
+
+- clocks:       A list of phandle + clock-specifier pairs for the
+                clocks listed in clock-names
+- clock-names:  Should contain the following:
+  "phy"         USB PHY reference clock
+  "core"        Protocol engine clock
+  "iface"       Interface bus clock
+  "alt_core"    Protocol engine clock for targets with asynchronous
+                reset methodology. (optional)
+
+- vdccx-supply: phandle to the regulator for the vdd supply for
+                digital circuit operation.
+- v1p8-supply:  phandle to the regulator for the 1.8V supply
+- v3p3-supply:  phandle to the regulator for the 3.3V supply
+
+- resets:       A list of phandle + reset-specifier pairs for the
+                resets listed in reset-names
+- reset-names:  Should contain the following:
+  "phy"         USB PHY controller reset
+  "link"        USB LINK controller reset
+
+- qcom,otg-control: OTG control (VBUS and ID notifications) can be one of
+                1 - PHY control
+                2 - PMIC control
+
+Optional properties:
+- dr_mode:      One of "host", "peripheral" or "otg". Defaults to "otg"
+
+- qcom,phy-init-sequence: PHY configuration sequence values. This is related to Device
+                Mode Eye Diagram test. Start address at which these values will be
+                written is ULPI_EXT_VENDOR_SPECIFIC. Value of -1 is reserved as
+                "do not overwrite default value at this address".
+                For example: qcom,phy-init-sequence = < -1 0x63 >;
+                Will update only value at address ULPI_EXT_VENDOR_SPECIFIC + 1.
+
+Example HSUSB OTG controller device node:
+
+    usb@f9a55000 {
+        compatible = "qcom,usb-otg-snps";
+        reg = <0xf9a55000 0x400>;
+        interrupts = <0 134 0>;
+        dr_mode = "peripheral";
+
+        clocks = <&gcc GCC_XO_CLK>, <&gcc GCC_USB_HS_SYSTEM_CLK>,
+                <&gcc GCC_USB_HS_AHB_CLK>;
+
+        clock-names = "phy", "core", "iface";
+
+        vddcx-supply = <&pm8841_s2_corner>;
+        v1p8-supply = <&pm8941_l6>;
+        v3p3-supply = <&pm8941_l24>;
+
+        resets = <&gcc GCC_USB2A_PHY_BCR>, <&gcc GCC_USB_HS_BCR>;
+        reset-names = "phy", "link";
+
+        qcom,otg-control = <1>;
+        qcom,phy-init-sequence = < -1 0x63 >;
+	};
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 31fb916..298820f 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -30,9 +30,12 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
+#include <linux/of_device.h>

 #include <linux/usb.h>
 #include <linux/usb/otg.h>
+#include <linux/usb/of.h>
 #include <linux/usb/ulpi.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/hcd.h>
@@ -217,16 +220,16 @@ static struct usb_phy_io_ops msm_otg_io_ops = {
 static void ulpi_init(struct msm_otg *motg)
 {
 	struct msm_otg_platform_data *pdata = motg->pdata;
-	int *seq = pdata->phy_init_seq;
+	int *seq = pdata->phy_init_seq, idx;
+	u32 addr = ULPI_EXT_VENDOR_SPECIFIC;

-	if (!seq)
-		return;
+	for (idx = 0; idx < pdata->phy_init_sz; idx++) {
+		if (seq[idx] == -1)
+			continue;

-	while (seq[0] >= 0) {
 		dev_vdbg(motg->phy.dev, "ulpi: write 0x%02x to 0x%02x\n",
-				seq[0], seq[1]);
-		ulpi_write(&motg->phy, seq[0], seq[1]);
-		seq += 2;
+				seq[idx], addr + idx);
+		ulpi_write(&motg->phy, seq[idx], addr + idx);
 	}
 }

@@ -1343,25 +1346,87 @@ static void msm_otg_debugfs_cleanup(void)
 	debugfs_remove(msm_otg_dbg_root);
 }

+static struct of_device_id msm_otg_dt_match[] = {
+	{
+		.compatible = "qcom,usb-otg-ci",
+		.data = (void *) CI_45NM_INTEGRATED_PHY
+	}, {
+		.compatible = "qcom,usb-otg-snps",
+		.data = (void *) SNPS_28NM_INTEGRATED_PHY
+	}, {}
+};
+
+static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
+{
+	struct msm_otg_platform_data *pdata;
+	const struct of_device_id *id;
+	struct device_node *node = pdev->dev.of_node;
+	struct property *prop;
+	int len, ret;
+	u32 val;
+
+	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
+	if (!pdata)
+		return -ENOMEM;
+
+	motg->pdata = pdata;
+
+	id = of_match_device(msm_otg_dt_match, &pdev->dev);
+	pdata->phy_type = (int) id->data;
+
+	pdata->mode = of_usb_get_dr_mode(node);
+	if (pdata->mode == USB_DR_MODE_UNKNOWN)
+		pdata->mode = USB_DR_MODE_OTG;
+
+	pdata->otg_control = OTG_PHY_CONTROL;
+	if (!of_property_read_u32(node, "qcom,otg-control", &val))
+		if (val == OTG_PMIC_CONTROL)
+			pdata->otg_control = val;
+
+	prop = of_find_property(node, "qcom,phy-init-sequence", &len);
+	if (!prop || !len)
+		return 0;
+
+	pdata->phy_init_seq = devm_kzalloc(&pdev->dev, len, GFP_KERNEL);
+	if (!pdata->phy_init_seq)
+		return 0;
+
+	len /= sizeof(u32);
+
+	if (len >= ULPI_EXT_VENDOR_SPECIFIC) {
+		dev_warn(&pdev->dev, "Too big PHY init sequence %d\n", len);
+		return 0;
+	}
+
+	ret = of_property_read_u32_array(node, "qcom,phy-init-sequence",
+					 pdata->phy_init_seq, len);
+	if (!ret)
+		pdata->phy_init_sz = len;
+	return 0;
+}
+
 static int __init msm_otg_probe(struct platform_device *pdev)
 {
 	int ret = 0;
+	struct device_node *np = pdev->dev.of_node;
+	struct msm_otg_platform_data *pdata;
 	struct resource *res;
 	struct msm_otg *motg;
 	struct usb_phy *phy;

-	dev_info(&pdev->dev, "msm_otg probe\n");
-	if (!dev_get_platdata(&pdev->dev)) {
-		dev_err(&pdev->dev, "No platform data given. Bailing out\n");
-		return -ENODEV;
-	}
-
 	motg = devm_kzalloc(&pdev->dev, sizeof(struct msm_otg), GFP_KERNEL);
 	if (!motg) {
 		dev_err(&pdev->dev, "unable to allocate msm_otg\n");
 		return -ENOMEM;
 	}

+	pdata = dev_get_platdata(&pdev->dev);
+	if (!pdata) {
+		ret = msm_otg_read_dt(pdev, motg);
+		if (ret)
+			return ret;
+	}
+
 	motg->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
 				     GFP_KERNEL);
 	if (!motg->phy.otg) {
@@ -1369,17 +1434,17 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}

-	motg->pdata = dev_get_platdata(&pdev->dev);
 	phy = &motg->phy;
 	phy->dev = &pdev->dev;

-	motg->phy_reset_clk = devm_clk_get(&pdev->dev, "usb_phy_clk");
+	motg->phy_reset_clk = devm_clk_get(&pdev->dev,
+					   np ? "phy" : "usb_phy_clk");
 	if (IS_ERR(motg->phy_reset_clk)) {
 		dev_err(&pdev->dev, "failed to get usb_phy_clk\n");
 		return PTR_ERR(motg->phy_reset_clk);
 	}

-	motg->clk = devm_clk_get(&pdev->dev, "usb_hs_clk");
+	motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk");
 	if (IS_ERR(motg->clk)) {
 		dev_err(&pdev->dev, "failed to get usb_hs_clk\n");
 		return PTR_ERR(motg->clk);
@@ -1391,7 +1456,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	 * operation and USB core cannot tolerate frequency changes on
 	 * CORE CLK.
 	 */
-	motg->pclk = devm_clk_get(&pdev->dev, "usb_hs_pclk");
+	motg->pclk = devm_clk_get(&pdev->dev, np ? "iface" : "usb_hs_pclk");
 	if (IS_ERR(motg->pclk)) {
 		dev_err(&pdev->dev, "failed to get usb_hs_pclk\n");
 		return PTR_ERR(motg->pclk);
@@ -1402,7 +1467,8 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	 * clock is introduced to remove the dependency on AXI
 	 * bus frequency.
 	 */
-	motg->core_clk = devm_clk_get(&pdev->dev, "usb_hs_core_clk");
+	motg->core_clk = devm_clk_get(&pdev->dev,
+				      np ? "alt_core" : "usb_hs_core_clk");

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	motg->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
@@ -1490,8 +1556,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, motg);
 	device_init_wakeup(&pdev->dev, 1);

-	if (motg->pdata->mode == USB_DR_MODE_OTG &&
-			motg->pdata->otg_control == OTG_USER_CONTROL) {
+	if (motg->pdata->mode == USB_DR_MODE_OTG) {
 		ret = msm_otg_debugfs_init(motg);
 		if (ret)
 			dev_dbg(&pdev->dev, "Can not create mode change file\n");
@@ -1637,6 +1702,8 @@ static const struct dev_pm_ops msm_otg_dev_pm_ops = {
 				msm_otg_runtime_idle)
 };

+MODULE_DEVICE_TABLE(of, msm_otg_dt_match);
+
 static struct platform_driver msm_otg_driver = {
 	.probe = msm_otg_probe,
 	.remove = msm_otg_remove,
@@ -1644,6 +1711,7 @@ static struct platform_driver msm_otg_driver = {
 		.name = DRIVER_NAME,
 		.owner = THIS_MODULE,
 		.pm = &msm_otg_dev_pm_ops,
+		.of_match_table = msm_otg_dt_match,
 	},
 };

diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 262ed80..bd68299 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -100,8 +100,9 @@ enum usb_chg_type {
 /**
  * struct msm_otg_platform_data - platform device data
  *              for msm_otg driver.
- * @phy_init_seq: PHY configuration sequence. val, reg pairs
- *              terminated by -1.
+ * @phy_init_seq: PHY configuration sequence values. Value of -1 is reserved as
+ *              "do not overwrite default vaule at this address".
+ * @phy_init_sz: PHY configuration sequence size.
  * @vbus_power: VBUS power on/off routine.
  * @power_budget: VBUS power budget in mA (0 will be treated as 500mA).
  * @mode: Supported mode (OTG/peripheral/host).
@@ -109,6 +110,7 @@ enum usb_chg_type {
  */
 struct msm_otg_platform_data {
 	int *phy_init_seq;
+	int phy_init_sz;
 	void (*vbus_power)(bool on);
 	unsigned power_budget;
 	enum usb_dr_mode mode;
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (8 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 09/14] usb: phy: msm: Add device tree support and binding information Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 12:34   ` Sergei Shtylyov
  2014-03-05 10:13 ` [PATCH v5 11/14] usb: phy: msm: Add support for secondary PHY control Ivan T. Ivanov
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/phy/phy-msm-usb.c |   30 ++++++++++++++++++++++--------
 include/linux/usb/msm_hsusb.h |    3 +++
 2 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 298820f..7e5c4ab 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -32,6 +32,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/reset.h>

 #include <linux/usb.h>
 #include <linux/usb/otg.h>
@@ -235,12 +236,16 @@ static void ulpi_init(struct msm_otg *motg)

 static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
 {
-	int ret = 0;
+	int ret;

-	if (!motg->pdata->link_clk_reset)
-		return ret;
+	if (motg->pdata->link_clk_reset)
+		ret = motg->pdata->link_clk_reset(motg->clk, assert);
+	else
+		if (assert)
+			ret = reset_control_assert(motg->link_rst);
+		else
+			ret = reset_control_deassert(motg->link_rst);

-	ret = motg->pdata->link_clk_reset(motg->clk, assert);
 	if (ret)
 		dev_err(motg->phy.dev, "usb link clk reset %s failed\n",
 			assert ? "assert" : "deassert");
@@ -250,12 +255,13 @@ static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)

 static int msm_otg_phy_clk_reset(struct msm_otg *motg)
 {
-	int ret = 0;
+	int ret;

-	if (!motg->pdata->phy_clk_reset)
-		return ret;
+	if (motg->pdata->phy_clk_reset)
+		ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
+	else
+		ret = reset_control_reset(motg->phy_rst);

-	ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
 	if (ret)
 		dev_err(motg->phy.dev, "usb phy clk reset failed\n");

@@ -1374,6 +1380,14 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 	id = of_match_device(msm_otg_dt_match, &pdev->dev);
 	pdata->phy_type = (int) id->data;

+	motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
+	if (IS_ERR(motg->link_rst))
+		return PTR_ERR(motg->link_rst);
+
+	motg->phy_rst = devm_reset_control_get(&pdev->dev, "phy");
+	if (IS_ERR(motg->phy_rst))
+		return PTR_ERR(motg->phy_rst);
+
 	pdata->mode = of_usb_get_dr_mode(node);
 	if (pdata->mode == USB_DR_MODE_UNKNOWN)
 		pdata->mode = USB_DR_MODE_OTG;
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index bd68299..4e5d916 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -165,6 +165,9 @@ struct msm_otg {
 	struct regulator *v3p3;
 	struct regulator *v1p8;
 	struct regulator *vddcx;
+
+	struct reset_control *phy_rst;
+	struct reset_control *link_rst;
 };

 #endif
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 11/14] usb: phy: msm: Add support for secondary PHY control
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (9 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 12/14] usb: phy: msm: Correct USB PHY Reset sequence for newer platform Ivan T. Ivanov
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, David Brown, devicetree,
	linux-doc, linux-kernel, linux-usb, linux-arm-msm, Manu Gautam

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Allow support to use 2nd HSPHY with USB2 Core.
Some platforms may have configuration to allow USB controller
work with any of the two HSPHYs present. By default driver
configures USB core to use primary HSPHY. Add support to allow
user select 2nd HSPHY using DT parameter.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Manu Gautam <mgautam@codeaurora.org>
---
 .../devicetree/bindings/usb/msm-hsusb.txt          |    6 +++++
 drivers/usb/phy/phy-msm-usb.c                      |   24 ++++++++++++++++++--
 include/linux/usb/msm_hsusb.h                      |    1 +
 include/linux/usb/msm_hsusb_hw.h                   |    1 +
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index ee4123d..0669667 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -59,6 +59,12 @@ Optional properties:
                 For example: qcom,phy-init-sequence = < -1 0x63 >;
                 Will update only value at address ULPI_EXT_VENDOR_SPECIFIC + 1.

+- qcom,phy-num: Select number of pyco-phy to use, can be one of
+                0 - PHY one, default
+                1 - Second PHY
+                Some platforms may have configuration to allow USB
+                controller work with any of the two HSPHYs present.
+
 Example HSUSB OTG controller device node:

     usb@f9a55000 {
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 7e5c4ab..f3e9389 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -315,6 +315,9 @@ static int msm_otg_phy_reset(struct msm_otg *motg)
 	if (!retries)
 		return -ETIMEDOUT;

+	if (motg->phy_number)
+		writel(readl(USB_PHY_CTRL2) | BIT(16), USB_PHY_CTRL2);
+
 	dev_info(motg->phy.dev, "phy_reset: success\n");
 	return 0;
 }
@@ -369,6 +372,9 @@ static int msm_otg_reset(struct usb_phy *phy)
 		ulpi_write(phy, ulpi_val, ULPI_USB_INT_EN_FALL);
 	}

+	if (motg->phy_number)
+		writel(readl(USB_PHY_CTRL2) | BIT(16), USB_PHY_CTRL2);
+
 	return 0;
 }

@@ -405,6 +411,7 @@ static int msm_otg_suspend(struct msm_otg *motg)
 	struct usb_phy *phy = &motg->phy;
 	struct usb_bus *bus = phy->otg->host;
 	struct msm_otg_platform_data *pdata = motg->pdata;
+	void __iomem *addr;
 	int cnt = 0;

 	if (atomic_read(&motg->in_lpm))
@@ -464,9 +471,13 @@ static int msm_otg_suspend(struct msm_otg *motg)
 	 */
 	writel(readl(USB_USBCMD) | ASYNC_INTR_CTRL | ULPI_STP_CTRL, USB_USBCMD);

+	addr = USB_PHY_CTRL;
+	if (motg->phy_number)
+		addr = USB_PHY_CTRL2;
+
 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
 			motg->pdata->otg_control == OTG_PMIC_CONTROL)
-		writel(readl(USB_PHY_CTRL) | PHY_RETEN, USB_PHY_CTRL);
+		writel(readl(addr) | PHY_RETEN, addr);

 	clk_disable_unprepare(motg->pclk);
 	clk_disable_unprepare(motg->clk);
@@ -496,6 +507,7 @@ static int msm_otg_resume(struct msm_otg *motg)
 {
 	struct usb_phy *phy = &motg->phy;
 	struct usb_bus *bus = phy->otg->host;
+	void __iomem *addr;
 	int cnt = 0;
 	unsigned temp;

@@ -509,9 +521,14 @@ static int msm_otg_resume(struct msm_otg *motg)

 	if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY &&
 			motg->pdata->otg_control == OTG_PMIC_CONTROL) {
+
+		addr = USB_PHY_CTRL;
+		if (motg->phy_number)
+			addr = USB_PHY_CTRL2;
+
 		msm_hsusb_ldo_set_mode(motg, 1);
 		msm_hsusb_config_vddcx(motg, 1);
-		writel(readl(USB_PHY_CTRL) & ~PHY_RETEN, USB_PHY_CTRL);
+		writel(readl(addr) & ~PHY_RETEN, addr);
 	}

 	temp = readl(USB_USBCMD);
@@ -1397,6 +1414,9 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 		if (val == OTG_PMIC_CONTROL)
 			pdata->otg_control = val;

+	if (!of_property_read_u32(node, "qcom,phy-num", &val) && val < 2)
+		motg->phy_number = val;
+
 	prop = of_find_property(node, "qcom,phy-init-sequence", &len);
 	if (!prop || !len)
 		return 0;
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 4e5d916..4628f1a 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -158,6 +158,7 @@ struct msm_otg {
 	atomic_t in_lpm;
 	int async_int;
 	unsigned cur_power;
+	int phy_number;
 	struct delayed_work chg_work;
 	enum usb_chg_state chg_state;
 	enum usb_chg_type chg_type;
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h
index 6e97a2d..e6d7035 100644
--- a/include/linux/usb/msm_hsusb_hw.h
+++ b/include/linux/usb/msm_hsusb_hw.h
@@ -25,6 +25,7 @@
 #define USB_OTGSC            (MSM_USB_BASE + 0x01A4)
 #define USB_USBMODE          (MSM_USB_BASE + 0x01A8)
 #define USB_PHY_CTRL         (MSM_USB_BASE + 0x0240)
+#define USB_PHY_CTRL2        (MSM_USB_BASE + 0x0278)

 #define USBCMD_RESET   2
 #define USB_USBINTR          (MSM_USB_BASE + 0x0148)
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 12/14] usb: phy: msm: Correct USB PHY Reset sequence for newer platform
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (10 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 11/14] usb: phy: msm: Add support for secondary PHY control Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 13/14] usb: phy: msm: Handle disconnect events Ivan T. Ivanov
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm, Mayank Rana

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

On few legacy platforms, USB PHY is having dedicated reset clk.
It is used to reset USB PHY after putting USB PHY into low power
mode and for calibration of USB PHY. Putting USB PHY into low
power mode is causing ulpi read/write timeout as expected. USB PHY
reset clk is not available on newer platform.

For 28nm PHY, reset USB PHY after resestting USB LINK.
Also reset USB PHY using USB_PHY_PON bit with USB_OTG_HS_PHY_CTRL
register after programming USB PHY Override registers as suggested
with hardware programming guidelines.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Mayank Rana <mrana@codeaurora.org>
---
 drivers/usb/phy/phy-msm-usb.c    |  141 ++++++++++++++++++++++++--------------
 include/linux/usb/msm_hsusb_hw.h |    5 ++
 2 files changed, 94 insertions(+), 52 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index f3e9389..8068555 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -48,6 +48,7 @@
 #define DRIVER_NAME	"msm_otg"

 #define ULPI_IO_TIMEOUT_USEC	(10 * 1000)
+#define LINK_RESET_TIMEOUT_USEC	(250 * 1000)

 #define USB_PHY_3P3_VOL_MIN	3050000 /* uV */
 #define USB_PHY_3P3_VOL_MAX	3300000 /* uV */
@@ -268,77 +269,35 @@ static int msm_otg_phy_clk_reset(struct msm_otg *motg)
 	return ret;
 }

-static int msm_otg_phy_reset(struct msm_otg *motg)
+static int msm_link_reset(struct msm_otg *motg)
 {
 	u32 val;
 	int ret;
-	int retries;

 	ret = msm_otg_link_clk_reset(motg, 1);
 	if (ret)
 		return ret;
-	ret = msm_otg_phy_clk_reset(motg);
-	if (ret)
-		return ret;
-	ret = msm_otg_link_clk_reset(motg, 0);
-	if (ret)
-		return ret;

-	val = readl(USB_PORTSC) & ~PORTSC_PTS_MASK;
-	writel(val | PORTSC_PTS_ULPI, USB_PORTSC);
-
-	for (retries = 3; retries > 0; retries--) {
-		ret = ulpi_write(&motg->phy, ULPI_FUNC_CTRL_SUSPENDM,
-				ULPI_CLR(ULPI_FUNC_CTRL));
-		if (!ret)
-			break;
-		ret = msm_otg_phy_clk_reset(motg);
-		if (ret)
-			return ret;
-	}
-	if (!retries)
-		return -ETIMEDOUT;
+	/* wait for 1ms delay as suggested in HPG. */
+	usleep_range(1000, 1200);

-	/* This reset calibrates the phy, if the above write succeeded */
-	ret = msm_otg_phy_clk_reset(motg);
+	ret = msm_otg_link_clk_reset(motg, 0);
 	if (ret)
 		return ret;

-	for (retries = 3; retries > 0; retries--) {
-		ret = ulpi_read(&motg->phy, ULPI_DEBUG);
-		if (ret != -ETIMEDOUT)
-			break;
-		ret = msm_otg_phy_clk_reset(motg);
-		if (ret)
-			return ret;
-	}
-	if (!retries)
-		return -ETIMEDOUT;
-
 	if (motg->phy_number)
 		writel(readl(USB_PHY_CTRL2) | BIT(16), USB_PHY_CTRL2);

-	dev_info(motg->phy.dev, "phy_reset: success\n");
+	val = readl(USB_PORTSC) & ~PORTSC_PTS_MASK;
+	writel(val | PORTSC_PTS_ULPI, USB_PORTSC);
+
 	return 0;
 }

-#define LINK_RESET_TIMEOUT_USEC		(250 * 1000)
 static int msm_otg_reset(struct usb_phy *phy)
 {
 	struct msm_otg *motg = container_of(phy, struct msm_otg, phy);
-	struct msm_otg_platform_data *pdata = motg->pdata;
 	int cnt = 0;
-	int ret;
-	u32 val = 0;
-	u32 ulpi_val = 0;
-
-	ret = msm_otg_phy_reset(motg);
-	if (ret) {
-		dev_err(phy->dev, "phy_reset failed\n");
-		return ret;
-	}
-
-	ulpi_init(motg);

 	writel(USBCMD_RESET, USB_USBCMD);
 	while (cnt < LINK_RESET_TIMEOUT_USEC) {
@@ -352,11 +311,87 @@ static int msm_otg_reset(struct usb_phy *phy)

 	/* select ULPI phy */
 	writel(0x80000000, USB_PORTSC);
+	writel(0x0, USB_AHBBURST);
+	writel(0x08, USB_AHBMODE);
+
+	if (motg->phy_number)
+		writel(readl(USB_PHY_CTRL2) | BIT(16), USB_PHY_CTRL2);
+	return 0;
+}
+
+static void msm_phy_reset(struct msm_otg *motg)
+{
+	void __iomem *addr;
+	u32 val;
+
+	if (motg->pdata->phy_type != SNPS_28NM_INTEGRATED_PHY) {
+		msm_otg_phy_clk_reset(motg);
+		return;
+	}
+
+	addr = USB_PHY_CTRL;
+	if (motg->phy_number)
+		addr = USB_PHY_CTRL2;
+
+	/* Assert USB PHY_PON */
+	val =  readl(addr);
+	val |= PHY_POR_ASSERT;
+	writel(val, addr);
+
+	/* wait for minimum 10 microseconds as suggested in HPG. */
+	usleep_range(10, 15);
+
+	/* Deassert USB PHY_PON */
+	val =  readl(addr);
+	val &= ~PHY_POR_ASSERT;
+	writel(val, addr);
+}
+
+static int msm_usb_reset(struct usb_phy *phy)
+{
+	struct msm_otg *motg = container_of(phy, struct msm_otg, phy);
+	int ret;
+
+	if (!IS_ERR(motg->core_clk))
+		clk_prepare_enable(motg->core_clk);
+
+	ret = msm_link_reset(motg);
+	if (ret) {
+		dev_err(phy->dev, "phy_reset failed\n");
+		return ret;
+	}
+
+	ret = msm_otg_reset(&motg->phy);
+	if (ret) {
+		dev_err(phy->dev, "link reset failed\n");
+		return ret;
+	}

 	msleep(100);

-	writel(0x0, USB_AHBBURST);
-	writel(0x00, USB_AHBMODE);
+	/* Reset USB PHY after performing USB Link RESET */
+	msm_phy_reset(motg);
+
+	if (!IS_ERR(motg->core_clk))
+		clk_disable_unprepare(motg->core_clk);
+
+	return 0;
+}
+
+static int msm_phy_init(struct usb_phy *phy)
+{
+	struct msm_otg *motg = container_of(phy, struct msm_otg, phy);
+	struct msm_otg_platform_data *pdata = motg->pdata;
+	u32 val, ulpi_val = 0;
+
+	/* Program USB PHY Override registers. */
+	ulpi_init(motg);
+
+	/*
+	 * It is recommended in HPG to reset USB PHY after programming
+	 * USB PHY Override registers.
+	 */
+	msm_phy_reset(motg);

 	if (pdata->otg_control == OTG_PHY_CONTROL) {
 		val = readl(USB_OTGSC);
@@ -1572,7 +1607,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 		goto disable_ldo;
 	}

-	phy->init = msm_otg_reset;
+	phy->init = msm_phy_init;
 	phy->set_power = msm_otg_set_power;

 	phy->io_ops = &msm_otg_io_ops;
@@ -1581,6 +1616,8 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	phy->otg->set_host = msm_otg_set_host;
 	phy->otg->set_peripheral = msm_otg_set_peripheral;

+	msm_usb_reset(phy);
+
 	ret = usb_add_phy(&motg->phy, USB_PHY_TYPE_USB2);
 	if (ret) {
 		dev_err(&pdev->dev, "usb_add_phy failed\n");
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h
index e6d7035..575c743 100644
--- a/include/linux/usb/msm_hsusb_hw.h
+++ b/include/linux/usb/msm_hsusb_hw.h
@@ -42,9 +42,14 @@
 #define ULPI_DATA(n)          ((n) & 255)
 #define ULPI_DATA_READ(n)     (((n) >> 8) & 255)

+/* synopsys 28nm phy registers */
+#define ULPI_PWR_CLK_MNG_REG	0x88
+#define OTG_COMP_DISABLE	BIT(0)
+
 #define ASYNC_INTR_CTRL         (1 << 29) /* Enable async interrupt */
 #define ULPI_STP_CTRL           (1 << 30) /* Block communication with PHY */
 #define PHY_RETEN               (1 << 1) /* PHY retention enable/disable */
+#define PHY_POR_ASSERT		(1 << 0) /* USB2 28nm PHY POR ASSERT */

 /* OTG definitions */
 #define OTGSC_INTSTS_MASK	(0x7f << 16)
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 13/14] usb: phy: msm: Handle disconnect events
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (11 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 12/14] usb: phy: msm: Correct USB PHY Reset sequence for newer platform Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-05 10:13 ` [PATCH v5 14/14] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX Ivan T. Ivanov
  2014-03-06  1:54 ` [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Tim Bird
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm, Pavankumar Kondeti

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Put the transceiver in non-driving mode. Otherwise host
may not detect soft-disconnection.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
---
 drivers/usb/phy/phy-msm-usb.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 8068555..f1e74a7 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -235,6 +235,23 @@ static void ulpi_init(struct msm_otg *motg)
 	}
 }

+static int msm_phy_notify_disconnect(struct usb_phy *phy,
+				   enum usb_device_speed speed)
+{
+	int val;
+
+	/*
+	 * Put the transceiver in non-driving mode. Otherwise host
+	 * may not detect soft-disconnection.
+	 */
+	val = ulpi_read(phy, ULPI_FUNC_CTRL);
+	val &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
+	val |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
+	ulpi_write(phy, val, ULPI_FUNC_CTRL);
+
+	return 0;
+}
+
 static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
 {
 	int ret;
@@ -1609,6 +1626,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)

 	phy->init = msm_phy_init;
 	phy->set_power = msm_otg_set_power;
+	phy->notify_disconnect = msm_phy_notify_disconnect;

 	phy->io_ops = &msm_otg_io_ops;

--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v5 14/14] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (12 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 13/14] usb: phy: msm: Handle disconnect events Ivan T. Ivanov
@ 2014-03-05 10:13 ` Ivan T. Ivanov
  2014-03-06  1:54 ` [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Tim Bird
  14 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-05 10:13 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, Felipe Balbi, Grant Likely
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, David Brown, devicetree,
	linux-doc, linux-kernel, linux-usb, linux-arm-msm, Mayank Rana

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

New platform uses RBCPR hardware feature, with that voting for
absolute voltage of VDD CX is not required. Hence vote for corner of
VDD CX which uses nominal corner voltage on VDD CX.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Mayank Rana <mrana@codeaurora.org>
---
 .../devicetree/bindings/usb/msm-hsusb.txt          |    5 +++
 drivers/usb/phy/phy-msm-usb.c                      |   35 +++++++++++++++-----
 include/linux/usb/msm_hsusb.h                      |    1 +
 3 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index 0669667..2826f2a 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -65,6 +65,10 @@ Optional properties:
                 Some platforms may have configuration to allow USB
                 controller work with any of the two HSPHYs present.

+- qcom,vdd-levels: This property must be a list of three integer values
+                (no, min, max) where each value represents either a voltage
+                in microvolts or a value corresponding to voltage corner.
+
 Example HSUSB OTG controller device node:

     usb@f9a55000 {
@@ -87,4 +91,5 @@ Example HSUSB OTG controller device node:

         qcom,otg-control = <1>;
         qcom,phy-init-sequence = < -1 0x63 >;
+        qcom,vdd-levels = <1 5 7>;
 	};
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index f1e74a7..574f560 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -62,6 +62,13 @@

 #define USB_PHY_VDD_DIG_VOL_MIN	1000000 /* uV */
 #define USB_PHY_VDD_DIG_VOL_MAX	1320000 /* uV */
+#define USB_PHY_SUSP_DIG_VOL	500000  /* uV */
+
+enum vdd_levels {
+	VDD_LEVEL_NONE = 0,
+	VDD_LEVEL_MIN,
+	VDD_LEVEL_MAX,
+};

 static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 {
@@ -69,8 +76,8 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)

 	if (init) {
 		ret = regulator_set_voltage(motg->vddcx,
-				USB_PHY_VDD_DIG_VOL_MIN,
-				USB_PHY_VDD_DIG_VOL_MAX);
+				motg->vdd_levels[VDD_LEVEL_MIN],
+				motg->vdd_levels[VDD_LEVEL_MAX]);
 		if (ret) {
 			dev_err(motg->phy.dev, "Cannot set vddcx voltage\n");
 			return ret;
@@ -81,7 +88,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init)
 			dev_err(motg->phy.dev, "unable to enable hsusb vddcx\n");
 	} else {
 		ret = regulator_set_voltage(motg->vddcx, 0,
-			USB_PHY_VDD_DIG_VOL_MAX);
+				motg->vdd_levels[VDD_LEVEL_MAX]);
 		if (ret)
 			dev_err(motg->phy.dev, "Cannot set vddcx voltage\n");
 		ret = regulator_disable(motg->vddcx);
@@ -435,17 +442,16 @@ static int msm_phy_init(struct usb_phy *phy)

 #ifdef CONFIG_PM

-#define USB_PHY_SUSP_DIG_VOL  500000
 static int msm_hsusb_config_vddcx(struct msm_otg *motg, int high)
 {
-	int max_vol = USB_PHY_VDD_DIG_VOL_MAX;
+	int max_vol = motg->vdd_levels[VDD_LEVEL_MAX];
 	int min_vol;
 	int ret;

 	if (high)
-		min_vol = USB_PHY_VDD_DIG_VOL_MIN;
+		min_vol = motg->vdd_levels[VDD_LEVEL_MIN];
 	else
-		min_vol = USB_PHY_SUSP_DIG_VOL;
+		min_vol = motg->vdd_levels[VDD_LEVEL_NONE];

 	ret = regulator_set_voltage(motg->vddcx, min_vol, max_vol);
 	if (ret) {
@@ -1438,7 +1444,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 	struct device_node *node = pdev->dev.of_node;
 	struct property *prop;
 	int len, ret;
-	u32 val;
+	u32 val, tmp[3];

 	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
@@ -1469,6 +1475,19 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 	if (!of_property_read_u32(node, "qcom,phy-num", &val) && val < 2)
 		motg->phy_number = val;

+	motg->vdd_levels[VDD_LEVEL_NONE] = USB_PHY_SUSP_DIG_VOL;
+	motg->vdd_levels[VDD_LEVEL_MIN] = USB_PHY_VDD_DIG_VOL_MIN;
+	motg->vdd_levels[VDD_LEVEL_MAX] = USB_PHY_VDD_DIG_VOL_MAX;
+
+	if (of_get_property(node, "qcom,vdd-levels", &len) &&
+	    len == sizeof(tmp)) {
+		of_property_read_u32_array(node, "qcom,vdd-levels",
+					   tmp, len / sizeof(*tmp));
+		motg->vdd_levels[VDD_LEVEL_NONE] = tmp[VDD_LEVEL_NONE];
+		motg->vdd_levels[VDD_LEVEL_MIN] = tmp[VDD_LEVEL_MIN];
+		motg->vdd_levels[VDD_LEVEL_MAX] = tmp[VDD_LEVEL_MAX];
+	}
+
 	prop = of_find_property(node, "qcom,phy-init-sequence", &len);
 	if (!prop || !len)
 		return 0;
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 4628f1a..b0a3924 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -169,6 +169,7 @@ struct msm_otg {

 	struct reset_control *phy_rst;
 	struct reset_control *link_rst;
+	int vdd_levels[3];
 };

 #endif
--
1.7.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets
  2014-03-05 10:13 ` [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets Ivan T. Ivanov
@ 2014-03-05 12:34   ` Sergei Shtylyov
  2014-03-06 16:35     ` Ivan T. Ivanov
  0 siblings, 1 reply; 21+ messages in thread
From: Sergei Shtylyov @ 2014-03-05 12:34 UTC (permalink / raw)
  To: Ivan T. Ivanov, Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-arm-msm

Hello.

On 05-03-2014 14:13, Ivan T. Ivanov wrote:

> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> ---
>   drivers/usb/phy/phy-msm-usb.c |   30 ++++++++++++++++++++++--------
>   include/linux/usb/msm_hsusb.h |    3 +++
>   2 files changed, 25 insertions(+), 8 deletions(-)

> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index 298820f..7e5c4ab 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
[...]
> @@ -235,12 +236,16 @@ static void ulpi_init(struct msm_otg *motg)
>
>   static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
>   {
> -	int ret = 0;
> +	int ret;
>
> -	if (!motg->pdata->link_clk_reset)
> -		return ret;
> +	if (motg->pdata->link_clk_reset)
> +		ret = motg->pdata->link_clk_reset(motg->clk, assert);
> +	else
> +		if (assert)

    Kernel style assumes:

	else if (assert)

> +			ret = reset_control_assert(motg->link_rst);
> +		else
> +			ret = reset_control_deassert(motg->link_rst);
>
[...]

WBR, Sergei


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support
  2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
                   ` (13 preceding siblings ...)
  2014-03-05 10:13 ` [PATCH v5 14/14] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX Ivan T. Ivanov
@ 2014-03-06  1:54 ` Tim Bird
  2014-03-08  0:15   ` Felipe Balbi
  14 siblings, 1 reply; 21+ messages in thread
From: Tim Bird @ 2014-03-06  1:54 UTC (permalink / raw)
  To: Ivan T. Ivanov
  Cc: Kumar Gala, David Brown, Linux Kernel Mailing List,
	linux-arm-msm, linux-usb

Ivan,

I'm still unsuccessful at getting this patch set to work on my kernel.
 Below is a sequence of register dumps showing the boot (and reset
during boot).  It shows a status transition in my kernel when I pull
the controller out of reset, and re-write PORTSC:PTS to ULPI
(simultaneously writing other bits in PORTSC to 0) This is at 3.109535
in the boot log below.  The status I'm seeing back from the other
registers doesn't make sense, and is different from what I see in 3.4
(where USB runs successfully on the board).  Is there some connection
between the PMIC and the USB that I'm missing?  The transition from
vbus B session valid to vbus B session end seems wrong (as does the
ULPII transitioning to 1).

In measuring voltages on the board, it appears that that vbus from the
connector (at 5V) gets routed through the PMIC, but comes out at 3.3V
on its way to the PHY VBUS input (measured at R179).  This seems
really weird - maybe you can shed some light on what is going on here.

Could you possibly send me your zImage and dtb file, so I can test
them on my board to make sure that the hardware is working?

Thanks,
 -- Tim

Here is my bootup sequence:
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] TRB: version 88888
[    0.000000] Linux version 3.13.0-rc6-00148-g1076101-dirty
(10102229@ussvlx8980) (gcc version 4.6.x-
google 20120106 (prerelease) (GCC) ) #79 SMP PREEMPT Wed Mar 5
17:41:54 PST 2014
[    0.000000] CPU: ARMv7 Processor [512f06f0] revision 0 (ARMv7),
cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT
instruction cache
[    0.000000] Machine model: Qualcomm APQ8074 Dragonboard
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 524288
[    0.000000] free_area_init_node: node 0, pgdat c08abac0,
node_mem_map c0922000
[    0.000000]   Normal zone: 1520 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 194560 pages, LIFO batch:31
[    0.000000]   HighMem zone: 2576 pages used for memmap
[    0.000000]   HighMem zone: 329728 pages, LIFO batch:31
[    0.000000] PERCPU: Embedded 8 pages/cpu @c1935000 s12224 r8192
d12352 u32768
[    0.000000] pcpu-alloc: s12224 r8192 d12352 u32768 alloc=8*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 522768
[    0.000000] Kernel command line: console=ttyMSM,115200,n8
androidboot.hardware=qcom user_debug=31 m
axcpus=2 msm_rtb.filter=0x37 ehci-hcd.park=3 earlyprintk debug
androidboot.emmc=true androidboot.seria
lno=40081a14 androidboot.baseband=apq
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7,
524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144
bytes)
[    0.000000] Memory: 2068932K/2097152K available (4458K kernel code,
257K rwdata, 1820K rodata, 283K
 init, 443K bss, 28220K reserved, 1318912K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0829de8   (6280 kB)
[    0.000000]       .init : 0xc082a000 - 0xc0870fc0   ( 284 kB)
[    0.000000]       .data : 0xc0872000 - 0xc08b240c   ( 258 kB)
[    0.000000]        .bss : 0xc08b240c - 0xc092139c   ( 444 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4,
Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected cp15 and mmio timer(s) running at 19.20MHz
(virt/virt).
[    0.000000] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps
every 3579139424256ns
[    0.000000] Switching to timer-based delay loop
[    0.000000] Console: colour dummy device 80x30
[    0.009136] Calibrating delay loop (skipped), value calculated
using timer frequency.. 38.40 BogoMI
PS (lpj=192000)
[    0.019535] pid_max: default: 32768 minimum: 301
[    0.024383] Mount-cache hash table entries: 512
[    0.029530] CPU: Testing write buffer coherency: ok
[    0.033969] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.039532] Setting up static identity map for 0x63b910 - 0x63b968
[    0.119860] CPU1: failed to boot: -38
[    0.139881] CPU2: failed to boot: -38
[    0.159915] CPU3: failed to boot: -38
[    0.162640] Brought up 1 CPUs
[    0.165657] SMP: Total of 1 processors activated.
[    0.170459] CPU: All CPU(s) started in SVC mode.
[    0.184094] VFP support v0.3: implementor 51 architecture 0 part 6f
variant 2 rev 0
[    0.191855] pinctrl core: initialized pinctrl subsystem
[    0.196365] regulator-dummy: no parameters
[    0.200498] NET: Registered protocol family 16
[    0.205042] DMA: preallocated 256 KiB pool for atomic coherent
allocations
[    0.215631] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4
watchpoint registers.
[    0.222677] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.232176] bio: create slab <bio-0> at 0
[    0.235853] SCSI subsystem initialized
[    0.240139] Switched to clocksource arch_sys_counter
[    0.249150] cfg80211: Calling CRDA to update world regulatory
domain
[    0.277578] NET: Registered protocol family 2
[    0.281408] TCP established hash table entries: 8192 (order: 3,
32768 bytes)
[    0.288130] TCP bind hash table entries: 8192 (order: 4, 65536
bytes)
[    0.294707] TCP: Hash tables configured (established 8192 bind
8192)
[    0.301082] TCP: reno registered
[    0.304335] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.310353] UDP-Lite hash table entries: 512 (order: 2, 16384
bytes)
[    0.316930] NET: Registered protocol family 1
[    0.321476] RPC: Registered named UNIX socket transport module.
[    0.327158] RPC: Registered udp transport module.
[    0.331972] RPC: Registered tcp transport module.
[    0.336707] RPC: Registered tcp NFSv4.1 backchannel transport
module.
[    0.343435] Trying to unpack rootfs image as initramfs...
[    0.565367] Freeing initrd memory: 3508K (c2000000 - c236d000)
[    0.570590] using sfpb hardware mutex registers (auto)
[    0.575592] smem_of_init: initialized successfully
[    0.580643] parse_smd_devicetree: enable_irq_wake() failed on 57
[    0.586427] parse_smsm_devicetree: enable_irq_wake() failed on 58
[    0.592650] parse_smd_devicetree: enable_irq_wake() failed on 188
[    0.598750] parse_smsm_devicetree: enable_irq_wake() failed on 189
[    0.605025] parse_smd_devicetree: enable_irq_wake() failed on 174
[    0.611184] parse_smsm_devicetree: enable_irq_wake() failed on 176
[    0.617414] parse_smd_devicetree: enable_irq_wake() failed on 200
[    0.623562] SMD successfully initialized
[    0.705001] bounce pool size: 64 pages
[    0.713164] NFS: Registering the id_resolver key type
[    0.717291] Key type id_resolver registered
[    0.721553] Key type id_legacy registered
[    0.726032] fuse init (API version 7.22)
[    0.729846] msgmni has been set to 1471
[    0.734961] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 253)
[    0.741474] io scheduler noop registered
[    0.745392] io scheduler deadline registered
[    0.749838] io scheduler cfq registered (default)
[    0.754787] msm_serial:
detecte�\x06��\x06~�`�\x1e��怞f�~����\x1e\x1e�~\x06��f��\x06~\x1e\x06������xx\x1e`�\x1e��怞f�~\x1e`\x1e�\x1e�fx��
 �
���\x06�\x1efxf�\x06\x06��~`ff�\x1ef\x1e\x06��\x06~�\x1ef������x�������\x06���f\x06����\x1e��f��fx�f�ff~`\x06��x\x1e\x1e�����\x02\x02\x02�r�’�����msm_seri
a
l: console setup on port #0
[    0.786273] console [ttyMSM0] enabled
[    0.786273] console [ttyMSM0] enabled
[    0.793666] bootconsole [earlycon0] disabled
[    0.793666] bootconsole [earlycon0] disabled
[    0.802411] msm_serial: driver initialized
[    0.807063] brd: module loaded
[    0.809555] loop: module loaded
[    0.809963] SCSI Media Changer driver v0.25
[    0.812776] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels,
max=256) (6 bit encapsulation en
abled).
[    0.816828] CSLIP: code copyright 1989 Regents of the University of
California.
[    0.826380] TRB: in msm_otg_probe
[    0.833527] TRB: in msm_otg_read_dt
[    0.836962] TRB: in msm_otg_read_dt, mode=2
[    0.840321] msm_otg f9a55000.usb: OTG regs = f005e000
[    0.844438] msm_otg f9a55000.usb: unable to get hsusb vddcx
[    0.849656] platform f9a55000.usb: Driver msm_otg requests probe
deferral
[    0.855162] msm_hsusb f9a55000.gadget: in ci_hdrc_msm_probe
[    0.862003] platform f9a55000.gadget: Driver msm_hsusb requests
probe deferral
[    0.867588] mousedev: PS/2 mouse device common for all mice
[    0.874700] i2c /dev entries driver
[    0.880503] oprofile: no performance counters
[    0.883657] oprofile: using timer interrupt.
[    0.888204] TCP: cubic registered
[    0.892452] NET: Registered protocol family 17
[    0.895718] Key type dns_resolver registered
[    0.900092] Registering SWP/SWPB emulation handler
[    0.905177] 8841_s1: 675 <--> 1050 mV at 0 mV normal idle
[    0.909257] 8841_s1_ao: 675 <--> 1050 mV at 0 mV normal idle
[    0.914863] 8841_s1_so: 675 <--> 1050 mV at 675 mV normal idle
[    0.920666] 8841_s2: 500 <--> 1050 mV at 0 mV normal idle
[    0.926286] 8841_s2_corner: 0 <--> 0 mV at 0 mV normal idle
[    0.931849] 8841_s2_corner_ao: 0 <--> 0 mV at 0 mV normal idle
[    0.937649] 8841_s2_floor_corner: 0 <--> 0 mV at 0 mV normal idle
[    0.943415] 8841_s3: 1050 mV normal idle
[    0.949641] 8841_s4: 815 <--> 900 mV at 0 mV normal idle
[    0.953634] 8841_s4_corner: 0 <--> 0 mV at 0 mV normal idle
[    0.959013] 8841_s4_floor_corner: 0 <--> 0 mV at 0 mV normal idle
[    0.964861] 8941_s1: 1300 mV normal idle
[    0.970851] 8941_s2: 2150 mV normal idle
[    0.974911] 8941_s3: 1800 mV normal idle
[    0.978896] 8941_l1: 1225 mV normal idle
[    0.982918] 8941_l2: 1200 mV normal idle
[    0.986891] 8941_l3: 1200 mV normal idle
[    0.990902] 8941_l4: 1225 mV normal idle
[    0.994876] 8941_l5: 1800 mV normal idle
[    0.998871] 8941_l6: 1800 mV normal idle
[    1.002886] 8941_l7: 1800 mV normal idle
[    1.006976] 8941_l9: 1800 <--> 2950 mV at 2950 mV normal idle
[    1.010892] 8941_l10: 1800 <--> 2950 mV at 2950 mV normal idle
[    1.016574] 8941_l11: 1300 mV normal idle
[    1.022398] 8941_l12: 1800 mV normal idle
[    1.026441] 8941_l12_ao: 1800 mV normal idle
[    1.030651] 8941_l13: 1800 <--> 2950 mV at 2950 mV normal idle
[    1.035073] 8941_l14: 1800 mV normal idle
[    1.040813] 8941_l15: 2050 mV normal idle
[    1.044956] 8941_l16: 2700 mV normal idle
[    1.049029] 8941_l17: 2700 mV normal idle
[    1.053134] 8941_l18: 2850 mV normal idle
[    1.057198] 8941_l19: 3300 mV normal idle
[    1.061307] 8941_l20: 2950 mV normal idle
[    1.065358] 8941_l21: 2950 mV normal idle
[    1.069445] 8941_l22: 3000 mV normal idle
[    1.073534] 8941_l23: 2800 mV normal idle
[    1.077600] 8941_l24: 3075 mV normal idle
[    1.081698] 8941_lvs1: no parameters
[    1.085743] 8941_lvs2: no parameters
[    1.089474] 8941_lvs3: no parameters
[    1.092765] msm_rpm_dev_probe(): RPM probe completed successfully
[    1.096898] TRB: in msm_otg_probe
[    1.102323] TRB: in msm_otg_read_dt
[    1.105538] TRB: in msm_otg_read_dt, mode=2
[    1.108878] msm_otg f9a55000.usb: OTG regs = f0062000
[    1.113364] TRB: voltage initialized status=0
[    1.119019] TRB: 9999 - before interrupt reset in msm_otg_probe
[    1.122575]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    1.128283]    ### PORTSC (184) val=cc000004
[    1.133855]      PTS (31:30) transceiver select =11b: serial
[    1.143136]     PSPD (27:26) port speed =11b: ???
[    1.148067]     PHCD (23) clock disable =0
[    1.148504]     LS (11:10) line status = 00b: SEO
[    1.156835]     PE (2) port enabled =1
[    1.157272]     CCS (0) current connect status =0
[    1.160850]   remainder=00000000
[    1.165605]   ### OTGSC (1a4) val=00000e20
[    1.168905]     1MSIE (29) 1MS timer int enable =0
[    1.172828]     BSVIE (27) vbus B valid int enable =0
[    1.177586]     FIELD_1MSS (21) 1ms timer status =0
[    1.182725]     FIELD_1MST (13) 1ms timer toggle =0
[    1.187395]     BSE (12) vbus B session end =0
[    1.192271]     BSV (11) vbus B session valid =1
[    1.196769]     ASV (10) vbus A session valid =1
[    1.201562]     AVV (9) A vbus valid =1
[    1.206143]     IDPU (5) ID pullup =1
[    1.209702]   remainder=00000000
[    1.213540]   ### USBINTR (148) val=00000000
[    1.216822]     SLE (8) sleep int =0
[    1.221090]     URE (6) USB reset int=0
[    1.224633]     PCE (2) port change detect int=0
[    1.228193]     UEI (1) USB error int=0
[    1.233069]     UI (0) USB int=0
[    1.236611]   remainder=00000000
[    1.240085]   ### USBSTS (144) val=60000000
[    1.243313]     ULPI (10) ULPI event complete=0
[    1.247202]     SOF (7) SOF received=0
[    1.251733]     UEI (1) USB error=0
[    1.255535]     UI (0) USB int=0
[    1.258920]   remainder=60000000
[    1.262412]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    1.265606]      SUSPENDM=0
[    1.270567]      OpMode=00b normal
[    1.276017]      TermSelect=0
[    1.276628]      XcvrSelect=00b HS
[    1.282720]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    1.282969]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    1.288176]      DmPulldown=0
[    1.293225]      DpPulldown=0
[    1.296161]    ### ULPI_USB_INT_STS (13) val=00000000
[    1.299114]      SessEnd=0
[    1.304164] TRB: msm writel(),         addr=f0062148, val=00000000
[    1.306755] TRB: msm writel(),         addr=f00621a4, val=00000000
[    1.312952] TRB: in msm_usb_reset, entering
[    1.319077]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    1.323177]    ### PORTSC (184) val=cc000004
[    1.328714]      PTS (31:30) transceiver select =11b: serial
[    1.337998]     PSPD (27:26) port speed =11b: ???
[    1.342960]     PHCD (23) clock disable =0
[    1.343383]     LS (11:10) line status = 00b: SEO
[    1.351729]     PE (2) port enabled =1
[    1.352151]     CCS (0) current connect status =0
[    1.355711]   remainder=00000000
[    1.360500]   ### OTGSC (1a4) val=00000e00
[    1.363782]     1MSIE (29) 1MS timer int enable =0
[    1.367689]     BSVIE (27) vbus B valid int enable =0
[    1.372482]     FIELD_1MSS (21) 1ms timer status =0
[    1.377585]     FIELD_1MST (13) 1ms timer toggle =0
[    1.382290]     BSE (12) vbus B session end =0
[    1.387134]     BSV (11) vbus B session valid =1
[    1.391665]     ASV (10) vbus A session valid =1
[    1.396422]     AVV (9) A vbus valid =1
[    1.401039]     IDPU (5) ID pullup =0
[    1.404581]   remainder=00000000
[    1.408399]   ### USBINTR (148) val=00000000
[    1.411717]     SLE (8) sleep int =0
[    1.415952]     URE (6) USB reset int=0
[    1.419511]     PCE (2) port change detect int=0
[    1.423088]     UEI (1) USB error int=0
[    1.427930]     UI (0) USB int=0
[    1.431508]   remainder=00000000
[    1.434963]   ### USBSTS (144) val=60000400
[    1.438174]     ULPI (10) ULPI event complete=1
[    1.442099]     SOF (7) SOF received=0
[    1.446594]     UEI (1) USB error=0
[    1.450430]     UI (0) USB int=0
[    1.453798]   remainder=60000000
[    1.457273]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    1.460502]      SUSPENDM=0
[    1.465429]      OpMode=00b normal
[    1.470914]      TermSelect=0
[    1.471507]      XcvrSelect=00b HS
[    1.477580]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    1.477848]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    1.483072]      DmPulldown=0
[    1.488086]      DpPulldown=0
[    1.491056]    ### ULPI_USB_INT_STS (13) val=00000000
[    1.493993]      SessEnd=0
[    1.499023] TRB: in msm_link_reset, entering
[    1.501648]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    1.506058]    ### PORTSC (184) val=cc000004
[    1.511369]      PTS (31:30) transceiver select =11b: serial
[    1.520652]     PSPD (27:26) port speed =11b: ???
[    1.525583]     PHCD (23) clock disable =0
[    1.526021]     LS (11:10) line status = 00b: SEO
[    1.534368]     PE (2) port enabled =1
[    1.534790]     CCS (0) current connect status =0
[    1.538350]   remainder=00000000
[    1.543139]   ### OTGSC (1a4) val=00000e00
[    1.546421]     1MSIE (29) 1MS timer int enable =0
[    1.550346]     BSVIE (27) vbus B valid int enable =0
[    1.555104]     FIELD_1MSS (21) 1ms timer status =0
[    1.560240]     FIELD_1MST (13) 1ms timer toggle =0
[    1.564912]     BSE (12) vbus B session end =0
[    1.569772]     BSV (11) vbus B session valid =1
[    1.574303]     ASV (10) vbus A session valid =1
[    1.579062]     AVV (9) A vbus valid =1
[    1.583677]     IDPU (5) ID pullup =0
[    1.587219]   remainder=00000000
[    1.591056]   ### USBINTR (148) val=00000000
[    1.594338]     SLE (8) sleep int =0
[    1.598591]     URE (6) USB reset int=0
[    1.602167]     PCE (2) port change detect int=0
[    1.605709]     UEI (1) USB error int=0
[    1.610587]     UI (0) USB int=0
[    1.614129]   remainder=00000000
[    1.617601]   ### USBSTS (144) val=60000400
[    1.620830]     ULPI (10) ULPI event complete=1
[    1.624720]     SOF (7) SOF received=0
[    1.629233]     UEI (1) USB error=0
[    1.633069]     UI (0) USB int=0
[    1.636437]   remainder=60000000
[    1.639912]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    1.643141]      SUSPENDM=0
[    1.648068]      OpMode=00b normal
[    1.653535]      TermSelect=0
[    1.654145]      XcvrSelect=00b HS
[    1.660236]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    1.660487]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    1.665693]      DmPulldown=0
[    1.670743]      DpPulldown=0
[    1.673678]    ### ULPI_USB_INT_STS (13) val=00000000
[    1.676631]      SessEnd=0
[    1.681681] TRB: msm_otg_link_clk_reset, assert=1
[    1.684268] TRB: calling reset_control_assert
[    1.690280]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    1.693385]    ### PORTSC (184) val=08130000
[    1.698766]      PTS (31:30) transceiver select =00b: other
[    1.708050]     PSPD (27:26) port speed =10b: high
[    1.712926]     PHCD (23) clock disable =0
[    1.713348]     LS (11:10) line status = 00b: SEO
[    1.721782]     PE (2) port enabled =0
[    1.722201]     CCS (0) current connect status =0
[    1.725762]   remainder=00130000
[    1.730553]   ### OTGSC (1a4) val=08130000
[    1.733835]     1MSIE (29) 1MS timer int enable =0
[    1.737741]     BSVIE (27) vbus B valid int enable =1
[    1.742532]     FIELD_1MSS (21) 1ms timer status =0
[    1.747638]     FIELD_1MST (13) 1ms timer toggle =0
[    1.752341]     BSE (12) vbus B session end =0
[    1.757185]     BSV (11) vbus B session valid =0
[    1.761717]     ASV (10) vbus A session valid =0
[    1.766474]     AVV (9) A vbus valid =0
[    1.771091]     IDPU (5) ID pullup =0
[    1.774632]   remainder=00130000
[    1.778452]   ### USBINTR (148) val=08130000
[    1.781770]     SLE (8) sleep int =0
[    1.786004]     URE (6) USB reset int=0
[    1.789563]     PCE (2) port change detect int=0
[    1.793140]     UEI (1) USB error int=0
[    1.797982]     UI (0) USB int=0
[    1.801560]   remainder=08130000
[    1.805015]   ### USBSTS (144) val=08130000
[    1.808226]     ULPI (10) ULPI event complete=0
[    1.812150]     SOF (7) SOF received=0
[    1.816646]     UEI (1) USB error=0
[    1.820482]     UI (0) USB int=0
[    1.823850]   remainder=08130000
[    1.827324]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    1.830554]      SUSPENDM=0
[    1.835482]      OpMode=00b normal
[    1.840965]      TermSelect=0
[    1.841559]      XcvrSelect=00b HS
[    1.847633]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    1.847899]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    1.853125]      DmPulldown=0
[    1.858138]      DpPulldown=0
[    1.861108]    ### ULPI_USB_INT_STS (13) val=00000000
[    1.864045]      SessEnd=0
[    1.869075] TRB: msm_link_reset 1 - before
msm_otg_link_clk_reset(0)
[    1.871703] TRB: msm_otg_link_clk_reset, assert=0
[    1.878192] TRB: calling reset_control_deassert
[    1.882813] TRB: msm_link_reset 2 - before USB_PHY_CTRL2 |= (1<<16)
[    1.887136]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    1.893403]    ### PORTSC (184) val=cc000004
[    1.898940]      PTS (31:30) transceiver select =11b: serial
[    1.908223]     PSPD (27:26) port speed =11b: ???
[    1.913188]     PHCD (23) clock disable =0
[    1.913608]     LS (11:10) line status = 00b: SEO
[    1.921954]     PE (2) port enabled =1
[    1.922376]     CCS (0) current connect status =0
[    1.925936]   remainder=00000000
[    1.930726]   ### OTGSC (1a4) val=00000e00
[    1.934007]     1MSIE (29) 1MS timer int enable =0
[    1.937916]     BSVIE (27) vbus B valid int enable =0
[    1.942707]     FIELD_1MSS (21) 1ms timer status =0
[    1.947810]     FIELD_1MST (13) 1ms timer toggle =0
[    1.952515]     BSE (12) vbus B session end =0
[    1.957359]     BSV (11) vbus B session valid =1
[    1.961890]     ASV (10) vbus A session valid =1
[    1.966647]     AVV (9) A vbus valid =1
[    1.971263]     IDPU (5) ID pullup =0
[    1.974806]   remainder=00000000
[    1.978626]   ### USBINTR (148) val=00000000
[    1.981942]     SLE (8) sleep int =0
[    1.986177]     URE (6) USB reset int=0
[    1.989735]     PCE (2) port change detect int=0
[    1.993315]     UEI (1) USB error int=0
[    1.998157]     UI (0) USB int=0
[    2.001732]   remainder=00000000
[    2.005188]   ### USBSTS (144) val=60000400
[    2.008401]     ULPI (10) ULPI event complete=1
[    2.012324]     SOF (7) SOF received=0
[    2.016820]     UEI (1) USB error=0
[    2.020657]     UI (0) USB int=0
[    2.024024]   remainder=60000000
[    2.027497]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    2.030727]      SUSPENDM=0
[    2.035655]      OpMode=00b normal
[    2.041138]      TermSelect=0
[    2.041733]      XcvrSelect=00b HS
[    2.047807]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    2.048074]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    2.053324]      DmPulldown=0
[    2.058312]      DpPulldown=0
[    2.061282]    ### ULPI_USB_INT_STS (13) val=00000000
[    2.064217]      SessEnd=0
[    2.069250] TRB: msm readl(),          addr=f0062278, val=000c3c32
[    2.071877] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    2.078022]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    2.084201]    ### PORTSC (184) val=cc000004
[    2.089651]      PTS (31:30) transceiver select =11b: serial
[    2.098935]     PSPD (27:26) port speed =11b: ???
[    2.103900]     PHCD (23) clock disable =0
[    2.104321]     LS (11:10) line status = 00b: SEO
[    2.112665]     PE (2) port enabled =1
[    2.113087]     CCS (0) current connect status =0
[    2.116647]   remainder=00000000
[    2.121439]   ### OTGSC (1a4) val=00000e00
[    2.124720]     1MSIE (29) 1MS timer int enable =0
[    2.128627]     BSVIE (27) vbus B valid int enable =0
[    2.133418]     FIELD_1MSS (21) 1ms timer status =0
[    2.138523]     FIELD_1MST (13) 1ms timer toggle =0
[    2.143226]     BSE (12) vbus B session end =0
[    2.148071]     BSV (11) vbus B session valid =1
[    2.152603]     ASV (10) vbus A session valid =1
[    2.157360]     AVV (9) A vbus valid =1
[    2.161976]     IDPU (5) ID pullup =0
[    2.165519]   remainder=00000000
[    2.169337]   ### USBINTR (148) val=00000000
[    2.172655]     SLE (8) sleep int =0
[    2.176890]     URE (6) USB reset int=0
[    2.180466]     PCE (2) port change detect int=0
[    2.184010]     UEI (1) USB error int=0
[    2.188868]     UI (0) USB int=0
[    2.192444]   remainder=00000000
[    2.195899]   ### USBSTS (144) val=60000400
[    2.199112]     ULPI (10) ULPI event complete=1
[    2.203036]     SOF (7) SOF received=0
[    2.207532]     UEI (1) USB error=0
[    2.211367]     UI (0) USB int=0
[    2.214737]   remainder=60000000
[    2.218209]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    2.221439]      SUSPENDM=0
[    2.226368]      OpMode=00b normal
[    2.231851]      TermSelect=0
[    2.232443]      XcvrSelect=00b HS
[    2.238518]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    2.238784]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    2.244010]      DmPulldown=0
[    2.249023]      DpPulldown=0
[    2.251994]    ### ULPI_USB_INT_STS (13) val=00000000
[    2.254929]      SessEnd=0
[    2.259961] TRB: msm_link_reset 3 - before PORTSC:PTS |=
PORTSC_PTS_SERIAL
[    2.262589] TRB: msm readl(),          addr=f0062184, val=cc000004
[    2.269428] PORTSC_PTS_ULPI=80000000
[    2.275605] PORTSC_PTS_SERIAL=c0000000
[    2.279320] TRB: msm writel(),         addr=f0062184, val=cc000004
[    2.282899] TRB: msm_link_reset 4
[    2.289042] TRB: doing ULPI_FUNC_CTRL: clear SUSPENDM
[    2.292449] TRB: ulpi_write reg=0x6, val=0x40
[    2.297464] TRB: msm writel(),         addr=f0062170, val=60060040
[    2.301825] TRB: msm readl(),          addr=f0062170, val=28060040
[    2.307883]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    2.314063]    ### PORTSC (184) val=cc000004
[    2.319512]      PTS (31:30) transceiver select =11b: serial
[    2.328796]     PSPD (27:26) port speed =11b: ???
[    2.333760]     PHCD (23) clock disable =0
[    2.334183]     LS (11:10) line status = 00b: SEO
[    2.342527]     PE (2) port enabled =1
[    2.342949]     CCS (0) current connect status =0
[    2.346509]   remainder=00000000
[    2.351299]   ### OTGSC (1a4) val=00000e00
[    2.354580]     1MSIE (29) 1MS timer int enable =0
[    2.358489]     BSVIE (27) vbus B valid int enable =0
[    2.363280]     FIELD_1MSS (21) 1ms timer status =0
[    2.368383]     FIELD_1MST (13) 1ms timer toggle =0
[    2.373088]     BSE (12) vbus B session end =0
[    2.377932]     BSV (11) vbus B session valid =1
[    2.382463]     ASV (10) vbus A session valid =1
[    2.387220]     AVV (9) A vbus valid =1
[    2.391836]     IDPU (5) ID pullup =0
[    2.395379]   remainder=00000000
[    2.399199]   ### USBINTR (148) val=00000000
[    2.402515]     SLE (8) sleep int =0
[    2.406750]     URE (6) USB reset int=0
[    2.410326]     PCE (2) port change detect int=0
[    2.413870]     UEI (1) USB error int=0
[    2.418729]     UI (0) USB int=0
[    2.422305]   remainder=00000000
[    2.425761]   ### USBSTS (144) val=60000400
[    2.428974]     ULPI (10) ULPI event complete=1
[    2.432897]     SOF (7) SOF received=0
[    2.437393]     UEI (1) USB error=0
[    2.441229]     UI (0) USB int=0
[    2.444597]   remainder=60000000
[    2.448071]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    2.451301]      SUSPENDM=0
[    2.456229]      OpMode=00b normal
[    2.461712]      TermSelect=0
[    2.462306]      XcvrSelect=00b HS
[    2.468380]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    2.468645]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    2.473870]      DmPulldown=0
[    2.478886]      DpPulldown=0
[    2.481854]    ### ULPI_USB_INT_STS (13) val=00000000
[    2.484791]      SessEnd=0
[    2.489823] TRB: msm_link_reset 5 - before msm_otg_phy_clk_reset
[    2.492447] TRB: msm_otg_phy_clk_reset
[    2.498599]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    2.502171]    ### PORTSC (184) val=cc000004
[    2.507620]      PTS (31:30) transceiver select =11b: serial
[    2.516903]     PSPD (27:26) port speed =11b: ???
[    2.521868]     PHCD (23) clock disable =0
[    2.522290]     LS (11:10) line status = 00b: SEO
[    2.530635]     PE (2) port enabled =1
[    2.531056]     CCS (0) current connect status =0
[    2.534616]   remainder=00000000
[    2.539389]   ### OTGSC (1a4) val=00000e00
[    2.542706]     1MSIE (29) 1MS timer int enable =0
[    2.546595]     BSVIE (27) vbus B valid int enable =0
[    2.551386]     FIELD_1MSS (21) 1ms timer status =0
[    2.556492]     FIELD_1MST (13) 1ms timer toggle =0
[    2.561197]     BSE (12) vbus B session end =0
[    2.566040]     BSV (11) vbus B session valid =1
[    2.570572]     ASV (10) vbus A session valid =1
[    2.575329]     AVV (9) A vbus valid =1
[    2.579926]     IDPU (5) ID pullup =0
[    2.583504]   remainder=00000000
[    2.587306]   ### USBINTR (148) val=00000000
[    2.590623]     SLE (8) sleep int =0
[    2.594858]     URE (6) USB reset int=0
[    2.598417]     PCE (2) port change detect int=0
[    2.601994]     UEI (1) USB error int=0
[    2.606836]     UI (0) USB int=0
[    2.610413]   remainder=00000000
[    2.613869]   ### USBSTS (144) val=60000400
[    2.617080]     ULPI (10) ULPI event complete=1
[    2.621006]     SOF (7) SOF received=0
[    2.625500]     UEI (1) USB error=0
[    2.629319]     UI (0) USB int=0
[    2.632722]   remainder=60000000
[    2.636179]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    2.639391]      SUSPENDM=0
[    2.644353]      OpMode=00b normal
[    2.649802]      TermSelect=0
[    2.650430]      XcvrSelect=00b HS
[    2.656488]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    2.656753]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    2.661978]      DmPulldown=0
[    2.666992]      DpPulldown=0
[    2.669945]    ### ULPI_USB_INT_STS (13) val=00000000
[    2.672916]      SessEnd=0
[    2.677929] TRB: msm_link_reset 6 - before ulpi_read(ULPI_DEBUG)
[    2.680557] TRB: msm writel(),         addr=f0062170, val=40150000
[    2.686703] TRB: msm readl(),          addr=f0062170, val=08150000
[    2.692711] TRB: msm readl(),          addr=f0062170, val=08150000
[    2.698856] TRB: ulpi_read reg=0x15, val=0x0
[    2.705032] TRB: in msm_link_reset, leaving
[    2.709446] msm_otg f9a55000.usb: phy_reset: success
[    2.713367] TRB: in msm_otg_reset, entering
[    2.718558]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    2.722483]    ### PORTSC (184) val=cc000004
[    2.728020]      PTS (31:30) transceiver select =11b: serial
[    2.737302]     PSPD (27:26) port speed =11b: ???
[    2.742267]     PHCD (23) clock disable =0
[    2.742689]     LS (11:10) line status = 00b: SEO
[    2.751033]     PE (2) port enabled =1
[    2.751455]     CCS (0) current connect status =0
[    2.755015]   remainder=00000000
[    2.759789]   ### OTGSC (1a4) val=00000e00
[    2.763104]     1MSIE (29) 1MS timer int enable =0
[    2.766994]     BSVIE (27) vbus B valid int enable =0
[    2.771787]     FIELD_1MSS (21) 1ms timer status =0
[    2.776891]     FIELD_1MST (13) 1ms timer toggle =0
[    2.781596]     BSE (12) vbus B session end =0
[    2.786439]     BSV (11) vbus B session valid =1
[    2.790971]     ASV (10) vbus A session valid =1
[    2.795728]     AVV (9) A vbus valid =1
[    2.800345]     IDPU (5) ID pullup =0
[    2.803887]   remainder=00000000
[    2.807705]   ### USBINTR (148) val=00000000
[    2.811023]     SLE (8) sleep int =0
[    2.815258]     URE (6) USB reset int=0
[    2.818817]     PCE (2) port change detect int=0
[    2.822394]     UEI (1) USB error int=0
[    2.827236]     UI (0) USB int=0
[    2.830812]   remainder=00000000
[    2.834269]   ### USBSTS (144) val=60000400
[    2.837480]     ULPI (10) ULPI event complete=1
[    2.841403]     SOF (7) SOF received=0
[    2.845899]     UEI (1) USB error=0
[    2.849719]     UI (0) USB int=0
[    2.853122]   remainder=60000000
[    2.856578]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    2.859791]      SUSPENDM=0
[    2.864752]      OpMode=00b normal
[    2.870219]      TermSelect=0
[    2.870811]      XcvrSelect=00b HS
[    2.876886]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    2.877153]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    2.882378]      DmPulldown=0
[    2.887391]      DpPulldown=0
[    2.890362]    ### ULPI_USB_INT_STS (13) val=00000000
[    2.893297]      SessEnd=0
[    2.898328] TRB: issuing USBCMD_RESET to USB_USBCMD
[    2.900954] TRB: msm writel(),         addr=f0062140, val=00000002
[    2.905715] TRB: msm readl(),          addr=f0062140, val=00080002
[    2.911984] TRB: msm readl(),          addr=f0062140, val=00080000
[    2.918126]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    2.924306]    ### PORTSC (184) val=cc000004
[    2.929756]      PTS (31:30) transceiver select =11b: serial
[    2.939039]     PSPD (27:26) port speed =11b: ???
[    2.944003]     PHCD (23) clock disable =0
[    2.944426]     LS (11:10) line status = 00b: SEO
[    2.952770]     PE (2) port enabled =1
[    2.953191]     CCS (0) current connect status =0
[    2.956752]   remainder=00000000
[    2.961541]   ### OTGSC (1a4) val=00000e00
[    2.964825]     1MSIE (29) 1MS timer int enable =0
[    2.968732]     BSVIE (27) vbus B valid int enable =0
[    2.973523]     FIELD_1MSS (21) 1ms timer status =0
[    2.978626]     FIELD_1MST (13) 1ms timer toggle =0
[    2.983331]     BSE (12) vbus B session end =0
[    2.988175]     BSV (11) vbus B session valid =1
[    2.992707]     ASV (10) vbus A session valid =1
[    2.997464]     AVV (9) A vbus valid =1
[    3.002080]     IDPU (5) ID pullup =0
[    3.005623]   remainder=00000000
[    3.009441]   ### USBINTR (148) val=00000000
[    3.012758]     SLE (8) sleep int =0
[    3.016993]     URE (6) USB reset int=0
[    3.020571]     PCE (2) port change detect int=0
[    3.024113]     UEI (1) USB error int=0
[    3.028974]     UI (0) USB int=0
[    3.032548]   remainder=00000000
[    3.036004]   ### USBSTS (144) val=60000000
[    3.039217]     ULPI (10) ULPI event complete=0
[    3.043140]     SOF (7) SOF received=0
[    3.047636]     UEI (1) USB error=0
[    3.051496]     UI (0) USB int=0
[    3.054841]   remainder=60000000
[    3.058314]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
[    3.061545]      SUSPENDM=0
[    3.066471]      OpMode=00b normal
[    3.071954]      TermSelect=0
[    3.072549]      XcvrSelect=00b HS
[    3.078623]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    3.078890]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
[    3.084112]      DmPulldown=0
[    3.089128]      DpPulldown=0
[    3.092098]    ### ULPI_USB_INT_STS (13) val=00000000
[    3.095033]      SessEnd=0
[    3.100064] TRB: in msm_otg_reset, 11111 !!! check regs here
(before) !!!
[    3.102692] TRB: turning PTS transceiver back to ULPI and resetting
rest of PORTSC
[    3.109535] TRB: msm writel(),         addr=f0062184, val=80000000
[    3.117013] TRB: in msm_otg_reset, 11122 !!! check regs here
(after) !!!
[    3.123178]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    3.130017]    ### PORTSC (184) val=8c000804
[    3.135328]      PTS (31:30) transceiver select =10b: ulpi
[    3.144611]     PSPD (27:26) port speed =11b: ???
[    3.149367]     PHCD (23) clock disable =0
[    3.149806]     LS (11:10) line status = 10b: J-state
[    3.158136]     PE (2) port enabled =1
[    3.158922]     CCS (0) current connect status =0
[    3.162499]   remainder=00000000
[    3.167255]   ### OTGSC (1a4) val=003e1000
[    3.170570]     1MSIE (29) 1MS timer int enable =0
[    3.174460]     BSVIE (27) vbus B valid int enable =0
[    3.179236]     FIELD_1MSS (21) 1ms timer status =1
[    3.184373]     FIELD_1MST (13) 1ms timer toggle =0
[    3.189045]     BSE (12) vbus B session end =1
[    3.193922]     BSV (11) vbus B session valid =0
[    3.198418]     ASV (10) vbus A session valid =0
[    3.203210]     AVV (9) A vbus valid =0
[    3.207792]     IDPU (5) ID pullup =0
[    3.211367]   remainder=001e0000
[    3.215171]   ### USBINTR (148) val=00000000
[    3.218470]     SLE (8) sleep int =0
[    3.222741]     URE (6) USB reset int=0
[    3.226281]     PCE (2) port change detect int=0
[    3.229841]     UEI (1) USB error int=0
[    3.234719]     UI (0) USB int=0
[    3.238261]   remainder=00000000
[    3.241750]   ### USBSTS (144) val=40000480
[    3.244946]     ULPI (10) ULPI event complete=1
[    3.248852]     SOF (7) SOF received=1
[    3.253382]     UEI (1) USB error=0
[    3.257185]     UI (0) USB int=0
[    3.260586]   remainder=40000000
[    3.264045]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    3.267255]      SUSPENDM=1
[    3.272217]      OpMode=10b disable bit-stuff and NRZI encoding
[    3.277670]      TermSelect=1
[    3.281071]      XcvrSelect=01b FS
[    3.286870]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    3.287136]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    3.292361]      DmPulldown=1
[    3.297374]      DpPulldown=1
[    3.300345]    ### ULPI_USB_INT_STS (13) val=00000008
[    3.303279]      SessEnd=1
[    3.308312] TRB: msm writel(),         addr=f0062090, val=00000000
[    3.310937] TRB: in msm_otg_reset, 11133
[    3.317081]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    3.321180]    ### PORTSC (184) val=8c000804
[    3.326457]      PTS (31:30) transceiver select =10b: ulpi
[    3.335741]     PSPD (27:26) port speed =11b: ???
[    3.340532]     PHCD (23) clock disable =0
[    3.340952]     LS (11:10) line status = 10b: J-state
[    3.349282]     PE (2) port enabled =1
[    3.350066]     CCS (0) current connect status =0
[    3.353643]   remainder=00000000
[    3.358399]   ### OTGSC (1a4) val=003e3000
[    3.361717]     1MSIE (29) 1MS timer int enable =0
[    3.365605]     BSVIE (27) vbus B valid int enable =0
[    3.370398]     FIELD_1MSS (21) 1ms timer status =1
[    3.375502]     FIELD_1MST (13) 1ms timer toggle =1
[    3.380207]     BSE (12) vbus B session end =1
[    3.385051]     BSV (11) vbus B session valid =0
[    3.389565]     ASV (10) vbus A session valid =0
[    3.394355]     AVV (9) A vbus valid =0
[    3.398939]     IDPU (5) ID pullup =0
[    3.402514]   remainder=001e0000
[    3.406316]   ### USBINTR (148) val=00000000
[    3.409617]     SLE (8) sleep int =0
[    3.413885]     URE (6) USB reset int=0
[    3.417427]     PCE (2) port change detect int=0
[    3.421004]     UEI (1) USB error int=0
[    3.425849]     UI (0) USB int=0
[    3.429407]   remainder=00000000
[    3.432895]   ### USBSTS (144) val=40000480
[    3.436092]     ULPI (10) ULPI event complete=1
[    3.439997]     SOF (7) SOF received=1
[    3.444527]     UEI (1) USB error=0
[    3.448330]     UI (0) USB int=0
[    3.451731]   remainder=40000000
[    3.455190]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    3.458402]      SUSPENDM=1
[    3.463364]      OpMode=10b disable bit-stuff and NRZI encoding
[    3.468817]      TermSelect=1
[    3.472218]      XcvrSelect=01b FS
[    3.478015]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    3.478282]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    3.483505]      DmPulldown=1
[    3.488521]      DpPulldown=1
[    3.491489]    ### ULPI_USB_INT_STS (13) val=00000008
[    3.494426]      SessEnd=1
[    3.499458] TRB: msm writel(),         addr=f0062098, val=00000008
[    3.502084] TRB: in msm_otg_reset, 22222
[    3.508226]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    3.512326]    ### PORTSC (184) val=8c000804
[    3.517603]      PTS (31:30) transceiver select =10b: ulpi
[    3.526886]     PSPD (27:26) port speed =11b: ???
[    3.531677]     PHCD (23) clock disable =0
[    3.532099]     LS (11:10) line status = 10b: J-state
[    3.540444]     PE (2) port enabled =1
[    3.541212]     CCS (0) current connect status =0
[    3.544773]   remainder=00000000
[    3.549547]   ### OTGSC (1a4) val=003e1000
[    3.552862]     1MSIE (29) 1MS timer int enable =0
[    3.556752]     BSVIE (27) vbus B valid int enable =0
[    3.561543]     FIELD_1MSS (21) 1ms timer status =1
[    3.566649]     FIELD_1MST (13) 1ms timer toggle =0
[    3.571351]     BSE (12) vbus B session end =1
[    3.576195]     BSV (11) vbus B session valid =0
[    3.580728]     ASV (10) vbus A session valid =0
[    3.585485]     AVV (9) A vbus valid =0
[    3.590083]     IDPU (5) ID pullup =0
[    3.593661]   remainder=001e0000
[    3.597462]   ### USBINTR (148) val=00000000
[    3.600778]     SLE (8) sleep int =0
[    3.605015]     URE (6) USB reset int=0
[    3.608574]     PCE (2) port change detect int=0
[    3.612151]     UEI (1) USB error int=0
[    3.616994]     UI (0) USB int=0
[    3.620569]   remainder=00000000
[    3.624026]   ### USBSTS (144) val=40000480
[    3.627237]     ULPI (10) ULPI event complete=1
[    3.631160]     SOF (7) SOF received=1
[    3.635657]     UEI (1) USB error=0
[    3.639476]     UI (0) USB int=0
[    3.642879]   remainder=40000000
[    3.646335]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    3.649548]      SUSPENDM=1
[    3.654509]      OpMode=10b disable bit-stuff and NRZI encoding
[    3.659962]      TermSelect=1
[    3.663363]      XcvrSelect=01b FS
[    3.669160]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    3.669428]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    3.674653]      DmPulldown=1
[    3.679667]      DpPulldown=1
[    3.682637]    ### ULPI_USB_INT_STS (13) val=00000008
[    3.685571]      SessEnd=1
[    3.690621] TRB: msm readl(),          addr=f0062278, val=000c3c32
[    3.693214] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    3.699375] TRB: in msm_otg_reset, leaving
[    3.705554]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    3.709618]    ### PORTSC (184) val=8c000804
[    3.715103]      PTS (31:30) transceiver select =10b: ulpi
[    3.724386]     PSPD (27:26) port speed =11b: ???
[    3.729143]     PHCD (23) clock disable =0
[    3.729581]     LS (11:10) line status = 10b: J-state
[    3.737912]     PE (2) port enabled =1
[    3.738695]     CCS (0) current connect status =0
[    3.742272]   remainder=00000000
[    3.747028]   ### OTGSC (1a4) val=003e1000
[    3.750345]     1MSIE (29) 1MS timer int enable =0
[    3.754235]     BSVIE (27) vbus B valid int enable =0
[    3.759009]     FIELD_1MSS (21) 1ms timer status =1
[    3.764148]     FIELD_1MST (13) 1ms timer toggle =0
[    3.768818]     BSE (12) vbus B session end =1
[    3.773695]     BSV (11) vbus B session valid =0
[    3.778193]     ASV (10) vbus A session valid =0
[    3.782984]     AVV (9) A vbus valid =0
[    3.787567]     IDPU (5) ID pullup =0
[    3.791143]   remainder=001e0000
[    3.794944]   ### USBINTR (148) val=00000000
[    3.798245]     SLE (8) sleep int =0
[    3.802514]     URE (6) USB reset int=0
[    3.806056]     PCE (2) port change detect int=0
[    3.809616]     UEI (1) USB error int=0
[    3.814494]     UI (0) USB int=0
[    3.818034]   remainder=00000000
[    3.821525]   ### USBSTS (144) val=40000480
[    3.824719]     ULPI (10) ULPI event complete=1
[    3.828627]     SOF (7) SOF received=1
[    3.833157]     UEI (1) USB error=0
[    3.836958]     UI (0) USB int=0
[    3.840361]   remainder=40000000
[    3.843818]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    3.847030]      SUSPENDM=1
[    3.851992]      OpMode=10b disable bit-stuff and NRZI encoding
[    3.857446]      TermSelect=1
[    3.860847]      XcvrSelect=01b FS
[    3.866644]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    3.866909]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    3.872134]      DmPulldown=1
[    3.877148]      DpPulldown=1
[    3.880101]    ### ULPI_USB_INT_STS (13) val=00000008
[    3.883072]      SessEnd=1
[    3.990164] TRB: in msm_phy_reset, entering
[    3.990181]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    3.993140]    ### PORTSC (184) val=8c000804
[    3.998693]      PTS (31:30) transceiver select =10b: ulpi
[    4.007977]     PSPD (27:26) port speed =11b: ???
[    4.012768]     PHCD (23) clock disable =0
[    4.013188]     LS (11:10) line status = 10b: J-state
[    4.021536]     PE (2) port enabled =1
[    4.022303]     CCS (0) current connect status =0
[    4.025864]   remainder=00000000
[    4.030653]   ### OTGSC (1a4) val=003e3000
[    4.033935]     1MSIE (29) 1MS timer int enable =0
[    4.037843]     BSVIE (27) vbus B valid int enable =0
[    4.042634]     FIELD_1MSS (21) 1ms timer status =1
[    4.047738]     FIELD_1MST (13) 1ms timer toggle =1
[    4.052466]     BSE (12) vbus B session end =1
[    4.057286]     BSV (11) vbus B session valid =0
[    4.061818]     ASV (10) vbus A session valid =0
[    4.066575]     AVV (9) A vbus valid =0
[    4.071192]     IDPU (5) ID pullup =0
[    4.074735]   remainder=001e0000
[    4.078553]   ### USBINTR (148) val=00000000
[    4.081870]     SLE (8) sleep int =0
[    4.086105]     URE (6) USB reset int=0
[    4.089664]     PCE (2) port change detect int=0
[    4.093240]     UEI (1) USB error int=0
[    4.098085]     UI (0) USB int=0
[    4.101660]   remainder=00000000
[    4.105116]   ### USBSTS (144) val=40000480
[    4.108327]     ULPI (10) ULPI event complete=1
[    4.112276]     SOF (7) SOF received=1
[    4.116746]     UEI (1) USB error=0
[    4.120583]     UI (0) USB int=0
[    4.123951]   remainder=40000000
[    4.127426]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    4.130654]      SUSPENDM=1
[    4.135583]      OpMode=10b disable bit-stuff and NRZI encoding
[    4.141070]      TermSelect=1
[    4.144437]      XcvrSelect=01b FS
[    4.150268]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    4.150519]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    4.155724]      DmPulldown=1
[    4.160773]      DpPulldown=1
[    4.163711]    ### ULPI_USB_INT_STS (13) val=00000008
[    4.166662]      SessEnd=1
[    4.171713] TRB: msm readl(),          addr=f0062278, val=000d3c32
[    4.174303] TRB: msm writel(),         addr=f0062278, val=000d3c33
[    4.180523] TRB: msm readl(),          addr=f0062278, val=000d3c33
[    4.186630] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    4.192810] TRB: in msm_phy_reset, leaving
[    4.198953]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    4.203052]    ### PORTSC (184) val=8c000804
[    4.208502]      PTS (31:30) transceiver select =10b: ulpi
[    4.217785]     PSPD (27:26) port speed =11b: ???
[    4.222578]     PHCD (23) clock disable =0
[    4.222998]     LS (11:10) line status = 10b: J-state
[    4.231345]     PE (2) port enabled =1
[    4.232111]     CCS (0) current connect status =0
[    4.235671]   remainder=00000000
[    4.240463]   ### OTGSC (1a4) val=003e3000
[    4.243745]     1MSIE (29) 1MS timer int enable =0
[    4.247651]     BSVIE (27) vbus B valid int enable =0
[    4.252444]     FIELD_1MSS (21) 1ms timer status =1
[    4.257547]     FIELD_1MST (13) 1ms timer toggle =1
[    4.262252]     BSE (12) vbus B session end =1
[    4.267096]     BSV (11) vbus B session valid =0
[    4.271626]     ASV (10) vbus A session valid =0
[    4.276384]     AVV (9) A vbus valid =0
[    4.281000]     IDPU (5) ID pullup =0
[    4.284543]   remainder=001e0000
[    4.288361]   ### USBINTR (148) val=00000000
[    4.291679]     SLE (8) sleep int =0
[    4.295914]     URE (6) USB reset int=0
[    4.299473]     PCE (2) port change detect int=0
[    4.303050]     UEI (1) USB error int=0
[    4.307892]     UI (0) USB int=0
[    4.311470]   remainder=00000000
[    4.314925]   ### USBSTS (144) val=40000480
[    4.318136]     ULPI (10) ULPI event complete=1
[    4.322061]     SOF (7) SOF received=1
[    4.326557]     UEI (1) USB error=0
[    4.330392]     UI (0) USB int=0
[    4.333762]   remainder=40000000
[    4.337234]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    4.340464]      SUSPENDM=1
[    4.345392]      OpMode=10b disable bit-stuff and NRZI encoding
[    4.350879]      TermSelect=1
[    4.354247]      XcvrSelect=01b FS
[    4.360060]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    4.360345]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    4.365534]      DmPulldown=1
[    4.370584]      DpPulldown=1
[    4.373519]    ### ULPI_USB_INT_STS (13) val=00000008
[    4.376472]      SessEnd=1
[    4.381519] TRB: in msm_usb_reset, leaving
[    4.384108]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    4.388191]    ### PORTSC (184) val=8c000804
[    4.393675]      PTS (31:30) transceiver select =10b: ulpi
[    4.402959]     PSPD (27:26) port speed =11b: ???
[    4.407716]     PHCD (23) clock disable =0
[    4.408154]     LS (11:10) line status = 10b: J-state
[    4.416485]     PE (2) port enabled =1
[    4.417268]     CCS (0) current connect status =0
[    4.420846]   remainder=00000000
[    4.425602]   ### OTGSC (1a4) val=003e1000
[    4.428900]     1MSIE (29) 1MS timer int enable =0
[    4.432825]     BSVIE (27) vbus B valid int enable =0
[    4.437583]     FIELD_1MSS (21) 1ms timer status =1
[    4.442721]     FIELD_1MST (13) 1ms timer toggle =0
[    4.447391]     BSE (12) vbus B session end =1
[    4.452268]     BSV (11) vbus B session valid =0
[    4.456766]     ASV (10) vbus A session valid =0
[    4.461556]     AVV (9) A vbus valid =0
[    4.466139]     IDPU (5) ID pullup =0
[    4.469698]   remainder=001e0000
[    4.473536]   ### USBINTR (148) val=00000000
[    4.476818]     SLE (8) sleep int =0
[    4.481087]     URE (6) USB reset int=0
[    4.484629]     PCE (2) port change detect int=0
[    4.488189]     UEI (1) USB error int=0
[    4.493067]     UI (0) USB int=0
[    4.496608]   remainder=00000000
[    4.500080]   ### USBSTS (144) val=40000480
[    4.503310]     ULPI (10) ULPI event complete=1
[    4.507200]     SOF (7) SOF received=1
[    4.511730]     UEI (1) USB error=0
[    4.515531]     UI (0) USB int=0
[    4.518917]   remainder=40000000
[    4.522409]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    4.525603]      SUSPENDM=1
[    4.530564]      OpMode=10b disable bit-stuff and NRZI encoding
[    4.536017]      TermSelect=1
[    4.539403]      XcvrSelect=01b FS
[    4.545218]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    4.545484]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    4.550707]      DmPulldown=1
[    4.555723]      DpPulldown=1
[    4.558674]    ### ULPI_USB_INT_STS (13) val=00000008
[    4.561644]      SessEnd=1
[    4.566695] TRB: in msm_otg_probe, mode=2, otg_control=3
[    4.569267] creating debugfs msm_otg/mode
[    4.574854] msm_hsusb f9a55000.gadget: in ci_hdrc_msm_probe
[    4.578655] TRB: in ci_get_platdata
[    4.584042] TRB: in ci_get_platdata, dr_mode=2
[    4.587589] TRB!!!!!!!!!!!!: in ci_hdrc_probe
[    4.592042] TRB: hw_device_init
[    4.596434] TRB: in hw_alloc_regmap, is_lpg=0
[    4.599391] TRB: ci hw_read: reg=f0064108, mask=00020000,
val=00000000
[    4.603922] TRB: in hw_alloc_regmap, is_lpg=0
[    4.610346] TRB: ci hw_read: reg=f0064124, mask=0000001f,
val=00000010
[    4.614756] TRB: ci hw_read: reg=f0064184, mask=00800000,
val=00000000
[    4.621196] TRB: ci hw_write: reg=f0064148, mask=ffffffff,
data=00000000
[    4.627690] TRB: ci hw_write: reg=f0064144, mask=ffffffff,
data=ffffffff
[    4.634570] ci_hdrc ci_hdrc.0: ChipIdea HDRC found, lpm: 0; cap:
f0064100 op: f0064140
[    4.641249] TRB: hw_device_init done
[    4.648953] TRB: msm_phy_init, entering
[    4.652701]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    4.656247]    ### PORTSC (184) val=8c000804
[    4.661817]      PTS (31:30) transceiver select =10b: ulpi
[    4.671101]     PSPD (27:26) port speed =11b: ???
[    4.675857]     PHCD (23) clock disable =0
[    4.676296]     LS (11:10) line status = 10b: J-state
[    4.684626]     PE (2) port enabled =1
[    4.685412]     CCS (0) current connect status =0
[    4.688970]   remainder=00000000
[    4.693762]   ### OTGSC (1a4) val=003e1000
[    4.697044]     1MSIE (29) 1MS timer int enable =0
[    4.700968]     BSVIE (27) vbus B valid int enable =0
[    4.705726]     FIELD_1MSS (21) 1ms timer status =1
[    4.710862]     FIELD_1MST (13) 1ms timer toggle =0
[    4.715535]     BSE (12) vbus B session end =1
[    4.720411]     BSV (11) vbus B session valid =0
[    4.724909]     ASV (10) vbus A session valid =0
[    4.729683]     AVV (9) A vbus valid =0
[    4.734300]     IDPU (5) ID pullup =0
[    4.737842]   remainder=001e0000
[    4.741677]   ### USBINTR (148) val=00000000
[    4.744959]     SLE (8) sleep int =0
[    4.749213]     URE (6) USB reset int=0
[    4.752789]     PCE (2) port change detect int=0
[    4.756332]     UEI (1) USB error int=0
[    4.761208]     UI (0) USB int=0
[    4.764750]   remainder=00000000
[    4.768224]   ### USBSTS (144) val=00000080
[    4.771452]     ULPI (10) ULPI event complete=0
[    4.775342]     SOF (7) SOF received=1
[    4.779855]     UEI (1) USB error=0
[    4.783691]     UI (0) USB int=0
[    4.787059]   remainder=00000000
[    4.790551]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    4.793745]      SUSPENDM=1
[    4.798690]      OpMode=10b disable bit-stuff and NRZI encoding
[    4.804161]      TermSelect=1
[    4.807546]      XcvrSelect=01b FS
[    4.813359]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    4.813625]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    4.818833]      DmPulldown=1
[    4.823882]      DpPulldown=1
[    4.826818]    ### ULPI_USB_INT_STS (13) val=00000008
[    4.829771]      SessEnd=1
[    4.834817] TRB: ulpi_init() 1
[    4.837405] TRB: ulpi_init() 2
[    4.840462] TRB: ulpi_init() 3
[    4.843484] TRB: ulpi: write 0x63 to 0x81
[    4.846522] TRB: ulpi_init() 4
[    4.850619] TRB: ulpi_write reg=0x81, val=0x63
[    4.853555] TRB: msm writel(),         addr=f0062170, val=60810063
[    4.857984] TRB: msm readl(),          addr=f0062170, val=28810863
[    4.864164] TRB: ulpi_init() 5
[    4.870321] TRB: ulpi_init() 6
[    4.873344] TRB: ulpi_init() 7 - done
[    4.876382] TRB: in msm_phy_reset, entering
[    4.880116]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    4.884129]    ### PORTSC (184) val=8c000804
[    4.889665]      PTS (31:30) transceiver select =10b: ulpi
[    4.898949]     PSPD (27:26) port speed =11b: ???
[    4.903740]     PHCD (23) clock disable =0
[    4.904161]     LS (11:10) line status = 10b: J-state
[    4.912508]     PE (2) port enabled =1
[    4.913276]     CCS (0) current connect status =0
[    4.916836]   remainder=00000000
[    4.921626]   ### OTGSC (1a4) val=003e1000
[    4.924908]     1MSIE (29) 1MS timer int enable =0
[    4.928815]     BSVIE (27) vbus B valid int enable =0
[    4.933606]     FIELD_1MSS (21) 1ms timer status =1
[    4.938711]     FIELD_1MST (13) 1ms timer toggle =0
[    4.943415]     BSE (12) vbus B session end =1
[    4.948259]     BSV (11) vbus B session valid =0
[    4.952790]     ASV (10) vbus A session valid =0
[    4.957547]     AVV (9) A vbus valid =0
[    4.962163]     IDPU (5) ID pullup =0
[    4.965706]   remainder=001e0000
[    4.969524]   ### USBINTR (148) val=00000000
[    4.972842]     SLE (8) sleep int =0
[    4.977077]     URE (6) USB reset int=0
[    4.980652]     PCE (2) port change detect int=0
[    4.984196]     UEI (1) USB error int=0
[    4.989057]     UI (0) USB int=0
[    4.992632]   remainder=00000000
[    4.996088]   ### USBSTS (144) val=00000480
[    4.999299]     ULPI (10) ULPI event complete=1
[    5.003224]     SOF (7) SOF received=1
[    5.007718]     UEI (1) USB error=0
[    5.011559]     UI (0) USB int=0
[    5.014924]   remainder=00000000
[    5.018397]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    5.021627]      SUSPENDM=1
[    5.026556]      OpMode=10b disable bit-stuff and NRZI encoding
[    5.032042]      TermSelect=1
[    5.035410]      XcvrSelect=01b FS
[    5.041240]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    5.041491]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    5.046697]      DmPulldown=1
[    5.051770]      DpPulldown=1
[    5.054682]    ### ULPI_USB_INT_STS (13) val=00000008
[    5.057634]      SessEnd=1
[    5.062685] TRB: msm readl(),          addr=f0062278, val=000d3c32
[    5.065276] TRB: msm writel(),         addr=f0062278, val=000d3c33
[    5.071494] TRB: msm readl(),          addr=f0062278, val=000d3c33
[    5.077602] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    5.083783] TRB: in msm_phy_reset, leaving
[    5.089926]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    5.094023]    ### PORTSC (184) val=8c000804
[    5.099475]      PTS (31:30) transceiver select =10b: ulpi
[    5.108759]     PSPD (27:26) port speed =11b: ???
[    5.113549]     PHCD (23) clock disable =0
[    5.113970]     LS (11:10) line status = 10b: J-state
[    5.122317]     PE (2) port enabled =1
[    5.123083]     CCS (0) current connect status =0
[    5.126644]   remainder=00000000
[    5.131435]   ### OTGSC (1a4) val=003e1000
[    5.134717]     1MSIE (29) 1MS timer int enable =0
[    5.138624]     BSVIE (27) vbus B valid int enable =0
[    5.143415]     FIELD_1MSS (21) 1ms timer status =1
[    5.148520]     FIELD_1MST (13) 1ms timer toggle =0
[    5.153223]     BSE (12) vbus B session end =1
[    5.158067]     BSV (11) vbus B session valid =0
[    5.162598]     ASV (10) vbus A session valid =0
[    5.167357]     AVV (9) A vbus valid =0
[    5.171972]     IDPU (5) ID pullup =0
[    5.175514]   remainder=001e0000
[    5.179335]   ### USBINTR (148) val=00000000
[    5.182650]     SLE (8) sleep int =0
[    5.186887]     URE (6) USB reset int=0
[    5.190463]     PCE (2) port change detect int=0
[    5.194005]     UEI (1) USB error int=0
[    5.198866]     UI (0) USB int=0
[    5.202441]   remainder=00000000
[    5.205896]   ### USBSTS (144) val=00000480
[    5.209109]     ULPI (10) ULPI event complete=1
[    5.213032]     SOF (7) SOF received=1
[    5.217529]     UEI (1) USB error=0
[    5.221365]     UI (0) USB int=0
[    5.224733]   remainder=00000000
[    5.228208]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    5.231437]      SUSPENDM=1
[    5.236364]      OpMode=10b disable bit-stuff and NRZI encoding
[    5.241850]      TermSelect=1
[    5.245218]      XcvrSelect=01b FS
[    5.251050]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    5.251299]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    5.256506]      DmPulldown=1
[    5.261556]      DpPulldown=1
[    5.264491]    ### ULPI_USB_INT_STS (13) val=00000008
[    5.267444]      SessEnd=1
[    5.272495] TRB: msm readl(),          addr=f0062278, val=000d3c32
[    5.275084] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    5.281263] TRB: msm_phy_init, leaving
[    5.287407]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    5.291160]    ### PORTSC (184) val=8c000804
[    5.296610]      PTS (31:30) transceiver select =10b: ulpi
[    5.305893]     PSPD (27:26) port speed =11b: ???
[    5.310683]     PHCD (23) clock disable =0
[    5.311105]     LS (11:10) line status = 10b: J-state
[    5.319435]     PE (2) port enabled =1
[    5.320237]     CCS (0) current connect status =0
[    5.323781]   remainder=00000000
[    5.328553]   ### OTGSC (1a4) val=003e3000
[    5.331869]     1MSIE (29) 1MS timer int enable =0
[    5.335759]     BSVIE (27) vbus B valid int enable =0
[    5.340552]     FIELD_1MSS (21) 1ms timer status =1
[    5.345655]     FIELD_1MST (13) 1ms timer toggle =1
[    5.350358]     BSE (12) vbus B session end =1
[    5.355202]     BSV (11) vbus B session valid =0
[    5.359718]     ASV (10) vbus A session valid =0
[    5.364508]     AVV (9) A vbus valid =0
[    5.369090]     IDPU (5) ID pullup =0
[    5.372668]   remainder=001e0000
[    5.376470]   ### USBINTR (148) val=00000000
[    5.379768]     SLE (8) sleep int =0
[    5.384039]     URE (6) USB reset int=0
[    5.387582]     PCE (2) port change detect int=0
[    5.391159]     UEI (1) USB error int=0
[    5.396001]     UI (0) USB int=0
[    5.399560]   remainder=00000000
[    5.403048]   ### USBSTS (144) val=00000480
[    5.406245]     ULPI (10) ULPI event complete=1
[    5.410168]     SOF (7) SOF received=1
[    5.414664]     UEI (1) USB error=0
[    5.418484]     UI (0) USB int=0
[    5.421885]   remainder=00000000
[    5.425343]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    5.428554]      SUSPENDM=1
[    5.433517]      OpMode=10b disable bit-stuff and NRZI encoding
[    5.438968]      TermSelect=1
[    5.442371]      XcvrSelect=01b FS
[    5.448168]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    5.448434]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    5.453659]      DmPulldown=1
[    5.458672]      DpPulldown=1
[    5.461643]    ### ULPI_USB_INT_STS (13) val=00000008
[    5.464579]      SessEnd=1
[    5.469611] TRB: getting interrupt
[    5.472233] TRB: ci->irq=166
[    5.475602] TRB: ci hw_read: reg=f0064124, mask=00000180,
val=00000180
[    5.478647] ci_hdrc ci_hdrc.0: It is OTG capable controller
[    5.484998] TRB: ci hw_write: reg=f00641a4, mask=7f000000,
data=00000000
[    5.490469] TRB: ci hw_write: reg=f00641a4, mask=007f0000,
data=007f0000
[    5.497396] TRB: in ci_hdrc_gadget_init
[    5.504092] TRB: ci hw_read: reg=f0064124, mask=00000080,
val=00000080
[    5.507638] TRB: setting irq = udc_irq
[    5.514307] TRB: in usb_add_gadget_udc_release()
[    5.518066] TRB: in ci_hdrc_probe, doing otg_set_peripheral, with
ci->gadget=ef02c068
[    5.522774] TRB: in msm_otg_set_peripheral
[    5.530480] TRB: MOSP 1
[    5.534454] TRB: MOSP 6
[    5.536798] peripheral driver registered w/ tranceiver
[    5.539232] TRB: MOSP 7
[    5.544452] TRB: MOSP 8
[    5.546786] TRB: MOSP 9
[    5.549211] TRB: ret=0
[    5.551663] TRB: in msm_otg_sm_work: state=0
[    5.554075] TRB: MOSW 1 OTG_STATE_UNDEFINED state
[    5.558502] TRB: in msm_otg_reset, entering
[    5.563210] TRB: ci hw_read: reg=f00641a4, mask=ffffffff,
val=00201000
[    5.567101] TRB: ci_udc_vbus_session, vbus_active=0
[    5.573731] TRB: ci_udc_vbus_session, gadget_ready=0
[    5.578470] TRB: ci hw_write: reg=f00641a4, mask=007f0000,
data=00080000
[    5.583701]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    5.590382]    ### PORTSC (184) val=8c000804
[    5.595656]      PTS (31:30) transceiver select =10b: ulpi
[    5.604961] TRB: ci hw_write: reg=f00641a4, mask=08000000,
data=08000000
[    5.605382] TRB Requesting irq 166:ci_hdrc_msm
[    5.612179] TRB: Creating device files for ci_hdrc.0
[    5.616477] /home/CORPUSERS/10102229/work/dragonboard/APQ8074_M8974AAAAANLYA31050138_JB_V11/kernel-
14-test-usb/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    5.622285] Freeing unused kernel memory: 280K (c082a000 -
c0870000)
[    5.636246]     PSPD (27:26) port speed =11b: ???
[    5.646953]     PHCD (23) clock disable =0
[    5.647390]     LS (11:10) line status = 10b: J-state
[    5.655720]     PE (2) port enabled =1
[    5.656504]     CCS (0) current connect status =0
[    5.660065]   remainder=00000000
[    5.676227]   ### OTGSC (1a4) val=08203000
[    5.676246]     1MSIE (29) 1MS timer int enable =0
[    5.679202]     BSVIE (27) vbus B valid int enable =1
mkdir: can't create directory '/dev': File exists[    5.689521]
FIELD_1MSS (21) 1ms timer status =
1

[    5.698400]     FIELD_1MST (13) 1ms timer toggle =1
[    5.698419]     BSE (12) vbus B session end =1
[    5.706024]     BSV (11) vbus B session valid =0
[    5.707588]     ASV (10) vbus A session valid =0
[    5.715575]     AVV (9) A vbus valid =0
[    5.716961]     IDPU (5) ID pullup =0
[    5.723884]   remainder=00000000
[    5.724341]   ### USBINTR (148) val=00000000
[    5.727639]     SLE (8) sleep int =0
[    5.740198]     URE (6) USB reset int=0
[    5.740216]     PCE (2) port change detect int=0
[    5.742827]     UEI (1) USB error int=0
[    5.747686]     UI (0) USB int=0
[    5.760258]   remainder=00000000
[    5.760276]   ### USBSTS (144) val=00000480
[    5.762538]     ULPI (10) ULPI event complete=1
[    5.766444]     SOF (7) SOF received=1
[    5.785969]     UEI (1) USB error=0
[    5.785985]     UI (0) USB int=0
[    5.788248]   remainder=00000000
[    5.792913]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    5.794934]      SUSPENDM=1
[    5.799879]      OpMode=10b disable bit-stuff and NRZI encoding
[    5.815934]      TermSelect=1
[    5.818195]      XcvrSelect=01b FS
[    5.824011]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    5.824275]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    5.829482]      DmPulldown=1
[    5.850184]      DpPulldown=1
[    5.850204]    ### ULPI_USB_INT_STS (13) val=00000008
[    5.852120]      SessEnd=1
[    5.857150] TRB: issuing USBCMD_RESET to USB_USBCMD
[    5.859758] TRB: msm writel(),         addr=f0062140, val=00000002
[    5.880186] TRB: msm readl(),          addr=f0062140, val=00080002
[    5.880210] TRB: msm readl(),          addr=f0062140, val=00080000
[    5.885247]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    5.900183]    ### PORTSC (184) val=8c000804
[    5.900202]      PTS (31:30) transceiver select =10b: ulpi
[    5.908448]     PSPD (27:26) port speed =11b: ???
[    5.930184]     PHCD (23) clock disable =0
[    5.930202]     LS (11:10) line status = 10b: J-state
[    5.937580]     PE (2) port enabled =1
[    5.938366]     CCS (0) current connect status =0
[    5.950183]   remainder=00000000
[    5.950200]   ### OTGSC (1a4) val=08203000
[    5.952463]     1MSIE (29) 1MS timer int enable =0
[    5.956369]     BSVIE (27) vbus B valid int enable =1
[    5.970185]     FIELD_1MSS (21) 1ms timer status =1
[    5.970203]     FIELD_1MST (13) 1ms timer toggle =1
[    5.973853]     BSE (12) vbus B session end =1
[    5.978715]     BSV (11) vbus B session valid =0
[    6.000181]     ASV (10) vbus A session valid =0
[    6.000200]     AVV (9) A vbus valid =0
[    6.003849]     IDPU (5) ID pullup =0
[    6.007407]   remainder=00000000
[    6.020179]   ### USBINTR (148) val=00000000
[    6.020197]     SLE (8) sleep int =0
[    6.023498]     URE (6) USB reset int=0
[    6.027057]     PCE (2) port change detect int=0
[    6.040225]     UEI (1) USB error int=0
[    6.040243]     UI (0) USB int=0
[    6.042851]   remainder=00000000
[    6.046326]   ### USBSTS (144) val=00000080
[    6.049537]     ULPI (10) ULPI event complete=0
sh: can't access tty; job control turned off
/ # [    6.063965]     SOF (7) SOF received=1
[    6.063983]     UEI (1) USB error=0
[    6.067703]     UI (0) USB int=0
[    6.071138]   remainder=00000000
[    6.074564]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    6.077775]      SUSPENDM=1
[    6.082836]      OpMode=10b disable bit-stuff and NRZI encoding
[    6.088191]      TermSelect=1
[    6.091613]      XcvrSelect=01b FS
[    6.097388]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    6.097655]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    6.102890]      DmPulldown=1
[    6.107894]      DpPulldown=1
[    6.110866]    ### ULPI_USB_INT_STS (13) val=00000008
[    6.113800]      SessEnd=1
[    6.118833] TRB: in msm_otg_reset, 11111 !!! check regs here
(before) !!!
[    6.121459] TRB: turning PTS transceiver back to ULPI and resetting
rest of PORTSC
[    6.128302] TRB: msm writel(),         addr=f0062184, val=80000000
[    6.135780] TRB: in msm_otg_reset, 11122 !!! check regs here
(after) !!!
[    6.141946]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    6.148783]    ### PORTSC (184) val=8c000804
[    6.154095]      PTS (31:30) transceiver select =10b: ulpi
[    6.163377]     PSPD (27:26) port speed =11b: ???
[    6.168134]     PHCD (23) clock disable =0
[    6.168573]     LS (11:10) line status = 10b: J-state
[    6.176902]     PE (2) port enabled =1
[    6.177687]     CCS (0) current connect status =0
[    6.181264]   remainder=00000000
[    6.186021]   ### OTGSC (1a4) val=08203000
[    6.189320]     1MSIE (29) 1MS timer int enable =0
[    6.193244]     BSVIE (27) vbus B valid int enable =1
[    6.198000]     FIELD_1MSS (21) 1ms timer status =1
[    6.203140]     FIELD_1MST (13) 1ms timer toggle =1
[    6.207810]     BSE (12) vbus B session end =1
[    6.212688]     BSV (11) vbus B session valid =0
[    6.217185]     ASV (10) vbus A session valid =0
[    6.221976]     AVV (9) A vbus valid =0
[    6.226559]     IDPU (5) ID pullup =0
[    6.230117]   remainder=00000000
[    6.233953]   ### USBINTR (148) val=00000000
[    6.237237]     SLE (8) sleep int =0
[    6.241506]     URE (6) USB reset int=0
[    6.245049]     PCE (2) port change detect int=0
[    6.248608]     UEI (1) USB error int=0
[    6.253484]     UI (0) USB int=0
[    6.257026]   remainder=00000000
[    6.260517]   ### USBSTS (144) val=00000480
[    6.263711]     ULPI (10) ULPI event complete=1
[    6.267619]     SOF (7) SOF received=1
[    6.272149]     UEI (1) USB error=0
[    6.275949]     UI (0) USB int=0
[    6.279336]   remainder=00000000
[    6.282826]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    6.286022]      SUSPENDM=1
[    6.290984]      OpMode=10b disable bit-stuff and NRZI encoding
[    6.296436]      TermSelect=1
[    6.299821]      XcvrSelect=01b FS
[    6.305637]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    6.305901]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    6.311127]      DmPulldown=1
[    6.316141]      DpPulldown=1
[    6.319094]    ### ULPI_USB_INT_STS (13) val=00000008
[    6.322064]      SessEnd=1
[    6.327080] TRB: msm writel(),         addr=f0062090, val=00000000
[    6.329687] TRB: in msm_otg_reset, 11133
[    6.335865]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    6.339929]    ### PORTSC (184) val=8c000804
[    6.345241]      PTS (31:30) transceiver select =10b: ulpi
[    6.354522]     PSPD (27:26) port speed =11b: ???
[    6.359281]     PHCD (23) clock disable =0
[    6.359719]     LS (11:10) line status = 10b: J-state
[    6.368048]     PE (2) port enabled =1
[    6.368833]     CCS (0) current connect status =0
[    6.372411]   remainder=00000000
[    6.377167]   ### OTGSC (1a4) val=08201000
[    6.380481]     1MSIE (29) 1MS timer int enable =0
[    6.384373]     BSVIE (27) vbus B valid int enable =1
[    6.389146]     FIELD_1MSS (21) 1ms timer status =1
[    6.394285]     FIELD_1MST (13) 1ms timer toggle =0
[    6.398956]     BSE (12) vbus B session end =1
[    6.403832]     BSV (11) vbus B session valid =0
[    6.408331]     ASV (10) vbus A session valid =0
[    6.413121]     AVV (9) A vbus valid =0
[    6.417704]     IDPU (5) ID pullup =0
[    6.421281]   remainder=00000000
[    6.425083]   ### USBINTR (148) val=00000000
[    6.428381]     SLE (8) sleep int =0
[    6.432652]     URE (6) USB reset int=0
[    6.436194]     PCE (2) port change detect int=0
[    6.439755]     UEI (1) USB error int=0
[    6.444632]     UI (0) USB int=0
[    6.448173]   remainder=00000000
[    6.451662]   ### USBSTS (144) val=00000480
[    6.454858]     ULPI (10) ULPI event complete=1
[    6.458765]     SOF (7) SOF received=1
[    6.463295]     UEI (1) USB error=0
[    6.467096]     UI (0) USB int=0
[    6.470498]   remainder=00000000
[    6.473955]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    6.477168]      SUSPENDM=1
[    6.482130]      OpMode=10b disable bit-stuff and NRZI encoding
[    6.487583]      TermSelect=1
[    6.490984]      XcvrSelect=01b FS
[    6.496781]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    6.497047]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    6.502273]      DmPulldown=1
[    6.507287]      DpPulldown=1
[    6.510256]    ### ULPI_USB_INT_STS (13) val=00000008
[    6.513192]      SessEnd=1
[    6.518224] TRB: msm writel(),         addr=f0062098, val=00000008
[    6.520849] TRB: in msm_otg_reset, 22222
[    6.526993]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    6.531093]    ### PORTSC (184) val=8c000804
[    6.536369]      PTS (31:30) transceiver select =10b: ulpi
[    6.545653]     PSPD (27:26) port speed =11b: ???
[    6.550443]     PHCD (23) clock disable =0
[    6.550866]     LS (11:10) line status = 10b: J-state
[    6.559193]     PE (2) port enabled =1
[    6.559978]     CCS (0) current connect status =0
[    6.563557]   remainder=00000000
[    6.568312]   ### OTGSC (1a4) val=08203000
[    6.571628]     1MSIE (29) 1MS timer int enable =0
[    6.575517]     BSVIE (27) vbus B valid int enable =1
[    6.580309]     FIELD_1MSS (21) 1ms timer status =1
[    6.585415]     FIELD_1MST (13) 1ms timer toggle =1
[    6.590102]     BSE (12) vbus B session end =1
[    6.594979]     BSV (11) vbus B session valid =0
[    6.599477]     ASV (10) vbus A session valid =0
[    6.604268]     AVV (9) A vbus valid =0
[    6.608849]     IDPU (5) ID pullup =0
[    6.612426]   remainder=00000000
[    6.616229]   ### USBINTR (148) val=00000000
[    6.619529]     SLE (8) sleep int =0
[    6.623797]     URE (6) USB reset int=0
[    6.627340]     PCE (2) port change detect int=0
[    6.630917]     UEI (1) USB error int=0
[    6.635760]     UI (0) USB int=0
[    6.639318]   remainder=00000000
[    6.642809]   ### USBSTS (144) val=00000480
[    6.646003]     ULPI (10) ULPI event complete=1
[    6.649910]     SOF (7) SOF received=1
[    6.654440]     UEI (1) USB error=0
[    6.658243]     UI (0) USB int=0
[    6.661644]   remainder=00000000
[    6.665102]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    6.668314]      SUSPENDM=1
[    6.673276]      OpMode=10b disable bit-stuff and NRZI encoding
[    6.678729]      TermSelect=1
[    6.682131]      XcvrSelect=01b FS
[    6.687928]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    6.688194]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    6.693418]      DmPulldown=1
[    6.698432]      DpPulldown=1
[    6.701402]    ### ULPI_USB_INT_STS (13) val=00000008
[    6.704337]      SessEnd=1
[    6.709371] TRB: msm readl(),          addr=f0062278, val=000c3c32
[    6.711997] TRB: msm writel(),         addr=f0062278, val=000d3c32
[    6.718141] TRB: in msm_otg_reset, leaving
[    6.724320]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[    6.728384]    ### PORTSC (184) val=8c000804
[    6.733869]      PTS (31:30) transceiver select =10b: ulpi
[    6.743151]     PSPD (27:26) port speed =11b: ???
[    6.747908]     PHCD (23) clock disable =0
[    6.748347]     LS (11:10) line status = 10b: J-state
[    6.756676]     PE (2) port enabled =1
[    6.757461]     CCS (0) current connect status =0
[    6.761038]   remainder=00000000
[    6.765796]   ### OTGSC (1a4) val=08201000
[    6.769093]     1MSIE (29) 1MS timer int enable =0
[    6.773017]     BSVIE (27) vbus B valid int enable =1
[    6.777775]     FIELD_1MSS (21) 1ms timer status =1
[    6.782913]     FIELD_1MST (13) 1ms timer toggle =0
[    6.787584]     BSE (12) vbus B session end =1
[    6.792460]     BSV (11) vbus B session valid =0
[    6.796959]     ASV (10) vbus A session valid =0
[    6.801750]     AVV (9) A vbus valid =0
[    6.806334]     IDPU (5) ID pullup =0
[    6.809892]   remainder=00000000
[    6.813728]   ### USBINTR (148) val=00000000
[    6.817010]     SLE (8) sleep int =0
[    6.821280]     URE (6) USB reset int=0
[    6.824823]     PCE (2) port change detect int=0
[    6.828383]     UEI (1) USB error int=0
[    6.833260]     UI (0) USB int=0
[    6.836802]   remainder=00000000
[    6.840290]   ### USBSTS (144) val=00000480
[    6.843486]     ULPI (10) ULPI event complete=1
[    6.847393]     SOF (7) SOF received=1
[    6.851922]     UEI (1) USB error=0
[    6.855724]     UI (0) USB int=0
[    6.859110]   remainder=00000000
[    6.862600]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[    6.865796]      SUSPENDM=1
[    6.870758]      OpMode=10b disable bit-stuff and NRZI encoding
[    6.876211]      TermSelect=1
[    6.879596]      XcvrSelect=01b FS
[    6.885409]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[    6.885676]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[    6.890900]      DmPulldown=1
[    6.895915]      DpPulldown=1
[    6.898867]    ### ULPI_USB_INT_STS (13) val=00000008
[    6.901838]      SessEnd=1
[    6.906855] TRB: msm readl(),          addr=f00621a4, val=08203000
[    6.909461] TRB: msm_otg_init_sm, pdata->mode=2
[    6.915638] TRB: MOSW 2 OTG_STATE_B_IDLE state

/ #
/ #
/ # cd lib/modules
/lib/modules # ls
ansi_cprng.ko          g_zero.ko              regs
g_hid.ko               libcomposite.ko        usb_f_mass_storage.ko
g_mass_storage.ko      loadem.sh              usb_f_ss_lb.ko
/lib/modules # insmod libcomposite.ko
/lib/modules # insmod usb_f_ss_lb.ko
/lib/modules # insmod usb_f_mass_storage.ko
/lib/modules # insmod g_zero.ko
[  213.753592] TRB: usb_gadget_probe_driver
[  213.753614] ------------[ cut here ]------------
[  213.756588] WARNING: CPU: 0 PID: 92 at
/home/CORPUSERS/10102229/work/dragonboard/APQ8074_M8974AAAAA
NLYA31050138_JB_V11/kernel-14-test-usb/drivers/usb/gadget/udc-core.c:416
usb_gadget_probe_driver+0x20/
0xf4()
[  213.770179] TRB: usb_gadget_probe_driver
[  213.779313] Modules linked in: g_zero(+) usb_f_mass_storage
usb_f_ss_lb libcomposite
[  213.791182] CPU: 0 PID: 92 Comm: insmod Not tainted
3.13.0-rc6-00148-g1076101-dirty #79
[  213.791229] [<c0214144>] (unwind_backtrace+0x0/0xf8) from
[<c0211ba8>] (show_stack+0x10/0x14)
[  213.798950] [<c0211ba8>] (show_stack+0x10/0x14) from [<c063198c>]
(dump_stack+0x64/0xb4)
[  213.807674] [<c063198c>] (dump_stack+0x64/0xb4) from [<c022afd8>]
(warn_slowpath_common+0x68/0x88)
[  213.815820] [<c022afd8>] (warn_slowpath_common+0x68/0x88) from
[<c022b08c>] (warn_slowpath_fmt+0x30
/0x40)
[  213.824582] [<c022b08c>] (warn_slowpath_fmt+0x30/0x40) from
[<c0522b0c>] (usb_gadget_probe_driver+0
x20/0xf4)
[  213.834218] [<c0522b0c>] (usb_gadget_probe_driver+0x20/0xf4) from
[<c0208860>] (do_one_initcall+0x1
10/0x174)
[  213.844116] [<c0208860>] (do_one_initcall+0x110/0x174) from
[<c0285740>] (load_module+0x185c/0x1c6c
)
[  213.853922] [<c0285740>] (load_module+0x185c/0x1c6c) from
[<c0285c40>] (SyS_init_module+0xf0/0x100)
[  213.863034] [<c0285c40>] (SyS_init_module+0xf0/0x100) from
[<c020e3c0>] (ret_fast_syscall+0x0/0x30)
[  213.871805] ---[ end trace babbb03ea78eda66 ]---
[  213.880816] TRB: in udc_bind_to_driver
[  213.885647] TRB: udc_bind_to_driver 1
[  213.889245] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
[  213.892967] zero gadget: zero ready
[  213.899016] TRB: udc_bind_to_driver 2
[  213.902335] TRB: udc_bind_to_driver 3 - calling
usb_gadget_udc_start
[  213.906136] TRB: calling through gadget->ops->udc_start()
[  213.912580] TRB: ci_udc_start()
[  213.917850] TRB: CIS 1
[  213.920821] TRB: CIS 2
[  213.923231] TRB: CIS 3
[  213.925576] TRB: CIS 4
[  213.927919] TRB: CIS 5
[  213.930295] TRB: CIS 6, vbus_active=0
[  213.932608] TRB: udc_bind_to_driver 4
[  213.936341] TRB: udc_bind_to_driver 5
[  213.939988] TRB: udc_bind_to_driver 6
[  213.943837] TRB: udc_bind_to_driver 7
/lib/modules #
/lib/modules # regs
sh: regs: not found
/lib/modules # ./regs
[  242.314425] TRB: in msm_otg_reg_show
[  242.314445]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  242.317057]    ### PORTSC (184) val=8c000804
[  242.322426]      PTS (31:30) transceiver select =10b: ulpi
[  242.331671]     PSPD (27:26) port speed =11b: ???
[  242.336407]     PHCD (23) clock disable =0
[  242.336844]     LS (11:10) line status = 10b: J-state
[  242.345174]     PE (2) port enabled =1
[  242.345957]     CCS (0) current connect status =0
[  242.349519]   remainder=00000000
[  242.354310]   ### OTGSC (1a4) val=08203000
[  242.357591]     1MSIE (29) 1MS timer int enable =0
[  242.361515]     BSVIE (27) vbus B valid int enable =1
[  242.366272]     FIELD_1MSS (21) 1ms timer status =1
[  242.371410]     FIELD_1MST (13) 1ms timer toggle =1
[  242.376081]     BSE (12) vbus B session end =1
[  242.380960]     BSV (11) vbus B session valid =0
[  242.385456]     ASV (10) vbus A session valid =0
[  242.390248]     AVV (9) A vbus valid =0
[  242.394830]     IDPU (5) ID pullup =0
[  242.398389]   remainder=00000000
[  242.402225]   ### USBINTR (148) val=00000000
[  242.405509]     SLE (8) sleep int =0
[  242.409760]     URE (6) USB reset int=0
[  242.413367]     PCE (2) port change detect int=0
[  242.416880]     UEI (1) USB error int=0
[  242.421758]     UI (0) USB int=0
[  242.425297]   remainder=00000000
[  242.428771]   ### USBSTS (144) val=00000480
[  242.432000]     ULPI (10) ULPI event complete=1
[  242.435890]     SOF (7) SOF received=1
[  242.440420]     UEI (1) USB error=0
[  242.444222]     UI (0) USB int=0
[  242.447606]   remainder=00000000
[  242.451099]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  242.454292]      SUSPENDM=1
[  242.459237]      OpMode=10b disable bit-stuff and NRZI encoding
[  242.464709]      TermSelect=1
[  242.468093]      XcvrSelect=01b FS
[  242.473909]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  242.474173]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  242.479381]      DmPulldown=1
[  242.484430]      DpPulldown=1
[  242.487366]    ### ULPI_USB_INT_STS (13) val=00000008
[  242.490335]      SessEnd=1
See regs in dmesg log
/lib/modules # echo none >/debugfs/msm_otg/mode
[  256.055595] TRB: in msm_otg_mode_write
[  256.055615] TRB: in msm_otg_mode_write, req_mode=0
[  256.058262] TRB: requested 'unknown' mode
[  256.063135] TRB: doing nothing 1
/lib/modules # echo peripheral >/debugfs/msm_otg/mode
[  263.136812] TRB: in msm_otg_mode_write
[  263.136983] TRB: in msm_otg_mode_write, req_mode=2
[  263.140685] TRB: requested 'peripheral' mode
[  263.145417] TRB: in msm_otg_sm_work: state=1
[  263.149832] TRB: MOSW 2 OTG_STATE_B_IDLE state
[  263.154289] TRB: msm writel(),         addr=f0062170, val=40040000
[  263.158342] TRB: msm readl(),          addr=f0062170, val=08045500
[  263.164547] TRB: msm readl(),          addr=f0062170, val=08045500
[  263.170706] TRB: ulpi_read reg=0x4, val=0x55
[  263.176828] TRB: ulpi_write reg=0x4, val=0x4d
[  263.181276] TRB: msm writel(),         addr=f0062170, val=6004004d
[  263.185511] TRB: msm readl(),          addr=f0062170, val=2804554d
[  263.191606] TRB: ulpi_write reg=0x86, val=0x3f
[  263.197747] TRB: msm writel(),         addr=f0062170, val=6086003f
[  263.202194] TRB: msm readl(),          addr=f0062170, val=2886553f
[  263.208339] TRB: ulpi_write reg=0x92, val=0x1f
[  263.214519] TRB: msm writel(),         addr=f0062170, val=6092001f
[  263.218931] TRB: msm readl(),          addr=f0062170, val=2892551f
[  263.225112] TRB: ulpi_write reg=0x95, val=0x1f
[  263.231271] TRB: msm writel(),         addr=f0062170, val=6095001f
[  263.235685] TRB: msm readl(),          addr=f0062170, val=2895551f
[  263.241967] TRB: ulpi_write reg=0x85, val=0x10
[  263.248009] TRB: msm writel(),         addr=f0062170, val=60850010
[  263.252455] TRB: msm readl(),          addr=f0062170, val=28855510
/lib/modules # [  263.350167] TRB: msm writel(),
addr=f0062170, val=40870000
[  263.350187] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.355227] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.361408] TRB: ulpi_read reg=0x87, val=0x0
[  263.460167] TRB: msm writel(),         addr=f0062170, val=40870000
[  263.460187] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.465227] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.471407] TRB: ulpi_read reg=0x87, val=0x0
[  263.570166] TRB: msm writel(),         addr=f0062170, val=40870000
[  263.570186] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.575224] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.581406] TRB: ulpi_read reg=0x87, val=0x0
[  263.680166] TRB: msm writel(),         addr=f0062170, val=40870000
[  263.680186] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.685225] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.691407] TRB: ulpi_read reg=0x87, val=0x0
[  263.790166] TRB: msm writel(),         addr=f0062170, val=40870000
[  263.790186] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.795225] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.801407] TRB: ulpi_read reg=0x87, val=0x0
[  263.900165] TRB: msm writel(),         addr=f0062170, val=40870000
[  263.900186] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.905224] TRB: msm readl(),          addr=f0062170, val=08870000
[  263.911405] TRB: ulpi_read reg=0x87, val=0x0
[  263.917550] TRB: ulpi_write reg=0x86, val=0x10
[  263.921992] TRB: msm writel(),         addr=f0062170, val=60860010
[  263.926233] TRB: msm readl(),          addr=f0062170, val=28860010
[  263.932411] TRB: ulpi_write reg=0x85, val=0x2
[  263.938556] TRB: msm writel(),         addr=f0062170, val=60850002
[  263.943003] TRB: msm readl(),          addr=f0062170, val=28850002
[  263.949061] TRB: ulpi_write reg=0x85, val=0x1
[  263.955240] TRB: msm writel(),         addr=f0062170, val=60850001
[  263.959652] TRB: msm readl(),          addr=f0062170, val=28850001
[  264.000165] TRB: msm writel(),         addr=f0062170, val=40870000
[  264.000185] TRB: msm readl(),          addr=f0062170, val=08870000
[  264.005224] TRB: msm readl(),          addr=f0062170, val=08870000
[  264.011405] TRB: ulpi_read reg=0x87, val=0x0
[  264.017552] TRB: ulpi_write reg=0x86, val=0x3f
[  264.021993] TRB: msm writel(),         addr=f0062170, val=6086003f
[  264.026231] TRB: msm readl(),          addr=f0062170, val=2886003f
[  264.032410] TRB: ulpi_write reg=0x92, val=0x1f
[  264.038554] TRB: msm writel(),         addr=f0062170, val=6092001f
[  264.043002] TRB: msm readl(),          addr=f0062170, val=2892001f
[  264.049146] TRB: ulpi_write reg=0x95, val=0x1f
[  264.055326] TRB: msm writel(),         addr=f0062170, val=6095001f
[  264.059739] TRB: msm readl(),          addr=f0062170, val=2895001f
[  264.065918] TRB: msm writel(),         addr=f0062170, val=40040000
[  264.072082] TRB: msm readl(),          addr=f0062170, val=08044d00
[  264.078228] TRB: msm readl(),          addr=f0062170, val=08044d00
[  264.084407] TRB: ulpi_read reg=0x4, val=0x4d
[  264.090568] TRB: ulpi_write reg=0x4, val=0x45
[  264.094978] TRB: msm writel(),         addr=f0062170, val=60040045
[  264.099234] TRB: msm readl(),          addr=f0062170, val=28044d45
[  264.105337] TRB: in msm_otg_sm_work: state=1
[  264.111507] TRB: MOSW 2 OTG_STATE_B_IDLE state
[  264.115903] msm_otg f9a55000.usb: Avail curr from USB = 100
[  264.120171] TRB: msm_otg_start_peripheral, on=1
[  264.125620] TRB: msm_otg_start_peripheral, gadget on
[  264.130153] TRB: ci_udc_vbus_session, vbus_active=1
[  264.135343] TRB: ci_udc_vbus_session, gadget_ready=1
[  264.139944] TRB: ci_udc_vbus_session, reset controller
[  264.145168] TRB: hw_device_reset
[  264.150100] TRB: ci hw_write: reg=f00641b4, mask=ffffffff,
data=ffffffff
[  264.153507] TRB: ci hw_write: reg=f0064140, mask=00000001,
data=00000000
[  264.160191] TRB: ci hw_write: reg=f0064140, mask=00000002,
data=00000002
[  264.166858] TRB: ci hw_read: reg=f0064140, mask=00000002,
val=00000002
[  264.173569] TRB: ci hw_read: reg=f0064140, mask=00000002,
val=00000000
[  264.179881] ci_hdrc ci_hdrc.0: CI_HDRC_CONTROLLER_RESET_EVENT
received
[  264.186405] TRB: msm_phy_init, entering
[  264.192912]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  264.196630]    ### PORTSC (184) val=8c000804
[  264.202199]      PTS (31:30) transceiver select =10b: ulpi
[  264.211483]     PSPD (27:26) port speed =11b: ???
[  264.216240]     PHCD (23) clock disable =0
[  264.216679]     LS (11:10) line status = 10b: J-state
[  264.225009]     PE (2) port enabled =1
[  264.225792]     CCS (0) current connect status =0
[  264.229353]   remainder=00000000
[  264.234144]   ### OTGSC (1a4) val=08203000
[  264.237425]     1MSIE (29) 1MS timer int enable =0
[  264.241350]     BSVIE (27) vbus B valid int enable =1
[  264.246108]     FIELD_1MSS (21) 1ms timer status =1
[  264.251246]     FIELD_1MST (13) 1ms timer toggle =1
[  264.255916]     BSE (12) vbus B session end =1
[  264.260794]     BSV (11) vbus B session valid =0
[  264.265291]     ASV (10) vbus A session valid =0
[  264.270064]     AVV (9) A vbus valid =0
[  264.274682]     IDPU (5) ID pullup =0
[  264.278224]   remainder=00000000
[  264.282060]   ### USBINTR (148) val=00000000
[  264.285343]     SLE (8) sleep int =0
[  264.289596]     URE (6) USB reset int=0
[  264.293171]     PCE (2) port change detect int=0
[  264.296715]     UEI (1) USB error int=0
[  264.301590]     UI (0) USB int=0
[  264.305132]   remainder=00000000
[  264.308605]   ### USBSTS (144) val=00000080
[  264.311834]     ULPI (10) ULPI event complete=0
[  264.315723]     SOF (7) SOF received=1
[  264.320255]     UEI (1) USB error=0
[  264.324056]     UI (0) USB int=0
[  264.327442]   remainder=00000000
[  264.330933]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  264.334127]      SUSPENDM=1
[  264.339073]      OpMode=10b disable bit-stuff and NRZI encoding
[  264.344543]      TermSelect=1
[  264.347927]      XcvrSelect=01b FS
[  264.353742]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  264.354008]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  264.359215]      DmPulldown=1
[  264.364263]      DpPulldown=1
[  264.367200]    ### ULPI_USB_INT_STS (13) val=00000008
[  264.370170]      SessEnd=1
[  264.375184] TRB: ulpi_init() 1
[  264.377788] TRB: ulpi_init() 2
[  264.380842] TRB: ulpi_init() 3
[  264.383865] TRB: ulpi: write 0x63 to 0x81
[  264.386905] TRB: ulpi_init() 4
[  264.391000] TRB: ulpi_write reg=0x81, val=0x63
[  264.393937] TRB: msm writel(),         addr=f0062170, val=60810063
[  264.398367] TRB: msm readl(),          addr=f0062170, val=28810863
[  264.404546] TRB: ulpi_init() 5
[  264.410704] TRB: ulpi_init() 6
[  264.413725] TRB: ulpi_init() 7 - done
[  264.416766] TRB: in msm_phy_reset, entering
[  264.420516]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  264.424494]    ### PORTSC (184) val=8c000804
[  264.430048]      PTS (31:30) transceiver select =10b: ulpi
[  264.439331]     PSPD (27:26) port speed =11b: ???
[  264.444122]     PHCD (23) clock disable =0
[  264.444543]     LS (11:10) line status = 10b: J-state
[  264.452890]     PE (2) port enabled =1
[  264.453658]     CCS (0) current connect status =0
[  264.457219]   remainder=00000000
[  264.462008]   ### OTGSC (1a4) val=08203000
[  264.465290]     1MSIE (29) 1MS timer int enable =0
[  264.469197]     BSVIE (27) vbus B valid int enable =1
[  264.473989]     FIELD_1MSS (21) 1ms timer status =1
[  264.479093]     FIELD_1MST (13) 1ms timer toggle =1
[  264.483797]     BSE (12) vbus B session end =1
[  264.488640]     BSV (11) vbus B session valid =0
[  264.493171]     ASV (10) vbus A session valid =0
[  264.497929]     AVV (9) A vbus valid =0
[  264.502546]     IDPU (5) ID pullup =0
[  264.506088]   remainder=00000000
[  264.509906]   ### USBINTR (148) val=00000000
[  264.513224]     SLE (8) sleep int =0
[  264.517459]     URE (6) USB reset int=0
[  264.521035]     PCE (2) port change detect int=0
[  264.524579]     UEI (1) USB error int=0
[  264.529439]     UI (0) USB int=0
[  264.533014]   remainder=00000000
[  264.536470]   ### USBSTS (144) val=00000480
[  264.539682]     ULPI (10) ULPI event complete=1
[  264.543605]     SOF (7) SOF received=1
[  264.548102]     UEI (1) USB error=0
[  264.551937]     UI (0) USB int=0
[  264.555306]   remainder=00000000
[  264.558779]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  264.562010]      SUSPENDM=1
[  264.566938]      OpMode=10b disable bit-stuff and NRZI encoding
[  264.572425]      TermSelect=1
[  264.575793]      XcvrSelect=01b FS
[  264.581623]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  264.581873]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  264.587079]      DmPulldown=1
[  264.592128]      DpPulldown=1
[  264.595064]    ### ULPI_USB_INT_STS (13) val=00000008
[  264.598017]      SessEnd=1
[  264.603068] TRB: msm readl(),          addr=f0062278, val=000c3c32
[  264.605657] TRB: msm writel(),         addr=f0062278, val=000c3c33
[  264.611878] TRB: msm readl(),          addr=f0062278, val=000c3c33
[  264.617985] TRB: msm writel(),         addr=f0062278, val=000c3c32
[  264.624164] TRB: in msm_phy_reset, leaving
[  264.630325]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  264.634390]    ### PORTSC (184) val=8c000804
[  264.639856]      PTS (31:30) transceiver select =10b: ulpi
[  264.649140]     PSPD (27:26) port speed =11b: ???
[  264.653930]     PHCD (23) clock disable =0
[  264.654352]     LS (11:10) line status = 10b: J-state
[  264.662700]     PE (2) port enabled =1
[  264.663466]     CCS (0) current connect status =0
[  264.667027]   remainder=00000000
[  264.671817]   ### OTGSC (1a4) val=08201000
[  264.675099]     1MSIE (29) 1MS timer int enable =0
[  264.679006]     BSVIE (27) vbus B valid int enable =1
[  264.683798]     FIELD_1MSS (21) 1ms timer status =1
[  264.688901]     FIELD_1MST (13) 1ms timer toggle =0
[  264.693606]     BSE (12) vbus B session end =1
[  264.698450]     BSV (11) vbus B session valid =0
[  264.702982]     ASV (10) vbus A session valid =0
[  264.707739]     AVV (9) A vbus valid =0
[  264.712354]     IDPU (5) ID pullup =0
[  264.715897]   remainder=00000000
[  264.719716]   ### USBINTR (148) val=00000000
[  264.723033]     SLE (8) sleep int =0
[  264.727269]     URE (6) USB reset int=0
[  264.730844]     PCE (2) port change detect int=0
[  264.734388]     UEI (1) USB error int=0
[  264.739248]     UI (0) USB int=0
[  264.742822]   remainder=00000000
[  264.746279]   ### USBSTS (144) val=00000480
[  264.749491]     ULPI (10) ULPI event complete=1
[  264.753416]     SOF (7) SOF received=1
[  264.757911]     UEI (1) USB error=0
[  264.761746]     UI (0) USB int=0
[  264.765115]   remainder=00000000
[  264.768590]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  264.771820]      SUSPENDM=1
[  264.776745]      OpMode=10b disable bit-stuff and NRZI encoding
[  264.782233]      TermSelect=1
[  264.785601]      XcvrSelect=01b FS
[  264.791432]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  264.791681]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  264.796888]      DmPulldown=1
[  264.801937]      DpPulldown=1
[  264.804874]    ### ULPI_USB_INT_STS (13) val=00000008
[  264.807825]      SessEnd=1
[  264.812875] TRB: msm readl(),          addr=f0062278, val=000c3c32
[  264.815466] TRB: msm writel(),         addr=f0062278, val=000d3c32
[  264.821646] TRB: msm_phy_init, leaving
[  264.827789]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  264.831543]    ### PORTSC (184) val=8c000804
[  264.836991]      PTS (31:30) transceiver select =10b: ulpi
[  264.846275]     PSPD (27:26) port speed =11b: ???
[  264.851068]     PHCD (23) clock disable =0
[  264.851488]     LS (11:10) line status = 10b: J-state
[  264.859816]     PE (2) port enabled =1
[  264.860619]     CCS (0) current connect status =0
[  264.864162]   remainder=00000000
[  264.868936]   ### OTGSC (1a4) val=08201000
[  264.872252]     1MSIE (29) 1MS timer int enable =0
[  264.876142]     BSVIE (27) vbus B valid int enable =1
[  264.880933]     FIELD_1MSS (21) 1ms timer status =1
[  264.886038]     FIELD_1MST (13) 1ms timer toggle =0
[  264.890742]     BSE (12) vbus B session end =1
[  264.895585]     BSV (11) vbus B session valid =0
[  264.900099]     ASV (10) vbus A session valid =0
[  264.904892]     AVV (9) A vbus valid =0
[  264.909474]     IDPU (5) ID pullup =0
[  264.913050]   remainder=00000000
[  264.916852]   ### USBINTR (148) val=00000000
[  264.920169]     SLE (8) sleep int =0
[  264.924404]     URE (6) USB reset int=0
[  264.927962]     PCE (2) port change detect int=0
[  264.931541]     UEI (1) USB error int=0
[  264.936383]     UI (0) USB int=0
[  264.939942]   remainder=00000000
[  264.943431]   ### USBSTS (144) val=00000480
[  264.946626]     ULPI (10) ULPI event complete=1
[  264.950551]     SOF (7) SOF received=1
[  264.955045]     UEI (1) USB error=0
[  264.958865]     UI (0) USB int=0
[  264.962267]   remainder=00000000
[  264.965725]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  264.968937]      SUSPENDM=1
[  264.973899]      OpMode=10b disable bit-stuff and NRZI encoding
[  264.979352]      TermSelect=1
[  264.982753]      XcvrSelect=01b FS
[  264.988551]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  264.988817]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  264.994042]      DmPulldown=1
[  264.999055]      DpPulldown=1
[  265.002026]    ### ULPI_USB_INT_STS (13) val=00000008
[  265.004961]      SessEnd=1
[  265.009994] TRB: ci hw_write: reg=f00641a8, mask=00000010,
data=00000010
[  265.012624] TRB: ci hw_write: reg=f00641a8, mask=00000003,
data=00000000
[  265.019462] TRB: ci hw_write: reg=f00641a8, mask=00000003,
data=00000002
[  265.026163] TRB: ci hw_write: reg=f00641a8, mask=00000008,
data=00000008
[  265.032847] TRB: ci hw_read: reg=f00641a8, mask=00000003,
val=00000002
[  265.039512] TRB hw_device_reset done
[  265.045863] TRB: ucd.c:hw_device_state, dma=791977984
[  265.049581] TRB: ci hw_write: reg=f0064158, mask=ffffffff,
data=2f34a000
[  265.054550] TRB: ci hw_write: reg=f0064148, mask=ffffffff,
data=00000147
[  265.061318] TRB: ci hw_write: reg=f0064140, mask=00000001,
data=00000001
[  265.067985] TRB: ucd.c:hw_device_state done
[  265.074684] ci_hdrc ci_hdrc.0: Connected to host

/lib/modules # ./regs
[  270.226712] TRB: in msm_otg_reg_show
[  270.226731]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
[  270.229343]    ### PORTSC (184) val=8c000804
[  270.234715]      PTS (31:30) transceiver select =10b: ulpi
[  270.243956]     PSPD (27:26) port speed =11b: ???
[  270.248692]     PHCD (23) clock disable =0
[  270.249131]     LS (11:10) line status = 10b: J-state
[  270.257460]     PE (2) port enabled =1
[  270.258245]     CCS (0) current connect status =0
[  270.261822]   remainder=00000000
[  270.266578]   ### OTGSC (1a4) val=08203000
[  270.269876]     1MSIE (29) 1MS timer int enable =0
[  270.273801]     BSVIE (27) vbus B valid int enable =1
[  270.278558]     FIELD_1MSS (21) 1ms timer status =1
[  270.283698]     FIELD_1MST (13) 1ms timer toggle =1
[  270.288368]     BSE (12) vbus B session end =1
[  270.293245]     BSV (11) vbus B session valid =0
[  270.297743]     ASV (10) vbus A session valid =0
[  270.302534]     AVV (9) A vbus valid =0
[  270.307115]     IDPU (5) ID pullup =0
[  270.310691]   remainder=00000000
[  270.314495]   ### USBINTR (148) val=00000147
[  270.317794]     SLE (8) sleep int =1
[  270.322063]     URE (6) USB reset int=1
[  270.325606]     PCE (2) port change detect int=1
[  270.329166]     UEI (1) USB error int=1
[  270.334042]     UI (0) USB int=1
[  270.337585]   remainder=00000000
[  270.341073]   ### USBSTS (144) val=00000480
[  270.344270]     ULPI (10) ULPI event complete=1
[  270.348176]     SOF (7) SOF received=1
[  270.352706]     UEI (1) USB error=0
[  270.356507]     UI (0) USB int=0
[  270.359894]   remainder=00000000
[  270.363383]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
[  270.366579]      SUSPENDM=1
[  270.371542]      OpMode=10b disable bit-stuff and NRZI encoding
[  270.376995]      TermSelect=1
[  270.380396]      XcvrSelect=01b FS
[  270.386193]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
[  270.386459]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
[  270.391684]      DmPulldown=1
[  270.396698]      DpPulldown=1
[  270.399652]    ### ULPI_USB_INT_STS (13) val=00000008
[  270.402620]      SessEnd=1
See regs in dmesg log
/lib/modules # echo "no joy!"
no joy!

On Wed, Mar 5, 2014 at 2:13 AM, Ivan T. Ivanov <iivanov@mm-sol.com> wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> Hi,
>
> This is a fifth version of patches posted earlier here [1].
>
> They have been tested on AP8074 DragonBoard. Only gadget
> mode utilized for now.
>
> CV Test Suite engine "Chapter 9 tests" are passing except
> "Halt Endpoint Test".
>
> usbtest driver report following failure:
> test 13 --> 32 (Broken pipe)    ep 81 couldn't set halt, -32
>
> Changes since v4:
>  - Drop patch [1/15] usb: phy: msm: Move mach dependent code to platform data
>    it is already merged.
>  - Address comments regarding devicetree bindings.
>
> [1] https://lkml.org/lkml/2013/11/12/298
>
> Ivan T. Ivanov (14):
>   usb: phy: msm: Move global regulators variables to driver state
>   usb: phy: msm: Migrate to Managed Device Resource allocation
>   usb: phy: msm: Remove unnecessarily check for valid regulators.
>   usb: phy: msm: Fix checkpatch.pl warnings
>   usb: phy: msm: Replace custom enum usb_mode_type with enum
>     usb_dr_mode
>   usb: phy: msm: Remove unused pclk_src_name
>   usb: phy: msm: Remove HSUSB prefix from regulator names
>   usb: phy: msm: Properly check result from platform_get_irq()
>   usb: phy: msm: Add device tree support and binding information
>   usb: phy: msm: Use reset framework for LINK and PHY resets
>   usb: phy: msm: Add support for secondary PHY control
>   usb: phy: msm: Correct USB PHY Reset sequence for newer platform
>   usb: phy: msm: Handle disconnect events
>   usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX
>
>  .../devicetree/bindings/usb/msm-hsusb.txt          |   78 +++
>  arch/arm/mach-msm/board-msm7x30.c                  |    2 +-
>  arch/arm/mach-msm/board-qsd8x50.c                  |    2 +-
>  drivers/usb/phy/phy-msm-usb.c                      |  674 +++++++++++---------
>  include/linux/usb/msm_hsusb.h                      |   39 +-
>  include/linux/usb/msm_hsusb_hw.h                   |    6 +
>  6 files changed, 474 insertions(+), 327 deletions(-)
>
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
 -- Tim Bird
Senior Software Engineer, Sony Mobile
Architecture Group Chair, CE Workgroup, Linux Foundation

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets
  2014-03-05 12:34   ` Sergei Shtylyov
@ 2014-03-06 16:35     ` Ivan T. Ivanov
  0 siblings, 0 replies; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-06 16:35 UTC (permalink / raw)
  To: Sergei Shtylyov, Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-arm-msm



On 03/05/14 14:34, Sergei Shtylyov wrote:
> Hello.
> 

>> --- a/drivers/usb/phy/phy-msm-usb.c
>> +++ b/drivers/usb/phy/phy-msm-usb.c
> [...]
>> @@ -235,12 +236,16 @@ static void ulpi_init(struct msm_otg *motg)
>>
>>   static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
>>   {
>> -    int ret = 0;
>> +    int ret;
>>
>> -    if (!motg->pdata->link_clk_reset)
>> -        return ret;
>> +    if (motg->pdata->link_clk_reset)
>> +        ret = motg->pdata->link_clk_reset(motg->clk, assert);
>> +    else
>> +        if (assert)
> 
>    Kernel style assumes:
> 
>     else if (assert)

Thanks. will fix it.

Regards,
Ivan

> 
>> +            ret = reset_control_assert(motg->link_rst);
>> +        else
>> +            ret = reset_control_deassert(motg->link_rst);
>>
> [...]
> 
> WBR, Sergei
> 
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support
  2014-03-06  1:54 ` [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Tim Bird
@ 2014-03-08  0:15   ` Felipe Balbi
  2014-03-08 16:46     ` Ivan T. Ivanov
  0 siblings, 1 reply; 21+ messages in thread
From: Felipe Balbi @ 2014-03-08  0:15 UTC (permalink / raw)
  To: Tim Bird
  Cc: Ivan T. Ivanov, Kumar Gala, David Brown,
	Linux Kernel Mailing List, linux-arm-msm, linux-usb

[-- Attachment #1: Type: text/plain, Size: 104456 bytes --]

On Wed, Mar 05, 2014 at 05:54:03PM -0800, Tim Bird wrote:
> Ivan,
> 
> I'm still unsuccessful at getting this patch set to work on my kernel.
>  Below is a sequence of register dumps showing the boot (and reset
> during boot).  It shows a status transition in my kernel when I pull
> the controller out of reset, and re-write PORTSC:PTS to ULPI
> (simultaneously writing other bits in PORTSC to 0) This is at 3.109535
> in the boot log below.  The status I'm seeing back from the other
> registers doesn't make sense, and is different from what I see in 3.4
> (where USB runs successfully on the board).  Is there some connection
> between the PMIC and the USB that I'm missing?  The transition from
> vbus B session valid to vbus B session end seems wrong (as does the
> ULPII transitioning to 1).
> 
> In measuring voltages on the board, it appears that that vbus from the
> connector (at 5V) gets routed through the PMIC, but comes out at 3.3V
> on its way to the PHY VBUS input (measured at R179).  This seems
> really weird - maybe you can shed some light on what is going on here.
> 
> Could you possibly send me your zImage and dtb file, so I can test
> them on my board to make sure that the hardware is working?
> 
> Thanks,
>  -- Tim
> 
> Here is my bootup sequence:
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] TRB: version 88888
> [    0.000000] Linux version 3.13.0-rc6-00148-g1076101-dirty
> (10102229@ussvlx8980) (gcc version 4.6.x-
> google 20120106 (prerelease) (GCC) ) #79 SMP PREEMPT Wed Mar 5
> 17:41:54 PST 2014
> [    0.000000] CPU: ARMv7 Processor [512f06f0] revision 0 (ARMv7),
> cr=10c5387d
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT
> instruction cache
> [    0.000000] Machine model: Qualcomm APQ8074 Dragonboard
> [    0.000000] bootconsole [earlycon0] enabled
> [    0.000000] Memory policy: Data cache writealloc
> [    0.000000] On node 0 totalpages: 524288
> [    0.000000] free_area_init_node: node 0, pgdat c08abac0,
> node_mem_map c0922000
> [    0.000000]   Normal zone: 1520 pages used for memmap
> [    0.000000]   Normal zone: 0 pages reserved
> [    0.000000]   Normal zone: 194560 pages, LIFO batch:31
> [    0.000000]   HighMem zone: 2576 pages used for memmap
> [    0.000000]   HighMem zone: 329728 pages, LIFO batch:31
> [    0.000000] PERCPU: Embedded 8 pages/cpu @c1935000 s12224 r8192
> d12352 u32768
> [    0.000000] pcpu-alloc: s12224 r8192 d12352 u32768 alloc=8*4096
> [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
> Total pages: 522768
> [    0.000000] Kernel command line: console=ttyMSM,115200,n8
> androidboot.hardware=qcom user_debug=31 m
> axcpus=2 msm_rtb.filter=0x37 ehci-hcd.park=3 earlyprintk debug
> androidboot.emmc=true androidboot.seria
> lno=40081a14 androidboot.baseband=apq
> [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
> [    0.000000] Dentry cache hash table entries: 131072 (order: 7,
> 524288 bytes)
> [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144
> bytes)
> [    0.000000] Memory: 2068932K/2097152K available (4458K kernel code,
> 257K rwdata, 1820K rodata, 283K
>  init, 443K bss, 28220K reserved, 1318912K highmem)
> [    0.000000] Virtual kernel memory layout:
> [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
> [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
> [    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
> [    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
> [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
> [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
> [    0.000000]       .text : 0xc0208000 - 0xc0829de8   (6280 kB)
> [    0.000000]       .init : 0xc082a000 - 0xc0870fc0   ( 284 kB)
> [    0.000000]       .data : 0xc0872000 - 0xc08b240c   ( 258 kB)
> [    0.000000]        .bss : 0xc08b240c - 0xc092139c   ( 444 kB)
> [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4,
> Nodes=1
> [    0.000000] Preemptible hierarchical RCU implementation.
> [    0.000000] NR_IRQS:16 nr_irqs:16 16
> [    0.000000] Architected cp15 and mmio timer(s) running at 19.20MHz
> (virt/virt).
> [    0.000000] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps
> every 3579139424256ns
> [    0.000000] Switching to timer-based delay loop
> [    0.000000] Console: colour dummy device 80x30
> [    0.009136] Calibrating delay loop (skipped), value calculated
> using timer frequency.. 38.40 BogoMI
> PS (lpj=192000)
> [    0.019535] pid_max: default: 32768 minimum: 301
> [    0.024383] Mount-cache hash table entries: 512
> [    0.029530] CPU: Testing write buffer coherency: ok
> [    0.033969] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> [    0.039532] Setting up static identity map for 0x63b910 - 0x63b968
> [    0.119860] CPU1: failed to boot: -38
> [    0.139881] CPU2: failed to boot: -38
> [    0.159915] CPU3: failed to boot: -38
> [    0.162640] Brought up 1 CPUs
> [    0.165657] SMP: Total of 1 processors activated.
> [    0.170459] CPU: All CPU(s) started in SVC mode.
> [    0.184094] VFP support v0.3: implementor 51 architecture 0 part 6f
> variant 2 rev 0
> [    0.191855] pinctrl core: initialized pinctrl subsystem
> [    0.196365] regulator-dummy: no parameters
> [    0.200498] NET: Registered protocol family 16
> [    0.205042] DMA: preallocated 256 KiB pool for atomic coherent
> allocations
> [    0.215631] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4
> watchpoint registers.
> [    0.222677] hw-breakpoint: maximum watchpoint size is 8 bytes.
> [    0.232176] bio: create slab <bio-0> at 0
> [    0.235853] SCSI subsystem initialized
> [    0.240139] Switched to clocksource arch_sys_counter
> [    0.249150] cfg80211: Calling CRDA to update world regulatory
> domain
> [    0.277578] NET: Registered protocol family 2
> [    0.281408] TCP established hash table entries: 8192 (order: 3,
> 32768 bytes)
> [    0.288130] TCP bind hash table entries: 8192 (order: 4, 65536
> bytes)
> [    0.294707] TCP: Hash tables configured (established 8192 bind
> 8192)
> [    0.301082] TCP: reno registered
> [    0.304335] UDP hash table entries: 512 (order: 2, 16384 bytes)
> [    0.310353] UDP-Lite hash table entries: 512 (order: 2, 16384
> bytes)
> [    0.316930] NET: Registered protocol family 1
> [    0.321476] RPC: Registered named UNIX socket transport module.
> [    0.327158] RPC: Registered udp transport module.
> [    0.331972] RPC: Registered tcp transport module.
> [    0.336707] RPC: Registered tcp NFSv4.1 backchannel transport
> module.
> [    0.343435] Trying to unpack rootfs image as initramfs...
> [    0.565367] Freeing initrd memory: 3508K (c2000000 - c236d000)
> [    0.570590] using sfpb hardware mutex registers (auto)
> [    0.575592] smem_of_init: initialized successfully
> [    0.580643] parse_smd_devicetree: enable_irq_wake() failed on 57
> [    0.586427] parse_smsm_devicetree: enable_irq_wake() failed on 58
> [    0.592650] parse_smd_devicetree: enable_irq_wake() failed on 188
> [    0.598750] parse_smsm_devicetree: enable_irq_wake() failed on 189
> [    0.605025] parse_smd_devicetree: enable_irq_wake() failed on 174
> [    0.611184] parse_smsm_devicetree: enable_irq_wake() failed on 176
> [    0.617414] parse_smd_devicetree: enable_irq_wake() failed on 200
> [    0.623562] SMD successfully initialized
> [    0.705001] bounce pool size: 64 pages
> [    0.713164] NFS: Registering the id_resolver key type
> [    0.717291] Key type id_resolver registered
> [    0.721553] Key type id_legacy registered
> [    0.726032] fuse init (API version 7.22)
> [    0.729846] msgmni has been set to 1471
> [    0.734961] Block layer SCSI generic (bsg) driver version 0.4
> loaded (major 253)
> [    0.741474] io scheduler noop registered
> [    0.745392] io scheduler deadline registered
> [    0.749838] io scheduler cfq registered (default)
> [    0.754787] msm_serial:
> detecte�\x06��\x06~�`�\x1e��怞f�~����\x1e\x1e�~\x06��f��\x06~\x1e\x06������xx\x1e`�\x1e��怞f�~\x1e`\x1e�\x1e�fx��
>  �
> ���\x06�\x1efxf�\x06\x06��~`ff�\x1ef\x1e\x06��\x06~�\x1ef������x�������\x06���f\x06����\x1e��f��fx�f�ff~`\x06��x\x1e\x1e�����\x02\x02\x02�r�’�����msm_seri
> a
> l: console setup on port #0
> [    0.786273] console [ttyMSM0] enabled
> [    0.786273] console [ttyMSM0] enabled
> [    0.793666] bootconsole [earlycon0] disabled
> [    0.793666] bootconsole [earlycon0] disabled
> [    0.802411] msm_serial: driver initialized
> [    0.807063] brd: module loaded
> [    0.809555] loop: module loaded
> [    0.809963] SCSI Media Changer driver v0.25
> [    0.812776] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels,
> max=256) (6 bit encapsulation en
> abled).
> [    0.816828] CSLIP: code copyright 1989 Regents of the University of
> California.
> [    0.826380] TRB: in msm_otg_probe
> [    0.833527] TRB: in msm_otg_read_dt
> [    0.836962] TRB: in msm_otg_read_dt, mode=2
> [    0.840321] msm_otg f9a55000.usb: OTG regs = f005e000
> [    0.844438] msm_otg f9a55000.usb: unable to get hsusb vddcx
> [    0.849656] platform f9a55000.usb: Driver msm_otg requests probe
> deferral
> [    0.855162] msm_hsusb f9a55000.gadget: in ci_hdrc_msm_probe
> [    0.862003] platform f9a55000.gadget: Driver msm_hsusb requests
> probe deferral
> [    0.867588] mousedev: PS/2 mouse device common for all mice
> [    0.874700] i2c /dev entries driver
> [    0.880503] oprofile: no performance counters
> [    0.883657] oprofile: using timer interrupt.
> [    0.888204] TCP: cubic registered
> [    0.892452] NET: Registered protocol family 17
> [    0.895718] Key type dns_resolver registered
> [    0.900092] Registering SWP/SWPB emulation handler
> [    0.905177] 8841_s1: 675 <--> 1050 mV at 0 mV normal idle
> [    0.909257] 8841_s1_ao: 675 <--> 1050 mV at 0 mV normal idle
> [    0.914863] 8841_s1_so: 675 <--> 1050 mV at 675 mV normal idle
> [    0.920666] 8841_s2: 500 <--> 1050 mV at 0 mV normal idle
> [    0.926286] 8841_s2_corner: 0 <--> 0 mV at 0 mV normal idle
> [    0.931849] 8841_s2_corner_ao: 0 <--> 0 mV at 0 mV normal idle
> [    0.937649] 8841_s2_floor_corner: 0 <--> 0 mV at 0 mV normal idle
> [    0.943415] 8841_s3: 1050 mV normal idle
> [    0.949641] 8841_s4: 815 <--> 900 mV at 0 mV normal idle
> [    0.953634] 8841_s4_corner: 0 <--> 0 mV at 0 mV normal idle
> [    0.959013] 8841_s4_floor_corner: 0 <--> 0 mV at 0 mV normal idle
> [    0.964861] 8941_s1: 1300 mV normal idle
> [    0.970851] 8941_s2: 2150 mV normal idle
> [    0.974911] 8941_s3: 1800 mV normal idle
> [    0.978896] 8941_l1: 1225 mV normal idle
> [    0.982918] 8941_l2: 1200 mV normal idle
> [    0.986891] 8941_l3: 1200 mV normal idle
> [    0.990902] 8941_l4: 1225 mV normal idle
> [    0.994876] 8941_l5: 1800 mV normal idle
> [    0.998871] 8941_l6: 1800 mV normal idle
> [    1.002886] 8941_l7: 1800 mV normal idle
> [    1.006976] 8941_l9: 1800 <--> 2950 mV at 2950 mV normal idle
> [    1.010892] 8941_l10: 1800 <--> 2950 mV at 2950 mV normal idle
> [    1.016574] 8941_l11: 1300 mV normal idle
> [    1.022398] 8941_l12: 1800 mV normal idle
> [    1.026441] 8941_l12_ao: 1800 mV normal idle
> [    1.030651] 8941_l13: 1800 <--> 2950 mV at 2950 mV normal idle
> [    1.035073] 8941_l14: 1800 mV normal idle
> [    1.040813] 8941_l15: 2050 mV normal idle
> [    1.044956] 8941_l16: 2700 mV normal idle
> [    1.049029] 8941_l17: 2700 mV normal idle
> [    1.053134] 8941_l18: 2850 mV normal idle
> [    1.057198] 8941_l19: 3300 mV normal idle
> [    1.061307] 8941_l20: 2950 mV normal idle
> [    1.065358] 8941_l21: 2950 mV normal idle
> [    1.069445] 8941_l22: 3000 mV normal idle
> [    1.073534] 8941_l23: 2800 mV normal idle
> [    1.077600] 8941_l24: 3075 mV normal idle
> [    1.081698] 8941_lvs1: no parameters
> [    1.085743] 8941_lvs2: no parameters
> [    1.089474] 8941_lvs3: no parameters
> [    1.092765] msm_rpm_dev_probe(): RPM probe completed successfully
> [    1.096898] TRB: in msm_otg_probe
> [    1.102323] TRB: in msm_otg_read_dt
> [    1.105538] TRB: in msm_otg_read_dt, mode=2
> [    1.108878] msm_otg f9a55000.usb: OTG regs = f0062000
> [    1.113364] TRB: voltage initialized status=0
> [    1.119019] TRB: 9999 - before interrupt reset in msm_otg_probe
> [    1.122575]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    1.128283]    ### PORTSC (184) val=cc000004
> [    1.133855]      PTS (31:30) transceiver select =11b: serial
> [    1.143136]     PSPD (27:26) port speed =11b: ???
> [    1.148067]     PHCD (23) clock disable =0
> [    1.148504]     LS (11:10) line status = 00b: SEO
> [    1.156835]     PE (2) port enabled =1
> [    1.157272]     CCS (0) current connect status =0
> [    1.160850]   remainder=00000000
> [    1.165605]   ### OTGSC (1a4) val=00000e20
> [    1.168905]     1MSIE (29) 1MS timer int enable =0
> [    1.172828]     BSVIE (27) vbus B valid int enable =0
> [    1.177586]     FIELD_1MSS (21) 1ms timer status =0
> [    1.182725]     FIELD_1MST (13) 1ms timer toggle =0
> [    1.187395]     BSE (12) vbus B session end =0
> [    1.192271]     BSV (11) vbus B session valid =1
> [    1.196769]     ASV (10) vbus A session valid =1
> [    1.201562]     AVV (9) A vbus valid =1
> [    1.206143]     IDPU (5) ID pullup =1
> [    1.209702]   remainder=00000000
> [    1.213540]   ### USBINTR (148) val=00000000
> [    1.216822]     SLE (8) sleep int =0
> [    1.221090]     URE (6) USB reset int=0
> [    1.224633]     PCE (2) port change detect int=0
> [    1.228193]     UEI (1) USB error int=0
> [    1.233069]     UI (0) USB int=0
> [    1.236611]   remainder=00000000
> [    1.240085]   ### USBSTS (144) val=60000000
> [    1.243313]     ULPI (10) ULPI event complete=0
> [    1.247202]     SOF (7) SOF received=0
> [    1.251733]     UEI (1) USB error=0
> [    1.255535]     UI (0) USB int=0
> [    1.258920]   remainder=60000000
> [    1.262412]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    1.265606]      SUSPENDM=0
> [    1.270567]      OpMode=00b normal
> [    1.276017]      TermSelect=0
> [    1.276628]      XcvrSelect=00b HS
> [    1.282720]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    1.282969]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    1.288176]      DmPulldown=0
> [    1.293225]      DpPulldown=0
> [    1.296161]    ### ULPI_USB_INT_STS (13) val=00000000
> [    1.299114]      SessEnd=0
> [    1.304164] TRB: msm writel(),         addr=f0062148, val=00000000
> [    1.306755] TRB: msm writel(),         addr=f00621a4, val=00000000
> [    1.312952] TRB: in msm_usb_reset, entering
> [    1.319077]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    1.323177]    ### PORTSC (184) val=cc000004
> [    1.328714]      PTS (31:30) transceiver select =11b: serial
> [    1.337998]     PSPD (27:26) port speed =11b: ???
> [    1.342960]     PHCD (23) clock disable =0
> [    1.343383]     LS (11:10) line status = 00b: SEO
> [    1.351729]     PE (2) port enabled =1
> [    1.352151]     CCS (0) current connect status =0
> [    1.355711]   remainder=00000000
> [    1.360500]   ### OTGSC (1a4) val=00000e00
> [    1.363782]     1MSIE (29) 1MS timer int enable =0
> [    1.367689]     BSVIE (27) vbus B valid int enable =0
> [    1.372482]     FIELD_1MSS (21) 1ms timer status =0
> [    1.377585]     FIELD_1MST (13) 1ms timer toggle =0
> [    1.382290]     BSE (12) vbus B session end =0
> [    1.387134]     BSV (11) vbus B session valid =1
> [    1.391665]     ASV (10) vbus A session valid =1
> [    1.396422]     AVV (9) A vbus valid =1
> [    1.401039]     IDPU (5) ID pullup =0
> [    1.404581]   remainder=00000000
> [    1.408399]   ### USBINTR (148) val=00000000
> [    1.411717]     SLE (8) sleep int =0
> [    1.415952]     URE (6) USB reset int=0
> [    1.419511]     PCE (2) port change detect int=0
> [    1.423088]     UEI (1) USB error int=0
> [    1.427930]     UI (0) USB int=0
> [    1.431508]   remainder=00000000
> [    1.434963]   ### USBSTS (144) val=60000400
> [    1.438174]     ULPI (10) ULPI event complete=1
> [    1.442099]     SOF (7) SOF received=0
> [    1.446594]     UEI (1) USB error=0
> [    1.450430]     UI (0) USB int=0
> [    1.453798]   remainder=60000000
> [    1.457273]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    1.460502]      SUSPENDM=0
> [    1.465429]      OpMode=00b normal
> [    1.470914]      TermSelect=0
> [    1.471507]      XcvrSelect=00b HS
> [    1.477580]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    1.477848]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    1.483072]      DmPulldown=0
> [    1.488086]      DpPulldown=0
> [    1.491056]    ### ULPI_USB_INT_STS (13) val=00000000
> [    1.493993]      SessEnd=0
> [    1.499023] TRB: in msm_link_reset, entering
> [    1.501648]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    1.506058]    ### PORTSC (184) val=cc000004
> [    1.511369]      PTS (31:30) transceiver select =11b: serial
> [    1.520652]     PSPD (27:26) port speed =11b: ???
> [    1.525583]     PHCD (23) clock disable =0
> [    1.526021]     LS (11:10) line status = 00b: SEO
> [    1.534368]     PE (2) port enabled =1
> [    1.534790]     CCS (0) current connect status =0
> [    1.538350]   remainder=00000000
> [    1.543139]   ### OTGSC (1a4) val=00000e00
> [    1.546421]     1MSIE (29) 1MS timer int enable =0
> [    1.550346]     BSVIE (27) vbus B valid int enable =0
> [    1.555104]     FIELD_1MSS (21) 1ms timer status =0
> [    1.560240]     FIELD_1MST (13) 1ms timer toggle =0
> [    1.564912]     BSE (12) vbus B session end =0
> [    1.569772]     BSV (11) vbus B session valid =1
> [    1.574303]     ASV (10) vbus A session valid =1
> [    1.579062]     AVV (9) A vbus valid =1
> [    1.583677]     IDPU (5) ID pullup =0
> [    1.587219]   remainder=00000000
> [    1.591056]   ### USBINTR (148) val=00000000
> [    1.594338]     SLE (8) sleep int =0
> [    1.598591]     URE (6) USB reset int=0
> [    1.602167]     PCE (2) port change detect int=0
> [    1.605709]     UEI (1) USB error int=0
> [    1.610587]     UI (0) USB int=0
> [    1.614129]   remainder=00000000
> [    1.617601]   ### USBSTS (144) val=60000400
> [    1.620830]     ULPI (10) ULPI event complete=1
> [    1.624720]     SOF (7) SOF received=0
> [    1.629233]     UEI (1) USB error=0
> [    1.633069]     UI (0) USB int=0
> [    1.636437]   remainder=60000000
> [    1.639912]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    1.643141]      SUSPENDM=0
> [    1.648068]      OpMode=00b normal
> [    1.653535]      TermSelect=0
> [    1.654145]      XcvrSelect=00b HS
> [    1.660236]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    1.660487]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    1.665693]      DmPulldown=0
> [    1.670743]      DpPulldown=0
> [    1.673678]    ### ULPI_USB_INT_STS (13) val=00000000
> [    1.676631]      SessEnd=0
> [    1.681681] TRB: msm_otg_link_clk_reset, assert=1
> [    1.684268] TRB: calling reset_control_assert
> [    1.690280]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    1.693385]    ### PORTSC (184) val=08130000
> [    1.698766]      PTS (31:30) transceiver select =00b: other
> [    1.708050]     PSPD (27:26) port speed =10b: high
> [    1.712926]     PHCD (23) clock disable =0
> [    1.713348]     LS (11:10) line status = 00b: SEO
> [    1.721782]     PE (2) port enabled =0
> [    1.722201]     CCS (0) current connect status =0
> [    1.725762]   remainder=00130000
> [    1.730553]   ### OTGSC (1a4) val=08130000
> [    1.733835]     1MSIE (29) 1MS timer int enable =0
> [    1.737741]     BSVIE (27) vbus B valid int enable =1
> [    1.742532]     FIELD_1MSS (21) 1ms timer status =0
> [    1.747638]     FIELD_1MST (13) 1ms timer toggle =0
> [    1.752341]     BSE (12) vbus B session end =0
> [    1.757185]     BSV (11) vbus B session valid =0
> [    1.761717]     ASV (10) vbus A session valid =0
> [    1.766474]     AVV (9) A vbus valid =0
> [    1.771091]     IDPU (5) ID pullup =0
> [    1.774632]   remainder=00130000
> [    1.778452]   ### USBINTR (148) val=08130000
> [    1.781770]     SLE (8) sleep int =0
> [    1.786004]     URE (6) USB reset int=0
> [    1.789563]     PCE (2) port change detect int=0
> [    1.793140]     UEI (1) USB error int=0
> [    1.797982]     UI (0) USB int=0
> [    1.801560]   remainder=08130000
> [    1.805015]   ### USBSTS (144) val=08130000
> [    1.808226]     ULPI (10) ULPI event complete=0
> [    1.812150]     SOF (7) SOF received=0
> [    1.816646]     UEI (1) USB error=0
> [    1.820482]     UI (0) USB int=0
> [    1.823850]   remainder=08130000
> [    1.827324]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    1.830554]      SUSPENDM=0
> [    1.835482]      OpMode=00b normal
> [    1.840965]      TermSelect=0
> [    1.841559]      XcvrSelect=00b HS
> [    1.847633]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    1.847899]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    1.853125]      DmPulldown=0
> [    1.858138]      DpPulldown=0
> [    1.861108]    ### ULPI_USB_INT_STS (13) val=00000000
> [    1.864045]      SessEnd=0
> [    1.869075] TRB: msm_link_reset 1 - before
> msm_otg_link_clk_reset(0)
> [    1.871703] TRB: msm_otg_link_clk_reset, assert=0
> [    1.878192] TRB: calling reset_control_deassert
> [    1.882813] TRB: msm_link_reset 2 - before USB_PHY_CTRL2 |= (1<<16)
> [    1.887136]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    1.893403]    ### PORTSC (184) val=cc000004
> [    1.898940]      PTS (31:30) transceiver select =11b: serial
> [    1.908223]     PSPD (27:26) port speed =11b: ???
> [    1.913188]     PHCD (23) clock disable =0
> [    1.913608]     LS (11:10) line status = 00b: SEO
> [    1.921954]     PE (2) port enabled =1
> [    1.922376]     CCS (0) current connect status =0
> [    1.925936]   remainder=00000000
> [    1.930726]   ### OTGSC (1a4) val=00000e00
> [    1.934007]     1MSIE (29) 1MS timer int enable =0
> [    1.937916]     BSVIE (27) vbus B valid int enable =0
> [    1.942707]     FIELD_1MSS (21) 1ms timer status =0
> [    1.947810]     FIELD_1MST (13) 1ms timer toggle =0
> [    1.952515]     BSE (12) vbus B session end =0
> [    1.957359]     BSV (11) vbus B session valid =1
> [    1.961890]     ASV (10) vbus A session valid =1
> [    1.966647]     AVV (9) A vbus valid =1
> [    1.971263]     IDPU (5) ID pullup =0
> [    1.974806]   remainder=00000000
> [    1.978626]   ### USBINTR (148) val=00000000
> [    1.981942]     SLE (8) sleep int =0
> [    1.986177]     URE (6) USB reset int=0
> [    1.989735]     PCE (2) port change detect int=0
> [    1.993315]     UEI (1) USB error int=0
> [    1.998157]     UI (0) USB int=0
> [    2.001732]   remainder=00000000
> [    2.005188]   ### USBSTS (144) val=60000400
> [    2.008401]     ULPI (10) ULPI event complete=1
> [    2.012324]     SOF (7) SOF received=0
> [    2.016820]     UEI (1) USB error=0
> [    2.020657]     UI (0) USB int=0
> [    2.024024]   remainder=60000000
> [    2.027497]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    2.030727]      SUSPENDM=0
> [    2.035655]      OpMode=00b normal
> [    2.041138]      TermSelect=0
> [    2.041733]      XcvrSelect=00b HS
> [    2.047807]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    2.048074]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    2.053324]      DmPulldown=0
> [    2.058312]      DpPulldown=0
> [    2.061282]    ### ULPI_USB_INT_STS (13) val=00000000
> [    2.064217]      SessEnd=0
> [    2.069250] TRB: msm readl(),          addr=f0062278, val=000c3c32
> [    2.071877] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    2.078022]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    2.084201]    ### PORTSC (184) val=cc000004
> [    2.089651]      PTS (31:30) transceiver select =11b: serial
> [    2.098935]     PSPD (27:26) port speed =11b: ???
> [    2.103900]     PHCD (23) clock disable =0
> [    2.104321]     LS (11:10) line status = 00b: SEO
> [    2.112665]     PE (2) port enabled =1
> [    2.113087]     CCS (0) current connect status =0
> [    2.116647]   remainder=00000000
> [    2.121439]   ### OTGSC (1a4) val=00000e00
> [    2.124720]     1MSIE (29) 1MS timer int enable =0
> [    2.128627]     BSVIE (27) vbus B valid int enable =0
> [    2.133418]     FIELD_1MSS (21) 1ms timer status =0
> [    2.138523]     FIELD_1MST (13) 1ms timer toggle =0
> [    2.143226]     BSE (12) vbus B session end =0
> [    2.148071]     BSV (11) vbus B session valid =1
> [    2.152603]     ASV (10) vbus A session valid =1
> [    2.157360]     AVV (9) A vbus valid =1
> [    2.161976]     IDPU (5) ID pullup =0
> [    2.165519]   remainder=00000000
> [    2.169337]   ### USBINTR (148) val=00000000
> [    2.172655]     SLE (8) sleep int =0
> [    2.176890]     URE (6) USB reset int=0
> [    2.180466]     PCE (2) port change detect int=0
> [    2.184010]     UEI (1) USB error int=0
> [    2.188868]     UI (0) USB int=0
> [    2.192444]   remainder=00000000
> [    2.195899]   ### USBSTS (144) val=60000400
> [    2.199112]     ULPI (10) ULPI event complete=1
> [    2.203036]     SOF (7) SOF received=0
> [    2.207532]     UEI (1) USB error=0
> [    2.211367]     UI (0) USB int=0
> [    2.214737]   remainder=60000000
> [    2.218209]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    2.221439]      SUSPENDM=0
> [    2.226368]      OpMode=00b normal
> [    2.231851]      TermSelect=0
> [    2.232443]      XcvrSelect=00b HS
> [    2.238518]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    2.238784]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    2.244010]      DmPulldown=0
> [    2.249023]      DpPulldown=0
> [    2.251994]    ### ULPI_USB_INT_STS (13) val=00000000
> [    2.254929]      SessEnd=0
> [    2.259961] TRB: msm_link_reset 3 - before PORTSC:PTS |=
> PORTSC_PTS_SERIAL
> [    2.262589] TRB: msm readl(),          addr=f0062184, val=cc000004
> [    2.269428] PORTSC_PTS_ULPI=80000000
> [    2.275605] PORTSC_PTS_SERIAL=c0000000
> [    2.279320] TRB: msm writel(),         addr=f0062184, val=cc000004
> [    2.282899] TRB: msm_link_reset 4
> [    2.289042] TRB: doing ULPI_FUNC_CTRL: clear SUSPENDM
> [    2.292449] TRB: ulpi_write reg=0x6, val=0x40
> [    2.297464] TRB: msm writel(),         addr=f0062170, val=60060040
> [    2.301825] TRB: msm readl(),          addr=f0062170, val=28060040
> [    2.307883]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    2.314063]    ### PORTSC (184) val=cc000004
> [    2.319512]      PTS (31:30) transceiver select =11b: serial
> [    2.328796]     PSPD (27:26) port speed =11b: ???
> [    2.333760]     PHCD (23) clock disable =0
> [    2.334183]     LS (11:10) line status = 00b: SEO
> [    2.342527]     PE (2) port enabled =1
> [    2.342949]     CCS (0) current connect status =0
> [    2.346509]   remainder=00000000
> [    2.351299]   ### OTGSC (1a4) val=00000e00
> [    2.354580]     1MSIE (29) 1MS timer int enable =0
> [    2.358489]     BSVIE (27) vbus B valid int enable =0
> [    2.363280]     FIELD_1MSS (21) 1ms timer status =0
> [    2.368383]     FIELD_1MST (13) 1ms timer toggle =0
> [    2.373088]     BSE (12) vbus B session end =0
> [    2.377932]     BSV (11) vbus B session valid =1
> [    2.382463]     ASV (10) vbus A session valid =1
> [    2.387220]     AVV (9) A vbus valid =1
> [    2.391836]     IDPU (5) ID pullup =0
> [    2.395379]   remainder=00000000
> [    2.399199]   ### USBINTR (148) val=00000000
> [    2.402515]     SLE (8) sleep int =0
> [    2.406750]     URE (6) USB reset int=0
> [    2.410326]     PCE (2) port change detect int=0
> [    2.413870]     UEI (1) USB error int=0
> [    2.418729]     UI (0) USB int=0
> [    2.422305]   remainder=00000000
> [    2.425761]   ### USBSTS (144) val=60000400
> [    2.428974]     ULPI (10) ULPI event complete=1
> [    2.432897]     SOF (7) SOF received=0
> [    2.437393]     UEI (1) USB error=0
> [    2.441229]     UI (0) USB int=0
> [    2.444597]   remainder=60000000
> [    2.448071]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    2.451301]      SUSPENDM=0
> [    2.456229]      OpMode=00b normal
> [    2.461712]      TermSelect=0
> [    2.462306]      XcvrSelect=00b HS
> [    2.468380]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    2.468645]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    2.473870]      DmPulldown=0
> [    2.478886]      DpPulldown=0
> [    2.481854]    ### ULPI_USB_INT_STS (13) val=00000000
> [    2.484791]      SessEnd=0
> [    2.489823] TRB: msm_link_reset 5 - before msm_otg_phy_clk_reset
> [    2.492447] TRB: msm_otg_phy_clk_reset
> [    2.498599]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    2.502171]    ### PORTSC (184) val=cc000004
> [    2.507620]      PTS (31:30) transceiver select =11b: serial
> [    2.516903]     PSPD (27:26) port speed =11b: ???
> [    2.521868]     PHCD (23) clock disable =0
> [    2.522290]     LS (11:10) line status = 00b: SEO
> [    2.530635]     PE (2) port enabled =1
> [    2.531056]     CCS (0) current connect status =0
> [    2.534616]   remainder=00000000
> [    2.539389]   ### OTGSC (1a4) val=00000e00
> [    2.542706]     1MSIE (29) 1MS timer int enable =0
> [    2.546595]     BSVIE (27) vbus B valid int enable =0
> [    2.551386]     FIELD_1MSS (21) 1ms timer status =0
> [    2.556492]     FIELD_1MST (13) 1ms timer toggle =0
> [    2.561197]     BSE (12) vbus B session end =0
> [    2.566040]     BSV (11) vbus B session valid =1
> [    2.570572]     ASV (10) vbus A session valid =1
> [    2.575329]     AVV (9) A vbus valid =1
> [    2.579926]     IDPU (5) ID pullup =0
> [    2.583504]   remainder=00000000
> [    2.587306]   ### USBINTR (148) val=00000000
> [    2.590623]     SLE (8) sleep int =0
> [    2.594858]     URE (6) USB reset int=0
> [    2.598417]     PCE (2) port change detect int=0
> [    2.601994]     UEI (1) USB error int=0
> [    2.606836]     UI (0) USB int=0
> [    2.610413]   remainder=00000000
> [    2.613869]   ### USBSTS (144) val=60000400
> [    2.617080]     ULPI (10) ULPI event complete=1
> [    2.621006]     SOF (7) SOF received=0
> [    2.625500]     UEI (1) USB error=0
> [    2.629319]     UI (0) USB int=0
> [    2.632722]   remainder=60000000
> [    2.636179]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    2.639391]      SUSPENDM=0
> [    2.644353]      OpMode=00b normal
> [    2.649802]      TermSelect=0
> [    2.650430]      XcvrSelect=00b HS
> [    2.656488]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    2.656753]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    2.661978]      DmPulldown=0
> [    2.666992]      DpPulldown=0
> [    2.669945]    ### ULPI_USB_INT_STS (13) val=00000000
> [    2.672916]      SessEnd=0
> [    2.677929] TRB: msm_link_reset 6 - before ulpi_read(ULPI_DEBUG)
> [    2.680557] TRB: msm writel(),         addr=f0062170, val=40150000
> [    2.686703] TRB: msm readl(),          addr=f0062170, val=08150000
> [    2.692711] TRB: msm readl(),          addr=f0062170, val=08150000
> [    2.698856] TRB: ulpi_read reg=0x15, val=0x0
> [    2.705032] TRB: in msm_link_reset, leaving
> [    2.709446] msm_otg f9a55000.usb: phy_reset: success
> [    2.713367] TRB: in msm_otg_reset, entering
> [    2.718558]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    2.722483]    ### PORTSC (184) val=cc000004
> [    2.728020]      PTS (31:30) transceiver select =11b: serial
> [    2.737302]     PSPD (27:26) port speed =11b: ???
> [    2.742267]     PHCD (23) clock disable =0
> [    2.742689]     LS (11:10) line status = 00b: SEO
> [    2.751033]     PE (2) port enabled =1
> [    2.751455]     CCS (0) current connect status =0
> [    2.755015]   remainder=00000000
> [    2.759789]   ### OTGSC (1a4) val=00000e00
> [    2.763104]     1MSIE (29) 1MS timer int enable =0
> [    2.766994]     BSVIE (27) vbus B valid int enable =0
> [    2.771787]     FIELD_1MSS (21) 1ms timer status =0
> [    2.776891]     FIELD_1MST (13) 1ms timer toggle =0
> [    2.781596]     BSE (12) vbus B session end =0
> [    2.786439]     BSV (11) vbus B session valid =1
> [    2.790971]     ASV (10) vbus A session valid =1
> [    2.795728]     AVV (9) A vbus valid =1
> [    2.800345]     IDPU (5) ID pullup =0
> [    2.803887]   remainder=00000000
> [    2.807705]   ### USBINTR (148) val=00000000
> [    2.811023]     SLE (8) sleep int =0
> [    2.815258]     URE (6) USB reset int=0
> [    2.818817]     PCE (2) port change detect int=0
> [    2.822394]     UEI (1) USB error int=0
> [    2.827236]     UI (0) USB int=0
> [    2.830812]   remainder=00000000
> [    2.834269]   ### USBSTS (144) val=60000400
> [    2.837480]     ULPI (10) ULPI event complete=1
> [    2.841403]     SOF (7) SOF received=0
> [    2.845899]     UEI (1) USB error=0
> [    2.849719]     UI (0) USB int=0
> [    2.853122]   remainder=60000000
> [    2.856578]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    2.859791]      SUSPENDM=0
> [    2.864752]      OpMode=00b normal
> [    2.870219]      TermSelect=0
> [    2.870811]      XcvrSelect=00b HS
> [    2.876886]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    2.877153]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    2.882378]      DmPulldown=0
> [    2.887391]      DpPulldown=0
> [    2.890362]    ### ULPI_USB_INT_STS (13) val=00000000
> [    2.893297]      SessEnd=0
> [    2.898328] TRB: issuing USBCMD_RESET to USB_USBCMD
> [    2.900954] TRB: msm writel(),         addr=f0062140, val=00000002
> [    2.905715] TRB: msm readl(),          addr=f0062140, val=00080002
> [    2.911984] TRB: msm readl(),          addr=f0062140, val=00080000
> [    2.918126]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    2.924306]    ### PORTSC (184) val=cc000004
> [    2.929756]      PTS (31:30) transceiver select =11b: serial
> [    2.939039]     PSPD (27:26) port speed =11b: ???
> [    2.944003]     PHCD (23) clock disable =0
> [    2.944426]     LS (11:10) line status = 00b: SEO
> [    2.952770]     PE (2) port enabled =1
> [    2.953191]     CCS (0) current connect status =0
> [    2.956752]   remainder=00000000
> [    2.961541]   ### OTGSC (1a4) val=00000e00
> [    2.964825]     1MSIE (29) 1MS timer int enable =0
> [    2.968732]     BSVIE (27) vbus B valid int enable =0
> [    2.973523]     FIELD_1MSS (21) 1ms timer status =0
> [    2.978626]     FIELD_1MST (13) 1ms timer toggle =0
> [    2.983331]     BSE (12) vbus B session end =0
> [    2.988175]     BSV (11) vbus B session valid =1
> [    2.992707]     ASV (10) vbus A session valid =1
> [    2.997464]     AVV (9) A vbus valid =1
> [    3.002080]     IDPU (5) ID pullup =0
> [    3.005623]   remainder=00000000
> [    3.009441]   ### USBINTR (148) val=00000000
> [    3.012758]     SLE (8) sleep int =0
> [    3.016993]     URE (6) USB reset int=0
> [    3.020571]     PCE (2) port change detect int=0
> [    3.024113]     UEI (1) USB error int=0
> [    3.028974]     UI (0) USB int=0
> [    3.032548]   remainder=00000000
> [    3.036004]   ### USBSTS (144) val=60000000
> [    3.039217]     ULPI (10) ULPI event complete=0
> [    3.043140]     SOF (7) SOF received=0
> [    3.047636]     UEI (1) USB error=0
> [    3.051496]     UI (0) USB int=0
> [    3.054841]   remainder=60000000
> [    3.058314]    ### ULPI_FUNC_CTRL (4,5,6) val=00000000
> [    3.061545]      SUSPENDM=0
> [    3.066471]      OpMode=00b normal
> [    3.071954]      TermSelect=0
> [    3.072549]      XcvrSelect=00b HS
> [    3.078623]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    3.078890]    ### ULPI_OTG_CTRL (a,b,c) val=00000000
> [    3.084112]      DmPulldown=0
> [    3.089128]      DpPulldown=0
> [    3.092098]    ### ULPI_USB_INT_STS (13) val=00000000
> [    3.095033]      SessEnd=0
> [    3.100064] TRB: in msm_otg_reset, 11111 !!! check regs here
> (before) !!!
> [    3.102692] TRB: turning PTS transceiver back to ULPI and resetting
> rest of PORTSC
> [    3.109535] TRB: msm writel(),         addr=f0062184, val=80000000
> [    3.117013] TRB: in msm_otg_reset, 11122 !!! check regs here
> (after) !!!
> [    3.123178]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    3.130017]    ### PORTSC (184) val=8c000804
> [    3.135328]      PTS (31:30) transceiver select =10b: ulpi
> [    3.144611]     PSPD (27:26) port speed =11b: ???
> [    3.149367]     PHCD (23) clock disable =0
> [    3.149806]     LS (11:10) line status = 10b: J-state
> [    3.158136]     PE (2) port enabled =1
> [    3.158922]     CCS (0) current connect status =0
> [    3.162499]   remainder=00000000
> [    3.167255]   ### OTGSC (1a4) val=003e1000
> [    3.170570]     1MSIE (29) 1MS timer int enable =0
> [    3.174460]     BSVIE (27) vbus B valid int enable =0
> [    3.179236]     FIELD_1MSS (21) 1ms timer status =1
> [    3.184373]     FIELD_1MST (13) 1ms timer toggle =0
> [    3.189045]     BSE (12) vbus B session end =1
> [    3.193922]     BSV (11) vbus B session valid =0
> [    3.198418]     ASV (10) vbus A session valid =0
> [    3.203210]     AVV (9) A vbus valid =0
> [    3.207792]     IDPU (5) ID pullup =0
> [    3.211367]   remainder=001e0000
> [    3.215171]   ### USBINTR (148) val=00000000
> [    3.218470]     SLE (8) sleep int =0
> [    3.222741]     URE (6) USB reset int=0
> [    3.226281]     PCE (2) port change detect int=0
> [    3.229841]     UEI (1) USB error int=0
> [    3.234719]     UI (0) USB int=0
> [    3.238261]   remainder=00000000
> [    3.241750]   ### USBSTS (144) val=40000480
> [    3.244946]     ULPI (10) ULPI event complete=1
> [    3.248852]     SOF (7) SOF received=1
> [    3.253382]     UEI (1) USB error=0
> [    3.257185]     UI (0) USB int=0
> [    3.260586]   remainder=40000000
> [    3.264045]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    3.267255]      SUSPENDM=1
> [    3.272217]      OpMode=10b disable bit-stuff and NRZI encoding
> [    3.277670]      TermSelect=1
> [    3.281071]      XcvrSelect=01b FS
> [    3.286870]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    3.287136]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    3.292361]      DmPulldown=1
> [    3.297374]      DpPulldown=1
> [    3.300345]    ### ULPI_USB_INT_STS (13) val=00000008
> [    3.303279]      SessEnd=1
> [    3.308312] TRB: msm writel(),         addr=f0062090, val=00000000
> [    3.310937] TRB: in msm_otg_reset, 11133
> [    3.317081]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    3.321180]    ### PORTSC (184) val=8c000804
> [    3.326457]      PTS (31:30) transceiver select =10b: ulpi
> [    3.335741]     PSPD (27:26) port speed =11b: ???
> [    3.340532]     PHCD (23) clock disable =0
> [    3.340952]     LS (11:10) line status = 10b: J-state
> [    3.349282]     PE (2) port enabled =1
> [    3.350066]     CCS (0) current connect status =0
> [    3.353643]   remainder=00000000
> [    3.358399]   ### OTGSC (1a4) val=003e3000
> [    3.361717]     1MSIE (29) 1MS timer int enable =0
> [    3.365605]     BSVIE (27) vbus B valid int enable =0
> [    3.370398]     FIELD_1MSS (21) 1ms timer status =1
> [    3.375502]     FIELD_1MST (13) 1ms timer toggle =1
> [    3.380207]     BSE (12) vbus B session end =1
> [    3.385051]     BSV (11) vbus B session valid =0
> [    3.389565]     ASV (10) vbus A session valid =0
> [    3.394355]     AVV (9) A vbus valid =0
> [    3.398939]     IDPU (5) ID pullup =0
> [    3.402514]   remainder=001e0000
> [    3.406316]   ### USBINTR (148) val=00000000
> [    3.409617]     SLE (8) sleep int =0
> [    3.413885]     URE (6) USB reset int=0
> [    3.417427]     PCE (2) port change detect int=0
> [    3.421004]     UEI (1) USB error int=0
> [    3.425849]     UI (0) USB int=0
> [    3.429407]   remainder=00000000
> [    3.432895]   ### USBSTS (144) val=40000480
> [    3.436092]     ULPI (10) ULPI event complete=1
> [    3.439997]     SOF (7) SOF received=1
> [    3.444527]     UEI (1) USB error=0
> [    3.448330]     UI (0) USB int=0
> [    3.451731]   remainder=40000000
> [    3.455190]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    3.458402]      SUSPENDM=1
> [    3.463364]      OpMode=10b disable bit-stuff and NRZI encoding
> [    3.468817]      TermSelect=1
> [    3.472218]      XcvrSelect=01b FS
> [    3.478015]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    3.478282]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    3.483505]      DmPulldown=1
> [    3.488521]      DpPulldown=1
> [    3.491489]    ### ULPI_USB_INT_STS (13) val=00000008
> [    3.494426]      SessEnd=1
> [    3.499458] TRB: msm writel(),         addr=f0062098, val=00000008
> [    3.502084] TRB: in msm_otg_reset, 22222
> [    3.508226]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    3.512326]    ### PORTSC (184) val=8c000804
> [    3.517603]      PTS (31:30) transceiver select =10b: ulpi
> [    3.526886]     PSPD (27:26) port speed =11b: ???
> [    3.531677]     PHCD (23) clock disable =0
> [    3.532099]     LS (11:10) line status = 10b: J-state
> [    3.540444]     PE (2) port enabled =1
> [    3.541212]     CCS (0) current connect status =0
> [    3.544773]   remainder=00000000
> [    3.549547]   ### OTGSC (1a4) val=003e1000
> [    3.552862]     1MSIE (29) 1MS timer int enable =0
> [    3.556752]     BSVIE (27) vbus B valid int enable =0
> [    3.561543]     FIELD_1MSS (21) 1ms timer status =1
> [    3.566649]     FIELD_1MST (13) 1ms timer toggle =0
> [    3.571351]     BSE (12) vbus B session end =1
> [    3.576195]     BSV (11) vbus B session valid =0
> [    3.580728]     ASV (10) vbus A session valid =0
> [    3.585485]     AVV (9) A vbus valid =0
> [    3.590083]     IDPU (5) ID pullup =0
> [    3.593661]   remainder=001e0000
> [    3.597462]   ### USBINTR (148) val=00000000
> [    3.600778]     SLE (8) sleep int =0
> [    3.605015]     URE (6) USB reset int=0
> [    3.608574]     PCE (2) port change detect int=0
> [    3.612151]     UEI (1) USB error int=0
> [    3.616994]     UI (0) USB int=0
> [    3.620569]   remainder=00000000
> [    3.624026]   ### USBSTS (144) val=40000480
> [    3.627237]     ULPI (10) ULPI event complete=1
> [    3.631160]     SOF (7) SOF received=1
> [    3.635657]     UEI (1) USB error=0
> [    3.639476]     UI (0) USB int=0
> [    3.642879]   remainder=40000000
> [    3.646335]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    3.649548]      SUSPENDM=1
> [    3.654509]      OpMode=10b disable bit-stuff and NRZI encoding
> [    3.659962]      TermSelect=1
> [    3.663363]      XcvrSelect=01b FS
> [    3.669160]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    3.669428]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    3.674653]      DmPulldown=1
> [    3.679667]      DpPulldown=1
> [    3.682637]    ### ULPI_USB_INT_STS (13) val=00000008
> [    3.685571]      SessEnd=1
> [    3.690621] TRB: msm readl(),          addr=f0062278, val=000c3c32
> [    3.693214] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    3.699375] TRB: in msm_otg_reset, leaving
> [    3.705554]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    3.709618]    ### PORTSC (184) val=8c000804
> [    3.715103]      PTS (31:30) transceiver select =10b: ulpi
> [    3.724386]     PSPD (27:26) port speed =11b: ???
> [    3.729143]     PHCD (23) clock disable =0
> [    3.729581]     LS (11:10) line status = 10b: J-state
> [    3.737912]     PE (2) port enabled =1
> [    3.738695]     CCS (0) current connect status =0
> [    3.742272]   remainder=00000000
> [    3.747028]   ### OTGSC (1a4) val=003e1000
> [    3.750345]     1MSIE (29) 1MS timer int enable =0
> [    3.754235]     BSVIE (27) vbus B valid int enable =0
> [    3.759009]     FIELD_1MSS (21) 1ms timer status =1
> [    3.764148]     FIELD_1MST (13) 1ms timer toggle =0
> [    3.768818]     BSE (12) vbus B session end =1
> [    3.773695]     BSV (11) vbus B session valid =0
> [    3.778193]     ASV (10) vbus A session valid =0
> [    3.782984]     AVV (9) A vbus valid =0
> [    3.787567]     IDPU (5) ID pullup =0
> [    3.791143]   remainder=001e0000
> [    3.794944]   ### USBINTR (148) val=00000000
> [    3.798245]     SLE (8) sleep int =0
> [    3.802514]     URE (6) USB reset int=0
> [    3.806056]     PCE (2) port change detect int=0
> [    3.809616]     UEI (1) USB error int=0
> [    3.814494]     UI (0) USB int=0
> [    3.818034]   remainder=00000000
> [    3.821525]   ### USBSTS (144) val=40000480
> [    3.824719]     ULPI (10) ULPI event complete=1
> [    3.828627]     SOF (7) SOF received=1
> [    3.833157]     UEI (1) USB error=0
> [    3.836958]     UI (0) USB int=0
> [    3.840361]   remainder=40000000
> [    3.843818]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    3.847030]      SUSPENDM=1
> [    3.851992]      OpMode=10b disable bit-stuff and NRZI encoding
> [    3.857446]      TermSelect=1
> [    3.860847]      XcvrSelect=01b FS
> [    3.866644]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    3.866909]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    3.872134]      DmPulldown=1
> [    3.877148]      DpPulldown=1
> [    3.880101]    ### ULPI_USB_INT_STS (13) val=00000008
> [    3.883072]      SessEnd=1
> [    3.990164] TRB: in msm_phy_reset, entering
> [    3.990181]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    3.993140]    ### PORTSC (184) val=8c000804
> [    3.998693]      PTS (31:30) transceiver select =10b: ulpi
> [    4.007977]     PSPD (27:26) port speed =11b: ???
> [    4.012768]     PHCD (23) clock disable =0
> [    4.013188]     LS (11:10) line status = 10b: J-state
> [    4.021536]     PE (2) port enabled =1
> [    4.022303]     CCS (0) current connect status =0
> [    4.025864]   remainder=00000000
> [    4.030653]   ### OTGSC (1a4) val=003e3000
> [    4.033935]     1MSIE (29) 1MS timer int enable =0
> [    4.037843]     BSVIE (27) vbus B valid int enable =0
> [    4.042634]     FIELD_1MSS (21) 1ms timer status =1
> [    4.047738]     FIELD_1MST (13) 1ms timer toggle =1
> [    4.052466]     BSE (12) vbus B session end =1
> [    4.057286]     BSV (11) vbus B session valid =0
> [    4.061818]     ASV (10) vbus A session valid =0
> [    4.066575]     AVV (9) A vbus valid =0
> [    4.071192]     IDPU (5) ID pullup =0
> [    4.074735]   remainder=001e0000
> [    4.078553]   ### USBINTR (148) val=00000000
> [    4.081870]     SLE (8) sleep int =0
> [    4.086105]     URE (6) USB reset int=0
> [    4.089664]     PCE (2) port change detect int=0
> [    4.093240]     UEI (1) USB error int=0
> [    4.098085]     UI (0) USB int=0
> [    4.101660]   remainder=00000000
> [    4.105116]   ### USBSTS (144) val=40000480
> [    4.108327]     ULPI (10) ULPI event complete=1
> [    4.112276]     SOF (7) SOF received=1
> [    4.116746]     UEI (1) USB error=0
> [    4.120583]     UI (0) USB int=0
> [    4.123951]   remainder=40000000
> [    4.127426]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    4.130654]      SUSPENDM=1
> [    4.135583]      OpMode=10b disable bit-stuff and NRZI encoding
> [    4.141070]      TermSelect=1
> [    4.144437]      XcvrSelect=01b FS
> [    4.150268]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    4.150519]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    4.155724]      DmPulldown=1
> [    4.160773]      DpPulldown=1
> [    4.163711]    ### ULPI_USB_INT_STS (13) val=00000008
> [    4.166662]      SessEnd=1
> [    4.171713] TRB: msm readl(),          addr=f0062278, val=000d3c32
> [    4.174303] TRB: msm writel(),         addr=f0062278, val=000d3c33
> [    4.180523] TRB: msm readl(),          addr=f0062278, val=000d3c33
> [    4.186630] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    4.192810] TRB: in msm_phy_reset, leaving
> [    4.198953]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    4.203052]    ### PORTSC (184) val=8c000804
> [    4.208502]      PTS (31:30) transceiver select =10b: ulpi
> [    4.217785]     PSPD (27:26) port speed =11b: ???
> [    4.222578]     PHCD (23) clock disable =0
> [    4.222998]     LS (11:10) line status = 10b: J-state
> [    4.231345]     PE (2) port enabled =1
> [    4.232111]     CCS (0) current connect status =0
> [    4.235671]   remainder=00000000
> [    4.240463]   ### OTGSC (1a4) val=003e3000
> [    4.243745]     1MSIE (29) 1MS timer int enable =0
> [    4.247651]     BSVIE (27) vbus B valid int enable =0
> [    4.252444]     FIELD_1MSS (21) 1ms timer status =1
> [    4.257547]     FIELD_1MST (13) 1ms timer toggle =1
> [    4.262252]     BSE (12) vbus B session end =1
> [    4.267096]     BSV (11) vbus B session valid =0
> [    4.271626]     ASV (10) vbus A session valid =0
> [    4.276384]     AVV (9) A vbus valid =0
> [    4.281000]     IDPU (5) ID pullup =0
> [    4.284543]   remainder=001e0000
> [    4.288361]   ### USBINTR (148) val=00000000
> [    4.291679]     SLE (8) sleep int =0
> [    4.295914]     URE (6) USB reset int=0
> [    4.299473]     PCE (2) port change detect int=0
> [    4.303050]     UEI (1) USB error int=0
> [    4.307892]     UI (0) USB int=0
> [    4.311470]   remainder=00000000
> [    4.314925]   ### USBSTS (144) val=40000480
> [    4.318136]     ULPI (10) ULPI event complete=1
> [    4.322061]     SOF (7) SOF received=1
> [    4.326557]     UEI (1) USB error=0
> [    4.330392]     UI (0) USB int=0
> [    4.333762]   remainder=40000000
> [    4.337234]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    4.340464]      SUSPENDM=1
> [    4.345392]      OpMode=10b disable bit-stuff and NRZI encoding
> [    4.350879]      TermSelect=1
> [    4.354247]      XcvrSelect=01b FS
> [    4.360060]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    4.360345]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    4.365534]      DmPulldown=1
> [    4.370584]      DpPulldown=1
> [    4.373519]    ### ULPI_USB_INT_STS (13) val=00000008
> [    4.376472]      SessEnd=1
> [    4.381519] TRB: in msm_usb_reset, leaving
> [    4.384108]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    4.388191]    ### PORTSC (184) val=8c000804
> [    4.393675]      PTS (31:30) transceiver select =10b: ulpi
> [    4.402959]     PSPD (27:26) port speed =11b: ???
> [    4.407716]     PHCD (23) clock disable =0
> [    4.408154]     LS (11:10) line status = 10b: J-state
> [    4.416485]     PE (2) port enabled =1
> [    4.417268]     CCS (0) current connect status =0
> [    4.420846]   remainder=00000000
> [    4.425602]   ### OTGSC (1a4) val=003e1000
> [    4.428900]     1MSIE (29) 1MS timer int enable =0
> [    4.432825]     BSVIE (27) vbus B valid int enable =0
> [    4.437583]     FIELD_1MSS (21) 1ms timer status =1
> [    4.442721]     FIELD_1MST (13) 1ms timer toggle =0
> [    4.447391]     BSE (12) vbus B session end =1
> [    4.452268]     BSV (11) vbus B session valid =0
> [    4.456766]     ASV (10) vbus A session valid =0
> [    4.461556]     AVV (9) A vbus valid =0
> [    4.466139]     IDPU (5) ID pullup =0
> [    4.469698]   remainder=001e0000
> [    4.473536]   ### USBINTR (148) val=00000000
> [    4.476818]     SLE (8) sleep int =0
> [    4.481087]     URE (6) USB reset int=0
> [    4.484629]     PCE (2) port change detect int=0
> [    4.488189]     UEI (1) USB error int=0
> [    4.493067]     UI (0) USB int=0
> [    4.496608]   remainder=00000000
> [    4.500080]   ### USBSTS (144) val=40000480
> [    4.503310]     ULPI (10) ULPI event complete=1
> [    4.507200]     SOF (7) SOF received=1
> [    4.511730]     UEI (1) USB error=0
> [    4.515531]     UI (0) USB int=0
> [    4.518917]   remainder=40000000
> [    4.522409]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    4.525603]      SUSPENDM=1
> [    4.530564]      OpMode=10b disable bit-stuff and NRZI encoding
> [    4.536017]      TermSelect=1
> [    4.539403]      XcvrSelect=01b FS
> [    4.545218]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    4.545484]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    4.550707]      DmPulldown=1
> [    4.555723]      DpPulldown=1
> [    4.558674]    ### ULPI_USB_INT_STS (13) val=00000008
> [    4.561644]      SessEnd=1
> [    4.566695] TRB: in msm_otg_probe, mode=2, otg_control=3
> [    4.569267] creating debugfs msm_otg/mode
> [    4.574854] msm_hsusb f9a55000.gadget: in ci_hdrc_msm_probe
> [    4.578655] TRB: in ci_get_platdata
> [    4.584042] TRB: in ci_get_platdata, dr_mode=2
> [    4.587589] TRB!!!!!!!!!!!!: in ci_hdrc_probe
> [    4.592042] TRB: hw_device_init
> [    4.596434] TRB: in hw_alloc_regmap, is_lpg=0
> [    4.599391] TRB: ci hw_read: reg=f0064108, mask=00020000,
> val=00000000
> [    4.603922] TRB: in hw_alloc_regmap, is_lpg=0
> [    4.610346] TRB: ci hw_read: reg=f0064124, mask=0000001f,
> val=00000010
> [    4.614756] TRB: ci hw_read: reg=f0064184, mask=00800000,
> val=00000000
> [    4.621196] TRB: ci hw_write: reg=f0064148, mask=ffffffff,
> data=00000000
> [    4.627690] TRB: ci hw_write: reg=f0064144, mask=ffffffff,
> data=ffffffff
> [    4.634570] ci_hdrc ci_hdrc.0: ChipIdea HDRC found, lpm: 0; cap:
> f0064100 op: f0064140
> [    4.641249] TRB: hw_device_init done
> [    4.648953] TRB: msm_phy_init, entering
> [    4.652701]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    4.656247]    ### PORTSC (184) val=8c000804
> [    4.661817]      PTS (31:30) transceiver select =10b: ulpi
> [    4.671101]     PSPD (27:26) port speed =11b: ???
> [    4.675857]     PHCD (23) clock disable =0
> [    4.676296]     LS (11:10) line status = 10b: J-state
> [    4.684626]     PE (2) port enabled =1
> [    4.685412]     CCS (0) current connect status =0
> [    4.688970]   remainder=00000000
> [    4.693762]   ### OTGSC (1a4) val=003e1000
> [    4.697044]     1MSIE (29) 1MS timer int enable =0
> [    4.700968]     BSVIE (27) vbus B valid int enable =0
> [    4.705726]     FIELD_1MSS (21) 1ms timer status =1
> [    4.710862]     FIELD_1MST (13) 1ms timer toggle =0
> [    4.715535]     BSE (12) vbus B session end =1
> [    4.720411]     BSV (11) vbus B session valid =0
> [    4.724909]     ASV (10) vbus A session valid =0
> [    4.729683]     AVV (9) A vbus valid =0
> [    4.734300]     IDPU (5) ID pullup =0
> [    4.737842]   remainder=001e0000
> [    4.741677]   ### USBINTR (148) val=00000000
> [    4.744959]     SLE (8) sleep int =0
> [    4.749213]     URE (6) USB reset int=0
> [    4.752789]     PCE (2) port change detect int=0
> [    4.756332]     UEI (1) USB error int=0
> [    4.761208]     UI (0) USB int=0
> [    4.764750]   remainder=00000000
> [    4.768224]   ### USBSTS (144) val=00000080
> [    4.771452]     ULPI (10) ULPI event complete=0
> [    4.775342]     SOF (7) SOF received=1
> [    4.779855]     UEI (1) USB error=0
> [    4.783691]     UI (0) USB int=0
> [    4.787059]   remainder=00000000
> [    4.790551]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    4.793745]      SUSPENDM=1
> [    4.798690]      OpMode=10b disable bit-stuff and NRZI encoding
> [    4.804161]      TermSelect=1
> [    4.807546]      XcvrSelect=01b FS
> [    4.813359]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    4.813625]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    4.818833]      DmPulldown=1
> [    4.823882]      DpPulldown=1
> [    4.826818]    ### ULPI_USB_INT_STS (13) val=00000008
> [    4.829771]      SessEnd=1
> [    4.834817] TRB: ulpi_init() 1
> [    4.837405] TRB: ulpi_init() 2
> [    4.840462] TRB: ulpi_init() 3
> [    4.843484] TRB: ulpi: write 0x63 to 0x81
> [    4.846522] TRB: ulpi_init() 4
> [    4.850619] TRB: ulpi_write reg=0x81, val=0x63
> [    4.853555] TRB: msm writel(),         addr=f0062170, val=60810063
> [    4.857984] TRB: msm readl(),          addr=f0062170, val=28810863
> [    4.864164] TRB: ulpi_init() 5
> [    4.870321] TRB: ulpi_init() 6
> [    4.873344] TRB: ulpi_init() 7 - done
> [    4.876382] TRB: in msm_phy_reset, entering
> [    4.880116]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    4.884129]    ### PORTSC (184) val=8c000804
> [    4.889665]      PTS (31:30) transceiver select =10b: ulpi
> [    4.898949]     PSPD (27:26) port speed =11b: ???
> [    4.903740]     PHCD (23) clock disable =0
> [    4.904161]     LS (11:10) line status = 10b: J-state
> [    4.912508]     PE (2) port enabled =1
> [    4.913276]     CCS (0) current connect status =0
> [    4.916836]   remainder=00000000
> [    4.921626]   ### OTGSC (1a4) val=003e1000
> [    4.924908]     1MSIE (29) 1MS timer int enable =0
> [    4.928815]     BSVIE (27) vbus B valid int enable =0
> [    4.933606]     FIELD_1MSS (21) 1ms timer status =1
> [    4.938711]     FIELD_1MST (13) 1ms timer toggle =0
> [    4.943415]     BSE (12) vbus B session end =1
> [    4.948259]     BSV (11) vbus B session valid =0
> [    4.952790]     ASV (10) vbus A session valid =0
> [    4.957547]     AVV (9) A vbus valid =0
> [    4.962163]     IDPU (5) ID pullup =0
> [    4.965706]   remainder=001e0000
> [    4.969524]   ### USBINTR (148) val=00000000
> [    4.972842]     SLE (8) sleep int =0
> [    4.977077]     URE (6) USB reset int=0
> [    4.980652]     PCE (2) port change detect int=0
> [    4.984196]     UEI (1) USB error int=0
> [    4.989057]     UI (0) USB int=0
> [    4.992632]   remainder=00000000
> [    4.996088]   ### USBSTS (144) val=00000480
> [    4.999299]     ULPI (10) ULPI event complete=1
> [    5.003224]     SOF (7) SOF received=1
> [    5.007718]     UEI (1) USB error=0
> [    5.011559]     UI (0) USB int=0
> [    5.014924]   remainder=00000000
> [    5.018397]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    5.021627]      SUSPENDM=1
> [    5.026556]      OpMode=10b disable bit-stuff and NRZI encoding
> [    5.032042]      TermSelect=1
> [    5.035410]      XcvrSelect=01b FS
> [    5.041240]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    5.041491]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    5.046697]      DmPulldown=1
> [    5.051770]      DpPulldown=1
> [    5.054682]    ### ULPI_USB_INT_STS (13) val=00000008
> [    5.057634]      SessEnd=1
> [    5.062685] TRB: msm readl(),          addr=f0062278, val=000d3c32
> [    5.065276] TRB: msm writel(),         addr=f0062278, val=000d3c33
> [    5.071494] TRB: msm readl(),          addr=f0062278, val=000d3c33
> [    5.077602] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    5.083783] TRB: in msm_phy_reset, leaving
> [    5.089926]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    5.094023]    ### PORTSC (184) val=8c000804
> [    5.099475]      PTS (31:30) transceiver select =10b: ulpi
> [    5.108759]     PSPD (27:26) port speed =11b: ???
> [    5.113549]     PHCD (23) clock disable =0
> [    5.113970]     LS (11:10) line status = 10b: J-state
> [    5.122317]     PE (2) port enabled =1
> [    5.123083]     CCS (0) current connect status =0
> [    5.126644]   remainder=00000000
> [    5.131435]   ### OTGSC (1a4) val=003e1000
> [    5.134717]     1MSIE (29) 1MS timer int enable =0
> [    5.138624]     BSVIE (27) vbus B valid int enable =0
> [    5.143415]     FIELD_1MSS (21) 1ms timer status =1
> [    5.148520]     FIELD_1MST (13) 1ms timer toggle =0
> [    5.153223]     BSE (12) vbus B session end =1
> [    5.158067]     BSV (11) vbus B session valid =0
> [    5.162598]     ASV (10) vbus A session valid =0
> [    5.167357]     AVV (9) A vbus valid =0
> [    5.171972]     IDPU (5) ID pullup =0
> [    5.175514]   remainder=001e0000
> [    5.179335]   ### USBINTR (148) val=00000000
> [    5.182650]     SLE (8) sleep int =0
> [    5.186887]     URE (6) USB reset int=0
> [    5.190463]     PCE (2) port change detect int=0
> [    5.194005]     UEI (1) USB error int=0
> [    5.198866]     UI (0) USB int=0
> [    5.202441]   remainder=00000000
> [    5.205896]   ### USBSTS (144) val=00000480
> [    5.209109]     ULPI (10) ULPI event complete=1
> [    5.213032]     SOF (7) SOF received=1
> [    5.217529]     UEI (1) USB error=0
> [    5.221365]     UI (0) USB int=0
> [    5.224733]   remainder=00000000
> [    5.228208]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    5.231437]      SUSPENDM=1
> [    5.236364]      OpMode=10b disable bit-stuff and NRZI encoding
> [    5.241850]      TermSelect=1
> [    5.245218]      XcvrSelect=01b FS
> [    5.251050]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    5.251299]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    5.256506]      DmPulldown=1
> [    5.261556]      DpPulldown=1
> [    5.264491]    ### ULPI_USB_INT_STS (13) val=00000008
> [    5.267444]      SessEnd=1
> [    5.272495] TRB: msm readl(),          addr=f0062278, val=000d3c32
> [    5.275084] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    5.281263] TRB: msm_phy_init, leaving
> [    5.287407]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    5.291160]    ### PORTSC (184) val=8c000804
> [    5.296610]      PTS (31:30) transceiver select =10b: ulpi
> [    5.305893]     PSPD (27:26) port speed =11b: ???
> [    5.310683]     PHCD (23) clock disable =0
> [    5.311105]     LS (11:10) line status = 10b: J-state
> [    5.319435]     PE (2) port enabled =1
> [    5.320237]     CCS (0) current connect status =0
> [    5.323781]   remainder=00000000
> [    5.328553]   ### OTGSC (1a4) val=003e3000
> [    5.331869]     1MSIE (29) 1MS timer int enable =0
> [    5.335759]     BSVIE (27) vbus B valid int enable =0
> [    5.340552]     FIELD_1MSS (21) 1ms timer status =1
> [    5.345655]     FIELD_1MST (13) 1ms timer toggle =1
> [    5.350358]     BSE (12) vbus B session end =1
> [    5.355202]     BSV (11) vbus B session valid =0
> [    5.359718]     ASV (10) vbus A session valid =0
> [    5.364508]     AVV (9) A vbus valid =0
> [    5.369090]     IDPU (5) ID pullup =0
> [    5.372668]   remainder=001e0000
> [    5.376470]   ### USBINTR (148) val=00000000
> [    5.379768]     SLE (8) sleep int =0
> [    5.384039]     URE (6) USB reset int=0
> [    5.387582]     PCE (2) port change detect int=0
> [    5.391159]     UEI (1) USB error int=0
> [    5.396001]     UI (0) USB int=0
> [    5.399560]   remainder=00000000
> [    5.403048]   ### USBSTS (144) val=00000480
> [    5.406245]     ULPI (10) ULPI event complete=1
> [    5.410168]     SOF (7) SOF received=1
> [    5.414664]     UEI (1) USB error=0
> [    5.418484]     UI (0) USB int=0
> [    5.421885]   remainder=00000000
> [    5.425343]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    5.428554]      SUSPENDM=1
> [    5.433517]      OpMode=10b disable bit-stuff and NRZI encoding
> [    5.438968]      TermSelect=1
> [    5.442371]      XcvrSelect=01b FS
> [    5.448168]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    5.448434]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    5.453659]      DmPulldown=1
> [    5.458672]      DpPulldown=1
> [    5.461643]    ### ULPI_USB_INT_STS (13) val=00000008
> [    5.464579]      SessEnd=1
> [    5.469611] TRB: getting interrupt
> [    5.472233] TRB: ci->irq=166
> [    5.475602] TRB: ci hw_read: reg=f0064124, mask=00000180,
> val=00000180
> [    5.478647] ci_hdrc ci_hdrc.0: It is OTG capable controller
> [    5.484998] TRB: ci hw_write: reg=f00641a4, mask=7f000000,
> data=00000000
> [    5.490469] TRB: ci hw_write: reg=f00641a4, mask=007f0000,
> data=007f0000
> [    5.497396] TRB: in ci_hdrc_gadget_init
> [    5.504092] TRB: ci hw_read: reg=f0064124, mask=00000080,
> val=00000080
> [    5.507638] TRB: setting irq = udc_irq
> [    5.514307] TRB: in usb_add_gadget_udc_release()
> [    5.518066] TRB: in ci_hdrc_probe, doing otg_set_peripheral, with
> ci->gadget=ef02c068
> [    5.522774] TRB: in msm_otg_set_peripheral
> [    5.530480] TRB: MOSP 1
> [    5.534454] TRB: MOSP 6
> [    5.536798] peripheral driver registered w/ tranceiver
> [    5.539232] TRB: MOSP 7
> [    5.544452] TRB: MOSP 8
> [    5.546786] TRB: MOSP 9
> [    5.549211] TRB: ret=0
> [    5.551663] TRB: in msm_otg_sm_work: state=0
> [    5.554075] TRB: MOSW 1 OTG_STATE_UNDEFINED state
> [    5.558502] TRB: in msm_otg_reset, entering
> [    5.563210] TRB: ci hw_read: reg=f00641a4, mask=ffffffff,
> val=00201000
> [    5.567101] TRB: ci_udc_vbus_session, vbus_active=0
> [    5.573731] TRB: ci_udc_vbus_session, gadget_ready=0
> [    5.578470] TRB: ci hw_write: reg=f00641a4, mask=007f0000,
> data=00080000
> [    5.583701]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    5.590382]    ### PORTSC (184) val=8c000804
> [    5.595656]      PTS (31:30) transceiver select =10b: ulpi
> [    5.604961] TRB: ci hw_write: reg=f00641a4, mask=08000000,
> data=08000000
> [    5.605382] TRB Requesting irq 166:ci_hdrc_msm
> [    5.612179] TRB: Creating device files for ci_hdrc.0
> [    5.616477] /home/CORPUSERS/10102229/work/dragonboard/APQ8074_M8974AAAAANLYA31050138_JB_V11/kernel-
> 14-test-usb/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
> [    5.622285] Freeing unused kernel memory: 280K (c082a000 -
> c0870000)
> [    5.636246]     PSPD (27:26) port speed =11b: ???
> [    5.646953]     PHCD (23) clock disable =0
> [    5.647390]     LS (11:10) line status = 10b: J-state
> [    5.655720]     PE (2) port enabled =1
> [    5.656504]     CCS (0) current connect status =0
> [    5.660065]   remainder=00000000
> [    5.676227]   ### OTGSC (1a4) val=08203000
> [    5.676246]     1MSIE (29) 1MS timer int enable =0
> [    5.679202]     BSVIE (27) vbus B valid int enable =1
> mkdir: can't create directory '/dev': File exists[    5.689521]
> FIELD_1MSS (21) 1ms timer status =
> 1
> 
> [    5.698400]     FIELD_1MST (13) 1ms timer toggle =1
> [    5.698419]     BSE (12) vbus B session end =1
> [    5.706024]     BSV (11) vbus B session valid =0
> [    5.707588]     ASV (10) vbus A session valid =0
> [    5.715575]     AVV (9) A vbus valid =0
> [    5.716961]     IDPU (5) ID pullup =0
> [    5.723884]   remainder=00000000
> [    5.724341]   ### USBINTR (148) val=00000000
> [    5.727639]     SLE (8) sleep int =0
> [    5.740198]     URE (6) USB reset int=0
> [    5.740216]     PCE (2) port change detect int=0
> [    5.742827]     UEI (1) USB error int=0
> [    5.747686]     UI (0) USB int=0
> [    5.760258]   remainder=00000000
> [    5.760276]   ### USBSTS (144) val=00000480
> [    5.762538]     ULPI (10) ULPI event complete=1
> [    5.766444]     SOF (7) SOF received=1
> [    5.785969]     UEI (1) USB error=0
> [    5.785985]     UI (0) USB int=0
> [    5.788248]   remainder=00000000
> [    5.792913]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    5.794934]      SUSPENDM=1
> [    5.799879]      OpMode=10b disable bit-stuff and NRZI encoding
> [    5.815934]      TermSelect=1
> [    5.818195]      XcvrSelect=01b FS
> [    5.824011]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    5.824275]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    5.829482]      DmPulldown=1
> [    5.850184]      DpPulldown=1
> [    5.850204]    ### ULPI_USB_INT_STS (13) val=00000008
> [    5.852120]      SessEnd=1
> [    5.857150] TRB: issuing USBCMD_RESET to USB_USBCMD
> [    5.859758] TRB: msm writel(),         addr=f0062140, val=00000002
> [    5.880186] TRB: msm readl(),          addr=f0062140, val=00080002
> [    5.880210] TRB: msm readl(),          addr=f0062140, val=00080000
> [    5.885247]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    5.900183]    ### PORTSC (184) val=8c000804
> [    5.900202]      PTS (31:30) transceiver select =10b: ulpi
> [    5.908448]     PSPD (27:26) port speed =11b: ???
> [    5.930184]     PHCD (23) clock disable =0
> [    5.930202]     LS (11:10) line status = 10b: J-state
> [    5.937580]     PE (2) port enabled =1
> [    5.938366]     CCS (0) current connect status =0
> [    5.950183]   remainder=00000000
> [    5.950200]   ### OTGSC (1a4) val=08203000
> [    5.952463]     1MSIE (29) 1MS timer int enable =0
> [    5.956369]     BSVIE (27) vbus B valid int enable =1
> [    5.970185]     FIELD_1MSS (21) 1ms timer status =1
> [    5.970203]     FIELD_1MST (13) 1ms timer toggle =1
> [    5.973853]     BSE (12) vbus B session end =1
> [    5.978715]     BSV (11) vbus B session valid =0
> [    6.000181]     ASV (10) vbus A session valid =0
> [    6.000200]     AVV (9) A vbus valid =0
> [    6.003849]     IDPU (5) ID pullup =0
> [    6.007407]   remainder=00000000
> [    6.020179]   ### USBINTR (148) val=00000000
> [    6.020197]     SLE (8) sleep int =0
> [    6.023498]     URE (6) USB reset int=0
> [    6.027057]     PCE (2) port change detect int=0
> [    6.040225]     UEI (1) USB error int=0
> [    6.040243]     UI (0) USB int=0
> [    6.042851]   remainder=00000000
> [    6.046326]   ### USBSTS (144) val=00000080
> [    6.049537]     ULPI (10) ULPI event complete=0
> sh: can't access tty; job control turned off
> / # [    6.063965]     SOF (7) SOF received=1
> [    6.063983]     UEI (1) USB error=0
> [    6.067703]     UI (0) USB int=0
> [    6.071138]   remainder=00000000
> [    6.074564]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    6.077775]      SUSPENDM=1
> [    6.082836]      OpMode=10b disable bit-stuff and NRZI encoding
> [    6.088191]      TermSelect=1
> [    6.091613]      XcvrSelect=01b FS
> [    6.097388]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    6.097655]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    6.102890]      DmPulldown=1
> [    6.107894]      DpPulldown=1
> [    6.110866]    ### ULPI_USB_INT_STS (13) val=00000008
> [    6.113800]      SessEnd=1
> [    6.118833] TRB: in msm_otg_reset, 11111 !!! check regs here
> (before) !!!
> [    6.121459] TRB: turning PTS transceiver back to ULPI and resetting
> rest of PORTSC
> [    6.128302] TRB: msm writel(),         addr=f0062184, val=80000000
> [    6.135780] TRB: in msm_otg_reset, 11122 !!! check regs here
> (after) !!!
> [    6.141946]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    6.148783]    ### PORTSC (184) val=8c000804
> [    6.154095]      PTS (31:30) transceiver select =10b: ulpi
> [    6.163377]     PSPD (27:26) port speed =11b: ???
> [    6.168134]     PHCD (23) clock disable =0
> [    6.168573]     LS (11:10) line status = 10b: J-state
> [    6.176902]     PE (2) port enabled =1
> [    6.177687]     CCS (0) current connect status =0
> [    6.181264]   remainder=00000000
> [    6.186021]   ### OTGSC (1a4) val=08203000
> [    6.189320]     1MSIE (29) 1MS timer int enable =0
> [    6.193244]     BSVIE (27) vbus B valid int enable =1
> [    6.198000]     FIELD_1MSS (21) 1ms timer status =1
> [    6.203140]     FIELD_1MST (13) 1ms timer toggle =1
> [    6.207810]     BSE (12) vbus B session end =1
> [    6.212688]     BSV (11) vbus B session valid =0
> [    6.217185]     ASV (10) vbus A session valid =0
> [    6.221976]     AVV (9) A vbus valid =0
> [    6.226559]     IDPU (5) ID pullup =0
> [    6.230117]   remainder=00000000
> [    6.233953]   ### USBINTR (148) val=00000000
> [    6.237237]     SLE (8) sleep int =0
> [    6.241506]     URE (6) USB reset int=0
> [    6.245049]     PCE (2) port change detect int=0
> [    6.248608]     UEI (1) USB error int=0
> [    6.253484]     UI (0) USB int=0
> [    6.257026]   remainder=00000000
> [    6.260517]   ### USBSTS (144) val=00000480
> [    6.263711]     ULPI (10) ULPI event complete=1
> [    6.267619]     SOF (7) SOF received=1
> [    6.272149]     UEI (1) USB error=0
> [    6.275949]     UI (0) USB int=0
> [    6.279336]   remainder=00000000
> [    6.282826]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    6.286022]      SUSPENDM=1
> [    6.290984]      OpMode=10b disable bit-stuff and NRZI encoding
> [    6.296436]      TermSelect=1
> [    6.299821]      XcvrSelect=01b FS
> [    6.305637]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    6.305901]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    6.311127]      DmPulldown=1
> [    6.316141]      DpPulldown=1
> [    6.319094]    ### ULPI_USB_INT_STS (13) val=00000008
> [    6.322064]      SessEnd=1
> [    6.327080] TRB: msm writel(),         addr=f0062090, val=00000000
> [    6.329687] TRB: in msm_otg_reset, 11133
> [    6.335865]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    6.339929]    ### PORTSC (184) val=8c000804
> [    6.345241]      PTS (31:30) transceiver select =10b: ulpi
> [    6.354522]     PSPD (27:26) port speed =11b: ???
> [    6.359281]     PHCD (23) clock disable =0
> [    6.359719]     LS (11:10) line status = 10b: J-state
> [    6.368048]     PE (2) port enabled =1
> [    6.368833]     CCS (0) current connect status =0
> [    6.372411]   remainder=00000000
> [    6.377167]   ### OTGSC (1a4) val=08201000
> [    6.380481]     1MSIE (29) 1MS timer int enable =0
> [    6.384373]     BSVIE (27) vbus B valid int enable =1
> [    6.389146]     FIELD_1MSS (21) 1ms timer status =1
> [    6.394285]     FIELD_1MST (13) 1ms timer toggle =0
> [    6.398956]     BSE (12) vbus B session end =1
> [    6.403832]     BSV (11) vbus B session valid =0
> [    6.408331]     ASV (10) vbus A session valid =0
> [    6.413121]     AVV (9) A vbus valid =0
> [    6.417704]     IDPU (5) ID pullup =0
> [    6.421281]   remainder=00000000
> [    6.425083]   ### USBINTR (148) val=00000000
> [    6.428381]     SLE (8) sleep int =0
> [    6.432652]     URE (6) USB reset int=0
> [    6.436194]     PCE (2) port change detect int=0
> [    6.439755]     UEI (1) USB error int=0
> [    6.444632]     UI (0) USB int=0
> [    6.448173]   remainder=00000000
> [    6.451662]   ### USBSTS (144) val=00000480
> [    6.454858]     ULPI (10) ULPI event complete=1
> [    6.458765]     SOF (7) SOF received=1
> [    6.463295]     UEI (1) USB error=0
> [    6.467096]     UI (0) USB int=0
> [    6.470498]   remainder=00000000
> [    6.473955]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    6.477168]      SUSPENDM=1
> [    6.482130]      OpMode=10b disable bit-stuff and NRZI encoding
> [    6.487583]      TermSelect=1
> [    6.490984]      XcvrSelect=01b FS
> [    6.496781]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    6.497047]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    6.502273]      DmPulldown=1
> [    6.507287]      DpPulldown=1
> [    6.510256]    ### ULPI_USB_INT_STS (13) val=00000008
> [    6.513192]      SessEnd=1
> [    6.518224] TRB: msm writel(),         addr=f0062098, val=00000008
> [    6.520849] TRB: in msm_otg_reset, 22222
> [    6.526993]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    6.531093]    ### PORTSC (184) val=8c000804
> [    6.536369]      PTS (31:30) transceiver select =10b: ulpi
> [    6.545653]     PSPD (27:26) port speed =11b: ???
> [    6.550443]     PHCD (23) clock disable =0
> [    6.550866]     LS (11:10) line status = 10b: J-state
> [    6.559193]     PE (2) port enabled =1
> [    6.559978]     CCS (0) current connect status =0
> [    6.563557]   remainder=00000000
> [    6.568312]   ### OTGSC (1a4) val=08203000
> [    6.571628]     1MSIE (29) 1MS timer int enable =0
> [    6.575517]     BSVIE (27) vbus B valid int enable =1
> [    6.580309]     FIELD_1MSS (21) 1ms timer status =1
> [    6.585415]     FIELD_1MST (13) 1ms timer toggle =1
> [    6.590102]     BSE (12) vbus B session end =1
> [    6.594979]     BSV (11) vbus B session valid =0
> [    6.599477]     ASV (10) vbus A session valid =0
> [    6.604268]     AVV (9) A vbus valid =0
> [    6.608849]     IDPU (5) ID pullup =0
> [    6.612426]   remainder=00000000
> [    6.616229]   ### USBINTR (148) val=00000000
> [    6.619529]     SLE (8) sleep int =0
> [    6.623797]     URE (6) USB reset int=0
> [    6.627340]     PCE (2) port change detect int=0
> [    6.630917]     UEI (1) USB error int=0
> [    6.635760]     UI (0) USB int=0
> [    6.639318]   remainder=00000000
> [    6.642809]   ### USBSTS (144) val=00000480
> [    6.646003]     ULPI (10) ULPI event complete=1
> [    6.649910]     SOF (7) SOF received=1
> [    6.654440]     UEI (1) USB error=0
> [    6.658243]     UI (0) USB int=0
> [    6.661644]   remainder=00000000
> [    6.665102]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    6.668314]      SUSPENDM=1
> [    6.673276]      OpMode=10b disable bit-stuff and NRZI encoding
> [    6.678729]      TermSelect=1
> [    6.682131]      XcvrSelect=01b FS
> [    6.687928]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    6.688194]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    6.693418]      DmPulldown=1
> [    6.698432]      DpPulldown=1
> [    6.701402]    ### ULPI_USB_INT_STS (13) val=00000008
> [    6.704337]      SessEnd=1
> [    6.709371] TRB: msm readl(),          addr=f0062278, val=000c3c32
> [    6.711997] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [    6.718141] TRB: in msm_otg_reset, leaving
> [    6.724320]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [    6.728384]    ### PORTSC (184) val=8c000804
> [    6.733869]      PTS (31:30) transceiver select =10b: ulpi
> [    6.743151]     PSPD (27:26) port speed =11b: ???
> [    6.747908]     PHCD (23) clock disable =0
> [    6.748347]     LS (11:10) line status = 10b: J-state
> [    6.756676]     PE (2) port enabled =1
> [    6.757461]     CCS (0) current connect status =0
> [    6.761038]   remainder=00000000
> [    6.765796]   ### OTGSC (1a4) val=08201000
> [    6.769093]     1MSIE (29) 1MS timer int enable =0
> [    6.773017]     BSVIE (27) vbus B valid int enable =1
> [    6.777775]     FIELD_1MSS (21) 1ms timer status =1
> [    6.782913]     FIELD_1MST (13) 1ms timer toggle =0
> [    6.787584]     BSE (12) vbus B session end =1
> [    6.792460]     BSV (11) vbus B session valid =0
> [    6.796959]     ASV (10) vbus A session valid =0
> [    6.801750]     AVV (9) A vbus valid =0
> [    6.806334]     IDPU (5) ID pullup =0
> [    6.809892]   remainder=00000000
> [    6.813728]   ### USBINTR (148) val=00000000
> [    6.817010]     SLE (8) sleep int =0
> [    6.821280]     URE (6) USB reset int=0
> [    6.824823]     PCE (2) port change detect int=0
> [    6.828383]     UEI (1) USB error int=0
> [    6.833260]     UI (0) USB int=0
> [    6.836802]   remainder=00000000
> [    6.840290]   ### USBSTS (144) val=00000480
> [    6.843486]     ULPI (10) ULPI event complete=1
> [    6.847393]     SOF (7) SOF received=1
> [    6.851922]     UEI (1) USB error=0
> [    6.855724]     UI (0) USB int=0
> [    6.859110]   remainder=00000000
> [    6.862600]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [    6.865796]      SUSPENDM=1
> [    6.870758]      OpMode=10b disable bit-stuff and NRZI encoding
> [    6.876211]      TermSelect=1
> [    6.879596]      XcvrSelect=01b FS
> [    6.885409]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [    6.885676]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [    6.890900]      DmPulldown=1
> [    6.895915]      DpPulldown=1
> [    6.898867]    ### ULPI_USB_INT_STS (13) val=00000008
> [    6.901838]      SessEnd=1
> [    6.906855] TRB: msm readl(),          addr=f00621a4, val=08203000
> [    6.909461] TRB: msm_otg_init_sm, pdata->mode=2
> [    6.915638] TRB: MOSW 2 OTG_STATE_B_IDLE state
> 
> / #
> / #
> / # cd lib/modules
> /lib/modules # ls
> ansi_cprng.ko          g_zero.ko              regs
> g_hid.ko               libcomposite.ko        usb_f_mass_storage.ko
> g_mass_storage.ko      loadem.sh              usb_f_ss_lb.ko
> /lib/modules # insmod libcomposite.ko
> /lib/modules # insmod usb_f_ss_lb.ko
> /lib/modules # insmod usb_f_mass_storage.ko
> /lib/modules # insmod g_zero.ko
> [  213.753592] TRB: usb_gadget_probe_driver
> [  213.753614] ------------[ cut here ]------------
> [  213.756588] WARNING: CPU: 0 PID: 92 at
> /home/CORPUSERS/10102229/work/dragonboard/APQ8074_M8974AAAAA
> NLYA31050138_JB_V11/kernel-14-test-usb/drivers/usb/gadget/udc-core.c:416
> usb_gadget_probe_driver+0x20/
> 0xf4()
> [  213.770179] TRB: usb_gadget_probe_driver
> [  213.779313] Modules linked in: g_zero(+) usb_f_mass_storage
> usb_f_ss_lb libcomposite
> [  213.791182] CPU: 0 PID: 92 Comm: insmod Not tainted
> 3.13.0-rc6-00148-g1076101-dirty #79
> [  213.791229] [<c0214144>] (unwind_backtrace+0x0/0xf8) from
> [<c0211ba8>] (show_stack+0x10/0x14)
> [  213.798950] [<c0211ba8>] (show_stack+0x10/0x14) from [<c063198c>]
> (dump_stack+0x64/0xb4)
> [  213.807674] [<c063198c>] (dump_stack+0x64/0xb4) from [<c022afd8>]
> (warn_slowpath_common+0x68/0x88)
> [  213.815820] [<c022afd8>] (warn_slowpath_common+0x68/0x88) from
> [<c022b08c>] (warn_slowpath_fmt+0x30
> /0x40)
> [  213.824582] [<c022b08c>] (warn_slowpath_fmt+0x30/0x40) from
> [<c0522b0c>] (usb_gadget_probe_driver+0
> x20/0xf4)
> [  213.834218] [<c0522b0c>] (usb_gadget_probe_driver+0x20/0xf4) from
> [<c0208860>] (do_one_initcall+0x1
> 10/0x174)
> [  213.844116] [<c0208860>] (do_one_initcall+0x110/0x174) from
> [<c0285740>] (load_module+0x185c/0x1c6c
> )
> [  213.853922] [<c0285740>] (load_module+0x185c/0x1c6c) from
> [<c0285c40>] (SyS_init_module+0xf0/0x100)
> [  213.863034] [<c0285c40>] (SyS_init_module+0xf0/0x100) from
> [<c020e3c0>] (ret_fast_syscall+0x0/0x30)
> [  213.871805] ---[ end trace babbb03ea78eda66 ]---
> [  213.880816] TRB: in udc_bind_to_driver
> [  213.885647] TRB: udc_bind_to_driver 1
> [  213.889245] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
> [  213.892967] zero gadget: zero ready
> [  213.899016] TRB: udc_bind_to_driver 2
> [  213.902335] TRB: udc_bind_to_driver 3 - calling
> usb_gadget_udc_start
> [  213.906136] TRB: calling through gadget->ops->udc_start()
> [  213.912580] TRB: ci_udc_start()
> [  213.917850] TRB: CIS 1
> [  213.920821] TRB: CIS 2
> [  213.923231] TRB: CIS 3
> [  213.925576] TRB: CIS 4
> [  213.927919] TRB: CIS 5
> [  213.930295] TRB: CIS 6, vbus_active=0
> [  213.932608] TRB: udc_bind_to_driver 4
> [  213.936341] TRB: udc_bind_to_driver 5
> [  213.939988] TRB: udc_bind_to_driver 6
> [  213.943837] TRB: udc_bind_to_driver 7
> /lib/modules #
> /lib/modules # regs
> sh: regs: not found
> /lib/modules # ./regs
> [  242.314425] TRB: in msm_otg_reg_show
> [  242.314445]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  242.317057]    ### PORTSC (184) val=8c000804
> [  242.322426]      PTS (31:30) transceiver select =10b: ulpi
> [  242.331671]     PSPD (27:26) port speed =11b: ???
> [  242.336407]     PHCD (23) clock disable =0
> [  242.336844]     LS (11:10) line status = 10b: J-state
> [  242.345174]     PE (2) port enabled =1
> [  242.345957]     CCS (0) current connect status =0
> [  242.349519]   remainder=00000000
> [  242.354310]   ### OTGSC (1a4) val=08203000
> [  242.357591]     1MSIE (29) 1MS timer int enable =0
> [  242.361515]     BSVIE (27) vbus B valid int enable =1
> [  242.366272]     FIELD_1MSS (21) 1ms timer status =1
> [  242.371410]     FIELD_1MST (13) 1ms timer toggle =1
> [  242.376081]     BSE (12) vbus B session end =1
> [  242.380960]     BSV (11) vbus B session valid =0
> [  242.385456]     ASV (10) vbus A session valid =0
> [  242.390248]     AVV (9) A vbus valid =0
> [  242.394830]     IDPU (5) ID pullup =0
> [  242.398389]   remainder=00000000
> [  242.402225]   ### USBINTR (148) val=00000000
> [  242.405509]     SLE (8) sleep int =0
> [  242.409760]     URE (6) USB reset int=0
> [  242.413367]     PCE (2) port change detect int=0
> [  242.416880]     UEI (1) USB error int=0
> [  242.421758]     UI (0) USB int=0
> [  242.425297]   remainder=00000000
> [  242.428771]   ### USBSTS (144) val=00000480
> [  242.432000]     ULPI (10) ULPI event complete=1
> [  242.435890]     SOF (7) SOF received=1
> [  242.440420]     UEI (1) USB error=0
> [  242.444222]     UI (0) USB int=0
> [  242.447606]   remainder=00000000
> [  242.451099]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  242.454292]      SUSPENDM=1
> [  242.459237]      OpMode=10b disable bit-stuff and NRZI encoding
> [  242.464709]      TermSelect=1
> [  242.468093]      XcvrSelect=01b FS
> [  242.473909]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  242.474173]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  242.479381]      DmPulldown=1
> [  242.484430]      DpPulldown=1
> [  242.487366]    ### ULPI_USB_INT_STS (13) val=00000008
> [  242.490335]      SessEnd=1
> See regs in dmesg log
> /lib/modules # echo none >/debugfs/msm_otg/mode
> [  256.055595] TRB: in msm_otg_mode_write
> [  256.055615] TRB: in msm_otg_mode_write, req_mode=0
> [  256.058262] TRB: requested 'unknown' mode
> [  256.063135] TRB: doing nothing 1
> /lib/modules # echo peripheral >/debugfs/msm_otg/mode
> [  263.136812] TRB: in msm_otg_mode_write
> [  263.136983] TRB: in msm_otg_mode_write, req_mode=2
> [  263.140685] TRB: requested 'peripheral' mode
> [  263.145417] TRB: in msm_otg_sm_work: state=1
> [  263.149832] TRB: MOSW 2 OTG_STATE_B_IDLE state
> [  263.154289] TRB: msm writel(),         addr=f0062170, val=40040000
> [  263.158342] TRB: msm readl(),          addr=f0062170, val=08045500
> [  263.164547] TRB: msm readl(),          addr=f0062170, val=08045500
> [  263.170706] TRB: ulpi_read reg=0x4, val=0x55
> [  263.176828] TRB: ulpi_write reg=0x4, val=0x4d
> [  263.181276] TRB: msm writel(),         addr=f0062170, val=6004004d
> [  263.185511] TRB: msm readl(),          addr=f0062170, val=2804554d
> [  263.191606] TRB: ulpi_write reg=0x86, val=0x3f
> [  263.197747] TRB: msm writel(),         addr=f0062170, val=6086003f
> [  263.202194] TRB: msm readl(),          addr=f0062170, val=2886553f
> [  263.208339] TRB: ulpi_write reg=0x92, val=0x1f
> [  263.214519] TRB: msm writel(),         addr=f0062170, val=6092001f
> [  263.218931] TRB: msm readl(),          addr=f0062170, val=2892551f
> [  263.225112] TRB: ulpi_write reg=0x95, val=0x1f
> [  263.231271] TRB: msm writel(),         addr=f0062170, val=6095001f
> [  263.235685] TRB: msm readl(),          addr=f0062170, val=2895551f
> [  263.241967] TRB: ulpi_write reg=0x85, val=0x10
> [  263.248009] TRB: msm writel(),         addr=f0062170, val=60850010
> [  263.252455] TRB: msm readl(),          addr=f0062170, val=28855510
> /lib/modules # [  263.350167] TRB: msm writel(),
> addr=f0062170, val=40870000
> [  263.350187] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.355227] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.361408] TRB: ulpi_read reg=0x87, val=0x0
> [  263.460167] TRB: msm writel(),         addr=f0062170, val=40870000
> [  263.460187] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.465227] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.471407] TRB: ulpi_read reg=0x87, val=0x0
> [  263.570166] TRB: msm writel(),         addr=f0062170, val=40870000
> [  263.570186] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.575224] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.581406] TRB: ulpi_read reg=0x87, val=0x0
> [  263.680166] TRB: msm writel(),         addr=f0062170, val=40870000
> [  263.680186] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.685225] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.691407] TRB: ulpi_read reg=0x87, val=0x0
> [  263.790166] TRB: msm writel(),         addr=f0062170, val=40870000
> [  263.790186] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.795225] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.801407] TRB: ulpi_read reg=0x87, val=0x0
> [  263.900165] TRB: msm writel(),         addr=f0062170, val=40870000
> [  263.900186] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.905224] TRB: msm readl(),          addr=f0062170, val=08870000
> [  263.911405] TRB: ulpi_read reg=0x87, val=0x0
> [  263.917550] TRB: ulpi_write reg=0x86, val=0x10
> [  263.921992] TRB: msm writel(),         addr=f0062170, val=60860010
> [  263.926233] TRB: msm readl(),          addr=f0062170, val=28860010
> [  263.932411] TRB: ulpi_write reg=0x85, val=0x2
> [  263.938556] TRB: msm writel(),         addr=f0062170, val=60850002
> [  263.943003] TRB: msm readl(),          addr=f0062170, val=28850002
> [  263.949061] TRB: ulpi_write reg=0x85, val=0x1
> [  263.955240] TRB: msm writel(),         addr=f0062170, val=60850001
> [  263.959652] TRB: msm readl(),          addr=f0062170, val=28850001
> [  264.000165] TRB: msm writel(),         addr=f0062170, val=40870000
> [  264.000185] TRB: msm readl(),          addr=f0062170, val=08870000
> [  264.005224] TRB: msm readl(),          addr=f0062170, val=08870000
> [  264.011405] TRB: ulpi_read reg=0x87, val=0x0
> [  264.017552] TRB: ulpi_write reg=0x86, val=0x3f
> [  264.021993] TRB: msm writel(),         addr=f0062170, val=6086003f
> [  264.026231] TRB: msm readl(),          addr=f0062170, val=2886003f
> [  264.032410] TRB: ulpi_write reg=0x92, val=0x1f
> [  264.038554] TRB: msm writel(),         addr=f0062170, val=6092001f
> [  264.043002] TRB: msm readl(),          addr=f0062170, val=2892001f
> [  264.049146] TRB: ulpi_write reg=0x95, val=0x1f
> [  264.055326] TRB: msm writel(),         addr=f0062170, val=6095001f
> [  264.059739] TRB: msm readl(),          addr=f0062170, val=2895001f
> [  264.065918] TRB: msm writel(),         addr=f0062170, val=40040000
> [  264.072082] TRB: msm readl(),          addr=f0062170, val=08044d00
> [  264.078228] TRB: msm readl(),          addr=f0062170, val=08044d00
> [  264.084407] TRB: ulpi_read reg=0x4, val=0x4d
> [  264.090568] TRB: ulpi_write reg=0x4, val=0x45
> [  264.094978] TRB: msm writel(),         addr=f0062170, val=60040045
> [  264.099234] TRB: msm readl(),          addr=f0062170, val=28044d45
> [  264.105337] TRB: in msm_otg_sm_work: state=1
> [  264.111507] TRB: MOSW 2 OTG_STATE_B_IDLE state
> [  264.115903] msm_otg f9a55000.usb: Avail curr from USB = 100
> [  264.120171] TRB: msm_otg_start_peripheral, on=1
> [  264.125620] TRB: msm_otg_start_peripheral, gadget on
> [  264.130153] TRB: ci_udc_vbus_session, vbus_active=1
> [  264.135343] TRB: ci_udc_vbus_session, gadget_ready=1
> [  264.139944] TRB: ci_udc_vbus_session, reset controller
> [  264.145168] TRB: hw_device_reset
> [  264.150100] TRB: ci hw_write: reg=f00641b4, mask=ffffffff,
> data=ffffffff
> [  264.153507] TRB: ci hw_write: reg=f0064140, mask=00000001,
> data=00000000
> [  264.160191] TRB: ci hw_write: reg=f0064140, mask=00000002,
> data=00000002
> [  264.166858] TRB: ci hw_read: reg=f0064140, mask=00000002,
> val=00000002
> [  264.173569] TRB: ci hw_read: reg=f0064140, mask=00000002,
> val=00000000
> [  264.179881] ci_hdrc ci_hdrc.0: CI_HDRC_CONTROLLER_RESET_EVENT
> received
> [  264.186405] TRB: msm_phy_init, entering
> [  264.192912]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  264.196630]    ### PORTSC (184) val=8c000804
> [  264.202199]      PTS (31:30) transceiver select =10b: ulpi
> [  264.211483]     PSPD (27:26) port speed =11b: ???
> [  264.216240]     PHCD (23) clock disable =0
> [  264.216679]     LS (11:10) line status = 10b: J-state
> [  264.225009]     PE (2) port enabled =1
> [  264.225792]     CCS (0) current connect status =0
> [  264.229353]   remainder=00000000
> [  264.234144]   ### OTGSC (1a4) val=08203000
> [  264.237425]     1MSIE (29) 1MS timer int enable =0
> [  264.241350]     BSVIE (27) vbus B valid int enable =1
> [  264.246108]     FIELD_1MSS (21) 1ms timer status =1
> [  264.251246]     FIELD_1MST (13) 1ms timer toggle =1
> [  264.255916]     BSE (12) vbus B session end =1
> [  264.260794]     BSV (11) vbus B session valid =0
> [  264.265291]     ASV (10) vbus A session valid =0
> [  264.270064]     AVV (9) A vbus valid =0
> [  264.274682]     IDPU (5) ID pullup =0
> [  264.278224]   remainder=00000000
> [  264.282060]   ### USBINTR (148) val=00000000
> [  264.285343]     SLE (8) sleep int =0
> [  264.289596]     URE (6) USB reset int=0
> [  264.293171]     PCE (2) port change detect int=0
> [  264.296715]     UEI (1) USB error int=0
> [  264.301590]     UI (0) USB int=0
> [  264.305132]   remainder=00000000
> [  264.308605]   ### USBSTS (144) val=00000080
> [  264.311834]     ULPI (10) ULPI event complete=0
> [  264.315723]     SOF (7) SOF received=1
> [  264.320255]     UEI (1) USB error=0
> [  264.324056]     UI (0) USB int=0
> [  264.327442]   remainder=00000000
> [  264.330933]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  264.334127]      SUSPENDM=1
> [  264.339073]      OpMode=10b disable bit-stuff and NRZI encoding
> [  264.344543]      TermSelect=1
> [  264.347927]      XcvrSelect=01b FS
> [  264.353742]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  264.354008]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  264.359215]      DmPulldown=1
> [  264.364263]      DpPulldown=1
> [  264.367200]    ### ULPI_USB_INT_STS (13) val=00000008
> [  264.370170]      SessEnd=1
> [  264.375184] TRB: ulpi_init() 1
> [  264.377788] TRB: ulpi_init() 2
> [  264.380842] TRB: ulpi_init() 3
> [  264.383865] TRB: ulpi: write 0x63 to 0x81
> [  264.386905] TRB: ulpi_init() 4
> [  264.391000] TRB: ulpi_write reg=0x81, val=0x63
> [  264.393937] TRB: msm writel(),         addr=f0062170, val=60810063
> [  264.398367] TRB: msm readl(),          addr=f0062170, val=28810863
> [  264.404546] TRB: ulpi_init() 5
> [  264.410704] TRB: ulpi_init() 6
> [  264.413725] TRB: ulpi_init() 7 - done
> [  264.416766] TRB: in msm_phy_reset, entering
> [  264.420516]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  264.424494]    ### PORTSC (184) val=8c000804
> [  264.430048]      PTS (31:30) transceiver select =10b: ulpi
> [  264.439331]     PSPD (27:26) port speed =11b: ???
> [  264.444122]     PHCD (23) clock disable =0
> [  264.444543]     LS (11:10) line status = 10b: J-state
> [  264.452890]     PE (2) port enabled =1
> [  264.453658]     CCS (0) current connect status =0
> [  264.457219]   remainder=00000000
> [  264.462008]   ### OTGSC (1a4) val=08203000
> [  264.465290]     1MSIE (29) 1MS timer int enable =0
> [  264.469197]     BSVIE (27) vbus B valid int enable =1
> [  264.473989]     FIELD_1MSS (21) 1ms timer status =1
> [  264.479093]     FIELD_1MST (13) 1ms timer toggle =1
> [  264.483797]     BSE (12) vbus B session end =1
> [  264.488640]     BSV (11) vbus B session valid =0
> [  264.493171]     ASV (10) vbus A session valid =0
> [  264.497929]     AVV (9) A vbus valid =0
> [  264.502546]     IDPU (5) ID pullup =0
> [  264.506088]   remainder=00000000
> [  264.509906]   ### USBINTR (148) val=00000000
> [  264.513224]     SLE (8) sleep int =0
> [  264.517459]     URE (6) USB reset int=0
> [  264.521035]     PCE (2) port change detect int=0
> [  264.524579]     UEI (1) USB error int=0
> [  264.529439]     UI (0) USB int=0
> [  264.533014]   remainder=00000000
> [  264.536470]   ### USBSTS (144) val=00000480
> [  264.539682]     ULPI (10) ULPI event complete=1
> [  264.543605]     SOF (7) SOF received=1
> [  264.548102]     UEI (1) USB error=0
> [  264.551937]     UI (0) USB int=0
> [  264.555306]   remainder=00000000
> [  264.558779]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  264.562010]      SUSPENDM=1
> [  264.566938]      OpMode=10b disable bit-stuff and NRZI encoding
> [  264.572425]      TermSelect=1
> [  264.575793]      XcvrSelect=01b FS
> [  264.581623]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  264.581873]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  264.587079]      DmPulldown=1
> [  264.592128]      DpPulldown=1
> [  264.595064]    ### ULPI_USB_INT_STS (13) val=00000008
> [  264.598017]      SessEnd=1
> [  264.603068] TRB: msm readl(),          addr=f0062278, val=000c3c32
> [  264.605657] TRB: msm writel(),         addr=f0062278, val=000c3c33
> [  264.611878] TRB: msm readl(),          addr=f0062278, val=000c3c33
> [  264.617985] TRB: msm writel(),         addr=f0062278, val=000c3c32
> [  264.624164] TRB: in msm_phy_reset, leaving
> [  264.630325]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  264.634390]    ### PORTSC (184) val=8c000804
> [  264.639856]      PTS (31:30) transceiver select =10b: ulpi
> [  264.649140]     PSPD (27:26) port speed =11b: ???
> [  264.653930]     PHCD (23) clock disable =0
> [  264.654352]     LS (11:10) line status = 10b: J-state
> [  264.662700]     PE (2) port enabled =1
> [  264.663466]     CCS (0) current connect status =0
> [  264.667027]   remainder=00000000
> [  264.671817]   ### OTGSC (1a4) val=08201000
> [  264.675099]     1MSIE (29) 1MS timer int enable =0
> [  264.679006]     BSVIE (27) vbus B valid int enable =1
> [  264.683798]     FIELD_1MSS (21) 1ms timer status =1
> [  264.688901]     FIELD_1MST (13) 1ms timer toggle =0
> [  264.693606]     BSE (12) vbus B session end =1
> [  264.698450]     BSV (11) vbus B session valid =0
> [  264.702982]     ASV (10) vbus A session valid =0
> [  264.707739]     AVV (9) A vbus valid =0
> [  264.712354]     IDPU (5) ID pullup =0
> [  264.715897]   remainder=00000000
> [  264.719716]   ### USBINTR (148) val=00000000
> [  264.723033]     SLE (8) sleep int =0
> [  264.727269]     URE (6) USB reset int=0
> [  264.730844]     PCE (2) port change detect int=0
> [  264.734388]     UEI (1) USB error int=0
> [  264.739248]     UI (0) USB int=0
> [  264.742822]   remainder=00000000
> [  264.746279]   ### USBSTS (144) val=00000480
> [  264.749491]     ULPI (10) ULPI event complete=1
> [  264.753416]     SOF (7) SOF received=1
> [  264.757911]     UEI (1) USB error=0
> [  264.761746]     UI (0) USB int=0
> [  264.765115]   remainder=00000000
> [  264.768590]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  264.771820]      SUSPENDM=1
> [  264.776745]      OpMode=10b disable bit-stuff and NRZI encoding
> [  264.782233]      TermSelect=1
> [  264.785601]      XcvrSelect=01b FS
> [  264.791432]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  264.791681]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  264.796888]      DmPulldown=1
> [  264.801937]      DpPulldown=1
> [  264.804874]    ### ULPI_USB_INT_STS (13) val=00000008
> [  264.807825]      SessEnd=1
> [  264.812875] TRB: msm readl(),          addr=f0062278, val=000c3c32
> [  264.815466] TRB: msm writel(),         addr=f0062278, val=000d3c32
> [  264.821646] TRB: msm_phy_init, leaving
> [  264.827789]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  264.831543]    ### PORTSC (184) val=8c000804
> [  264.836991]      PTS (31:30) transceiver select =10b: ulpi
> [  264.846275]     PSPD (27:26) port speed =11b: ???
> [  264.851068]     PHCD (23) clock disable =0
> [  264.851488]     LS (11:10) line status = 10b: J-state
> [  264.859816]     PE (2) port enabled =1
> [  264.860619]     CCS (0) current connect status =0
> [  264.864162]   remainder=00000000
> [  264.868936]   ### OTGSC (1a4) val=08201000
> [  264.872252]     1MSIE (29) 1MS timer int enable =0
> [  264.876142]     BSVIE (27) vbus B valid int enable =1
> [  264.880933]     FIELD_1MSS (21) 1ms timer status =1
> [  264.886038]     FIELD_1MST (13) 1ms timer toggle =0
> [  264.890742]     BSE (12) vbus B session end =1
> [  264.895585]     BSV (11) vbus B session valid =0
> [  264.900099]     ASV (10) vbus A session valid =0
> [  264.904892]     AVV (9) A vbus valid =0
> [  264.909474]     IDPU (5) ID pullup =0
> [  264.913050]   remainder=00000000
> [  264.916852]   ### USBINTR (148) val=00000000
> [  264.920169]     SLE (8) sleep int =0
> [  264.924404]     URE (6) USB reset int=0
> [  264.927962]     PCE (2) port change detect int=0
> [  264.931541]     UEI (1) USB error int=0
> [  264.936383]     UI (0) USB int=0
> [  264.939942]   remainder=00000000
> [  264.943431]   ### USBSTS (144) val=00000480
> [  264.946626]     ULPI (10) ULPI event complete=1
> [  264.950551]     SOF (7) SOF received=1
> [  264.955045]     UEI (1) USB error=0
> [  264.958865]     UI (0) USB int=0
> [  264.962267]   remainder=00000000
> [  264.965725]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  264.968937]      SUSPENDM=1
> [  264.973899]      OpMode=10b disable bit-stuff and NRZI encoding
> [  264.979352]      TermSelect=1
> [  264.982753]      XcvrSelect=01b FS
> [  264.988551]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  264.988817]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  264.994042]      DmPulldown=1
> [  264.999055]      DpPulldown=1
> [  265.002026]    ### ULPI_USB_INT_STS (13) val=00000008
> [  265.004961]      SessEnd=1
> [  265.009994] TRB: ci hw_write: reg=f00641a8, mask=00000010,
> data=00000010
> [  265.012624] TRB: ci hw_write: reg=f00641a8, mask=00000003,
> data=00000000
> [  265.019462] TRB: ci hw_write: reg=f00641a8, mask=00000003,
> data=00000002
> [  265.026163] TRB: ci hw_write: reg=f00641a8, mask=00000008,
> data=00000008
> [  265.032847] TRB: ci hw_read: reg=f00641a8, mask=00000003,
> val=00000002
> [  265.039512] TRB hw_device_reset done
> [  265.045863] TRB: ucd.c:hw_device_state, dma=791977984
> [  265.049581] TRB: ci hw_write: reg=f0064158, mask=ffffffff,
> data=2f34a000
> [  265.054550] TRB: ci hw_write: reg=f0064148, mask=ffffffff,
> data=00000147
> [  265.061318] TRB: ci hw_write: reg=f0064140, mask=00000001,
> data=00000001
> [  265.067985] TRB: ucd.c:hw_device_state done
> [  265.074684] ci_hdrc ci_hdrc.0: Connected to host
> 
> /lib/modules # ./regs
> [  270.226712] TRB: in msm_otg_reg_show
> [  270.226731]  motg->pdata->otg_control==OTG_PMIC_CONTROL=0
> [  270.229343]    ### PORTSC (184) val=8c000804
> [  270.234715]      PTS (31:30) transceiver select =10b: ulpi
> [  270.243956]     PSPD (27:26) port speed =11b: ???
> [  270.248692]     PHCD (23) clock disable =0
> [  270.249131]     LS (11:10) line status = 10b: J-state
> [  270.257460]     PE (2) port enabled =1
> [  270.258245]     CCS (0) current connect status =0
> [  270.261822]   remainder=00000000
> [  270.266578]   ### OTGSC (1a4) val=08203000
> [  270.269876]     1MSIE (29) 1MS timer int enable =0
> [  270.273801]     BSVIE (27) vbus B valid int enable =1
> [  270.278558]     FIELD_1MSS (21) 1ms timer status =1
> [  270.283698]     FIELD_1MST (13) 1ms timer toggle =1
> [  270.288368]     BSE (12) vbus B session end =1
> [  270.293245]     BSV (11) vbus B session valid =0
> [  270.297743]     ASV (10) vbus A session valid =0
> [  270.302534]     AVV (9) A vbus valid =0
> [  270.307115]     IDPU (5) ID pullup =0
> [  270.310691]   remainder=00000000
> [  270.314495]   ### USBINTR (148) val=00000147
> [  270.317794]     SLE (8) sleep int =1
> [  270.322063]     URE (6) USB reset int=1
> [  270.325606]     PCE (2) port change detect int=1
> [  270.329166]     UEI (1) USB error int=1
> [  270.334042]     UI (0) USB int=1
> [  270.337585]   remainder=00000000
> [  270.341073]   ### USBSTS (144) val=00000480
> [  270.344270]     ULPI (10) ULPI event complete=1
> [  270.348176]     SOF (7) SOF received=1
> [  270.352706]     UEI (1) USB error=0
> [  270.356507]     UI (0) USB int=0
> [  270.359894]   remainder=00000000
> [  270.363383]    ### ULPI_FUNC_CTRL (4,5,6) val=00000055
> [  270.366579]      SUSPENDM=1
> [  270.371542]      OpMode=10b disable bit-stuff and NRZI encoding
> [  270.376995]      TermSelect=1
> [  270.380396]      XcvrSelect=01b FS
> [  270.386193]    ### ULPI_IFC_CTRL (7,7,9) val=00000000
> [  270.386459]    ### ULPI_OTG_CTRL (a,b,c) val=00000006
> [  270.391684]      DmPulldown=1
> [  270.396698]      DpPulldown=1
> [  270.399652]    ### ULPI_USB_INT_STS (13) val=00000008
> [  270.402620]      SessEnd=1
> See regs in dmesg log

never got any reply to this, nor got a response to Sergei's comments.
Not looking good, too late for v3.15.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support
  2014-03-08  0:15   ` Felipe Balbi
@ 2014-03-08 16:46     ` Ivan T. Ivanov
  2014-03-10 18:36       ` Felipe Balbi
  0 siblings, 1 reply; 21+ messages in thread
From: Ivan T. Ivanov @ 2014-03-08 16:46 UTC (permalink / raw)
  To: balbi, Tim Bird
  Cc: Kumar Gala, David Brown, Linux Kernel Mailing List,
	linux-arm-msm, linux-usb

Hi,

On 03/08/2014 02:15 AM, Felipe Balbi wrote:
> On Wed, Mar 05, 2014 at 05:54:03PM -0800, Tim Bird wrote:
>> Ivan,
>>
>> I'm still unsuccessful at getting this patch set to work on my kernel.
>> See regs in dmesg log
>


<snip>

> never got any reply to this, nor got a response to Sergei's comments.
> Not looking good, too late for v3.15.
> 

I am working with Tim to resolve this issue. Sergei's comment have
been answered already :-)

It will be nice if you could pick up first several patches, which are
just cleanups.

Regards,
Ivan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support
  2014-03-08 16:46     ` Ivan T. Ivanov
@ 2014-03-10 18:36       ` Felipe Balbi
  0 siblings, 0 replies; 21+ messages in thread
From: Felipe Balbi @ 2014-03-10 18:36 UTC (permalink / raw)
  To: Ivan T. Ivanov
  Cc: balbi, Tim Bird, Kumar Gala, David Brown,
	Linux Kernel Mailing List, linux-arm-msm, linux-usb

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

Hi,

On Sat, Mar 08, 2014 at 06:46:52PM +0200, Ivan T. Ivanov wrote:
> Hi,
> 
> On 03/08/2014 02:15 AM, Felipe Balbi wrote:
> > On Wed, Mar 05, 2014 at 05:54:03PM -0800, Tim Bird wrote:
> >> Ivan,
> >>
> >> I'm still unsuccessful at getting this patch set to work on my kernel.
> >> See regs in dmesg log
> >
> 
> 
> <snip>
> 
> > never got any reply to this, nor got a response to Sergei's comments.
> > Not looking good, too late for v3.15.
> > 
> 
> I am working with Tim to resolve this issue. Sergei's comment have
> been answered already :-)

the only answer was "Thanks I'll fix it". To which there was never a
fix.

> It will be nice if you could pick up first several patches, which are
> just cleanups.

unfortunately I have already sent my pull request to Greg :-(

I could try to get some of those in during the -rc cycle, but it's
unlikely Greg will let me :-)


-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-03-10 18:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 10:13 [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 01/14] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 02/14] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 03/14] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 04/14] usb: phy: msm: Fix checkpatch.pl warnings Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 05/14] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 06/14] usb: phy: msm: Remove unused pclk_src_name Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 07/14] usb: phy: msm: Remove HSUSB prefix from regulator names Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 08/14] usb: phy: msm: Properly check result from platform_get_irq() Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 09/14] usb: phy: msm: Add device tree support and binding information Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 10/14] usb: phy: msm: Use reset framework for LINK and PHY resets Ivan T. Ivanov
2014-03-05 12:34   ` Sergei Shtylyov
2014-03-06 16:35     ` Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 11/14] usb: phy: msm: Add support for secondary PHY control Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 12/14] usb: phy: msm: Correct USB PHY Reset sequence for newer platform Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 13/14] usb: phy: msm: Handle disconnect events Ivan T. Ivanov
2014-03-05 10:13 ` [PATCH v5 14/14] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX Ivan T. Ivanov
2014-03-06  1:54 ` [PATCH v5 00/14] usb: phy: msm: Fixes, cleanups and DT support Tim Bird
2014-03-08  0:15   ` Felipe Balbi
2014-03-08 16:46     ` Ivan T. Ivanov
2014-03-10 18:36       ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).