Message ID | 20231214075637.176586-1-n-francis@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8382334dys; Wed, 13 Dec 2023 23:57:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWDHX5XuEu68f62gXUEcWFHV92wuDCrboUmh5zQ1BEaFhUJCyKtZl0IVI7HVXYdt/kEWYc X-Received: by 2002:a17:902:e5c5:b0:1d1:cd8b:8bc2 with SMTP id u5-20020a170902e5c500b001d1cd8b8bc2mr10673915plf.33.1702540623760; Wed, 13 Dec 2023 23:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702540623; cv=none; d=google.com; s=arc-20160816; b=zJW5gL53d8RKZjkdlANZnLiEDdsd0Q9cPlLmwtrDVtDwFp3bpWRKwcP5wdP1S9pV3s 6qjR4PFYExVCTBpNwhzo4vJrJvuIaDCeg6jtMZeI7ftY6F7Yk6Hm6KHNHBCDCaKI7q+A zOA0M/bG8L0l2X/mX5WIfshUM5tmJlhBZgnqjBGArJUCETd40hX2RD5JN3/VCr7/p6Ik RNODhp3t0W/NXZLmDwJYvCSJ39u1AvGT+EpJya/svibDlabHTDI++qODCFD+bIrRguKp 6s8/5FaayVkekUAWaNzk60ZV633YChxp0EbDtu6Rb1bQgB4LvR8r4+nHW6fMTtjTNx6P P+pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3lHhBGyswinmAFRMz+DLytZSA7pbdQyR25LCCNCUqkY=; fh=bdLXzcKUWFZqVcYUSNdj8CYHIkOpG0kEyeXl9Z/g0Wk=; b=h5p5//U6L31rQYmlxSv9bF8I7fVQspmpeS4rumHi6e1YONJ21NmO0tgon0mRnaDuGz 8j1H0KZBSPadCvF++Mh5L1jtNlynlLLMS0gzT0ic9jBwvGBMfHdLSHl/f6zobCBwotMd /ZTDd+q9Kxw7T2AGSwUJBpxNWILZslAAbW5to/q3k87mULbNchPbWi8m1W/BDYn6uR4h bbCCUmNS4U1n3F4ER4nGis3Y+4TKwAqr0bhfCe5A1/D1m0YBfr2xskcl4ZLOue4cjhi3 6+z4aoLaGH7krLEDtDNjEk1RxfuWzmU4Gd7uXqWWvbKBCytT/S4SQM1kKkYQ54x895pI Djgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Zigny+0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y4-20020a170902864400b001d076ffeecdsi1322582plt.198.2023.12.13.23.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:57:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Zigny+0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EEA1D80DB725; Wed, 13 Dec 2023 23:56:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234389AbjLNH4t (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 02:56:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbjLNH4r (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 02:56:47 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0322610F; Wed, 13 Dec 2023 23:56:52 -0800 (PST) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3BE7ugRs029444; Thu, 14 Dec 2023 01:56:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1702540602; bh=3lHhBGyswinmAFRMz+DLytZSA7pbdQyR25LCCNCUqkY=; h=From:To:CC:Subject:Date; b=Zigny+0Y03YdhLSJMVm8aYMkgizCfxgneY32eYMr22zaMKzGddXgLTQG8q6V1o/Y4 yCElyDJVbfWqJa/bPSjD+1YBSMAO1ZBSxpLfb+NxN502mcwdjd1asEsZbFqcm7pUOh Oh0JBVmu7EaxZbt2AmapLMkw3s8FdqnBh4/x7qsw= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3BE7ufai022171 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Dec 2023 01:56:41 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 14 Dec 2023 01:56:41 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 14 Dec 2023 01:56:41 -0600 Received: from a0497641-HP-Z2-Tower-G9-Workstation-Desktop-PC.dhcp.ti.com (a0497641-hp-z2-tower-g9-workstation-desktop-pc.dhcp.ti.com [172.24.227.36]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3BE7uc86027328; Thu, 14 Dec 2023 01:56:38 -0600 From: Neha Malcom Francis <n-francis@ti.com> To: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <vigneshr@ti.com>, <nm@ti.com> CC: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <a-nandan@ti.com>, <kristo@kernel.org>, <u-kumar1@ti.com>, <n-francis@ti.com> Subject: [PATCH] arm64: dts: ti: k3-j721e: Add support for DFS in J721E A72 Date: Thu, 14 Dec 2023 13:26:37 +0530 Message-ID: <20231214075637.176586-1-n-francis@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:56:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785243236876901096 X-GMAIL-MSGID: 1785243236876901096 |
Series |
arm64: dts: ti: k3-j721e: Add support for DFS in J721E A72
|
|
Commit Message
Neha Malcom Francis
Dec. 14, 2023, 7:56 a.m. UTC
Add 2G, 1.5G, 1G, 750M, 500M and 250M as the supported frequencies for
A72. This enables support for Dynamic Frequency Scaling (DFS).
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
---
Boot logs:
https://gist.github.com/nehamalcom/e3c3d0446f0467e7fd28706f7ffaeea8
J721E SoC has three different speed grade devices (see [1], 7.5
Operating Performance Points) which as of today are indiscernible in
software, users of a different speed grade device must manually change
the DTS to ensure their maximum speed frequency is supported.
[1] https://www.ti.com/lit/gpn/tda4vm
arch/arm64/boot/dts/ti/k3-j721e.dtsi | 35 ++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Comments
On 13:26-20231214, Neha Malcom Francis wrote: > Add 2G, 1.5G, 1G, 750M, 500M and 250M as the supported frequencies for > A72. This enables support for Dynamic Frequency Scaling (DFS). > Just curious, since I picked up the PMIC support... can we do dvfs? if not, please indicate that in the commit message. > Signed-off-by: Neha Malcom Francis <n-francis@ti.com> > --- > Boot logs: > https://gist.github.com/nehamalcom/e3c3d0446f0467e7fd28706f7ffaeea8 > > J721E SoC has three different speed grade devices (see [1], 7.5 > Operating Performance Points) which as of today are indiscernible in > software, users of a different speed grade device must manually change > the DTS to ensure their maximum speed frequency is supported. > > [1] https://www.ti.com/lit/gpn/tda4vm This is critical info in the commit message and in documentation of source. I am also concerned if the table should be separated out as a dtsi and included at board.dts level to prevent downstream users going crazy.. Are you absolutely sure this has no detection logic that can be implemented? Almost all TI K3 SoCs seem to have a standard scheme to detect the speed grades till date. /me wonders what the heck happened here.. > > arch/arm64/boot/dts/ti/k3-j721e.dtsi | 35 ++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi > index a200810df54a..fe92879f5812 100644 > --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi > @@ -48,6 +48,9 @@ cpu0: cpu@0 { > d-cache-line-size = <64>; > d-cache-sets = <256>; > next-level-cache = <&L2_0>; > + clocks = <&k3_clks 202 2>; > + clock-names = "cpu"; > + operating-points-v2 = <&cpu0_opp_table>; > }; > > cpu1: cpu@1 { > @@ -62,9 +65,41 @@ cpu1: cpu@1 { > d-cache-line-size = <64>; > d-cache-sets = <256>; > next-level-cache = <&L2_0>; > + clocks = <&k3_clks 203 0>; > + clock-names = "cpu"; > + operating-points-v2 = <&cpu0_opp_table>; > }; > }; > > + cpu0_opp_table: opp-table { > + compatible = "operating-points-v2"; Don't you need opp-shared ? > + > + opp6-2000000000 { > + opp-hz = /bits/ 64 <2000000000>; > + }; > + > + opp5-1500000000 { > + opp-hz = /bits/ 64 <1500000000>; > + }; > + > + opp4-1000000000 { > + opp-hz = /bits/ 64 <1000000000>; > + }; > + > + opp3-750000000 { > + opp-hz = /bits/ 64 <750000000>; > + }; > + > + opp2-500000000 { > + opp-hz = /bits/ 64 <500000000>; > + }; > + > + opp1-250000000 { > + opp-hz = /bits/ 64 <250000000>; Could you add clock-latency-ns ? > + }; > + > + }; > + > L2_0: l2-cache0 { > compatible = "cache"; > cache-level = <2>; > -- > 2.34.1 >
Hi Nishanth On 14/12/23 18:21, Nishanth Menon wrote: > On 13:26-20231214, Neha Malcom Francis wrote: >> Add 2G, 1.5G, 1G, 750M, 500M and 250M as the supported frequencies for >> A72. This enables support for Dynamic Frequency Scaling (DFS). >> > > Just curious, since I picked up the PMIC support... can we do dvfs? if > not, please indicate that in the commit message. > DVFS is not supported on J7 devices, I'll mention that in v2. >> Signed-off-by: Neha Malcom Francis <n-francis@ti.com> >> --- >> Boot logs: >> https://gist.github.com/nehamalcom/e3c3d0446f0467e7fd28706f7ffaeea8 >> >> J721E SoC has three different speed grade devices (see [1], 7.5 >> Operating Performance Points) which as of today are indiscernible in >> software, users of a different speed grade device must manually change >> the DTS to ensure their maximum speed frequency is supported. >> >> [1] https://www.ti.com/lit/gpn/tda4vm > This is critical info in the commit message and in documentation of > source. > Will put that in the commit message. > I am also concerned if the table should be separated out as a dtsi and > included at board.dts level to prevent downstream users going crazy.. > Hm... could you elaborate on that more? I don't understand the reasoning of including this at a board level for a SoC problem. > Are you absolutely sure this has no detection logic that can be > implemented? Almost all TI K3 SoCs seem to have a standard scheme to > detect the speed grades till date. /me wonders what the heck happened > here.. > Going through the reference manual and data sheet I didn't find anything that could differentiate between speed grades, this was confirmed for J7200, I'll do the needful to confirm this for J721E as well before v2. >> >> arch/arm64/boot/dts/ti/k3-j721e.dtsi | 35 ++++++++++++++++++++++++++++ >> 1 file changed, 35 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> index a200810df54a..fe92879f5812 100644 >> --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> @@ -48,6 +48,9 @@ cpu0: cpu@0 { >> d-cache-line-size = <64>; >> d-cache-sets = <256>; >> next-level-cache = <&L2_0>; >> + clocks = <&k3_clks 202 2>; >> + clock-names = "cpu"; >> + operating-points-v2 = <&cpu0_opp_table>; >> }; >> >> cpu1: cpu@1 { >> @@ -62,9 +65,41 @@ cpu1: cpu@1 { >> d-cache-line-size = <64>; >> d-cache-sets = <256>; >> next-level-cache = <&L2_0>; >> + clocks = <&k3_clks 203 0>; >> + clock-names = "cpu"; >> + operating-points-v2 = <&cpu0_opp_table>; >> }; >> }; >> >> + cpu0_opp_table: opp-table { >> + compatible = "operating-points-v2"; > Don't you need opp-shared ? opp-shared would imply that the CPUs switch DFS states together... is that something we want? >> + >> + opp6-2000000000 { >> + opp-hz = /bits/ 64 <2000000000>; >> + }; >> + >> + opp5-1500000000 { >> + opp-hz = /bits/ 64 <1500000000>; >> + }; >> + >> + opp4-1000000000 { >> + opp-hz = /bits/ 64 <1000000000>; >> + }; >> + >> + opp3-750000000 { >> + opp-hz = /bits/ 64 <750000000>; >> + }; >> + >> + opp2-500000000 { >> + opp-hz = /bits/ 64 <500000000>; >> + }; >> + >> + opp1-250000000 { >> + opp-hz = /bits/ 64 <250000000>; > Could you add clock-latency-ns ? Will add in v2. >> + }; >> + >> + }; >> + >> L2_0: l2-cache0 { >> compatible = "cache"; >> cache-level = <2>; >> -- >> 2.34.1 >> > > Thanks for reviewing!
diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi index a200810df54a..fe92879f5812 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi @@ -48,6 +48,9 @@ cpu0: cpu@0 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&L2_0>; + clocks = <&k3_clks 202 2>; + clock-names = "cpu"; + operating-points-v2 = <&cpu0_opp_table>; }; cpu1: cpu@1 { @@ -62,9 +65,41 @@ cpu1: cpu@1 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&L2_0>; + clocks = <&k3_clks 203 0>; + clock-names = "cpu"; + operating-points-v2 = <&cpu0_opp_table>; }; }; + cpu0_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp6-2000000000 { + opp-hz = /bits/ 64 <2000000000>; + }; + + opp5-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + }; + + opp4-1000000000 { + opp-hz = /bits/ 64 <1000000000>; + }; + + opp3-750000000 { + opp-hz = /bits/ 64 <750000000>; + }; + + opp2-500000000 { + opp-hz = /bits/ 64 <500000000>; + }; + + opp1-250000000 { + opp-hz = /bits/ 64 <250000000>; + }; + + }; + L2_0: l2-cache0 { compatible = "cache"; cache-level = <2>;