Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2422182lqt; Mon, 22 Apr 2024 10:09:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJVJ4xI7iqPJjO+bRuLZS0eyrCtTVVNcpgFuHR3apICVQvivdwGLiLczW3+UA9B0ydUej/y6YkDXv5pKHhqc4N+RQgOSRT2y52eu+T5g== X-Google-Smtp-Source: AGHT+IGb6Angx7DfKTEkwfQkXc4hXQvZUMahhhD3REol6BNzb5o9FHqbVmA/jNQDEqJnbnAyFiyI X-Received: by 2002:a05:6a21:279d:b0:1ad:3d92:fdcc with SMTP id rn29-20020a056a21279d00b001ad3d92fdccmr1710424pzb.33.1713805784475; Mon, 22 Apr 2024 10:09:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713805784; cv=pass; d=google.com; s=arc-20160816; b=M05kzder9ZN9xojnhyOKER/+IGU8kmDISPCyYDFC3ld41gkiidQht7C1Rbm5fAITKz RN0n3POcphWMb8qXiuBp0aVkZncOfvuugcQvvdb3VPWPzryeJG785/GDPgOH0Dx9zYt4 GKUmN30IqKsaGaDIklzldgMlf+zhRhmRvkf93lvBepZ3A/M2IWa+UzXPygpN0dX8oT5o QeUc4gkPAi7s00f62FQcTvYq34JEJxN0ki6znq+Qh8yWMSBFGLp1BjhV9FwCKIiYzDDY lkWA+GHYNBWbKfbOLtbW70L5Ub6fFrt9Cp3VTpTcZ35gfwrWRh2LNv8456V8jTKl4/eQ ndQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tnaV6AFnoQnhk0/PR5CgdcJAAlgwKr9V9n0fxXRFi/s=; fh=JLtDjhfj4weIF7c9GI4AoCyO5Dro7WT6c0QH9KnuUlM=; b=X/n79B2Nx55fU0I6MsSUkwc04j3np86jHjiOaeq/7BmzNsl3Bm91bXXYFUSSm9THV9 sRKzvkHF1R+abFaRQrzwx4hfUxhmR1LLmHwYyB+jnbIArxwCUMS3aIdW4mRsepJXQuRZ Idbh+nofgYzuXymhS4bFlpbzXgH0ai7/l7WVivE+GUxDApOaRVoXqSuUD7FD6fpexw47 Z/xz00G0bQXG/DC1B6uuC5KhBVRjbwlkPD2KjU5bU+pvis68h3tSikuIwHUZgGGrWseR hVWO8OER5md7oIIkvtcBhz3quyPfLwKVPt0m2emy9BNbuQizy9RbsF7P1fDKcIUT5fpB OYbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CQwGaxlI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gb5-20020a17090b060500b002a6b7cc391dsi9909049pjb.165.2024.04.22.10.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CQwGaxlI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153787-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 173C4282C82 for ; Mon, 22 Apr 2024 17:09:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3961153BDB; Mon, 22 Apr 2024 17:09:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CQwGaxlI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D4826153839; Mon, 22 Apr 2024 17:09:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805745; cv=none; b=A8cUfX9vzxxnCmw1vk/u3CfIqgujtkf/dg5SM48bZQn5aRqVUT+0vg1vmML1vjj5xkI1HwoomWWOYthmVLb4Z8yMICYjVM4kuqxKA9rREj3cnBg/JkjJ1U5pCtWCY0K07AfsHsCOVPN3E5u9VFiLQDrVY1Ced6U4KznIK43SyKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805745; c=relaxed/simple; bh=+gIC4KdUtfmTwuaNPgYrW2N0OiI+7zGr44ir/9OqFhQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lqrYkJTFDXFC0Wx2doZ3jnzvfYPOgTkcOc4jFWxv0pn5gNIlpCD8TIG/zt1dJnv/hGFBOGozz1H/oisBH8tsn5wltjK8nigChts6QJ1uzFIekZFlxhZIBw7diUfSo1xV/oCTfzT/qkOwmQ7wyWqg9DWddlDySspuCDkDHRpHaHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CQwGaxlI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DC6AC113CC; Mon, 22 Apr 2024 17:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713805744; bh=+gIC4KdUtfmTwuaNPgYrW2N0OiI+7zGr44ir/9OqFhQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CQwGaxlIPaHJP73+DrBusG65P+8fNgSoFXCy+lJLRAF4UYA0NXuAnRrSMPEtjOJ6A wVi3FL3AKf0brAjJ8AsMq0WeASveHhJM2NPjtooKhiJnvhxZITiX5nGGDwM/rkZ5+Q xM3E5R+l3tOpkSVi3Z8plKVzk6qWqJLy0zrimEFmEU5E+tCLUuoiI3IkTLt9AaG1E5 WAXd6vbd+M86WAUGiRxMJZqw1IINNveEqEsYAyqMMGJkTaISiVhYzqI3FREegk4xEw xELTbLPxLSzFJkLZ2xokPXafDMYfPrXRtz/oDuS3vHLdeu9BgxilBpWDU+B1fkZyIk 25BVKD69v4B7A== Date: Mon, 22 Apr 2024 22:38:47 +0530 From: Manivannan Sadhasivam To: Krishna Chaitanya Chundru Cc: Manivannan Sadhasivam , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , johan+linaro@kernel.org, bmasney@redhat.com, djakov@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, vireshk@kernel.org, quic_vbadigan@quicinc.com, quic_skananth@quicinc.com, quic_nitegupt@quicinc.com, quic_parass@quicinc.com, krzysztof.kozlowski@linaro.org Subject: Re: [PATCH v10 4/6] arm64: dts: qcom: sm8450: Add OPP table support to PCIe Message-ID: <20240422170847.GI9775@thinkpad> References: <20240409-opp_support-v10-0-1956e6be343f@quicinc.com> <20240409-opp_support-v10-4-1956e6be343f@quicinc.com> <20240422144431.GE9775@thinkpad> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Apr 22, 2024 at 10:25:06PM +0530, Krishna Chaitanya Chundru wrote: > > > 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) > Sorry, that's my bad. I missed the fact that the spec doubled the data rate starting from GEN 3 only. - Mani -- மணிவண்ணன் சதாசிவம்