Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp204096rdb; Thu, 19 Oct 2023 01:42:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjI72aTL/u1b939j2uiDbwQfngLtXVfm0L8kdq0u2NUZdRE9Q2O7C7haE90TlBHAetX5M/ X-Received: by 2002:a17:90a:53e1:b0:27c:f1ca:f8a6 with SMTP id y88-20020a17090a53e100b0027cf1caf8a6mr1373445pjh.30.1697704972762; Thu, 19 Oct 2023 01:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697704972; cv=none; d=google.com; s=arc-20160816; b=Ng8PupIUiFRS6zmBUulG/KNYcuJLDy2L39/4X0DVmqwYq34WkFtSXlJCqN3CMOnLFH QHI/EFc5Ee9zjvuwb4IZEwcGonBZ7mGC6KoI54kVWOy2KiKwlAA9K6HX8mhgwzSNNDKs X+07NRTNe9/CUKkzfAPi0pHaTh5FJcUo6JUdYtRa7/uvXe0YJhacsFVImWEIYploRNQL 9RU7QMBdsBwduuJ6Xvr7NZx+G8D2CkRA2DQ+bS8QRup7RaijxI+r38qSa6tIx8NpqjU+ TPwEEVoNn+hxO6/kNl7xeBxNcn84ueNOB3SdFGDTTM26d5ymJFbLet4VWtzXJpfzXzjQ K8uQ== 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=m0AmhCm0JSBrSdfidoMph5nAJXYnICf0M/MiA5Ja0yI=; fh=/PcbLsdifyktaw5PNVUHNeBf/uyMY7MMN8WFopaJ5z8=; b=UKe7bceywAruQiOXOOEaIjdY6eLusN8L5GtTrQbl7tZGqP61qMymUy338+OTqFFTjW JLmTHuPVxfsDGINojPmsKyAUuqVl5+8MxeE9nOGiRPXL3y03LgYrsnf6Glxn7FLxrdVi LxzVhjHnasQTecPuLotkhY6r+mRs9GCiqCGoD0whS4Xhj2dto8OzSUcMRf6/6tHUurIW P7BDViLCKCvX4a0FESfSNj8sON1QYXPiM7AvFzsnlGNXaXliBzU7CrpUBZrYto0AhTEa Hr6ejqVvrF8le+100/xKlsQ/U3Y2u7IZZgdJg189eM+V4SRWMHE5VBWkW3Xo1Gc5hJ6G 2yeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=j3x8eXfd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id lk10-20020a17090b33ca00b002639acf55c7si1842527pjb.7.2023.10.19.01.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=j3x8eXfd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 095D782DDAD3; Thu, 19 Oct 2023 01:42:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344979AbjJSIme (ORCPT + 99 others); Thu, 19 Oct 2023 04:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235268AbjJSImR (ORCPT ); Thu, 19 Oct 2023 04:42:17 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91291D52; Thu, 19 Oct 2023 01:42:04 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39J89PrW005581; Thu, 19 Oct 2023 08:41:39 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=m0AmhCm0JSBrSdfidoMph5nAJXYnICf0M/MiA5Ja0yI=; b=j3x8eXfdtfkwjJr3mM4h+UuSsZMHUp+NeOXIQyNfLQSB3tKI7UjKfCtA69XX2IsmYfnA uMC29S1L9wlegkJYD3OhD+Ow5c6bgGbI90bfZ0pihJ8u+lC/4tPhwoKSgPx/Hc/Ias6Y UA38+gF1VMbuLPz+PkzM4Mbs9afZwJokvRI5tzFD8sSAQdfcbCq9yyakE2RYZffG+xO1 spcwYopMByRYh1x8WikptJ/sJjmqtzqVYmRbjHTmeYRWq2VUSzdvsZdJTgeqwXs7/A2E VjwQU+cUQfEJ2tqSqP1PmI0LrtaAY3R+3TmfjeaBDO/Sux/SuhNecztD+mhelQAffWM7 jQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tt8xsb9h2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Oct 2023 08:41:39 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39J8fcAj006334 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Oct 2023 08:41:38 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; Thu, 19 Oct 2023 01:41:32 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v4 7/9] arm64: dts: qcom: ipq5332: populate the opp table based on the eFuse Date: Thu, 19 Oct 2023 14:10:41 +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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: krJ20BW2be3AA6ouDvT0VFjoniL_qs28 X-Proofpoint-ORIG-GUID: krJ20BW2be3AA6ouDvT0VFjoniL_qs28 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-19_06,2023-10-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 clxscore=1015 impostorscore=0 phishscore=0 adultscore=0 priorityscore=1501 mlxlogscore=961 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310190072 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 01:42:50 -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 0x7 1500000000 0 1 0x3 ------------------------------------------------ Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan --- v4: Change opp-supported-hw from 0xf to 0x7 in commit log and DT entry. 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..42e2e48 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 = <0x7>; + 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