Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp820085rdb; Thu, 19 Oct 2023 23:21:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFexertPMHzTEMrL8i9Kf/aIViuHHCRER9SPH5zJuqNAA034rX3JuQxqxC7buBXY4CXtMt7 X-Received: by 2002:a17:90a:7066:b0:27d:2ecd:6a23 with SMTP id f93-20020a17090a706600b0027d2ecd6a23mr931126pjk.14.1697782894372; Thu, 19 Oct 2023 23:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697782894; cv=none; d=google.com; s=arc-20160816; b=wzQaynKygKws7dmD4HwhQtnYXTyB5feNoamQ3YSUeNzdTNMsf2P2jI8GP46PgvNQ9o q9JrUkPSHGQzcggvcWAP+WzKVRTJ+P0LInTlLMkjkArLPY9LQxPf2LL+gCfIHmKJciwg i083Z5JV1deUQRfBN0dhDdExarAHBaBNz8tihBmN/zIGl2vD8F23W1kNRbq8uTwUqbNB k+mjIhtHGjHT1M9I5vFZOX5rasB8jaMeOebSwP138jsWqB8iahsx/EFnM15vMCnGuU0f aKliYc5ll3yRr99AizevYf62iaK5oyQshkltnqINl7hGWANZK96JFGD3BZl5HZODvBkW piJA== 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=JIk2gX/el4YSdpH3SijmN7XQ28M3iMt/ElM1C5zqP/E=; fh=/PcbLsdifyktaw5PNVUHNeBf/uyMY7MMN8WFopaJ5z8=; b=VvDKNpyosqvPJD/DyNqpktWpL7QLk3WzXaydYqnxgLo6CH1nbexVYtgHflAzUwZHvV mUhtz81gGkpdxB90T5mmvXCgnNN5upWm2/VIsUQieloswqsEODm0vTaZcVJxXVJ/ere8 w64jyLH6s9yCd42iCsJNy7rDvlRjvABc0RmZpnWsWPyF51tzk617jseIEr/EyLUFft3m hArwTtXZmy8Gq7ES1Sm6kycf8EmrUJCrlduHACm7rqvSexODLOr/OkgQz+VrMsFeH2d7 PO+b0Dm9opNV0fMIS23Kd+IIjcypGd3Qt0Z2T2E15ZUhVnBzC3wkAG+7jUYqRN085q6G Zl2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jiDPM9Ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id oo11-20020a17090b1c8b00b00273f1cd73b2si1372288pjb.75.2023.10.19.23.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:21:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jiDPM9Ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 2E16082B1C42; Thu, 19 Oct 2023 23:21:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376339AbjJTGV0 (ORCPT + 99 others); Fri, 20 Oct 2023 02:21:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346970AbjJTGVT (ORCPT ); Fri, 20 Oct 2023 02:21:19 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6663110E0; Thu, 19 Oct 2023 23:21:13 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39K58MW5002385; Fri, 20 Oct 2023 06:20:48 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=JIk2gX/el4YSdpH3SijmN7XQ28M3iMt/ElM1C5zqP/E=; b=jiDPM9JucQT1DkXP4iMGrEhh656iEs0ibXAUK+j/R2QyawntuhV6YYceqHkHzj6gsK20 5ldoQfoMEwz31B5POtLzPxJUekKEyKalgKvMr7C0Epc0lVHg33Msr8hWzAjko3RNPxiQ 1wKUaBbSwpkj4d/rMCIKA7b93Q/+vl2X/0m8ODw7AVLzh70H/tjCAcoGGH2h9YNSGeC4 gK+OIrKBa5RPKiDD7xT7+9t2Emq0DtXRUqveRZaLVyR/ept9lhAqY7lpdA6SjkQM9Oa+ 0pRdmKCAfeLZStF52KToOakWb1V01vgytuTuloEALJij5jIXQUai6fGrfE5vvW6wmPY5 Kw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tubwmgwa8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:47 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39K6KlWx028887 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 06:20:47 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:41 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v5 9/9] arm64: dts: qcom: ipq9574: populate the opp table based on the eFuse Date: Fri, 20 Oct 2023 11:49:39 +0530 Message-ID: <14ab08b7cfd904433ca6065fac798d4f221c9d95.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-ORIG-GUID: xNbPQKZ-3vaSOkqbbVmimm7LtiBOybVT X-Proofpoint-GUID: xNbPQKZ-3vaSOkqbbVmimm7LtiBOybVT 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 phishscore=0 mlxlogscore=972 clxscore=1015 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxscore=0 priorityscore=1501 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310200053 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 23:21:33 -0700 (PDT) IPQ95xx SoCs have different OPPs available for the CPU based on SoC variant. This can be determined from an eFuse register present in the silicon. Add support to read the eFuse and populate the OPPs based on it. Frequency 1.2GHz 1.8GHz 1.5GHz No opp-supported-hw Limit ------------------------------------------------------------ 936000000 1 1 1 1 0xf 1104000000 1 1 1 1 0xf 1200000000 1 1 1 1 0xf 1416000000 0 1 1 1 0x7 1488000000 0 1 1 1 0x7 1800000000 0 1 0 1 0x5 2208000000 0 0 0 1 0x1 ----------------------------------------------------------- Reviewed-by: Konrad Dybcio Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v2: cpu_speed_bin -> cpu-speed-bin in node name Move comment to commit log --- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index cc84f25..5f83ee4 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -106,42 +106,56 @@ }; cpu_opp_table: opp-table-cpu { - compatible = "operating-points-v2"; + compatible = "operating-points-v2-kryo-cpu"; opp-shared; + nvmem-cells = <&cpu_speed_bin>; opp-936000000 { opp-hz = /bits/ 64 <936000000>; opp-microvolt = <725000>; + opp-supported-hw = <0xf>; clock-latency-ns = <200000>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; opp-microvolt = <787500>; + opp-supported-hw = <0xf>; + clock-latency-ns = <200000>; + }; + + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <862500>; + opp-supported-hw = <0xf>; clock-latency-ns = <200000>; }; opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <862500>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1488000000 { opp-hz = /bits/ 64 <1488000000>; opp-microvolt = <925000>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <987500>; + opp-supported-hw = <0x5>; clock-latency-ns = <200000>; }; opp-2208000000 { opp-hz = /bits/ 64 <2208000000>; opp-microvolt = <1062500>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; }; @@ -223,6 +237,11 @@ reg = <0x000a4000 0x5a1>; #address-cells = <1>; #size-cells = <1>; + + cpu_speed_bin: cpu-speed-bin@15 { + reg = <0x15 0x2>; + bits = <7 2>; + }; }; cryptobam: dma-controller@704000 { -- 2.7.4