Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3671473rdg; Wed, 18 Oct 2023 02:33:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/rjqLzA2ahAql7g0RfA6+hwYjwENq4HziIeo/ummqNRndw030Q7acwpfIw2fv6NAPTtWQ X-Received: by 2002:a17:903:708:b0:1c7:733b:27c7 with SMTP id kk8-20020a170903070800b001c7733b27c7mr4296229plb.56.1697621604140; Wed, 18 Oct 2023 02:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697621604; cv=none; d=google.com; s=arc-20160816; b=v8jf6uU0/jkjTBNVMmqLV8aWL2lnSQwgYYohrdHgh9VCi5qYXdBM8QXBrzZc+6+gqq OGZBGUKBpkIV8k4LeMoCRY2g8k+ED8lpv6amr0l7yWEzV+6vBj9F56JRLk7JgkF3nU80 jF7h78oguXFSUKAm3hsbsqGOzLpJ3YH1Y9cgVj5zeWniRu1HpTqvyQVuoPJjoh2Gse6N mGPYWmH6jCn43FGvRnZd4pP6u3lJRoQgY5j+cjgmkmcJIsOTxdO/vEOdLWTpY00lEwFI okM4cK/527VeOMe++Hz+t58wWWm+F/az0Sx5EGc7uCGg7S23q3yDF3f8y4SGa17CZKGX ZAXw== 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=T/oG60Q9zeRn1XvdoFfQJ2ViE5hDmDaNlQSy1uGrojE=; fh=TexRbNhpseSDwji4zm0ZYE1dIqB1VQ9GLSRhn7EXsPo=; b=cU1q842v+PFjk+lMJVnmb5EDwYdJQxCOg2PR1yRZg9mwwFUwL8GniUwOrwqXPO5aQl NYpJkWYe/Fth5Kl8V4UZ4SwIzn980SCjNmPx7ksZ0sRsaXfmiqaXyxG45dIZNdy0Vfdv lFClkT3LSCLPKTpV839L5tYjIT+a2CUwr2DPduEEALNjoFRKQpJtinaFNj9XqPoYFPyA KhEy29vY9mxYmRzflV7/lYg5/NnsdYFojLxGtLadDVUDbUvOtelVw4PfssCs780s3wMw 7HxM5g3p9ZoAH3WPSh624x6wQkwm2amv2UkUe9TYKvOAYNF86uJR6oj6X6NJxJFQRJmR Euyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=KOwub9r2; 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 h14-20020a170902f54e00b001c62b659f98si3973744plf.79.2023.10.18.02.33.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:33:24 -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=KOwub9r2; 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 175D38026018; Wed, 18 Oct 2023 02:33:15 -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 S230001AbjJRJcn (ORCPT + 99 others); Wed, 18 Oct 2023 05:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbjJRJcY (ORCPT ); Wed, 18 Oct 2023 05:32:24 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCF2A1AD; Wed, 18 Oct 2023 02:31:24 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39I7dH60024520; Wed, 18 Oct 2023 09:31:21 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=T/oG60Q9zeRn1XvdoFfQJ2ViE5hDmDaNlQSy1uGrojE=; b=KOwub9r25lbfH4Ynjwlkksxz/5ZgywxBaTIblGbWlS/3G9Yi66R0TW3maDGRcj8ubyUN Xg91Sv9bX2zQgrxCMhbLKtn7PF9oEqTsIqu7cAcphvNMpcm6gqvuKJ9+ywsCJykQAFMM x6MAX9aVqytNiAJB+idx0n8CGZR188h/H+RvOHzj+6JuQGfhJJknvbnn3umI4hm8rEZX uKsW3QZZ31VoT6i6HPfmgHUWS91x6cW1lfakmYuBiEtwqMp8EQ+GkU+MEm6PbYBCimCS Gu2cXgvqSTjw14nNS4FGqP3VTZbIZ2uhrtxHXh6jmMVZBIv1j7p/b4z9JGe5BdomqGxN ag== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tt5v80rsk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 09:31:21 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39I9UuOm032409 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 09:30:57 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:51 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v3 6/8] arm64: dts: qcom: ipq5332: populate the opp table based on the eFuse Date: Wed, 18 Oct 2023 14:59:19 +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-GUID: k7mr5MDZvN8zAVhTdbIPfR8MbZe4O4VL X-Proofpoint-ORIG-GUID: k7mr5MDZvN8zAVhTdbIPfR8MbZe4O4VL 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 malwarescore=0 mlxlogscore=939 lowpriorityscore=0 phishscore=0 impostorscore=0 suspectscore=0 mlxscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 spamscore=0 adultscore=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 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]); Wed, 18 Oct 2023 02:33:16 -0700 (PDT) IPQ53xx 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. Add support to read the eFuse and populate the OPPs based on it. ------------------------------------------------ Frequency BIT2 BIT1 opp-supported-hw 1.1GHz 1.5GHz ------------------------------------------------ 1100000000 1 1 0xf 1500000000 0 1 0x3 ------------------------------------------------ Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v2: Fix inconsistencies in comment and move it to commit log as suggested Remove opp-microvolt entries as no regulator is managed by Linux cpu_speed_bin -> cpu-speed-bin in node name Remove "nvmem-cell-names" due to dtbs_check error --- arch/arm64/boot/dts/qcom/ipq5332.dtsi | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi index 4206f05..a0dcba3 100644 --- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi @@ -91,11 +91,19 @@ }; cpu_opp_table: opp-table-cpu { - compatible = "operating-points-v2"; + compatible = "operating-points-v2-kryo-cpu"; opp-shared; + nvmem-cells = <&cpu_speed_bin>; - opp-1488000000 { - opp-hz = /bits/ 64 <1488000000>; + opp-1100000000 { + opp-hz = /bits/ 64 <1100000000>; + opp-supported-hw = <0xF>; + clock-latency-ns = <200000>; + }; + + opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-supported-hw = <0x3>; clock-latency-ns = <200000>; }; }; @@ -163,6 +171,11 @@ reg = <0x000a4000 0x721>; #address-cells = <1>; #size-cells = <1>; + + cpu_speed_bin: cpu-speed-bin@1d { + reg = <0x1d 0x2>; + bits = <7 2>; + }; }; rng: rng@e3000 { -- 2.7.4