]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: qcom: socinfo: Add support for new fields in revision 20
authorMukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Tue, 4 Nov 2025 13:09:05 +0000 (18:39 +0530)
committerBjorn Andersson <andersson@kernel.org>
Thu, 6 Nov 2025 20:11:54 +0000 (14:11 -0600)
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.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251104130906.167666-1-mukesh.ojha@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/socinfo.c
include/linux/soc/qcom/socinfo.h

index af0188bd388012a61f6cee92948f2f3ca999027d..37567f5492fa8055024df3e38d0cdf2b081167a8 100644 (file)
@@ -213,6 +213,7 @@ struct socinfo_params {
        u32 num_func_clusters;
        u32 boot_cluster;
        u32 boot_core;
+       u32 raw_package_type;
 };
 
 struct smem_image_version {
@@ -675,6 +676,11 @@ 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);
+               fallthrough;
        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);
index 608950443eeef68e51f1fcfb5ed03b90a5030fc6..c4dae173cc30dcd414e49cbc2006421046ee2439 100644 (file)
@@ -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 */