Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3673243rdg; Wed, 18 Oct 2023 02:38:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtShCr/MBQ0kRAqYbRWIg4D2zdpuovbzBpo0a8vFXlHnowt9LFlw3ESnoiV2aGvslngJg8 X-Received: by 2002:a17:90a:1cf:b0:27d:839:52ae with SMTP id 15-20020a17090a01cf00b0027d083952aemr4643593pjd.32.1697621889492; Wed, 18 Oct 2023 02:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697621889; cv=none; d=google.com; s=arc-20160816; b=PglNvIWKgVAKYZnkd/tUwQhRbGOHmMu6twp2vnmbnt+B9oAcibP44d1++/t6QsEpq5 Oyjm+JtAcZy4sxWG6zPxOXIclGrWJ251f3YmoZyrFf73h26hWg5xwqr/QOzdqDO22u6P 4dtNun0Efcxwo6om5BOarJfiz0KwFAaAU8terQHMGphVQge3wUsZ5KhsE9C11menSnB8 Egrt7ZXjo030HPMJ4c8eWDZ+vNLkqK3PSaKb6ygUPZhddn8O1H4T0oq+FscEe2fPW8Y6 hYZW8gO/paVE4RxsGcWT0aP45Iu3rqRW+jcFdA1e1OMyTdm89WBTAK0xzGWL3YDZ6OYD b9Lw== 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=71SDrbCHhggW77N4ET/lTU7t3o/T2Zf+gfsOoMco9/w=; fh=ohXLHIUa9uK/sLc5b4QB0P5vSAcNC4PMHSfmp3ICAGQ=; b=YxS+QuJ8vf+rMl3r0hRNI1l7Ncxdt3lmzddQMY6DC5n7JI7iGFhepqsov0Wl9Ei9+9 2QuanyLVa51oKpFM73CCxIB7AXVRavZBH8Xh2mtbcDekFMSNbwNUU5vk4pfEVMuCmUm/ ozW0NgczOXPhgqEmQk4RPqIANCypfDuDjIQUY1skFW/nxsrwyAO2K+L9U0C7blglx3+G QzERvPEiVpFhE2ZutKmXVYvCGfxKsWqEre3dZ3nQq77YcZbMLwLFNFKEoL+Kr8niN69P 7XAmgUiaN7gzhYDmZuDcUUdWV8Y+tA9/dwqQOQt3lPXaLd/12c30iLlaVl2JdrOhQAPW O5Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=El2eEPp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id i184-20020a6387c1000000b0056c2f508898si1589270pge.725.2023.10.18.02.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:38:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=El2eEPp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 4C33D802DB8A; Wed, 18 Oct 2023 02:38:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjJRJhz (ORCPT + 99 others); Wed, 18 Oct 2023 05:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234992AbjJRJcc (ORCPT ); Wed, 18 Oct 2023 05:32:32 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86ABD44; Wed, 18 Oct 2023 02:31:37 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39I8HTIH017351; Wed, 18 Oct 2023 09:31:04 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=71SDrbCHhggW77N4ET/lTU7t3o/T2Zf+gfsOoMco9/w=; b=El2eEPp2kr9nYe/WIi7GiUaXqmFlO5uUuLvNWOfNxkTi65Lmf3ecb1YEIE7AbDyHg0r4 ldrwO70WNqdEL8Gme+P8/UFbYizZAhlAHcBGua2eJ4R1rmI87DqTGWadwZgqo53i4lVO oCo5q9Gc8zK9QGAWxu0sFQ7V20plR/eVw9mAS5rL1YiE+HBtEaMVgjF/QTVfsOOrvlP8 bFvzRVJ5i0sifxEzVz9J1AB4xZbN+wn24PIB5CYrE5cMVtaqvpHnYpFeQVid7llkw0RJ VxF2F8y2vIFqXXgqUhZN2Cm0Y82AVu7U6nLCPf4KUe5ClSOC/BEs36r7d8yrwJcEVnaL AQ== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tsr7c2mk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 09:31:04 +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 39I9V2ef026356 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 09:31:02 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.39; Wed, 18 Oct 2023 02:30:56 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan , Praveenkumar I Subject: [PATCH v3 7/8] cpufreq: qti: Introduce cpufreq for ipq95xx Date: Wed, 18 Oct 2023 14:59:20 +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: 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: a82e-l75JEBiHhdDS8ltw7kLtYeAcyh2 X-Proofpoint-GUID: a82e-l75JEBiHhdDS8ltw7kLtYeAcyh2 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-18_07,2023-10-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 bulkscore=0 adultscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310180080 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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 02:38:07 -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 f43e5cd..4f794ba 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -183,6 +183,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "qcom,ipq5332", }, { .compatible = "qcom,ipq8064", }, { .compatible = "qcom,ipq8074", }, + { .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 0014909..d44be4e 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -166,6 +166,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; @@ -417,6 +424,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { { .compatible = "qcom,ipq8064", .data = &match_data_krait }, { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 }, { .compatible = "qcom,apq8064", .data = &match_data_krait }, + { .compatible = "qcom,ipq9574", .data = &match_data_kryo }, { .compatible = "qcom,msm8974", .data = &match_data_krait }, { .compatible = "qcom,msm8960", .data = &match_data_krait }, {}, -- 2.7.4