Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp820105rdb; Thu, 19 Oct 2023 23:21:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYtBGop2SV5WGp27UyvzEDhMZ4Z8IMDMpBAvlmKJDSuK2Qt75hTYyr1mADpLymhok6H11e X-Received: by 2002:a05:6a20:2451:b0:161:3120:e888 with SMTP id t17-20020a056a20245100b001613120e888mr1020600pzc.46.1697782897445; Thu, 19 Oct 2023 23:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697782897; cv=none; d=google.com; s=arc-20160816; b=M9Tm6Vp0/GZ66qgasiTikJL+yb0fIZmBYX4tcZbiB8L53g7bGfHIoXRpy7sX7lera3 LOgF8lCT3vtX6z4WXQ23Q08VexmxLtd2xTbKfM4kXTwEWnzcKC1YPczsqGdlQh+zd3sB XjS5vWp3KbCmhGmT/KCZYXYHuaT2ii6EHBoJ0x7YU+nTVZ2FBNVx9TzkW6qDBs42nFLm 5nwxpEN128FJYztcAeX+pmyBs7XqgBgvIuiWZTZ6rC0hPOmT6grO/HuP3FXz+gT5JBnG WnvEHqMlWkn0ljMOZ6iKBdX9kGKa8N+ubkPUZlDgWaxYi+noAeSaRGKTveMSVqlqmqxY qQWQ== 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=8NhxoiE2BMLc5QDoklL2Y2z6+7+j4qpgWB4Q9R1eYEs=; fh=/PcbLsdifyktaw5PNVUHNeBf/uyMY7MMN8WFopaJ5z8=; b=VINJLx0o5toTouOOC2KBQI4ii7RNTgv7P3qRrhFgd/8TCl39tAWkOivZwCkCJFdnqm 7dnV32Tnp/SwwTF8s7HX2ykCLz/3C7LqnAi//Jip/Eu3W6qkZCAou+E7ii4NrFdErnvI ozXvQ5ZBJ/G5UUxuD6nCccFXNhz5h6FhS1VGtK0U5cPAbz5jJSFrkotQjiQhX5Wkwwbe vgy60VcVbMQGj8ic6bSkaGjcnE6mTNAZUYsRB5G/qffCBLIrjOyYs5x8j0Pfb04oILg0 vEDhDIBqr6W9NnR5rcYV8vvqTP5P4/m3XtGibUyG40/ndq7u3Hnfg2bLHMdk1t99zazA 9oEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Gr1SVGvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ng8-20020a17090b1a8800b00277617e4539si3906251pjb.97.2023.10.19.23.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Gr1SVGvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 0807482B1C4E; Thu, 19 Oct 2023 23:21:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376397AbjJTGVb (ORCPT + 99 others); Fri, 20 Oct 2023 02:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235631AbjJTGVP (ORCPT ); Fri, 20 Oct 2023 02:21:15 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D583D7F; Thu, 19 Oct 2023 23:21:01 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39K52Hl7010271; Fri, 20 Oct 2023 06:20:30 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=8NhxoiE2BMLc5QDoklL2Y2z6+7+j4qpgWB4Q9R1eYEs=; b=Gr1SVGvp+RADubHwVkejOH3k046bdyIPbUesM35aI0w7zOk35fROFIqK0HHWppWCfC8Q uGWRa6qefyd2a1zYyronFPof/bl8WDB7AejdSzUMFsBdU6RWsmQxDj4XOZ/i4vv59BZw dSakPpfdB3aLDiaGlhvT5C72UIlvjZf3OsiSqznxOZFwLxmwIE4X1jMfSWQfZaMMfla3 2ANnk4FnnKXFmM31j4NxuW5NP+0+bIE4C435uIm1KXKC8uWlF0NNcFJcYKfq0DzIJvl9 jTUlt98Zm0pM9WsS/7wdT/npRYJfSP1X+5uUSU83ysJCktSCAgkAL8q58hzfLDwxuq2Y Vw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tubxd0ucc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:30 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39K6KTY5027887 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:29 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; Thu, 19 Oct 2023 23:20:23 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v5 6/9] cpufreq: qti: Enable cpufreq for ipq53xx Date: Fri, 20 Oct 2023 11:49:36 +0530 Message-ID: <92acab57a7bd87e73382d2e1720ab55eac202409.1697781921.git.quic_varada@quicinc.com> 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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: jATKbNVCmBf752gOnrAdbncAx9POk3yu X-Proofpoint-ORIG-GUID: jATKbNVCmBf752gOnrAdbncAx9POk3yu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-20_04,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310200053 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 23:21:36 -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 --- 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 675da7f..f43e5cd 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,ipq8064", }, { .compatible = "qcom,ipq8074", }, { .compatible = "qcom,apq8064", }, diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index 3fa1264..e7e6a6a 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -153,6 +153,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: @@ -406,6 +411,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { { .compatible = "qcom,apq8096", .data = &match_data_kryo }, { .compatible = "qcom,msm8996", .data = &match_data_kryo }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, + { .compatible = "qcom,ipq5332", .data = &match_data_kryo }, { .compatible = "qcom,ipq8064", .data = &match_data_krait }, { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 }, { .compatible = "qcom,apq8064", .data = &match_data_krait }, -- 2.7.4