arm: tegra: enterprise: Add drivers for flashless XMM modem
Michael Hsu [Wed, 10 Aug 2011 18:59:27 +0000 (11:59 -0700)]
XMM modem requires GPIO power on sequence before modem
software can be downloaded to it.

BUG 828389

Change-Id: Ib8cf2a16a8b05a586d2f0b3bb57bad106a889cd1
Reviewed-on: http://git-master/r/46801
(cherry picked from commit 675f98979d6c6a281631d6590be5c7b6e5352b6f)
Reviewed-on: http://git-master/r/65958
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Red280cdd7669487e2368b75d4e1cd1c2130b3829

arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-enterprise-pinmux.c

index 3516f0d..287149a 100644 (file)
@@ -442,6 +442,21 @@ config TEGRA_USB_MODEM_POWER
          This option enables support for out-of_band remote wakeup, selective
          suspend and system suspend/resume.
 
+config TEGRA_BB_XMM_POWER
+       bool "Enable power driver for XMM modem"
+       default n
+       help
+         Enables power driver which controls gpio signals to XMM modem.
+
+config TEGRA_BB_XMM_POWER2
+       tristate "Enable power driver for XMM modem (flashless)"
+       default n
+       help
+         Enables power driver which controls gpio signals to XMM modem
+         (in flashless configuration).  User-mode application must
+         insert this LKM to initiate 2nd USB enumeration power sequence
+         - after modem software has been downloaded to flashless device.
+
 config TEGRA_THERMAL_SYSFS
        bool "Enable Thermal driver to use Thermal Sysfs infrastructure"
        depends on THERMAL
index caf8757..ac2979c 100644 (file)
@@ -161,8 +161,6 @@ obj-${CONFIG_MACH_CARDHU}               += board-cardhu-sdhci.o
 obj-${CONFIG_MACH_CARDHU}               += board-cardhu-sensors.o
 obj-${CONFIG_MACH_CARDHU}               += board-cardhu-memory.o
 obj-${CONFIG_MACH_CARDHU}               += board-cardhu-powermon.o
-obj-${CONFIG_MACH_CARDHU}               += baseband-xmm-power.o
-obj-m += baseband-xmm-power2.o
 
 obj-${CONFIG_MACH_KAI}                  += board-touch-kai-synaptics-spi.o
 obj-y                                   += board-touch-raydium_spi.o
@@ -191,3 +189,7 @@ obj-${CONFIG_MACH_KAI}                  += board-kai-power.o
 obj-${CONFIG_MACH_KAI}                  += board-kai-sdhci.o
 obj-${CONFIG_MACH_KAI}                  += board-kai-sensors.o
 obj-y                                   += eeprom-wifi-mac.o
+
+obj-${CONFIG_TEGRA_BB_XMM_POWER}        += baseband-xmm-power.o
+obj-${CONFIG_TEGRA_BB_XMM_POWER2}       += baseband-xmm-power2.o
+
index fbe875e..c2d9090 100644 (file)
@@ -948,13 +948,17 @@ static struct usb_phy_plat_data tegra_usb_phy_pdata[] = {
 
 static int cardu_usb_hsic_postsupend(void)
 {
+#ifdef CONFIG_TEGRA_BB_XMM_POWER
        baseband_xmm_set_power_status(BBXMM_PS_L2);
+#endif
        return 0;
 }
 
 static int cardu_usb_hsic_preresume(void)
 {
+#ifdef CONFIG_TEGRA_BB_XMM_POWER
        baseband_xmm_set_power_status(BBXMM_PS_L2TOL0);
+#endif
        return 0;
 }
 
index d8f7e40..d3760a8 100644 (file)
@@ -256,7 +256,7 @@ static __initdata struct tegra_pingroup_config enterprise_pinmux[] = {
        DEFAULT_PINMUX(GPIO_PU2,        UARTA,           NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(GPIO_PU3,        UARTA,           NORMAL,    NORMAL,     OUTPUT),
        DEFAULT_PINMUX(GPIO_PU5,        PWM2,            NORMAL,    NORMAL,     INPUT),
-       DEFAULT_PINMUX(GPIO_PU6,        RSVD1,           NORMAL,    NORMAL,     INPUT),
+       DEFAULT_PINMUX(GPIO_PU6,        PWM3,            NORMAL,    NORMAL,     OUTPUT),
        DEFAULT_PINMUX(DAP4_FS,         I2S3,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(DAP4_DIN,        I2S3,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(DAP4_DOUT,       I2S3,            NORMAL,    NORMAL,     INPUT),