mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: 8064: add platform configuration for two external 9k modems
The dsda2 target is a new platform that has two external mdm9x15 modems that operate simultaneously. Change-Id: If51077a41b21447dcf0c245620fff7439c8c8394 Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
This commit is contained in:
parent
1e486f5ab7
commit
0754e8d2d7
4 changed files with 248 additions and 6 deletions
|
@ -885,6 +885,105 @@ static struct msm_gpiomux_config mdm_configs[] __initdata = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config amdm_configs[] __initdata = {
|
||||
/* AP2MDM_STATUS */
|
||||
{
|
||||
.gpio = 48,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
|
||||
}
|
||||
},
|
||||
/* MDM2AP_STATUS */
|
||||
{
|
||||
.gpio = 49,
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mdm2ap_status_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
|
||||
}
|
||||
},
|
||||
/* MDM2AP_ERRFATAL */
|
||||
{
|
||||
.gpio = 19,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_ERRFATAL */
|
||||
{
|
||||
.gpio = 18,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */
|
||||
{
|
||||
.gpio = 27,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_WAKEUP */
|
||||
{
|
||||
.gpio = 35,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_wakeup,
|
||||
}
|
||||
},
|
||||
/* MDM2AP_PBL_READY*/
|
||||
{
|
||||
.gpio = 31,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &mdm2ap_pblrdy,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config bmdm_configs[] __initdata = {
|
||||
/* AP2MDM_STATUS */
|
||||
{
|
||||
.gpio = 56,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
|
||||
}
|
||||
},
|
||||
/* MDM2AP_STATUS */
|
||||
{
|
||||
.gpio = 32,
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mdm2ap_status_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mdm2ap_status_cfg,
|
||||
}
|
||||
},
|
||||
/* MDM2AP_ERRFATAL */
|
||||
{
|
||||
.gpio = 81,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &mdm2ap_errfatal_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_ERRFATAL */
|
||||
{
|
||||
.gpio = 18,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_SOFT_RESET, aka AP2MDM_PON_RESET_N */
|
||||
{
|
||||
.gpio = 3,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_soft_reset_cfg,
|
||||
}
|
||||
},
|
||||
/* AP2MDM_WAKEUP */
|
||||
{
|
||||
.gpio = 29,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ap2mdm_wakeup,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config mdm_i2s_configs[] __initdata = {
|
||||
/* AP2MDM_STATUS */
|
||||
{
|
||||
|
@ -1326,7 +1425,12 @@ void __init apq8064_init_gpiomux(void)
|
|||
ARRAY_SIZE(apq8064_ext_regulator_configs));
|
||||
|
||||
if (machine_is_apq8064_mtp()) {
|
||||
if (SOCINFO_VERSION_MINOR(platform_version) == 1)
|
||||
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
|
||||
msm_gpiomux_install(amdm_configs,
|
||||
ARRAY_SIZE(amdm_configs));
|
||||
msm_gpiomux_install(bmdm_configs,
|
||||
ARRAY_SIZE(bmdm_configs));
|
||||
} else if (SOCINFO_VERSION_MINOR(platform_version) == 1)
|
||||
msm_gpiomux_install(mdm_i2s_configs,
|
||||
ARRAY_SIZE(mdm_i2s_configs));
|
||||
else
|
||||
|
|
|
@ -1837,6 +1837,25 @@ static struct mdm_platform_data mdm_platform_data = {
|
|||
.sysmon_subsys_id = SYSMON_SS_EXT_MODEM,
|
||||
};
|
||||
|
||||
static struct mdm_vddmin_resource bmdm_vddmin_rscs = {
|
||||
.rpm_id = MSM_RPM_ID_VDDMIN_GPIO,
|
||||
.ap2mdm_vddmin_gpio = 30,
|
||||
.modes = 0x03,
|
||||
.drive_strength = 8,
|
||||
.mdm2ap_vddmin_gpio = 64,
|
||||
};
|
||||
|
||||
static struct mdm_platform_data bmdm_platform_data = {
|
||||
.mdm_version = "3.0",
|
||||
.ramdump_delay_ms = 2000,
|
||||
.sfr_query = 1,
|
||||
.send_shdn = 1,
|
||||
.vddmin_resource = &bmdm_vddmin_rscs,
|
||||
.peripheral_platform_device = &apq8064_device_ehci_host3,
|
||||
.ramdump_timeout_ms = 120000,
|
||||
.mdm2ap_status_gpio_run_cfg = &mdm2ap_status_gpio_run_cfg,
|
||||
};
|
||||
|
||||
static struct tsens_platform_data apq_tsens_pdata = {
|
||||
.tsens_factor = 1000,
|
||||
.hw_type = APQ_8064,
|
||||
|
@ -3133,7 +3152,7 @@ static void __init apq8064_pm8917_pdata_fixup(void)
|
|||
|
||||
static void __init apq8064_common_init(void)
|
||||
{
|
||||
u32 platform_version;
|
||||
u32 platform_version = socinfo_get_platform_version();
|
||||
|
||||
if (socinfo_get_pmic_model() == PMIC_MODEL_PM8917)
|
||||
apq8064_pm8917_pdata_fixup();
|
||||
|
@ -3189,14 +3208,23 @@ static void __init apq8064_common_init(void)
|
|||
msm_hsic_pdata.log2_irq_thresh = 5,
|
||||
apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
|
||||
device_initialize(&apq8064_device_hsic_host.dev);
|
||||
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
|
||||
apq8064_device_ehci_host3.dev.platform_data =
|
||||
&msm_ehci_host_pdata3;
|
||||
device_initialize(&apq8064_device_ehci_host3.dev);
|
||||
}
|
||||
}
|
||||
apq8064_pm8xxx_gpio_mpp_init();
|
||||
apq8064_init_mmc();
|
||||
|
||||
if (machine_is_apq8064_mtp()) {
|
||||
mdm_8064_device.dev.platform_data = &mdm_platform_data;
|
||||
platform_version = socinfo_get_platform_version();
|
||||
if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
|
||||
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
|
||||
amdm_8064_device.dev.platform_data = &mdm_platform_data;
|
||||
platform_device_register(&amdm_8064_device);
|
||||
bmdm_8064_device.dev.platform_data =
|
||||
&bmdm_platform_data;
|
||||
platform_device_register(&bmdm_8064_device);
|
||||
} else if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
|
||||
i2s_mdm_8064_device.dev.platform_data =
|
||||
&mdm_platform_data;
|
||||
platform_device_register(&i2s_mdm_8064_device);
|
||||
|
|
|
@ -2531,12 +2531,21 @@ struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = {
|
|||
#define MDM2AP_STATUS 49
|
||||
#define AP2MDM_STATUS 48
|
||||
#define AP2MDM_SOFT_RESET 27
|
||||
#define I2S_AP2MDM_SOFT_RESET 0
|
||||
#define I2S_AP2MDM_SOFT_RESET 0
|
||||
#define AP2MDM_WAKEUP 35
|
||||
#define I2S_AP2MDM_WAKEUP 44
|
||||
#define MDM2AP_PBLRDY 46
|
||||
#define AMDM2AP_PBLRDY_DSDA2 31
|
||||
#define I2S_MDM2AP_PBLRDY 81
|
||||
|
||||
/* Gpios for second MDM */
|
||||
#define BMDM2AP_ERRFATAL 81
|
||||
#define AP2BMDM_ERRFATAL 18
|
||||
#define BMDM2AP_STATUS 32
|
||||
#define AP2BMDM_STATUS 56
|
||||
#define AP2BMDM_SOFT_RESET 3
|
||||
#define AP2BMDM_WAKEUP 29
|
||||
|
||||
static struct resource mdm_resources[] = {
|
||||
{
|
||||
.start = MDM2AP_ERRFATAL,
|
||||
|
@ -2582,6 +2591,90 @@ static struct resource mdm_resources[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct resource mdm_dsda2_amdm_resources[] = {
|
||||
{
|
||||
.start = MDM2AP_ERRFATAL,
|
||||
.end = MDM2AP_ERRFATAL,
|
||||
.name = "MDM2AP_ERRFATAL",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2MDM_ERRFATAL,
|
||||
.end = AP2MDM_ERRFATAL,
|
||||
.name = "AP2MDM_ERRFATAL",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = MDM2AP_STATUS,
|
||||
.end = MDM2AP_STATUS,
|
||||
.name = "MDM2AP_STATUS",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2MDM_STATUS,
|
||||
.end = AP2MDM_STATUS,
|
||||
.name = "AP2MDM_STATUS",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2MDM_SOFT_RESET,
|
||||
.end = AP2MDM_SOFT_RESET,
|
||||
.name = "AP2MDM_SOFT_RESET",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2MDM_WAKEUP,
|
||||
.end = AP2MDM_WAKEUP,
|
||||
.name = "AP2MDM_WAKEUP",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AMDM2AP_PBLRDY_DSDA2,
|
||||
.end = AMDM2AP_PBLRDY_DSDA2,
|
||||
.name = "MDM2AP_PBLRDY",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource mdm_dsda2_bmdm_resources[] = {
|
||||
{
|
||||
.start = BMDM2AP_ERRFATAL,
|
||||
.end = BMDM2AP_ERRFATAL,
|
||||
.name = "MDM2AP_ERRFATAL",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2BMDM_ERRFATAL,
|
||||
.end = AP2BMDM_ERRFATAL,
|
||||
.name = "AP2MDM_ERRFATAL",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = BMDM2AP_STATUS,
|
||||
.end = BMDM2AP_STATUS,
|
||||
.name = "MDM2AP_STATUS",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2BMDM_STATUS,
|
||||
.end = AP2BMDM_STATUS,
|
||||
.name = "AP2MDM_STATUS",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2BMDM_SOFT_RESET,
|
||||
.end = AP2BMDM_SOFT_RESET,
|
||||
.name = "AP2MDM_SOFT_RESET",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{
|
||||
.start = AP2BMDM_WAKEUP,
|
||||
.end = AP2BMDM_WAKEUP,
|
||||
.name = "AP2MDM_WAKEUP",
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource i2s_mdm_resources[] = {
|
||||
{
|
||||
.start = MDM2AP_ERRFATAL,
|
||||
|
@ -2634,6 +2727,20 @@ struct platform_device mdm_8064_device = {
|
|||
.resource = mdm_resources,
|
||||
};
|
||||
|
||||
struct platform_device amdm_8064_device = {
|
||||
.name = "mdm2_modem",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(mdm_dsda2_amdm_resources),
|
||||
.resource = mdm_dsda2_amdm_resources,
|
||||
};
|
||||
|
||||
struct platform_device bmdm_8064_device = {
|
||||
.name = "mdm2_modem",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(mdm_dsda2_bmdm_resources),
|
||||
.resource = mdm_dsda2_bmdm_resources,
|
||||
};
|
||||
|
||||
struct platform_device i2s_mdm_8064_device = {
|
||||
.name = "mdm2_modem",
|
||||
.id = -1,
|
||||
|
|
|
@ -453,3 +453,6 @@ extern struct platform_device msm9615_device_acpuclk;
|
|||
extern struct platform_device apq8064_msm_mpd_device;
|
||||
|
||||
extern struct platform_device msm_gpio_device;
|
||||
|
||||
extern struct platform_device amdm_8064_device;
|
||||
extern struct platform_device bmdm_8064_device;
|
||||
|
|
Loading…
Reference in a new issue