Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp180990rdg; Thu, 12 Oct 2023 02:28:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEx/xpYf1LAE4m4DOPZgms0xQdOgNdtYxjvJmnqJ3WGZccocy4lbKIrbZ1SIo9JAjFmmuRG X-Received: by 2002:a17:90a:8e81:b0:274:b12a:37ad with SMTP id f1-20020a17090a8e8100b00274b12a37admr21296306pjo.37.1697102924383; Thu, 12 Oct 2023 02:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697102924; cv=none; d=google.com; s=arc-20160816; b=ucQdffji03HXNNp/7cF4CxWtgZy//+71Z1dZIABMweXO/OW1fQQ/mtPxLTZr8QSGwI 7eUAE0DJbeaK33FmbG+7LuINIOJ2/VY/TV53VLaqq3Ox4fQcCV2lk/97pwLHzniRcnMY NSDH76tnAoQvivJQ66+jiZoWYAmV29tnP1ziiK90Da9AXzSMWXLjSc3Xeo3WpkfMpGd9 YIczd03tdC6opLOxn3YbHeesx486ZWcWbSBj9opFyxu88CcPsCRhlfGCE5zMQ9DVj6HV b256uQqGHSSCsUWaGQrfbxeF1jRXc8NeMmJCbdPbpVwYUgBJQsNjv0hw62sbwHjyB2RE SJFw== 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=SCrUBt+MnF+liKuALBDiareYwEfn1z0LvAkcaKNjNQM=; fh=ohXLHIUa9uK/sLc5b4QB0P5vSAcNC4PMHSfmp3ICAGQ=; b=n/puNFJeZr1rOLnqBjeqDaCywu0FNG3s6yaSp3c8vWz51os7pcACedUwaho72zAb72 Mp2K8irqW3nNVQj5LKYADvvJ/bKsxX1pyef414Y1WcC1Hnw82NctVtePoAzhONH2Lp9l XINHw/N80XWTNRNTFmyke8gPXl42w+8IlyoK00U/+GAa53j+mHFi4SIRo2FcKfNHedOM jvTKsExhB8MwbJNRJhtLofOxxfyVXWLKoiJ2/QKt0mJy3UiD8pKZltkDF/n+MXhlDd83 TS8cm7UlV7PCv+EPzfqf2yZeOEdEJCgCtW28NWYYen/ac6OMInWfJ3hG6GeEgdkfjNIn Hx3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iGpqsgtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id cq16-20020a17090af99000b00273dfe0741csi1890466pjb.90.2023.10.12.02.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 02:28:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iGpqsgtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id D5F628225C8D; Thu, 12 Oct 2023 02:28:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235658AbjJLJ2a (ORCPT + 99 others); Thu, 12 Oct 2023 05:28:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235630AbjJLJ2P (ORCPT ); Thu, 12 Oct 2023 05:28:15 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E518E11B; Thu, 12 Oct 2023 02:28:08 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39C9NMLr027097; Thu, 12 Oct 2023 09:27:40 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=SCrUBt+MnF+liKuALBDiareYwEfn1z0LvAkcaKNjNQM=; b=iGpqsgtISD4ngdZYe5IGpPAhUB0oFjgfsksYcKzhB8JcCv4cXl1D4jT/Yrmkb+EypPMC 6U4Zr3iOrCNTtqcbkqbXw/YeLxNYnnyMSmffmmzVvsdyyD6E9OBPLhcgAhNrZ68RmQyD gq0MmSgv02veaPVeaQq9Z6723pCF4sGBca4SlKHF7mdlRlfcoBtpHnfCve+y0tQVr+1h lg9l41RLpgSsBoXOiOlGGpEmpXIVxaMpHyQu4Lka16CplyuJHE2BAFN08IODuP8Pt4Ng YmD5f1dYJ9W1auSrYrnKC3ud1JSsJBCGJwIUcCF0EwF2QxdGDXlBLrKqOqmjzaFBHb8d pw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tp9dp0j0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 09:27:40 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39C9RceG030438 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 09:27:39 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:32 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan , Praveenkumar I Subject: [PATCH v2 7/8] cpufreq: qti: Introduce cpufreq for ipq95xx Date: Thu, 12 Oct 2023 14:56:23 +0530 Message-ID: <0853e3d5e83f6f8b30d2e05a2ff4996f136acb2f.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: -AjM4kS7KSM_yjsqxzOh6Oqkcrwmzk5i X-Proofpoint-GUID: -AjM4kS7KSM_yjsqxzOh6Oqkcrwmzk5i 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 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 bulkscore=0 mlxscore=0 clxscore=1011 adultscore=0 impostorscore=0 malwarescore=0 phishscore=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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 12 Oct 2023 02:28:42 -0700 (PDT) IPQ95xx SoCs have different OPPs available for the CPU based on the SoC variant. This can be determined from an eFuse register present in the silicon. Added support for ipq95xx 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. Signed-off-by: Praveenkumar I Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v2: Simplify bin selection by tweaking the order in dts --- 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 5804063..16b763f 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -181,6 +181,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "qcom,ipq5332", }, { .compatible = "qcom,ipq8064", }, + { .compatible = "qcom,ipq9574", }, { .compatible = "qcom,apq8064", }, { .compatible = "qcom,msm8974", }, { .compatible = "qcom,msm8960", }, diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index 520b79a..4768d07 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -161,6 +161,13 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, case QCOM_ID_IPQ5300: drv->versions = 1 << (unsigned int)(*speedbin); break; + case QCOM_ID_IPQ9514: + case QCOM_ID_IPQ9550: + case QCOM_ID_IPQ9554: + case QCOM_ID_IPQ9570: + case QCOM_ID_IPQ9574: + drv->versions = 1 << (unsigned int)(*speedbin); + break; default: BUG(); break; @@ -368,6 +375,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, { .compatible = "qcom,ipq5332", .data = &match_data_kryo }, { .compatible = "qcom,ipq8064", .data = &match_data_krait }, + { .compatible = "qcom,ipq9574", .data = &match_data_kryo }, { .compatible = "qcom,apq8064", .data = &match_data_krait }, { .compatible = "qcom,msm8974", .data = &match_data_krait }, { .compatible = "qcom,msm8960", .data = &match_data_krait }, -- 2.7.4