From nobody Sun Oct 5 14:33:08 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 494AB2571C5; Mon, 4 Aug 2025 11:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754306485; cv=none; b=Da6HW5SfPyU1UQN7CxHf4JPzWa0VlaE5CGjbW/VSMDxa9NQECUsiy0AUe1WQAaf6ROhCIEf4hskBf/0385TcpverUinZmkwmmWCjGIolhp+Ytd2OEUtEB2QgMvSIgURmg3yKfDKCCIGHmLJUAzFwOFRAG4lTRcpzboY4L+vzLA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754306485; c=relaxed/simple; bh=Ztfu/dcEq6pZJ+vtoSkR99aWDu6yBZOhG1pLPhH9wP8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QHPTboQo7m+K3wRE2J194HaRubqxdcX1uEWJTydGwvgjsgkk5RUY2F65n4p/FrGCFJI8E/wnCd8h9WU9FpQAwCCP+CiRXNIVJ4WvSs7SHWW+oL7qyhK0GsRO1R966zbKAB6XvgB24NV6204omijSF4QaellbmoHD05pR4mc8yHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=adyDURCU; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="adyDURCU" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5746rTJj017446; Mon, 4 Aug 2025 11:21:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= PcQP/LVOaUjn/ZGPYjDlE6qZirGI1tSVP9hECb/DR8g=; b=adyDURCUynIhIhC6 VuHKip88ulje71HLo5fhVEOaAY37OlPPVaJnW3bNELl697IcjfpCg8TXVdCXTgRp 9uXjkJ6Q4w6RBcqyEG/MRwZiBMeoeKKbB7LBfCKpW6QWZuSx0lsdPDwZ4VgIyQN0 3E8bpYFVjtRHXNo4s6SVfM9P6ni+3UfXypbAKvuPz2pQkgramV9Ai+gdZLc8yt8d pbsHOJXHLuozAtNDwakiKneYaap+OMQ0BASM0WFEYBzwC73uAPs1o7vKWd3zxRkY 5MYquPwsyPZt6WflpEJppqhEZmrl0pkn14U5fRBP/Ut4uK8Z/+VOM/A0N5d80/Cv F3FtFg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48aqyv0xv8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Aug 2025 11:21:19 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 574BLIoF024614 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Aug 2025 11:21:18 GMT Received: from hu-varada-blr.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.1748.10; Mon, 4 Aug 2025 04:21:13 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Md Sadre Alam , Sricharan Ramabadhran , Konrad Dybcio Subject: [PATCH v5 3/4] cpufreq: qcom-nvmem: Enable cpufreq for ipq5424 Date: Mon, 4 Aug 2025 16:50:40 +0530 Message-ID: <20250804112041.845135-4-quic_varada@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250804112041.845135-1-quic_varada@quicinc.com> References: <20250804112041.845135-1-quic_varada@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: WQduxM9R1JX_93fYISf3bF6ibSs8xO2G X-Authority-Analysis: v=2.4 cv=F/xXdrhN c=1 sm=1 tr=0 ts=689097af cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=XqKM0RL5GMr1h_B9R8QA:9 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: WQduxM9R1JX_93fYISf3bF6ibSs8xO2G X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA0MDA2MiBTYWx0ZWRfX/PhDSIiQHlCQ 2BlJfdLqRAKYIbZRwS7S322HoTRYEdoLGlYRSKJSzFxHFSk4CC4TXUmfFGGls1cgYakxR1pgZ/w 18o9VYXnvKeRbSKZYv90vsVW6L/3iA3jLV7NcrAPEXBLdHJMZJyuzPclmTy31jUiZ2qY2PT4iU6 RVRUi9uqf4OIsrNg4mc88nG2uDJXiGU68T/ux9hFMjPajKmCJvEFYnhCueXPFh09ABCVKn6G9pg 6T4LAaxhOybxFfZMq74+GAA8Wx0oB9ZrLJFZOQ7S2RBuP314OaTew+T6aAViJFjDfL8tT5OQ56o a+MXol99PMyIx/Zc1UEpkpBDP8ZYIZw/9yiMRvyY6rVJU04x7HxHwnqaXQbQWE7VuHs3fCvGxbR 4VnAngVC7vzCzm+jUt3uZLTv0RXJ06OILa6YIlGgoCMoEttre/TWW/idrXA/R9D8mJV5/oxY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-04_05,2025-08-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 mlxscore=0 phishscore=0 bulkscore=0 adultscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2508040062 Content-Type: text/plain; charset="utf-8" From: Md Sadre Alam IPQ5424 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 ipq5424 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. Signed-off-by: Md Sadre Alam Signed-off-by: Sricharan Ramabadhran Acked-by: Viresh Kumar Reviewed-by: Konrad Dybcio [ Changed '!=3D' based check to '=3D=3D' based check ] Signed-off-by: Varadarajan Narayanan --- v5: Add 'Acked-by: Viresh Kumar' --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/qcom-cpufreq-nvmem.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq= -dt-platdev.c index 015dd393eaba..de1769649368 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -191,6 +191,7 @@ static const struct of_device_id blocklist[] __initcons= t =3D { { .compatible =3D "ti,am62p5", }, =20 { .compatible =3D "qcom,ipq5332", }, + { .compatible =3D "qcom,ipq5424", }, { .compatible =3D "qcom,ipq6018", }, { .compatible =3D "qcom,ipq8064", }, { .compatible =3D "qcom,ipq8074", }, diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cp= ufreq-nvmem.c index 54f8117103c8..765a5bb81829 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -200,6 +200,10 @@ static int qcom_cpufreq_kryo_name_version(struct devic= e *cpu_dev, case QCOM_ID_IPQ9574: drv->versions =3D 1 << (unsigned int)(*speedbin); break; + case QCOM_ID_IPQ5424: + case QCOM_ID_IPQ5404: + drv->versions =3D (*speedbin =3D=3D 0x3b) ? BIT(1) : BIT(0); + break; case QCOM_ID_MSM8996SG: case QCOM_ID_APQ8096SG: drv->versions =3D 1 << ((unsigned int)(*speedbin) + 4); @@ -591,6 +595,7 @@ static const struct of_device_id qcom_cpufreq_match_lis= t[] __initconst __maybe_u { .compatible =3D "qcom,msm8996", .data =3D &match_data_kryo }, { .compatible =3D "qcom,qcs404", .data =3D &match_data_qcs404 }, { .compatible =3D "qcom,ipq5332", .data =3D &match_data_kryo }, + { .compatible =3D "qcom,ipq5424", .data =3D &match_data_kryo }, { .compatible =3D "qcom,ipq6018", .data =3D &match_data_ipq6018 }, { .compatible =3D "qcom,ipq8064", .data =3D &match_data_ipq8064 }, { .compatible =3D "qcom,ipq8074", .data =3D &match_data_ipq8074 }, --=20 2.34.1