Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1881212lqe; Tue, 9 Apr 2024 03:21:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVSge8YIC7guOPEA6JyL8WYImyWQg6OBkZl99v/G1GH/Cq3miP0z6qYLZ/eH6G1SPszjZz0L3VlQRSCPRiz8bH0bkDAIEvs2ZvrL0nyA== X-Google-Smtp-Source: AGHT+IG37H1qo72QWR9Zt1A+nb8LAa8B8FdqmkhTRYQImSlUG23NZdiRb3Ts35cRnKYhFrdmcZgh X-Received: by 2002:a05:6808:1486:b0:3c5:fe94:28e1 with SMTP id e6-20020a056808148600b003c5fe9428e1mr1685418oiw.58.1712658116671; Tue, 09 Apr 2024 03:21:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712658116; cv=pass; d=google.com; s=arc-20160816; b=NX5Vp14LuIU1NbQCBh4j+0yMkghxS1TzplqiX7PMKqR2M12WWA3zTKlASzX7T7lpnI DkbQfKZ4rbadzQoAbtKP5TNeJZ31J52FCaYmrUVlLrUMnLqMsilLcmsWK0jre66/RFhb nzGWfnt+Gn4vHR8vxiiKpD79BUy69e290a0fENqBcWj0B7mkJ5MHjO4Xzp00xog4b3Gi YXjnaPg2jbfoZp/u/pDbudlfylpBl/vhvLnQHmen3foX9oC3Gnpp3/jIrpkhkjUF4jUW OM/cYhEGo3BXlysKBOraKB1NcZhdtow0vve5daL+0NVAymSUPBC/SpxrzGCH1AqkhpBO /V6Q== 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=JXYjc+7LNB6PlcHPEpdjQ2BZ2YBrmlJcYbOjIA+Vhdg=; fh=FDbu6HHvWmLN/xuS0ajO9hm8shWpYMUgRsYnBHewYXY=; b=snSNCFqz8OhNcppivWJpbkyZ86Rv4hcTuTz3/RmAnCIydDDPPFbuAXsJj2V9ofwNml HoHE0ouULphkAKtUmmYzTsY1qc/SX/LBnhTiS+Sy6ZTbV5vq8ncsRiPNGa74tAgCzlhE 0AjmV/LVxbG/YXA5feC+KpDDHCfgh0quMQC4xMixuSscFEvfYYEuhKQWA1y+LOvRLQeX NjdgtphwiXCDYA2mMS1+Rzb36anM/E4nj1EsIQ2hlkLpiR3GB+jwqG0PLjAebEofV+xc RDsD4/X3a96M7Vn5Dv+qVbX6aiRDLjRJf2Er4Lk+rbL2Dq7ka7tGk2IBRn7WKhG6nFnv UMVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Dc/2OmoF"; 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-136662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136662-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 a6-20020a05620a16c600b0078d63e71e34si4555123qkn.522.2024.04.09.03.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:21:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136662-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="Dc/2OmoF"; 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-136662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136662-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 555F21C21BDE for ; Tue, 9 Apr 2024 10:21:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CF1185951; Tue, 9 Apr 2024 10:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Dc/2OmoF" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 89AA88593B; Tue, 9 Apr 2024 10:14:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657675; cv=none; b=pHI0CMjlA052z9j6QmspTJ/bJuiISqm53ev9qWSorZj+wPr0TfvCbLZ2i3jLV3nrhDko8MWQ+i8Q3/Q3mDHWiXvW8Bp7GLznr7Kk/0DKUG0E8oEvP2ii7vUglEWGJ5heM4QX3GKnFBrcvu54R2byeegQEZLIlNbWVycb3a6xRus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657675; c=relaxed/simple; bh=quBqk4ZSPz0FlL5a0iOeYJ8NmNEZAtsqWwFqLvmMzvY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=HXDHCR2f5xPgzKP9qnkYCMSNF8bsZ43O40gtZzNe3rObym86M60t7GzEBcnVtpYhlEsvJMJ5id07wtmwzeW/ErFoomRz4R9PIpYsp99Brb9CdPyoj+To81je0UHdGJIVjPPOrrzBVpuUeRGp7UtZYOKVqvAtzn+Lvnt+l2xOQPM= 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=Dc/2OmoF; arc=none smtp.client-ip=205.220.180.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 (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 439A1XJl008201; Tue, 9 Apr 2024 10:14:04 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=JXYjc+7LNB6PlcHPEpdjQ2BZ2YBrmlJcYbOjIA+Vhdg =; b=Dc/2OmoFMO8K6y6DZ4I8Om3JRTgqAGhHqlXqB7ctS/Fr2pADxafa4SsY3WE XNY8NH9brb0BBvkh0v4+wjtm5yXD6T4utm2AwJtwPt4gs55FV96Wn0M8YpgGOBw/ bn/FPToO1urHiFrbxnzrb5fIdIzjwbCV+7PuTIYfo4cYpBo961SomryNfOxIUEso paLGTO07U6GKL7XvpG+I30474/DQevNN+Dwcg38+vMXkQditM9AhjWPTmv38vf+K defvzkoifaqUcEoZcaAYwuUYstKb3nX65yej1wKcirNG3GxE8nxZk0sEPwP4X+KP 5qXMeAepu1trB7QtkqHBTlTJrfw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xd3bsg1bc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Apr 2024 10:14:04 +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 439AE2T3026981 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Apr 2024 10:14:02 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.4; Tue, 9 Apr 2024 03:13:55 -0700 From: Krishna chaitanya chundru Date: Tue, 9 Apr 2024 15:43:22 +0530 Subject: [PATCH v10 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: <20240409-opp_support-v10-4-1956e6be343f@quicinc.com> References: <20240409-opp_support-v10-0-1956e6be343f@quicinc.com> In-Reply-To: <20240409-opp_support-v10-0-1956e6be343f@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=1712657608; l=3084; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=quBqk4ZSPz0FlL5a0iOeYJ8NmNEZAtsqWwFqLvmMzvY=; b=lBNEanD8Y+bBSfjy5A/JsH89qVM1T4FpZRqY6Sh6uX0Y8e/4xH3t+mOLBFTRZ1HFD1eCKK5ye 8uL10Ihghk4AY6SQOQWphxqiH9flTLiveJLGED/NVbDadpYZNzM19Tb 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-GUID: VmIvBdeiu8JgtMtHA6Uq9lO0uOyh64KN X-Proofpoint-ORIG-GUID: VmIvBdeiu8JgtMtHA6Uq9lO0uOyh64KN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-09_06,2024-04-05_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404090065 PCIe needs to choose the appropriate performance state of RPMh power domain and interconnect bandwidth based up on the PCIe data rate. Add the OPP table support to specify RPMh performance states and interconnect peak bandwidth. 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. 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..9dfe16012726 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 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 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