mdm: Assert wakeup gpio to indicate mdm hsic to start connecting
hsic enumeration failure observed when mdm hsic initiates connect
signalling and apq hsic is not ready to act on it. Asserting wakeup
gpio after adding apq hsic device to indicate mdm hsic to start
initiating connect
CRs-Fixed: 349725
Change-Id: I608e8421172bbe70d3476f25334d9f3209700c45
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
diff --git a/arch/arm/mach-msm/mdm2.c b/arch/arm/mach-msm/mdm2.c
index e0d2696..b4b7ea3 100644
--- a/arch/arm/mach-msm/mdm2.c
+++ b/arch/arm/mach-msm/mdm2.c
@@ -79,6 +79,11 @@
{
power_on_count++;
+ /* this gpio will be used to indicate apq readiness,
+ * de-assert it now so that it can asserted later
+ */
+ gpio_direction_output(mdm_drv->ap2mdm_wakeup_gpio, 0);
+
/* The second attempt to power-on the mdm is the first attempt
* from user space, but we're already powered on. Ignore this.
* Subsequent attempts are from SSR or if something failed, in
@@ -97,7 +102,7 @@
/* Deassert RESET first and wait for it to settle. */
pr_debug("%s: Pulling RESET gpio high\n", __func__);
gpio_direction_output(mdm_drv->ap2mdm_pmic_reset_n_gpio, 1);
- usleep(1000);
+ usleep(20000);
/* Pull PWR gpio high and wait for it to settle, but only
* the first time the mdm is powered up.
@@ -152,6 +157,7 @@
if (value) {
mdm_peripheral_disconnect(mdm_drv);
mdm_peripheral_connect(mdm_drv);
+ gpio_direction_output(mdm_drv->ap2mdm_wakeup_gpio, 1);
}
}