arm: tegra: xmm: modify CP power sequence
Seongho Joo [Sat, 25 Feb 2012 03:28:14 +0000 (12:28 +0900)]
modify CP power sequence timing based on modem vendor
spec information.
> 20 ms  : REST low and ON low
> 400 us : RESET high and ON low
> 60 us  : RESEET high and ON high

Bug 943280

Signed-off-by: Seongho Joo <sjoo@nvidia.com>
Reviewed-on: http://git-master/r/85964
(cherry picked from commit 8a6e64228f11d46f502c654bd9a1b508af93a67b)

Change-Id: I01f4fae493627d46707ebfcad676fc0a25b5258d
Reviewed-on: http://git-master/r/96453
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/baseband-xmm-power.c

index 1d5fc1e..21f62a0 100644 (file)
@@ -118,15 +118,12 @@ static int baseband_modem_power_on(struct baseband_power_platform_data *data)
        gpio_set_value(baseband_power_driver_data->
                modem.xmm.ipc_hsic_active, 1);
 
-       /* wait 20 ms */
-       mdelay(20);
-
        /* reset / power on sequence */
-       mdelay(40);
+       msleep(40);
        gpio_set_value(data->modem.xmm.bb_rst, 1);
        mdelay(1);
        gpio_set_value(data->modem.xmm.bb_on, 1);
-       udelay(40);
+       udelay(70);
        gpio_set_value(data->modem.xmm.bb_on, 0);
 
        return 0;
@@ -645,11 +642,12 @@ static void baseband_xmm_power_L2_resume_work(struct work_struct *work)
 static void baseband_xmm_power_reset_on(void)
 {
        /* reset / power on sequence */
-       mdelay(40);
+       gpio_set_value(baseband_power_driver_data->modem.xmm.bb_rst, 0);
+       msleep(40);
        gpio_set_value(baseband_power_driver_data->modem.xmm.bb_rst, 1);
        mdelay(1);
        gpio_set_value(baseband_power_driver_data->modem.xmm.bb_on, 1);
-       udelay(40);
+       udelay(70);
        gpio_set_value(baseband_power_driver_data->modem.xmm.bb_on, 0);
 }