summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSheshu Shenoy <sshenoy@nvidia.com>2010-03-17 16:13:09 -0700
committerGary King <gking@nvidia.com>2010-03-29 17:28:41 -0800
commit3411c4d9bd30038b821eb9a45133313b3d234e1c (patch)
tree7d06422ee669c0f357a19d336954c968cc1ad09e /arch
parentdcf183c1230421a18ca15ef199e7d8f1970e0c22 (diff)
tegra odm: added IFF modem specific details to the odm kit
Change-Id: Ie798a5dac7b450fd987f90d839549015c24ba2ce Reviewed-on: http://git-master/r/875 Tested-by: Sheshagiri Shenoy <sshenoy@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Tested-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board_nvodm.c54
-rwxr-xr-xarch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c8
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query_discovery.c13
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_addresses.h11
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_peripherals.h8
5 files changed, 94 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board_nvodm.c b/arch/arm/mach-tegra/board_nvodm.c
index f81736679916..0717929e1ca7 100644
--- a/arch/arm/mach-tegra/board_nvodm.c
+++ b/arch/arm/mach-tegra/board_nvodm.c
@@ -386,6 +386,7 @@ static void __init register_enc28j60(void)
}
#endif
+
#ifndef CONFIG_KEYBOARD_TEGRA
#define kbc_init() do { } while (0)
@@ -448,6 +449,58 @@ fail:
}
#endif
+static struct spi_board_info tegra_spi_ipc_devices[] __initdata =
+{
+ {
+ .modalias = "spi_ipc",
+ .bus_num = 0,
+ .chip_select = 0,
+ .mode = SPI_MODE_1,
+ .max_speed_hz = 12000000,
+ .platform_data = NULL,
+ .irq = 0,
+ },
+};
+
+static void __init register_spi_ipc_devices(void)
+{
+ NvError err;
+ NvU32 irq;
+ NvU32 instance = 0xFFFF;
+ NvU32 cs = 0xFFFF;
+ const NvOdmPeripheralConnectivity *pConnectivity = NULL;
+ int i;
+
+ pConnectivity =
+ NvOdmPeripheralGetGuid(NV_ODM_GUID('s','p','i',' ','_','i','p','c'));
+ if (!pConnectivity)
+ return;
+
+ for (i = 0; i < pConnectivity->NumAddress; i++)
+ {
+ switch (pConnectivity->AddressList[i].Interface)
+ {
+ case NvOdmIoModule_Spi:
+ instance = pConnectivity->AddressList[i].Instance;
+ cs = pConnectivity->AddressList[i].Address;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Infineon SPI Protocol driver needs one SPI info and a gpio for interrupt */
+ if (instance == 0xffff || cs == 0xffff)
+ return;
+
+ printk("Enabled Infineon IPC Protocol driver\n");
+
+ tegra_spi_ipc_devices[0].bus_num = instance;
+ tegra_spi_ipc_devices[0].chip_select = cs;
+ spi_register_board_info(tegra_spi_ipc_devices, ARRAY_SIZE(tegra_spi_ipc_devices));
+}
+
+
static void __init tegra_machine_init(void)
{
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_ANDROID_MODULE)
@@ -481,6 +534,7 @@ static void __init tegra_machine_init(void)
#endif
register_enc28j60();
+ register_spi_ipc_devices();
/* register the devices */
#ifdef CONFIG_MTD_NAND_TEGRA
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c b/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c
index 0b21b7245009..fa8098570209 100755
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c
@@ -770,6 +770,9 @@ NvOdmQuerySpiGetDeviceInfo(
static const NvOdmQuerySpiDeviceInfo s_Spi1Cs0Info_EmpRil =
{NvOdmQuerySpiSignalMode_0, NV_TRUE, NV_TRUE};
+ static const NvOdmQuerySpiDeviceInfo s_Spi1Cs0Info_IfxRil =
+ {NvOdmQuerySpiSignalMode_1, NV_TRUE, NV_FALSE};
+
static const NvOdmQuerySpiDeviceInfo s_Spi1Cs0Info =
{NvOdmQuerySpiSignalMode_0, NV_TRUE, NV_FALSE};
@@ -787,6 +790,11 @@ NvOdmQuerySpiGetDeviceInfo(
(ControllerId == 0 ) && (ChipSelect == 0))
return &s_Spi1Cs0Info_EmpRil;
break;
+ case TEGRA_DEVKIT_BCT_CUSTOPT_0_RIL_IFX:
+ if ((OdmIoModule == NvOdmIoModule_Spi) &&
+ (ControllerId == 0 ) && (ChipSelect == 0))
+ return &s_Spi1Cs0Info_IfxRil;
+ break;
}
if ((OdmIoModule == NvOdmIoModule_Spi) &&
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query_discovery.c b/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query_discovery.c
index e14fa7c7deec..9cf5ddf199a2 100644
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query_discovery.c
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query_discovery.c
@@ -772,6 +772,19 @@ NvIsFilteredPeripheral(const NvOdmPeripheralConnectivity* pConnectivity)
}
}
+ if (pConnectivity->Guid == NV_ODM_GUID('s','p','i',' ','_','i','p','c'))
+ {
+ if (ril == TEGRA_DEVKIT_BCT_CUSTOPT_0_RIL_IFX)
+ {
+ return NV_FALSE; // IFX supported - don't filter it
+ }
+ else
+ {
+ return NV_TRUE; // IFX not supported - filter it
+ }
+ }
+
+
if (!Personality)
Personality = TEGRA_DEVKIT_DEFAULT_PERSONALITY;
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_addresses.h b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_addresses.h
index 7dca2fca27a0..70f20af74044 100644
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_addresses.h
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_addresses.h
@@ -83,3 +83,14 @@ static const NvOdmIoAddress s_ffaEmpM570Addresses[] =
{ NvOdmIoModule_Gpio, 0x19, 0x0 }, /* GPIO Port Z and Pin 0 AWR */
{ NvOdmIoModule_Gpio, 0x18, 0x6 }, /* GPIO Port Y and Pin 6 CWR */
};
+
+// IFX Modem module
+static const NvOdmIoAddress s_ffaInfnAddresses[] =
+{
+ { NvOdmIoModule_Spi, 0x0, 0x0 }, /* Spi Controller 0 and Chip Select 0 */
+ { NvOdmIoModule_Gpio, 0x18, 0x6 }, /* GPIO Port Y and Pin 6 SRDY */
+ { NvOdmIoModule_Gpio, 0x19, 0x0 }, /* GPIO Port Z and Pin 0 MRDY */
+ { NvOdmIoModule_Gpio, 0x15, 0x0 }, /* GPIO Port V and Pin 0 Reset */
+ { NvOdmIoModule_Gpio, 0x15, 0x1 } /* GPIO Port V and Pin 1 Power */
+};
+
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_peripherals.h b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_peripherals.h
index 67e7cf18cc61..69b364f11689 100644
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_peripherals.h
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e951_peripherals.h
@@ -71,4 +71,12 @@
NvOdmPeripheralClass_Other
},
+// IFX Modem on COMMs Module
+{
+ NV_ODM_GUID('s','p','i',' ','_','i','p','c'),
+ s_ffaInfnAddresses,
+ NV_ARRAY_SIZE(s_ffaInfnAddresses),
+ NvOdmPeripheralClass_Other
+},
+
// NOTE: This list *must* end with a trailing comma.