[PATCH] soc: qcom: socinfo: add support for new fields in revisions 20,21,22, and 23

Ananthu C V posted 1 patch 2 months, 3 weeks ago
drivers/soc/qcom/socinfo.c       | 4 ++++
include/linux/soc/qcom/socinfo.h | 9 +++++++++
2 files changed, 13 insertions(+)
[PATCH] soc: qcom: socinfo: add support for new fields in revisions 20,21,22, and 23
Posted by Ananthu C V 2 months, 3 weeks ago
add support for the below fields in socinfo structure:
- v20:
  * raw_package_type: type of the raw package
- v21:
  * partial_features_array_offset: position on array indexed by
    ChipInfoPartType, each bit notes the corresponding component being
    enabled or disabled
- v22:
  * cpu_cores_array_offset: position on array of cpu cores per cluster
- v23:
  * part_instances_offset: position on array of PlatformInfoPartInfoType
    structures
  * num_part_instances: length of the array of part_instances at
    part_instances_offset

Signed-off-by: Ananthu C V <ananthu.cv@oss.qualcomm.com>
---
 drivers/soc/qcom/socinfo.c       | 4 ++++
 include/linux/soc/qcom/socinfo.h | 9 +++++++++
 2 files changed, 13 insertions(+)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 963772f45489..a14aaad51f81 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -621,6 +621,10 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
 			   &qcom_socinfo->info.fmt);
 
 	switch (qcom_socinfo->info.fmt) {
+	case SOCINFO_VERSION(0, 23):
+	case SOCINFO_VERSION(0, 22):
+	case SOCINFO_VERSION(0, 21):
+	case SOCINFO_VERSION(0, 20):
 	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..40903c54b526 100644
--- a/include/linux/soc/qcom/socinfo.h
+++ b/include/linux/soc/qcom/socinfo.h
@@ -82,6 +82,15 @@ struct socinfo {
 	__le32 num_func_clusters;
 	__le32 boot_cluster;
 	__le32 boot_core;
+	/* Version 20 */
+	__le32 raw_package_type;
+	/* Version 21 */
+	__le32 partial_features_array_offset;
+	/* Version 22 */
+	__le32 cpu_cores_array_offset;
+	/* Version 23 */
+	__le32 part_instances_offset;
+	__le32 num_part_instances;
 };
 
 /* Internal feature codes */
-- 
2.43.0
Re: [PATCH] soc: qcom: socinfo: add support for new fields in revisions 20,21,22, and 23
Posted by Bjorn Andersson 2 months, 3 weeks ago
On Thu, Nov 13, 2025 at 12:55:06AM -0800, Ananthu C V wrote:
> add support for the below fields in socinfo structure:
> - v20:
>   * raw_package_type: type of the raw package
> - v21:
>   * partial_features_array_offset: position on array indexed by
>     ChipInfoPartType, each bit notes the corresponding component being
>     enabled or disabled
> - v22:
>   * cpu_cores_array_offset: position on array of cpu cores per cluster
> - v23:
>   * part_instances_offset: position on array of PlatformInfoPartInfoType
>     structures
>   * num_part_instances: length of the array of part_instances at
>     part_instances_offset
> 

Please see https://lore.kernel.org/r/20251104130906.167666-1-mukesh.ojha@oss.qualcomm.com

Regards,
Bjorn

> Signed-off-by: Ananthu C V <ananthu.cv@oss.qualcomm.com>
> ---
>  drivers/soc/qcom/socinfo.c       | 4 ++++
>  include/linux/soc/qcom/socinfo.h | 9 +++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
> index 963772f45489..a14aaad51f81 100644
> --- a/drivers/soc/qcom/socinfo.c
> +++ b/drivers/soc/qcom/socinfo.c
> @@ -621,6 +621,10 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
>  			   &qcom_socinfo->info.fmt);
>  
>  	switch (qcom_socinfo->info.fmt) {
> +	case SOCINFO_VERSION(0, 23):
> +	case SOCINFO_VERSION(0, 22):
> +	case SOCINFO_VERSION(0, 21):
> +	case SOCINFO_VERSION(0, 20):
>  	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..40903c54b526 100644
> --- a/include/linux/soc/qcom/socinfo.h
> +++ b/include/linux/soc/qcom/socinfo.h
> @@ -82,6 +82,15 @@ struct socinfo {
>  	__le32 num_func_clusters;
>  	__le32 boot_cluster;
>  	__le32 boot_core;
> +	/* Version 20 */
> +	__le32 raw_package_type;
> +	/* Version 21 */
> +	__le32 partial_features_array_offset;
> +	/* Version 22 */
> +	__le32 cpu_cores_array_offset;
> +	/* Version 23 */
> +	__le32 part_instances_offset;
> +	__le32 num_part_instances;
>  };
>  
>  /* Internal feature codes */
> -- 
> 2.43.0
>
Re: [PATCH] soc: qcom: socinfo: add support for new fields in revisions 20,21,22, and 23
Posted by Konrad Dybcio 2 months, 3 weeks ago
On 11/13/25 9:55 AM, Ananthu C V wrote:
> add support for the below fields in socinfo structure:
> - v20:
>   * raw_package_type: type of the raw package
> - v21:
>   * partial_features_array_offset: position on array indexed by
>     ChipInfoPartType, each bit notes the corresponding component being
>     enabled or disabled
> - v22:
>   * cpu_cores_array_offset: position on array of cpu cores per cluster
> - v23:
>   * part_instances_offset: position on array of PlatformInfoPartInfoType
>     structures
>   * num_part_instances: length of the array of part_instances at
>     part_instances_offset
> 
> Signed-off-by: Ananthu C V <ananthu.cv@oss.qualcomm.com>
> ---

Please follow the existing pattern and add debugfs entries for the
new values

Konrad