From aac2ecbbccbdb2c2ab8bea4d307cfc75fcf38570 Mon Sep 17 00:00:00 2001 From: Chetan C R Date: Wed, 8 Dec 2021 18:32:31 +0530 Subject: [PATCH] soc: qcom: socinfo: Add support for Kona-7230 soc-id Add support for getting soc-id and dummy handle on Kona-7230. Change-Id: I1c93ffd1d3b2575549d39390f18dddc85bf5d8e8 Signed-off-by: Chetan C R --- drivers/soc/qcom/socinfo.c | 7 +++++++ include/soc/qcom/socinfo.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 7b2b44722e51..8c6dbdd296cb 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -324,6 +324,9 @@ static struct msm_soc_info cpu_of_id[] = { [455] = {MSM_CPU_KONA, "KONA"}, [496] = {MSM_CPU_KONA, "KONA"}, + /* kona-7230-iot ID */ + [548] = {MSM_CPU_KONA_IOT, "KONA-7230-IOT"}, + /* Lito ID */ [400] = {MSM_CPU_LITO, "LITO"}, [440] = {MSM_CPU_LITO, "LITO"}, @@ -1358,6 +1361,10 @@ static void * __init setup_dummy_socinfo(void) dummy_socinfo.id = 338; strlcpy(dummy_socinfo.build_id, "sdm450 - ", sizeof(dummy_socinfo.build_id)); + } else if (early_machine_is_kona_7230_iot()) { + dummy_socinfo.id = 548; + strlcpy(dummy_socinfo.build_id, "kona-7230-iot - ", + sizeof(dummy_socinfo.build_id)); } else strlcat(dummy_socinfo.build_id, "Dummy socinfo", sizeof(dummy_socinfo.build_id)); diff --git a/include/soc/qcom/socinfo.h b/include/soc/qcom/socinfo.h index 46ac4ec4b019..c96234e07b2b 100644 --- a/include/soc/qcom/socinfo.h +++ b/include/soc/qcom/socinfo.h @@ -54,6 +54,8 @@ of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,sa8150") #define early_machine_is_kona() \ of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,kona") +#define early_machine_is_kona_7230_iot() \ + of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,kona-7230-iot") #define early_machine_is_lito() \ of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,lito") #define early_machine_is_orchid() \ @@ -177,6 +179,7 @@ enum msm_cpu { MSM_CPU_SM8150, MSM_CPU_SA8150, MSM_CPU_KONA, + MSM_CPU_KONA_IOT, MSM_CPU_LITO, MSM_CPU_ORCHID, MSM_CPU_BENGAL,