Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp180712rdg; Thu, 12 Oct 2023 02:28:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpPE/j6kieSuGpYDQBzcsO8Jv/SKBrSWesiCjXewyodZZPHZt7RgNnaSdYDlP4G2ovXnm3 X-Received: by 2002:a05:6358:998e:b0:13c:dd43:f741 with SMTP id j14-20020a056358998e00b0013cdd43f741mr16492973rwb.24.1697102887701; Thu, 12 Oct 2023 02:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697102887; cv=none; d=google.com; s=arc-20160816; b=zNS3aGB2IaEbnvzJIGgdfMlxIuluELRgcoFI1sSz0/4/7DbqMElI1PBJ8cGZlfPePa +yc6dJjzhszNIuDWB9RdbkAUxQ73/J7Omewy4msE70zjm4NB6jt+ohmTAxO4iZLz7AsL uFshsTQpqIsIFygZKv/FxUN8iLSVLt6QfDHdEnBrsegu3/anx4gotwfQ62dT92Lli475 YZc+7ItPh6O+0Pm1JjNnPoURuz25lcXCAsh/cTeATFkcAkaBOvVzWfmo11LKEqlgzzUm Df8q7DmueF8pB8x0fvyxLQfRaohvhrCvuoJDwTff/LuCxTjbFowR6WUnTDv5uc3+fpWf vfOw== 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=os1kDwGKRf3MBrmzOlXCUAclaUGlA4fZF3yRgAmrB0M=; fh=TexRbNhpseSDwji4zm0ZYE1dIqB1VQ9GLSRhn7EXsPo=; b=q9rxUvnCgI1gG2B6Tm+yhfmOUuGwTPVXBFIfQSm8Ba+A0Qap5+2w/y/2n8UX2mMrwa abaZHx+FB5iKPEew9Ka1fuaTSBrQBH3eIgK4PzMXlMcTwomLeEaBq4JNM8TwMNOKc4g6 ktbOMS4VajhODc0m+Ec6SK+wreVU1nISRDusUF6ITs/3YOPfJP2nvULBndrQlysWOyyA M4MUf3INoB1qiRhDFwYU6jXOfuf0AFGPdwAAcUukxhR/8vrYYGBs+ZjZQ4I+utW9W24j EWZSuXoP2/U0mNYIRz3YXYrLs1Wqc6T29tD6h9cWir1nSU5PyBfy6Y0scW6F6N9PC0xo +iZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=W9SIYEiQ; 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 203-20020a6302d4000000b00573e329b014si1910276pgc.339.2023.10.12.02.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 02:28:07 -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=W9SIYEiQ; 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 900C581A32BB; Thu, 12 Oct 2023 02:28:04 -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 S235677AbjJLJ1s (ORCPT + 99 others); Thu, 12 Oct 2023 05:27:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235605AbjJLJ1g (ORCPT ); Thu, 12 Oct 2023 05:27:36 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E125D6; Thu, 12 Oct 2023 02:27:35 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39C8wDJN002045; Thu, 12 Oct 2023 09:27:28 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=os1kDwGKRf3MBrmzOlXCUAclaUGlA4fZF3yRgAmrB0M=; b=W9SIYEiQ2p03IqPWdLZKXdt/h58CqwFahra1BG2D2/+jY2PXFoKZ469tSeVl7RklBhO+ Ua+AXE+qJWXdpb4angCJrSbLnMrdkHYhgvaNospaagGhE8BQ3rUZ72W4h7HLWrohE55z iydAyMyUP6HDETb/CG0enOhUz2LrgsUbY7IJasVaUPKODDlxBeuEWnypArcSOhgNITjM r4cCgYuTiMRdp1unR7oDPY1qac1MVj2R+QBDrcbHJkwIKg/2m0khq2QQFhsAVHwkCfpd GUA87pvRlgOeKKvRUoglQuXXHSb1DsbbzoEufjrGUjT7bPZI3Z4fK9JjqQQRzMiLdI6H cA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tnstytusn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 09:27:27 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39C9RQeC014297 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 09:27:26 GMT Received: from varda-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 12 Oct 2023 02:27:21 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v2 5/8] cpufreq: qti: Enable cpufreq for ipq53xx Date: Thu, 12 Oct 2023 14:56:21 +0530 Message-ID: <719a5e5ff4750d022bed7bed424c3a33615dedf0.1697101543.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 nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 8n4yrFGq2LK4Ftu9LmTonAWX1l63eCao X-Proofpoint-GUID: 8n4yrFGq2LK4Ftu9LmTonAWX1l63eCao X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-12_05,2023-10-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310120079 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]); Thu, 12 Oct 2023 02:28:04 -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: Bryan O'Donoghue Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v2: Move IPQ53xx after APQ8096SG --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/qcom-cpufreq-nvmem.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 2016d47..5804063 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -179,6 +179,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "ti,am625", }, { .compatible = "ti,am62a7", }, + { .compatible = "qcom,ipq5332", }, { .compatible = "qcom,ipq8064", }, { .compatible = "qcom,apq8064", }, { .compatible = "qcom,msm8974", }, diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index 84d7033..520b79a 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -154,6 +154,13 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, case QCOM_ID_APQ8096SG: drv->versions = 1 << ((unsigned int)(*speedbin) + 4); break; + 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; default: BUG(); break; @@ -359,6 +366,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,apq8064", .data = &match_data_krait }, { .compatible = "qcom,msm8974", .data = &match_data_krait }, -- 2.7.4