Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2218347lqo; Sun, 19 May 2024 20:34:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6JLdOtZFqCxoGdsw8Fcnjb/GrILTnkhARu7BiWU65CKa+Adyj9CDXpD/OW9B1/uj2oitHLksjzWs7IVsIMoUkuwh4/6ErRcBaXV9qEw== X-Google-Smtp-Source: AGHT+IHft64grZ1da+L5823sGeDditYrgyFzgpmEPLRqF4ZfM+s5MYmuOimDTBa2+ZihfsPsdXq1 X-Received: by 2002:a05:6a20:7348:b0:1af:baf9:feee with SMTP id adf61e73a8af0-1afde0fba34mr29723080637.26.1716176092446; Sun, 19 May 2024 20:34:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716176092; cv=pass; d=google.com; s=arc-20160816; b=CUs8G5pB/dFG192S9x+SrOf53QFVOc3kIronywu2knBr7LJZMafEfOrAjEk042Q+QO DXtx22Brp9DFsJlo/wTh7uwi//gNP3wj8uDK/PNCBRtj4sG3FeoNUzqfICSUNlxnWklV B+DxpvubokkWoF5UegJZbKCk9PEXM3hQuPTwYq/iOezPy38m6g5RQ91atajVZiQg5kp4 YegRWLltZRdIhhf2dAQRW330SvhehNJaCDI7/53SmE7OSqgGzrKMgoU8N88oFdXVk/+1 /Qs/HHqwtKV5YZOGxtGq779BbSY0bGIChmVwtMvQAU5vwWLyBKDDnp1HSWAmHMiFhl3q +ueA== 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=RHrnvRwUYdl0vgTV+AFW7AGRf7s70ZLB6HV3vObv3VRwlZIfp1yZ3WvTZ2emIDa6BY asnQ37DSv2XgQz9Nym7k+hs7BO9xV/Xk92ZmpCcxoF93XyQxd5yLupnxDDGbdNIwqTQ3 eoxXxEErbiGlp4goleoGk8fwLUcWb8vkrGk33IwmUGuEgVWmpKz9BYZbpr7VYXzw1FqL l0nI6xPpX2Y8Q6WMYmATJbgKxiws4U187SE+pk46rIzBzU0cvpl0/xI1mjbQgXCCcscH +M0NeU1i6KcPEgLZh77Fmt8GgrSLuD/lEQJhNrlw4Tr1F1K1mNZ/zG1rWTaZ0S7l2ySk 30gQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fi7ihtsU; 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-183390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bad6058si18879945ad.133.2024.05.19.20.34.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 20:34:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fi7ihtsU; 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-183390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183390-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E03D428299D for ; Mon, 20 May 2024 03:34:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B376A1CD31; Mon, 20 May 2024 03:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fi7ihtsU" 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 4B6641C6B5; Mon, 20 May 2024 03:33:38 +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=1716176019; cv=none; b=uSESwm26VQqEXjrGMAkb1QCQ9rPafye8fXMSSvR7kTSDmdrWRhGexEdHa45EFI4LFWi/Kcm4v0xywBgiluO1pQHF46bwVXw7/sYKn03WZXnYQM0nPZuTiQKdJeUoHPhfuQEoCgIxZpuAPtXWXUxDn575CiC8T8v/RdjlgkrRS9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716176019; c=relaxed/simple; bh=wVO/WTS2BpIMcr2Lhbp3edMXCnSTqOBuvM683JpAm9k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=L84FfV1r8Q7s9WvO6UJNyc9IzklhmCqWUYg6D0DpOmWQHcy2JvBflYfvvQR0e45rKtMBRXPrZ4p9+7OvQS6IdMvrWTjnNTmBURNdtYntBTFARoIsyMZD4DEMT8b8p7WHCKVczgUDGfTz7JjO8SSZuLkBbxB/5Y0gum5a2jprMTw= 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=fi7ihtsU; 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44JNgLsY005035; Mon, 20 May 2024 03:33:30 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=fi7ihtsUc+UYdSPltpfWN3/wmwPtQiOFds18joNEQ1bJ/NmVojUHpAlET86 eBEDNZEBJx3K07lvzAeUHbu09qUHkflZelPBgd6B36MJg7TO1QWh2WbnELcEiHO/ Jd/XvNzIkijiVXY3WSCTmq+AqUJyG0BAW6E5cUREOFdvGLKMiTanfTe3K0nP/Rsh IbZQjoFJEsed4sYBg7u/ACYhx6230AXnoVUDN42VA6dFim2MFWfQKoPRFHMsd35l 1tfgFR9pyA4ZgONTU10TeNBfSAgvAJxdGOF3bgcXrb45FwpkoibK3So/jPut5nQJ +UmGVOuG78oEhrFf38n5O2pLiWQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6pr2j889-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 May 2024 03:33:30 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44K3XTiF002416 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 May 2024 03:33:29 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; Sun, 19 May 2024 20:33:23 -0700 From: Krishna chaitanya chundru Date: Sat, 18 May 2024 19:01:45 +0530 Subject: [PATCH v13 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: <20240518-opp_support-v13-4-78c73edf50de@quicinc.com> References: <20240518-opp_support-v13-0-78c73edf50de@quicinc.com> In-Reply-To: <20240518-opp_support-v13-0-78c73edf50de@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=1716175976; l=3219; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=wVO/WTS2BpIMcr2Lhbp3edMXCnSTqOBuvM683JpAm9k=; b=DCZRgzAzr7iD9hIk8LHnHyA45LPAam3XQZQpt6yZxgL+flv3qoWYWMXc6WmAwJP9vftugvCrK +3IHFzztX5ED6M2RUrL+ALcWyXPEE7vTThUte819ESjWcv1gPZZiK0I X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: uqN57S7x-sDr9C8oGqBq3IqWNq7MlJaN X-Proofpoint-GUID: uqN57S7x-sDr9C8oGqBq3IqWNq7MlJaN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-20_02,2024-05-17_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=900 bulkscore=0 malwarescore=0 spamscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405200028 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