Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8e50871 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

esoc: Add support for sdxprairie



Add basic operations to support sdxprairie in esoc driver that includes
compatibility, initializations and power control operations (reset,
shutdown, and so on). Most of the configurations are leveraged from
the existing sdx50 configurations.

Change-Id: Ide75e2f2efeac0767c1ecd760bda7e455ab527dc
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent defdcf8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ to be reset.

Required Properties:
- compatible:	The bus devices need to be compatible with
		"qcom,ext-mdm9x55", qcom,ext-sdx50m.
		"qcom,ext-mdm9x55", qcom,ext-sdx50m, qcom,ext-sdxprairie.

Required named gpio properties:
- qcom,mdm2ap-errfatal-gpio: gpio for the external modem to indicate to the apps processor
+28 −0
Original line number Diff line number Diff line
@@ -1051,6 +1051,26 @@ static int sdx50m_setup_hw(struct mdm_ctrl *mdm,
	return ret;
}

static int sdxprairie_setup_hw(struct mdm_ctrl *mdm,
					const struct mdm_ops *ops,
					struct platform_device *pdev)
{
	int ret;

	/* Same configuration as that of sdx50, except for the name */
	ret = sdx50m_setup_hw(mdm, ops, pdev);
	if (ret) {
		dev_err(mdm->dev, "Hardware setup failed for sdxprairie\n");
		esoc_mdm_log("Hardware setup failed for sdxprairie\n");
		return ret;
	}

	mdm->esoc->name = SDXPRAIRIE_LABEL;
	esoc_mdm_log("Hardware setup done for sdxprairie\n");

	return ret;
}

static struct esoc_clink_ops mdm_cops = {
	.cmd_exe = mdm_cmd_exe,
	.get_status = mdm_get_status,
@@ -1070,11 +1090,19 @@ static struct mdm_ops sdx50m_ops = {
	.pon_ops = &sdx50m_pon_ops,
};

static struct mdm_ops sdxprairie_ops = {
	.clink_ops = &mdm_cops,
	.config_hw = sdxprairie_setup_hw,
	.pon_ops = &sdx50m_pon_ops,
};

static const struct of_device_id mdm_dt_match[] = {
	{ .compatible = "qcom,ext-mdm9x55",
		.data = &mdm9x55_ops, },
	{ .compatible = "qcom,ext-sdx50m",
		.data = &sdx50m_ops, },
	{ .compatible = "qcom,ext-sdxprairie",
		.data = &sdxprairie_ops, },
	{},
};
MODULE_DEVICE_TABLE(of, mdm_dt_match);
+4 −0
Original line number Diff line number Diff line
@@ -518,6 +518,10 @@ static struct esoc_compat compat_table[] = {
		.name = "SDX50M",
		.data = NULL,
	},
	{
		.name = "SDXPRAIRIE",
		.data = NULL,
	},
};

static struct esoc_drv esoc_ssr_drv = {
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#define MDM9x55_PCIE			"PCIe"
#define SDX50M_LABEL			"SDX50M"
#define SDX50M_PCIE			"PCIe"
#define SDXPRAIRIE_LABEL		"SDXPRAIRIE"
#define MDM2AP_STATUS_TIMEOUT_MS	120000L
#define MDM_MODEM_TIMEOUT		3000
#define DEF_RAMDUMP_TIMEOUT		120000