Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
@ 2025-04-25 13:59 Mukesh Ojha
  2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Mukesh Ojha @ 2025-04-25 13:59 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Mukesh Ojha

Add support for socinfo version 20. Version 20 adds a new field
package id and its zeroth bit contain information that can be
can be used to tune temperature thresholds on devices which might
be able to withstand higher temperatures. Zeroth bit value 1 means
that its heat dissipation is better and more relaxed thermal
scheme can be put in place and 0 means a more aggressive scheme
may be needed.

Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
---
Changes in v2:
 - Added debugfs entry and described more about the field in commit
   text.

 drivers/soc/qcom/socinfo.c       | 5 +++++
 include/linux/soc/qcom/socinfo.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 18d7f1be9093..5800ebf9ceea 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -153,6 +153,7 @@ struct socinfo_params {
 	u32 num_func_clusters;
 	u32 boot_cluster;
 	u32 boot_core;
+	u32 raw_package_type;
 };
 
 struct smem_image_version {
@@ -607,6 +608,10 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
 			   &qcom_socinfo->info.fmt);
 
 	switch (qcom_socinfo->info.fmt) {
+	case SOCINFO_VERSION(0, 20):
+		qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type);
+		debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root,
+				   &qcom_socinfo->info.raw_package_type);
 	case SOCINFO_VERSION(0, 19):
 		qcom_socinfo->info.num_func_clusters = __le32_to_cpu(info->num_func_clusters);
 		qcom_socinfo->info.boot_cluster = __le32_to_cpu(info->boot_cluster);
diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h
index 608950443eee..c4dae173cc30 100644
--- a/include/linux/soc/qcom/socinfo.h
+++ b/include/linux/soc/qcom/socinfo.h
@@ -82,6 +82,8 @@ struct socinfo {
 	__le32 num_func_clusters;
 	__le32 boot_cluster;
 	__le32 boot_core;
+	/* Version 20 */
+	__le32 raw_package_type;
 };
 
 /* Internal feature codes */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-05-09 22:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
2025-04-25 17:28   ` Dmitry Baryshkov
2025-05-08 15:37     ` Mukesh Ojha
2025-05-08 15:56       ` Dmitry Baryshkov
2025-05-08 16:48         ` Mukesh Ojha
2025-05-08 18:01           ` Konrad Dybcio
2025-05-09 10:06             ` Mukesh Ojha
2025-05-09 22:46               ` Konrad Dybcio
2025-04-25 13:59 ` [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Mukesh Ojha
2025-04-25 17:29   ` Dmitry Baryshkov
2025-04-25 17:29 ` [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Dmitry Baryshkov
2025-04-25 19:18 ` Konrad Dybcio
2025-04-26 16:28 ` kernel test robot
2025-04-26 17:30 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox