Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp66980rdb; Tue, 31 Oct 2023 00:13:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYJWFE4k8JuZyLQzEfH+rHaAR+2K/vsQS3dZY7mH0qdVzaMAn2bGvycIcxMVX7rRjOBXPj X-Received: by 2002:a17:902:d4cf:b0:1cc:1686:37ac with SMTP id o15-20020a170902d4cf00b001cc168637acmr15813353plg.55.1698736403180; Tue, 31 Oct 2023 00:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698736403; cv=none; d=google.com; s=arc-20160816; b=Jyv+M4RP9QXqhungoXMMEq528OrjYeUcGtckmQOZouOAGXeUVQ7RUf3hL7MBfX6t9G pNO5OahxTX0iQy8q69S0kLZjr0G02vPd5POPqUfwcn/oc0ij8RQJdOltNJth+J0qnW6h qggT4z0FA8+pjwAQdQu4sq0wK6fWCj2O7eA5rgP9gBuGrM0kW6GdPgW+8gi5Di6y/vaQ hI7wrmYjHbeoB8DFC0Wa1Sp8A2+JBP0BTrO9/6Sr+OgXgT7Qthh8OYUm1LbXD+55Cts2 MrkhLyhsb3qFXlQ9DS9tPUY3gx8K5QtOp3dSnZR7n/fMgIQ0sxhdceSU+lquqVICvU6q xS3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fI79fCu7u7JtqeAo3O8pgl49D1o129Qrn5JbKv9fzRQ=; fh=/PcbLsdifyktaw5PNVUHNeBf/uyMY7MMN8WFopaJ5z8=; b=L1bnTI2WKRvtz3k4/IqTUDuOyr7tk/LFGfWYNx4jU/L7lzJt9fju3UC5sCCUQK3Qf5 4g93AR1jjgj1tOZMj5e+Jrn82W+cYp+gMLspAacFzpeItYLXZC8xLNTagA+3vgphxYSH FFsyzNXxhE1RgTUPs0FirwMhxr8W9zznx65acUcKMf5BPuy24V9F7lwemF36hIMHGKpW ZQjAMP9r9tSzhSQ+Lus10LiIwh+Kq1nsSbVC9EtPQOCEJfv1kUBGZRdVfNmWqlcVmoxx JddpWZNSnuVqP+caK9EXb8a2PQ5g3Mv8IyaXlf20WEAlLYAdLhVmKoKglu1IVOO1o74e W68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Y/d2Szs2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id v8-20020a170902b7c800b001cc4689a51esi617811plz.37.2023.10.31.00.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 00:13:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Y/d2Szs2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5000F80BC81A; Tue, 31 Oct 2023 00:13:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343573AbjJaHMz (ORCPT + 99 others); Tue, 31 Oct 2023 03:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343565AbjJaHMy (ORCPT ); Tue, 31 Oct 2023 03:12:54 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870FCD8; Tue, 31 Oct 2023 00:12:51 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39V6NIt1015035; Tue, 31 Oct 2023 07:12:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=fI79fCu7u7JtqeAo3O8pgl49D1o129Qrn5JbKv9fzRQ=; b=Y/d2Szs27U43kVCQr8k2z/kdDfYMbf1fQXVvtAxYcAEBEMiwXefEk2r7p4QpAW5Py8bh JjL+K5+RVGP/SJCRU3vwcgRkv3xD6MiOj7Gfig/QvCzu8kQxEcmkQnvpnqyPc1UcHj0K RDrqun1LL8NwcoPwwBj5zPIGvKlQIFgNdS1OVKa8+A21QFNy3pX1mo2op1oCwTST0FeI PVRv2XcjVitZfzT0j+V+IF8vCaNpwxsEBroaSLYZALF5awoutK5EzwStnoXH2XfiCovb +vqlMNMytH9nmMEwhmcbgQeF+2k6YNnUS4FTevA2iOTYh+n7tmxZsKkfN3nASawDfHCU pA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u2mcygwxy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2023 07:12:18 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39V7CHpT004161 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2023 07:12:17 GMT Received: from varda-linux.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 31 Oct 2023 00:12:10 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v6 1/2] cpufreq: qti: Enable cpufreq for ipq53xx Date: Tue, 31 Oct 2023 12:41:38 +0530 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 30cwzmSCJm0XsI5kH8KCJIyFcJ9oZpF0 X-Proofpoint-ORIG-GUID: 30cwzmSCJm0XsI5kH8KCJIyFcJ9oZpF0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-30_13,2023-10-31_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310310054 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 31 Oct 2023 00:13:19 -0700 (PDT) IPQ53xx have different OPPs available for the CPU based on SoC variant. This can be determined through use of an eFuse register present in the silicon. Added support for ipq53xx on nvmem driver which helps to determine OPPs at runtime based on the eFuse register which has the CPU frequency limits. opp-supported-hw dt binding can be used to indicate the available OPPs for each limit. nvmem driver also creates the "cpufreq-dt" platform_device after passing the version matching data to the OPP framework so that the cpufreq-dt handles the actual cpufreq implementation. Reviewed-by: Dmitry Baryshkov Reviewed-by: Bryan O'Donoghue Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v6: Rebase to top of tree v5: Merge IPQ53xx with existing APQ8096 case v2: Move IPQ53xx after APQ8096SG --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/qcom-cpufreq-nvmem.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 0718191..53da255 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -180,6 +180,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "ti,am62a7", }, { .compatible = "ti,am62p5", }, + { .compatible = "qcom,ipq5332", }, { .compatible = "qcom,ipq6018", }, { .compatible = "qcom,ipq8064", }, { .compatible = "qcom,ipq8074", }, diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index 158c0e1..4f7af70 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -183,6 +183,11 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, switch (msm_id) { case QCOM_ID_MSM8996: case QCOM_ID_APQ8096: + case QCOM_ID_IPQ5332: + case QCOM_ID_IPQ5322: + case QCOM_ID_IPQ5312: + case QCOM_ID_IPQ5302: + case QCOM_ID_IPQ5300: drv->versions = 1 << (unsigned int)(*speedbin); break; case QCOM_ID_MSM8996SG: @@ -541,6 +546,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { { .compatible = "qcom,msm8909", .data = &match_data_msm8909 }, { .compatible = "qcom,msm8996", .data = &match_data_kryo }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, + { .compatible = "qcom,ipq5332", .data = &match_data_kryo }, { .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 }, { .compatible = "qcom,ipq8064", .data = &match_data_ipq8064 }, { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 }, -- 2.7.4