Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp820235rdb; Thu, 19 Oct 2023 23:22:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQy9Tp0puvOupElamCOTsvfGmvYg/Va2WQfL5X13I+SJKsBWSDBI4TqO7DhePUpDJqAVA8 X-Received: by 2002:a05:6a00:2d10:b0:6b6:5ed4:dd42 with SMTP id fa16-20020a056a002d1000b006b65ed4dd42mr917100pfb.31.1697782920392; Thu, 19 Oct 2023 23:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697782920; cv=none; d=google.com; s=arc-20160816; b=Kasoa33puKYJEkMbqbJMLS8PNF2cWEvYkIDNWbtqEMdULI8zTRVV2T60b0pIkJSkeG UwXakv9/b66LwrUlAG/ERBpjrUK32pqK1ODyjmsjYbe/UbEedXufBeIR5JA/AJ0IO1a/ 1CNbMLutS0X6/hs80DmIGpr5ZgadMZTh3x4G+Wl21xiPTIzV6GjUX/+k0D6fkJ+T0f2t 28DjBIH5uScVsqqcg7NFBAiTSQdWrcGQkZYvRlTytRgvtJTHU+CIaAfkYoleGw71ts1V 57fS4+Fwm7j6/XfpBqYH340ngT7kToHvyhRRKUwry3+eTLtnwaU+xFbiCc4KACdu3IyV 2kdw== 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=LlQk6ncC8payQgiMOyKB8jXlWeLRdLG3WINON416hHk=; fh=I1BoAR+h7S6+N5oVQGrbzeJSPQAaebNHNMUQ6jDz8qQ=; b=Fp3aswN7WcZvxyeXbo4z/Ch1bQx74aO0zH/hZbU9bAK+QfCUKzi4gTtb3idKcAsT8S tuzK+GxhbvCdYduX/9P7sXmy9Rq5ibYqGjUvq+uAKEjLHTOddHAhvVbCpaFWl7OBD5Zc xXmtm2BbaVn9nBUtoyW3xkdSDm6/PFpO0eJ57IblWajk2UB07ff8BnlHChsJemXl2wGA 28U3f9wtvPKO52T9I+oqphttzKaBlnCVKMqVvUsQXEg14I3eL4BzPIYIuCHEdVeV5e8A vXbnK8IEJf7fVhuCGfWK8N77sLaNywhUtcio1hAhluTblf4VM4uT+7aUXvwdAxKYRWCA xPUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Oe2+dXCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id g12-20020aa79dcc000000b00691018e3f4dsi1229705pfq.201.2023.10.19.23.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:22:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Oe2+dXCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 5835881F3895; Thu, 19 Oct 2023 23:21:57 -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 S1376315AbjJTGVp (ORCPT + 99 others); Fri, 20 Oct 2023 02:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235646AbjJTGVX (ORCPT ); Fri, 20 Oct 2023 02:21:23 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52C9D66; Thu, 19 Oct 2023 23:21:16 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39K52wRM012498; Fri, 20 Oct 2023 06:20:42 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=LlQk6ncC8payQgiMOyKB8jXlWeLRdLG3WINON416hHk=; b=Oe2+dXCEJt/NWFeolk5wF0OfntDbkQNC1Wx7XlHQ4oYXM5l7iM9fI2mCkXHascuHA0v9 MkqHykVUu+jMqJPRMHgKxZDxL8YnNO1p/tCqtSSE9vqYA0RDyawC+0OC6DpHyW0QWIwZ og945VPbBc3F/ZI0JbSJlQuwuHgujn9MH7HqWV53Kq4aQ5viSqV9wkps5iGAtftUDsFO Q6qQy9O+9YN/OM4AnMer7FZ0249ksetNqQ6M6CSEj5uhAr/dwjsXkBJphp95Qao2kIZz CBn5KyzogwvZzgpw34DR8s/gbmelH+GnMKqw3y0Yi9Um79rM16EFpxo+IHLMfDSk1LMt +w== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tubxggub7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:42 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39K6Kfbw007956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:41 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:35 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan , Praveenkumar I Subject: [PATCH v5 8/9] cpufreq: qti: Introduce cpufreq for ipq95xx Date: Fri, 20 Oct 2023 11:49:38 +0530 Message-ID: <4c8c2c2684f3824742bc2c6db7d10fa504616a33.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: TxbS8vwUQ6XRGiEdo-025PkDeUFwJ_4t X-Proofpoint-ORIG-GUID: TxbS8vwUQ6XRGiEdo-025PkDeUFwJ_4t 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 malwarescore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310200053 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, 19 Oct 2023 23:21:57 -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. Reviewed-by: Dmitry Baryshkov Signed-off-by: Praveenkumar I Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v5: Merge IPQ95xx with APQ8096 case v2: Simplify bin selection by tweaking the order in dts --- 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 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 e7e6a6a..5827005 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -158,6 +158,11 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, case QCOM_ID_IPQ5312: case QCOM_ID_IPQ5302: case QCOM_ID_IPQ5300: + 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; case QCOM_ID_MSM8996SG: @@ -415,6 +420,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