Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp891481rbd; Fri, 23 Feb 2024 06:51:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUT2wPQ2owmuGEfyZn8IhNdt23tRCR8Mb0y62KK1xSohYpGfYQty3ESudo7KWWHuWC71dPau272vZrls4fnZ0cDkXGLKuazpRVtn6Kd4Q== X-Google-Smtp-Source: AGHT+IFmVJvmicjkyUuyXuSYgQPjXz6pAmqhk0Muudy+YsJfEMcH38GRexheVSPso18y5IiqNtL0 X-Received: by 2002:a17:906:4688:b0:a41:3c58:db2 with SMTP id a8-20020a170906468800b00a413c580db2mr31993ejr.0.1708699876242; Fri, 23 Feb 2024 06:51:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708699876; cv=pass; d=google.com; s=arc-20160816; b=n2pdwFrBjOvOA5Pl+1bZ5VEl+fcckpnlxxgBPWlJvMi9WcttqJ1AaN2SpqNvWDp5ge 2LKvZewvyOaTgmkoq4HoXD0lh95YExLWiXII2+aePg5tV3xkWk+FBiJUhNOy/U7xUNQ8 SyCBowrgr1kzUyqffNZaicwBbwImCV2S3ZeTD5bxhNcWyuLphSVautsYNhZpDDFFokrH cb/365Xzz1GA1sPlz4szZIKN1DlcbCwncXk1V0Ilnw06MNqWmplRMTW1ZtOJ2VyBypw0 qlulrcMbdqPRRqCTQLnS2v1loY+TFYdlWc795bV8uk8aaACTTq93Ncisjs+EMQPVzxtW SjFg== 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=MWJFlLU/eSswcHRepliMx7VnE186DBZvx1uc7BliI60=; fh=mLeyOiXXxJHJYs8dxImKbmNctx3gBpnhH0V2tKEUcOs=; b=DumRqzX/Dmy5dZU3Dmgw0Z7w0RgeJyuJ1m5iAHVQTNoZxGM1vOXUMcSRs7rpZy0HVM SKN7B/O8CsAmJ0LOCp58aXkzzv0/7pSvoxU1p5O6ERH/dwZZDk5XKkdaC3bfGF/OzfFp vu2eSH1lmo+emeJ+ZdhXrxU4nCFkrOUbInPOLbQnvN3/Nx0tWy6GQHY3P46Z2WlOg8wf ts4YajPeBxsfvZKEKxIomlm2qvdBqLkmXVzw45l2m7rNJky0ljGbxSO65YzQWKhE964U Lq7/rB36MhwfILrVAnvFBCTw5HnKsv2Hsx7mklvXQMBJ8UmA7bLMIOVMf1DFlZi11HD5 hLQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Mv3QhKHA; 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-78536-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j7-20020a170906430700b00a3d82f3a286si6476408ejm.567.2024.02.23.06.51.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:51:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78536-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Mv3QhKHA; 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-78536-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78536-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CDD6E1F24DD2 for ; Fri, 23 Feb 2024 14:51:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CFC285C43; Fri, 23 Feb 2024 14:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Mv3QhKHA" 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 E3CFE5C60F; Fri, 23 Feb 2024 14:49:02 +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=1708699744; cv=none; b=kqpkzhHX03OfKXvfpKLUITs4oREneGVXnmb5c7tFsmZCAAy5dZbUJ3PG1Dc8BVSsgR04sZvQ7kw6M6RB1ZG/YrjTFZ+L2CiP5uIc/vh6s+uFQT+XcEsUkA78SEapKTFNxjiOxgJpHlh2kkLVjYvQnG4NjEcLnZ4xBfWTdPnr5PY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708699744; c=relaxed/simple; bh=QhBOenPCWU9RPOLZkMRagkZZgTUlqWbD929MpJwSVcQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=aLl/8GG9baHyZ4i/mbmk9huBmnreATftW3IWtG2toqhPnmjJ0EVqoBKsz09YdrT6up4ga47uCPvh+8jlX9O1PvT2eYcp6+op1zy6HNmTMMbQFUhNW7qxcypdWmpf2y86P7MSXa3AtOebRJMff/od+Y7MYT+V5W0Psf/Mwu2NLWA= 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=Mv3QhKHA; 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 41NDQYKO025841; Fri, 23 Feb 2024 14:48:54 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=MWJFlLU/eSswcHRepliMx7VnE186DBZvx1uc7BliI60 =; b=Mv3QhKHATZiIiLIGQK3kDxKaXs+MLVcWjnmuik+moDFYSvf63i/stEKoTE1 L4H6K3ndqTLU1stZsjT/r1QU5eCzj2fpQvuawSANsRx0LJF4XZ2t3b9rcUym/ET9 rPMrWbU1ojt5s9SKyelaXviuaR5fexxrjhbGmA32pJGTT4ouTMmBLW3Qn29VoG2K eioG9WRSjnwHFD9aebsmJo+RXdhDLQuwIj3lzNkKQyH2T0Hm9i+SvLeHgUBakrWy eMnnIfQDVCI7aFbLt3vPrUzJv8VGpOeHaeiGefT/4h0iG8pGg8VAfUwcVBvJH0Rg MnbaTxh012jqW5u/pSXrcgqHkJw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3weme3h9jr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 14:48:53 +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 41NEmq2E032533 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 14:48:52 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.1118.40; Fri, 23 Feb 2024 06:48:46 -0800 From: Krishna chaitanya chundru Date: Fri, 23 Feb 2024 20:18:02 +0530 Subject: [PATCH v7 5/7] 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: <20240223-opp_support-v7-5-10b4363d7e71@quicinc.com> References: <20240223-opp_support-v7-0-10b4363d7e71@quicinc.com> In-Reply-To: <20240223-opp_support-v7-0-10b4363d7e71@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , Rob Herring , Johan Hovold , Brian Masney , Georgi Djakov CC: , , , , , , , , , Krishna chaitanya chundru X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708699693; l=2796; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=QhBOenPCWU9RPOLZkMRagkZZgTUlqWbD929MpJwSVcQ=; b=tUsqIr/BxZrMRkGTy9lejAxdS9/J3ggwO1Ekisog/sh8A9UxvDuiPOAIRorQZr/frCAeg8fU+ xKt5vHaFnPiDEpxsnKaKaIWrJ33cAWeeSLyTHEM+TDETA4AgavbebiP 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-GUID: ADOTWF6JcMv6iQ-ov8aAcBYb5iLwk3UT X-Proofpoint-ORIG-GUID: ADOTWF6JcMv6iQ-ov8aAcBYb5iLwk3UT 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-02-22_15,2024-02-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 mlxlogscore=853 malwarescore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402230108 PCIe needs to choose the appropriate performance state of RPMH power domain and interconnect bandwidth based up on the PCIe gen speed. Add the OPP table support to specify RPMH performance states and interconnect peak bandwidth. Signed-off-by: Krishna chaitanya chundru --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 6b1d2e0d9d14..662f2129f20d 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -1827,7 +1827,32 @@ pcie0: pcie@1c00000 { 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"; + + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + opp-8000000 { + opp-hz = /bits/ 64 <8000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <984500 1>; + }; + }; + }; pcie0_phy: phy@1c06000 { @@ -1938,7 +1963,56 @@ pcie1: pcie@1c08000 { 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 1x1 */ + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + /* GEN 1x2 GEN 2x1 */ + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + /* GEN 2x2 */ + opp-10000000 { + opp-hz = /bits/ 64 <10000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <1000000 1>; + }; + + /* GEN 3x1 */ + opp-8000000 { + opp-hz = /bits/ 64 <8000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <984500 1>; + }; + + /* GEN 3x2 GEN 4x1 */ + opp-16000000 { + opp-hz = /bits/ 64 <16000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <1969000 1>; + }; + + /* GEN 4x2 */ + opp-32000000 { + opp-hz = /bits/ 64 <32000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <3938000 1>; + }; + }; + }; pcie1_phy: phy@1c0e000 { -- 2.42.0