Message ID | 20240104111922.832040-1-n-francis@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5545689dyb; Thu, 4 Jan 2024 03:20:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzLakFIJjAzCH7pxLVbY7BFkNfl1kIC3dBmB94LzA7RRFxZ8mfkkxFAL+iXxSfAFrf194j X-Received: by 2002:a05:6358:5293:b0:175:3606:13c8 with SMTP id g19-20020a056358529300b00175360613c8mr340187rwa.54.1704367210036; Thu, 04 Jan 2024 03:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704367209; cv=none; d=google.com; s=arc-20160816; b=pg/bBy76CGRpH4yPVRteoeSoTu/DDNe9Jp0c3ZYG5sJl80Sfn2kqfAvjRC0JqA6HTx VukGdNiWepriIFvB9IPsjOixoWSv82XyWWpFqRkmgrJX/kWaQKisY6K1+7sOrzK7jl/w yeojiSl83+S8ANrXsNnTMVV2tZeX2KVHEOauXCkh47AbaahZ3PRc0emkhBqkOwOZY5t2 XgPnhbaaBSUk0OUTMErEfOr7fNvWOAEj4iGWR6cVfvBX7oS+ofm66y8ql/M19EVfm4QL jKRqTJ1o6OIkGMxZjZ8mXRFJ7hjS604KDabQqfLspdVVH5MCSdj6ggkai3VWg91rsBWw EuQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=gEI1DUvl7fwMGnh7BriCsJR03yIbeB6SbxVvjDA9xHg=; fh=bdLXzcKUWFZqVcYUSNdj8CYHIkOpG0kEyeXl9Z/g0Wk=; b=ukBI/wQ69dWU4Oi0I3+ZwFBdG9WiQPrp210WeGsIN/uPlhsCxm2Ll5TXCNi51vMYLG zlRcjl+z4SH4sV9DRDQgVLKu+8GR8rBMkQEOprPSiNTSAlNb/UnsKI5SQZuKC7soRl3H tT99t3KMAlhjNwnO+TrmGjUItwwGj622peRB56fNjFf+C7QO7huy6v9H2qF5MyT0ye14 l0TMgN98QdPHB/3nXOnFflAWa74kXnWe6r7Wn8Kq54HTEuuTafpJpyF0bke/i67mT2MY 2OgvU1lUShlks8rrHYs94XyruRz1YAcR0vfx5gZKTiLlW9v6XuLmPC1CsAnjvMXqiGF4 4jiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BCIiI5a9; spf=pass (google.com: domain of linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x4-20020a63db44000000b005c1b316d768si23130108pgi.664.2024.01.04.03.20.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 03:20:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BCIiI5a9; spf=pass (google.com: domain of linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16575-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D02182859C1 for <ouuuleilei@gmail.com>; Thu, 4 Jan 2024 11:19:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF5A42111A; Thu, 4 Jan 2024 11:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="BCIiI5a9" X-Original-To: linux-kernel@vger.kernel.org Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 23111210F3; Thu, 4 Jan 2024 11:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 404BJQfJ124161; Thu, 4 Jan 2024 05:19:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1704367166; bh=gEI1DUvl7fwMGnh7BriCsJR03yIbeB6SbxVvjDA9xHg=; h=From:To:CC:Subject:Date; b=BCIiI5a9PeRs0T+tkg67xaVWYXo85oT6EKzgsRzyOcJr+aOblB0QhLpEyANNkOLRV Ra0gpt21YLCm/FMycxD/NDXIKKrIJSaGhDriliaDketlmqnGL5z7AiYdaW5RKcHhLf 62VDJ30ArdkfeUuVCP6fcyWcpm3ImUNbQa+y8cac= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 404BJQtm117077 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Jan 2024 05:19:26 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 4 Jan 2024 05:19:26 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) 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, 4 Jan 2024 05:19:26 -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 404BJMmS111184; Thu, 4 Jan 2024 05:19:23 -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 v2] arm64: dts: ti: k3-j721e: Add support for DFS in J721E A72 Date: Thu, 4 Jan 2024 16:49:22 +0530 Message-ID: <20240104111922.832040-1-n-francis@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787158551793515801 X-GMAIL-MSGID: 1787158551793515801 |
Series |
[v2] arm64: dts: ti: k3-j721e: Add support for DFS in J721E A72
|
|
Commit Message
Neha Malcom Francis
Jan. 4, 2024, 11:19 a.m. UTC
Add 2G, 1G, 500M and 250M as the supported frequencies for A72. This
enables support for Dynamic Frequency Scaling (DFS). Note that Dynamic
Voltage and Frequency Scaling (DVFS) is not supported on J7 devices.
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.
To obtain clock-latency-ns, the maximum time was found to switch from/to
any frequency for a CPU and this value was rounded off and set.
[1] https://www.ti.com/lit/gpn/tda4vm
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
---
Test and boot logs:
https://gist.github.com/nehamalcom/33608837ab5ad3332ff11a7fa7a602e2
Changes since v1:
https://lore.kernel.org/all/20231214075637.176586-1-n-francis@ti.com/
- removed OPPs 1.5G and 750M as they introduced boot regression in
J721E-SK
- Nishanth
- indicated DVFS not supported in commit message
- moved critical data sheet info from below tear line to commit
message
- added opp-shared property
- added clock-latency-ns property
arch/arm64/boot/dts/ti/k3-j721e.dtsi | 31 ++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
Comments
On 16:49-20240104, Neha Malcom Francis wrote: > Add 2G, 1G, 500M and 250M as the supported frequencies for A72. This > enables support for Dynamic Frequency Scaling (DFS). Note that Dynamic > Voltage and Frequency Scaling (DVFS) is not supported on J7 devices. > > 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. > > To obtain clock-latency-ns, the maximum time was found to switch from/to > any frequency for a CPU and this value was rounded off and set. > > [1] https://www.ti.com/lit/gpn/tda4vm > > Signed-off-by: Neha Malcom Francis <n-francis@ti.com> > --- > Test and boot logs: > https://gist.github.com/nehamalcom/33608837ab5ad3332ff11a7fa7a602e2 > > Changes since v1: > https://lore.kernel.org/all/20231214075637.176586-1-n-francis@ti.com/ > - removed OPPs 1.5G and 750M as they introduced boot regression in > J721E-SK I do not think this is the right approach precisely for the above reason. See my comment in V1: https://lore.kernel.org/all/20231214125130.zqtq6ioj4c533wha@elbow/ " 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.. " I suspect there is no magic opp configuration that will work with all downstream and board variations. instead of creating a trimmed down non-datasheet tuples of OPP configuration, use the data sheet provided OPP configurations into each dtsi and the boards can apply the dtsi based on the type of sample they have. I don't see any other scheme (overlays, maybe?).. but this approach is broken and your note above proves why this approach is broken. > - Nishanth > - indicated DVFS not supported in commit message > - moved critical data sheet info from below tear line to commit > message > - added opp-shared property > - added clock-latency-ns property > > arch/arm64/boot/dts/ti/k3-j721e.dtsi | 31 ++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi > index a200810df54a..5de6c70bd989 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,6 +65,34 @@ 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"; > + opp-shared; > + > + opp6-2000000000 { > + opp-hz = /bits/ 64 <2000000000>; > + clock-latency-ns = <300000>; > + }; > + > + opp4-1000000000 { > + opp-hz = /bits/ 64 <1000000000>; > + clock-latency-ns = <300000>; > + }; > + > + opp2-500000000 { > + opp-hz = /bits/ 64 <500000000>; > + clock-latency-ns = <300000>; > + }; > + > + opp1-250000000 { > + opp-hz = /bits/ 64 <250000000>; > + clock-latency-ns = <300000>; > }; > }; > > -- > 2.34.1 >
Hi Nishanth, On 04/01/24 20:46, Nishanth Menon wrote: > On 16:49-20240104, Neha Malcom Francis wrote: >> Add 2G, 1G, 500M and 250M as the supported frequencies for A72. This >> enables support for Dynamic Frequency Scaling (DFS). Note that Dynamic >> Voltage and Frequency Scaling (DVFS) is not supported on J7 devices. >> >> 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. >> >> To obtain clock-latency-ns, the maximum time was found to switch from/to >> any frequency for a CPU and this value was rounded off and set. >> >> [1] https://www.ti.com/lit/gpn/tda4vm >> >> Signed-off-by: Neha Malcom Francis <n-francis@ti.com> >> --- >> Test and boot logs: >> https://gist.github.com/nehamalcom/33608837ab5ad3332ff11a7fa7a602e2 >> >> Changes since v1: >> https://lore.kernel.org/all/20231214075637.176586-1-n-francis@ti.com/ >> - removed OPPs 1.5G and 750M as they introduced boot regression in >> J721E-SK > > I do not think this is the right approach precisely for the above > reason. > > See my comment in V1: https://lore.kernel.org/all/20231214125130.zqtq6ioj4c533wha@elbow/ > > " > 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.. > " > > I suspect there is no magic opp configuration that will work with all > downstream and board variations. instead of creating a trimmed down > non-datasheet tuples of OPP configuration, use the data sheet provided > OPP configurations into each dtsi and the boards can apply the dtsi > based on the type of sample they have. > > I don't see any other scheme (overlays, maybe?).. but this approach is > broken and your note above proves why this approach is broken. > Understood... I believed OPPs were an SoC specific thing until this failure came about and it makes sense to take it at the board level now. Will factor this in for v3. >> - Nishanth >> - indicated DVFS not supported in commit message >> - moved critical data sheet info from below tear line to commit >> message >> - added opp-shared property >> - added clock-latency-ns property >> >> arch/arm64/boot/dts/ti/k3-j721e.dtsi | 31 ++++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi >> index a200810df54a..5de6c70bd989 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,6 +65,34 @@ 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"; >> + opp-shared; >> + >> + opp6-2000000000 { >> + opp-hz = /bits/ 64 <2000000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp4-1000000000 { >> + opp-hz = /bits/ 64 <1000000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp2-500000000 { >> + opp-hz = /bits/ 64 <500000000>; >> + clock-latency-ns = <300000>; >> + }; >> + >> + opp1-250000000 { >> + opp-hz = /bits/ 64 <250000000>; >> + clock-latency-ns = <300000>; >> }; >> }; >> >> -- >> 2.34.1 >> >
diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi index a200810df54a..5de6c70bd989 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,6 +65,34 @@ 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"; + opp-shared; + + opp6-2000000000 { + opp-hz = /bits/ 64 <2000000000>; + clock-latency-ns = <300000>; + }; + + opp4-1000000000 { + opp-hz = /bits/ 64 <1000000000>; + clock-latency-ns = <300000>; + }; + + opp2-500000000 { + opp-hz = /bits/ 64 <500000000>; + clock-latency-ns = <300000>; + }; + + opp1-250000000 { + opp-hz = /bits/ 64 <250000000>; + clock-latency-ns = <300000>; }; };