Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp685504lqe; Sat, 6 Apr 2024 21:39:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPZgaR2WIhfVLQhYUvrVSz5MB1mxSkR5kiPX+uWwN5U0K5YlOtkcJi1EFsXm78QqIK57rE0qVYLICAdmZl4Ez3NJox5PQ5zeDEjpIedw== X-Google-Smtp-Source: AGHT+IE8bLE2eVgjvCbE4cyQfo5AfkQNeGbYp4+TQ4D38fEGlIr/Uvt+TbHpRBpS60YvWxRRv+cn X-Received: by 2002:a05:6e02:219b:b0:368:a856:aa20 with SMTP id j27-20020a056e02219b00b00368a856aa20mr6350596ila.20.1712464799760; Sat, 06 Apr 2024 21:39:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712464799; cv=pass; d=google.com; s=arc-20160816; b=vIbkNCHLU9U9akuzugXHGcXy/+YMkaGWL8RbLq5ikSAt10NSevC+x2FAgwhFqFgegT fSbPwKmpzXVrLN98+JDkOqul/qG2Q/Jg5sUTyUuuY4FhkvSqSX0kRvqsjFoHlGi5P0dt AuQTCgDGqOXAel3QofksIIo+YNzvhYIajBN/z5rpCTyMNWPEoU3lgROjGoACBqV7L+jZ gnaTkvte73AZu7rfNFZjH+bOwpF0/+5MJOZ/GXYJUuI9aJ8OsiSpzEFW2Bc0I1/oJ0hD BdGzEyRMUwjLVzT9yEJ5Q8zTSyY0nVRHKLqw1itiNgIkpH9hKzZ6t6Lc5o1w4V+q04kr i6pg== 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=Q1bI00pqF38P/LgcTcCi6YImI9IKv63tqPTIQkkPB7g=; fh=FDbu6HHvWmLN/xuS0ajO9hm8shWpYMUgRsYnBHewYXY=; b=LNtJCzLRt0HsfRHnYJBEv75jeaJoESlOXKHMw6X1FPbhBtan7QhQwU4EzhxYVFwD4E /zoP2f6+mw8f5cNoGnyzZ+ul+C4Tk2MCCGTELv2jatUfw2al9JTUX2alzRQ3t7KDIGvZ lJWBe7viufHOXm7n2S7ahdczM25b7nRD9wFYwPYJfJpHT1MKglsbouesdm639Omr7QzU qmyUOAJjmEc9J9NYis2kONUqfy4PxZ0zuvDTl1HxPxRxsGA89d72waYPfDxrHm2XE2w4 ChrMr7MKKMRNc04JNe4+Z/Q4rENa1urBFgpV8WnS+VNqhWDHmLu5aeGaZxVULd+BCxXu kmDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mOlUeHuF; 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-134167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e7-20020a636907000000b005dc864bb6e6si4020901pgc.634.2024.04.06.21.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 21:39:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mOlUeHuF; 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-134167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134167-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5D4F6B2294F for ; Sun, 7 Apr 2024 04:39:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 525001C0DF2; Sun, 7 Apr 2024 04:38:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mOlUeHuF" 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 EA8C414F78; Sun, 7 Apr 2024 04:38:30 +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=1712464712; cv=none; b=ixter9z3brZzBq8d/r/hvoYdT5QdUKFbT0cLUL0fi1yFd+89KtO8SJ8YrvIYESzMZO00QeT+3ORUCh08kn1S+NRrcnfkbDG04kq7Ta5HNs316GCrwqQzVjkzTWrFHycx6NQeSy+v+hGwQ3Q/WetwXFr5RC2FaivWBWmTCKdhwaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712464712; c=relaxed/simple; bh=wErkEAdqYK2YpiBGoOn/1MZ4PZvhL/pY0JTuqSHh5qQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=Go+iJHni55FD6BYzdkE/LtAs6icDUS7V7U8hDooLSSlnu6Ho6iM/LDuOc+ITAinZDUoQa/KRfAhnJ8vu0IVhRmssBEKctBM5RttzDE6kWDg8CH/2P4QFSKLAE+PMLe1jqYL0op0sNbLxwKx0Hx8LuixPi96LJZdXykz3DWSvHOk= 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=mOlUeHuF; 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 (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4374USPS004423; Sun, 7 Apr 2024 04:38:23 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=Q1bI00pqF38P/LgcTcCi6YImI9IKv63tqPTIQkkPB7g =; b=mOlUeHuFFPsRNsswKl9CYIVG0aHYp7OqTNx1nxT/SfA+/TKuC8Bk6CGusjH aMbXDeEvF7RgW63Ih13QWmVz6kqmxPcGC/Y657r3yAXzdZquR19bw3fGfyMIhr1p omCSpSJYtE00ZMeBgKK4YWOVTBeG6lp740Dt2DaQb6RiDkz21jH5DMhfQ+ixqK7b AiuOP9jnuvky8vkrKmXv4bzuawnWv4BA+fuyjjvp0SrO5BvjQX/MXha0IW2Y38u3 F7LlDnv0ygacd2jKO8eufG4kc76L1XDlrp7pD7h+zOdav3x6T5qT//APdvTZOcjc hehmAmuPiYkeddovCjrLdgtwhTA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xayjys9sv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 07 Apr 2024 04:38:22 +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 4374cKGW018975 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 7 Apr 2024 04:38:20 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; Sat, 6 Apr 2024 21:38:14 -0700 From: Krishna chaitanya chundru Date: Sun, 7 Apr 2024 10:07:37 +0530 Subject: [PATCH v9 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: <20240407-opp_support-v9-4-496184dc45d7@quicinc.com> References: <20240407-opp_support-v9-0-496184dc45d7@quicinc.com> In-Reply-To: <20240407-opp_support-v9-0-496184dc45d7@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=1712464666; l=2896; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=wErkEAdqYK2YpiBGoOn/1MZ4PZvhL/pY0JTuqSHh5qQ=; b=V4nkGyk48hTJQYr0SAQTR19ytXuCMfq/raEI24PNNQrqyh7uiIUUYAd/xDj7RrlC22A5fy56F kw7wCzBLeO9BU84KXrzb7kewFAQzxd7nCH5Um4rmLDu49OKDZNYTWdi 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: zCao9UNz3yIjlvPOme-wi9MhI3qmaeW2 X-Proofpoint-GUID: zCao9UNz3yIjlvPOme-wi9MhI3qmaeW2 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-07_01,2024-04-05_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=920 clxscore=1015 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404070032 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 | 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..881e5339cfff 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 1x1 */ + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + /* GEN 2x1 */ + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + /* GEN 3x1 */ + 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 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