Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp156552lqa; Fri, 26 Apr 2024 18:55:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtAPzK+h8WxGX/5TvtPNdPIeRhCpFT2aOYyhyNs7IxrDiEQdQ2VO7/GIs2+FcEkTugQtF/rxVnMu0ZFtkDwohLUj0WoICTevfC71J8vA== X-Google-Smtp-Source: AGHT+IFXprmnGoYOJfcKFfDpiK2uwVL5ErTulBds0hOqp8m5Jz9I9idqMK7RVC15KcwEvRWhQYvr X-Received: by 2002:a05:622a:2cf:b0:43a:15fd:869a with SMTP id a15-20020a05622a02cf00b0043a15fd869amr4972515qtx.22.1714182910293; Fri, 26 Apr 2024 18:55:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714182910; cv=pass; d=google.com; s=arc-20160816; b=oM1k1KH87fer7zwjW862HFv0m7KawKPgK3IUEQ+20k2g4LL9pOleJf/y8UvDUr6Hlq POZHywe4ytvwbG+oCpIMiyEOfT4XeCjoWhxpCU2VFac43X0mhyO9FLaKprkz/gzW1krf 6sh/lnBs21fQdeuWunfMZjV2b41Gt57A26xztUh24QrVgXidOWRRsFEryWNeHAqEvqKX Pa+LAYyxxRx3N5D7qzpzt8y78Az5/7+Muua4/GagobfenWvXT0aFj2dSDbklgaBvJEJ2 rTFBlo250e3HV/QbRxnDGxhv2sIb6pjsRLLEz7koySuk7HOhEG0AvhAlgUWizefjRgF0 H5/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=BgsIcopzHfkUgr/RderJeQnQv5QySCTk4RUuCp2kW/0=; fh=FDbu6HHvWmLN/xuS0ajO9hm8shWpYMUgRsYnBHewYXY=; b=qghNSThmwIzF7aXNiANxuoRnH8WuUQ5zTY6Jv6ELZS4qvvNBDNRBFLkMZmkzozF8ci RX+z31X/pDRF0RE0j24jpiYo76pQeRfUJEQovyJthn+CFEAQuyfaHbXVf8vBsdP+4+oq jafbkh4VsCAhkMLWxcJJImGOgb5Upam7sZQfoDkBHBjyzjquuk4A8PHx+OuBCJAIviCX Y7Ygrao0N60QiNZlKDG3YyhMp1oixARz+06nUWXdojpndWFyF+27TjxTZb2DQodR4BBs isf6KTkpvWOcLxLI/x/t4/9m4JGm4sF9TP8hyegPHBIDkuCz2eqbuSv7t9CMILxWVMPL JgsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jKuoIHht; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-160861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cm12-20020a05622a250c00b0043a1899c8e0si8743651qtb.339.2024.04.26.18.55.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 18:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jKuoIHht; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-160861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F13981C21F3E for ; Sat, 27 Apr 2024 01:55:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5FA83AC01; Sat, 27 Apr 2024 01:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jKuoIHht" 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 8C80C3F9D4; Sat, 27 Apr 2024 01:54:22 +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=1714182863; cv=none; b=LH7HOKNeXero5Uh3PzrTqn5xaoUxsBdel1dFcLBLB7R2zYHMQGIIBW/y/wrpFlFNblisA1cJAUb8KMjofIvuufH+PfnQLqZ3YbBFnWAjRg31RLFNzYbkvNgOfqsT30vqm0hKrW8JD0VuVLAeJImO3y004r5JWUos+V3dlfU3TVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714182863; c=relaxed/simple; bh=wVO/WTS2BpIMcr2Lhbp3edMXCnSTqOBuvM683JpAm9k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=d8x1sqG87Abztg1w/gmBArlv/C6BoqJalutNjYVA5LEuQpvZ6uA4YeW6yBPOLP/AQfBZ9beDAd7a/apiCQvxgJimGCSQx39cZO+S4Vji17+v0T3JBzDEGCHUqMNmj3HjmM9q7yIRR4f8ZcO6fWchWsZbYTZmgwVxwq2mhTUg18k= 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=jKuoIHht; 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 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43R1nogM019705; Sat, 27 Apr 2024 01:54:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=BgsIcopzHfkUgr/RderJeQnQv5QySCTk4RUuCp2kW/0 =; b=jKuoIHhtFBgakvsV1RG8sRnGvn2SZNSo9Wy28bY+kY4XnKx0z0cG/a/PGBb QIPFxyjdUfHoYSGJVRL0qQFT+h3TswmxPHMMZB49oH/Bt+KLCP7dVyxuqTanOLw5 eX016Ai2FtviVdNNpik8hwTbc9rz8bEEiickyaBg30e6jq6ARkJR2M7D9p+hzvc/ BfkCKCyDYBW4ZKVz00XMQMB771cwh+LVPLSKeDxXYMVz4pEf1MUBE2SKf28V6iET KSSTeX//V3VYO+d1+cFQFF4n4b39g/qksvHndja+kT/5JTxYBlTpixeohEBAtgjQ yQI+SQ7hagiw8OcnNL6FbKvcAAQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrfak8y3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 27 Apr 2024 01:54:11 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43R1sAee003525 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 27 Apr 2024 01:54:10 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 26 Apr 2024 18:54:04 -0700 From: Krishna chaitanya chundru Date: Sat, 27 Apr 2024 07:22:37 +0530 Subject: [PATCH v12 4/6] arm64: dts: qcom: sm8450: Add OPP table support to PCIe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20240427-opp_support-v12-4-f6beb0a1f2fc@quicinc.com> References: <20240427-opp_support-v12-0-f6beb0a1f2fc@quicinc.com> In-Reply-To: <20240427-opp_support-v12-0-f6beb0a1f2fc@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , , , CC: , , , , , , , , , , X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714182818; l=3219; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=wVO/WTS2BpIMcr2Lhbp3edMXCnSTqOBuvM683JpAm9k=; b=mTAhohGlJCoUHx+E390JEFagbVJssHC/YyGVYWGwkHHGPZePfV3sOE9Bep/MpkAiWkSFAc2L8 OcUiKETzu8QD2+r752ccdOL8qSMawuAawnkS/fgA8XtAQ0lyydRt/Gw X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: I0urSqgaDhlT3Un4qO5IVj8sP-37xopU X-Proofpoint-GUID: I0urSqgaDhlT3Un4qO5IVj8sP-37xopU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-26_22,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 mlxscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404270012 PCIe host controller driver needs to choose the appropriate performance state of RPMh power domain and interconnect bandwidth based on the PCIe data rate. Hence, add the OPP table support to specify RPMh performance states and interconnect peak bandwidth. It should be noted that the different link configurations may share the same aggregate bandwidth, e.g., a 2.5 GT/s x2 link and a 5.0 GT/s x1 link have the same bandwidth and share the same OPP entry. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Krishna chaitanya chundru --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 615296e13c43..2e047aba220b 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -1855,7 +1855,35 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; + operating-points-v2 = <&pcie0_opp_table>; + status = "disabled"; + + pcie0_opp_table: opp-table { + compatible = "operating-points-v2"; + + /* GEN 1 x1 */ + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + /* GEN 2 x1 */ + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + /* GEN 3 x1 */ + opp-8000000 { + opp-hz = /bits/ 64 <8000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <984500 1>; + }; + }; + }; pcie0_phy: phy@1c06000 { @@ -1982,7 +2010,56 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; + operating-points-v2 = <&pcie1_opp_table>; + status = "disabled"; + + pcie1_opp_table: opp-table { + compatible = "operating-points-v2"; + + /* GEN 1 x1 */ + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + /* GEN 1 x2 and GEN 2 x1 */ + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + /* GEN 2 x2 */ + opp-10000000 { + opp-hz = /bits/ 64 <10000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <1000000 1>; + }; + + /* GEN 3 x1 */ + opp-8000000 { + opp-hz = /bits/ 64 <8000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <984500 1>; + }; + + /* GEN 3 x2 and GEN 4 x1 */ + opp-16000000 { + opp-hz = /bits/ 64 <16000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <1969000 1>; + }; + + /* GEN 4 x2 */ + opp-32000000 { + opp-hz = /bits/ 64 <32000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <3938000 1>; + }; + }; + }; pcie1_phy: phy@1c0e000 { -- 2.42.0