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

Commit f0622493 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: soc: qcom: Add support for sa8195p"

parents 1dae7cf7 08eaaec5
Loading
Loading
Loading
Loading
+29 −1
Original line number Diff line number Diff line
@@ -131,6 +131,18 @@ static const char * const sa6155adp_hw_platform_subtype[] = {
	[PLATFORM_SUBTYPE_SA6155_ADP_INVALID] = "INVALID",
};

enum {
	PLATFORM_SUBTYPE_SA8195_ADP_STAR = 0x0,
	PLATFORM_SUBTYPE_SA8195_ADP_AIR = 0x1,
	PLATFORM_SUBTYPE_SA8195_ADP_INVALID,
};

static const char * const sa8195adp_hw_platform_subtype[] = {
	[PLATFORM_SUBTYPE_SA8195_ADP_STAR] = "ADP_STAR",
	[PLATFORM_SUBTYPE_SA8195_ADP_AIR] = "ADP_AIR",
	[PLATFORM_SUBTYPE_SA8195_ADP_INVALID] = "INVALID",
};

enum {
	PLATFORM_SUBTYPE_QRD = 0x0,
	PLATFORM_SUBTYPE_SKUAA = 0x1,
@@ -354,6 +366,9 @@ static struct msm_soc_info cpu_of_id[] = {
	/* sa8155P ID */
	[367] = {MSM_CPU_SA8155P, "SA8155P"},

	/* sa8195P ID */
	[405] = {MSM_CPU_SA8195P, "SA8195P"},

	/* sdmshrike ID */
	[340] = {MSM_CPU_SDMSHRIKE, "SDMSHRIKE"},

@@ -798,6 +813,15 @@ msm_get_platform_subtype(struct device *dev,
				}
				return snprintf(buf, PAGE_SIZE, "%-.32s\n",
				sa6155adp_hw_platform_subtype[hw_subtype]);
			} else if ((strcmp(machine_name, "SA8195P") == 0)) {
				if (hw_subtype >=
					PLATFORM_SUBTYPE_SA8195_ADP_INVALID) {
					pr_err("Invalid hardware platform sub type for adp found\n");
					hw_subtype =
					PLATFORM_SUBTYPE_SA8195_ADP_INVALID;
				}
				return snprintf(buf, PAGE_SIZE, "%-.32s\n",
				sa8195adp_hw_platform_subtype[hw_subtype]);
			} else {
				pr_err("Invalid machine name for ADP platform\n");
				return 0;
@@ -1314,6 +1338,10 @@ static void * __init setup_dummy_socinfo(void)
		dummy_socinfo.id = 369;
		strlcpy(dummy_socinfo.build_id, "sm6150p - ",
		sizeof(dummy_socinfo.build_id));
	} else if (early_machine_is_sa8195p()) {
		dummy_socinfo.id = 405;
		strlcpy(dummy_socinfo.build_id, "sa8195p - ",
		sizeof(dummy_socinfo.build_id));
	} else if (early_machine_is_qcs405()) {
		dummy_socinfo.id = 352;
		strlcpy(dummy_socinfo.build_id, "qcs405 - ",
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,sm6150")
#define early_machine_is_sm6150p()	\
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,sm6150p")
#define early_machine_is_sa8195p()	\
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,sa8195p")
#define early_machine_is_qcs405()	\
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,qcs405")
#define early_machine_is_qcs403()	\
@@ -121,6 +123,7 @@
#define early_machine_is_sa8155p()	0
#define early_machine_is_sdmshrike()	0
#define early_machine_is_sm6150()	0
#define early_machine_is_sa8195p()	0
#define early_machine_is_sm6150p()	0
#define early_machine_is_qcs405()	0
#define early_machine_is_qcs403()	0
@@ -159,6 +162,7 @@ enum msm_cpu {
	MSM_CPU_SM8150P,
	MSM_CPU_SA8155,
	MSM_CPU_SA8155P,
	MSM_CPU_SA8195P,
	MSM_CPU_SDMSHRIKE,
	MSM_CPU_SM6150,
	MSM_CPU_SM6150P,