Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2411607lqt; Mon, 22 Apr 2024 09:55:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIqIivNG0rCmuX1GlxKxAeYIU9Y1ygDy9nkwbaWbOR7mhMMG2qYCcBEmhFJpmecMqYl7xGiLZu2BSh1WTP2Db0ipSvMz5pEnHpuVH7oQ== X-Google-Smtp-Source: AGHT+IGIwoFH6B2XqRXB6cUT+Vv30+DoArlWBWoJDbBlZh2H2U00YNxX5Heu4O5lxIEfacGGG7Wo X-Received: by 2002:a05:6000:c07:b0:347:a3c:5a8 with SMTP id dn7-20020a0560000c0700b003470a3c05a8mr8103213wrb.25.1713804943217; Mon, 22 Apr 2024 09:55:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713804943; cv=pass; d=google.com; s=arc-20160816; b=cJsD0sFc1sj3xup9FeP41LiMlD+yDgogVD6Q3YBsFyNjSpoRv6bSmsDwTCWPtUw2zl DzkQ1T5XL1WxJmqwfYaKV7GVwx9CW7DYo22G7rZjJVwoErPXE6Tpf2q/swo62a5TYC8V kSvomuAyMMbU5Rc/BfsfLKrMo/mGD8dUh3hBgk1zMHOe5DZHduU06nLOwvV0ICtV2Hkf sSYOz8W0QG+mspTVZDjbYUV4NMgQmJ6r0a7Ui6bkCoeh41QMydvPfMK45+YPzjX+uW3+ 2wmHoAqkadH9CxPvrhwG5AT5/xYKqRWxkeCW5shu4x52WMCoymO+wdNep0lmSFbEsABx LOBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WqGboBVd32J2qAYOSSOnGKGRpD5bTQ7vE9elE/ZKkTA=; fh=9otEHVMncT/ULv3FdSE/0jfrRLh38+TTiNSTvo1XZD4=; b=xC6tXAkpwpzrJhbVsxZbobJDZbxAdi48CGlIYpptJWksDxqqIXAa3f1sTSTgad5BEb rwwGQTSKq4x5ryH56TQZqC+csaljjhCxDtKfmbWxrDxNiK7KOSuTxzYSYqAzCz3Q/6dh vQYd89EpXidwe7QJOtRSRnTidQqbDN1yr1GaHZhtzO6icP43qRRpj8zNnEd2EKsJgKyg dkeRbUh1ckVMtSQQ48F0+3j1FZCVGVdLrv46N7H5hQovrLM+FZekNKKIV/Fzmmd+rhT8 jAVHaxIu5SgI0TgdXt869B66B3cwSV5CuqfxVhzh5o81h6+cEGRuboZY5J3ridNicQ7t PR1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=m6dGXjxZ; 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-153758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153758-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u22-20020a170906c41600b00a5876506e54si58753ejz.809.2024.04.22.09.55.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=m6dGXjxZ; 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-153758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153758-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 C2E6A1F21A6C for ; Mon, 22 Apr 2024 16:55:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5BBB153BC1; Mon, 22 Apr 2024 16:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="m6dGXjxZ" 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 6F82B1DDE9; Mon, 22 Apr 2024 16:55:29 +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=1713804930; cv=none; b=gBQEJIpAgRMiCswZoKpeJGuxmygrifl9vI0eoXXpn61AdNNF5uuu/Idbv4rNO9yE6LKlsIp87tbgIvyYbqiQb7Kfkmy9J46gybu6/2jCoICNfTTg6hhB4YS1n7yH4L95a/AShLeqrm6+rXb7q2ZweCCTorcANf1/vLonMr8R2VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713804930; c=relaxed/simple; bh=2jZwFQHtiH7cm+Ga9AwJWMCkGznGng+DZ6vbx9U5YrY=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=tFUTMVvm/w6M1YC4jtbpSHFHGC76GPfW+AMUpwkft30LqnFxjLTmS8FxNkBhS25UK784BRgzEAUec5z1ZsDbKTUeKCBOGSwsIK1c2F/MWMgA6F3B0DRzXc3KL5jtfwkfTB3E2N6EaQr395DUKi2ZEv+xZoes/V9pHKBrPw8sVj0= 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=m6dGXjxZ; 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.18.1.2/8.18.1.2) with ESMTP id 43MBEDIZ005693; Mon, 22 Apr 2024 16:55:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=WqGboBVd32J2qAYOSSOnGKGRpD5bTQ7vE9elE/ZKkTA=; b=m6 dGXjxZbWqEl3GJWLoxB/fz5piKVqA/om+BPGJCQDj0Ysfm9cx8FrmJBHP3nJ+ae0 8P7C+cwA+OyQUYDr++QSAiSIdKks2mwx8FaOtIXfEK0XdQvSE6Iton0l7BhKbLjx Lepk8LiEj5En6SXaJReYKR3PA/5dUdCZpbC7e+LTxiNezu6riCtLCwdK1HrnnJ1f 3dQeD7Zi+bABkOz0oZamuwtcJ7zCfK7IuXLHcnK3TI5GvO3Zi1MZglvHmO++brox LXPqFTJB38QSFQEdoEsqN1CiWhDnG8izgHN1zK5Zl0SMpdonrSTSLSg2YpKFDEaR BcUNfYrP2Pt7fWT/ZU5w== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xnmuvh5s7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 16:55:19 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43MGtIjK022925 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 16:55:18 GMT Received: from [10.216.42.44] (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; Mon, 22 Apr 2024 09:55:10 -0700 Message-ID: Date: Mon, 22 Apr 2024 22:25:06 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v10 4/6] arm64: dts: qcom: sm8450: Add OPP table support to PCIe Content-Language: en-US To: Manivannan Sadhasivam CC: Bjorn Andersson , Konrad Dybcio , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Bjorn Helgaas , , , , , , , , , , , , , References: <20240409-opp_support-v10-0-1956e6be343f@quicinc.com> <20240409-opp_support-v10-4-1956e6be343f@quicinc.com> <20240422144431.GE9775@thinkpad> From: Krishna Chaitanya Chundru In-Reply-To: <20240422144431.GE9775@thinkpad> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: huHlSHyjlGnejDwA-RQTxRbv-uGRYwTh X-Proofpoint-ORIG-GUID: huHlSHyjlGnejDwA-RQTxRbv-uGRYwTh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-22_09,2024-04-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1011 priorityscore=1501 mlxscore=0 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404220071 On 4/22/2024 8:14 PM, Manivannan Sadhasivam wrote: > On Tue, Apr 09, 2024 at 03:43:22PM +0530, Krishna chaitanya chundru wrote: >> PCIe needs to choose the appropriate performance state of RPMh power > > 'PCIe host controller driver' > >> domain and interconnect bandwidth based up on the PCIe data rate. > > 'based on the PCIe data rate' > >> >> Add the OPP table support to specify RPMh performance states and > > 'Hence, add...' > >> interconnect peak bandwidth. >> >> Different link configurations may share the same aggregate bandwidth, > > 'It should be noted that the different...' > >> 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>; > > I doubt this value. See below... > >> + 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>; > > GEN 3 x1 frequency is lower than GEN 2 x2? This looks strange. Both should be of > same frequency. > Gen2 is 5GT/s where as GEN3 is 8GT/s. so the freq for 3 x1(8 x1 GT/s) is less than Gen2 x2(5 x2 GT/s) - Krishna Chaitanya. >> + required-opps = <&rpmhpd_opp_nom>; >> + opp-peak-kBps = <984500 1>; >> + }; >> + >> + /* GEN 3 x2 GEN 4 x1 */ > > 'GEN 3 x2 and GEN 4 x1' > > - Mani >