[v1] arm64: dts: rockchip: Add cache information to the Rockchip RK3566 and RK3568 SoC
Message ID | 20240226182310.4032-1-linux.amoon@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82132-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2255809dyb; Mon, 26 Feb 2024 10:23:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/iRYPokSpR/0tBwrzR7dVSaiQiKn44b8Z/QbF4IU42D8H/yA9o1823nqK0/g4VWJ1oC7J7NC0SVLiu8IdtdILOn1JsA== X-Google-Smtp-Source: AGHT+IGlAD7fKU5x/ONu9pPApLje4/wLvT9ZwfmQSjXjNyBwchPu1oPjy+MMdaW7nPzdxrrl9VPi X-Received: by 2002:a05:6512:3f06:b0:512:dab0:836d with SMTP id y6-20020a0565123f0600b00512dab0836dmr6525751lfa.43.1708971825702; Mon, 26 Feb 2024 10:23:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708971825; cv=pass; d=google.com; s=arc-20160816; b=CGY+Hvc+sPL7Boh/djZpRaNd16ADTJEDfyLZsFWnN+GWzlAnHC1f1UTL23lKVYzFsh F7D7Cw0ENGlXHRmspuraoJtzYyKqzbxlb0fDOifa9YwCnLYXBdGFF2kH+rUCVYKiUV0Z QClDfjwWccSjDEk789LRa5Y78J3FL4oSYMzeBBdv4LBL0SM/grzS3xthwOAqtur57hBV yUuGtCUK5q0ehwQRVuyyd+ffPBAp6me/8w2eN+Hm27l5sRPXNWB73hzPkVh5/Jtw4VvB 9QZZ0+87wb63r+f8XhBhUbeOkcG7Xp0kV2eaSa/rbZHebJkYYMuqu5zD2o92L11I4VpW bVYw== ARC-Message-Signature: i=2; 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=Oq9kS8EeuXsGUVpRBBrLiDhME6a4wGuEkqHoj3EbhjU=; fh=bFt9vztDdMZoBWiYIMqwcrR5yig/CL+sKFGpdTEF8/k=; b=pw31xLlBr7mS/RYkK0DtnB2bZVoupkaaWAQhviwacqC89Atcx+GjAAHDiH2TuFIUFo 6ADHy8KsFHqvXXp60jZipqU2i5zF4OPtWU6orsnMQy+4bcKhDHs3OX2hZGsfGfM8jvhI FzFDP61dJ8CC/csJ0NlXO5IVICv8lJgYH1X8JhP6p8778tkvZ50AXBQwDj/6IUUmYWrj d9BVoZvCHzXzCcXff4GO2B8et4WfXxoEFp7c7BDW90+PbMeoneanxrTpaDhgH7rUkjvG 2rZJl/xtKIQ/lLfIHUkI42/PgjAMlNNEubdSM+Tdpyl9sTUtW7jdCu1RX9+hYPm3b4eu +5Vw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ndoDhY9W; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82132-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82132-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dk10-20020a0564021d8a00b00565b7cfaf71si1933184edb.607.2024.02.26.10.23.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:23:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82132-ouuuleilei=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=@gmail.com header.s=20230601 header.b=ndoDhY9W; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82132-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82132-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 16D641F27453 for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 18:23:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E92812F58E; Mon, 26 Feb 2024 18:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ndoDhY9W" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B03C660DC5; Mon, 26 Feb 2024 18:23:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708971809; cv=none; b=O+0Yc2cmIghBzMmZ2wxNcCmSy4YxbaD0VE/uIBhPPVSjpZ3Xv6pIs1nZKxR0IfXg/uXgHvK166ej1BvBFMEkFRTz1xLzHDHO411PCcTin2WxlLVkvuBhci7IHoOLhp2vs00VNmchUPSpL+vLe5lfCOYX1RkNxQKR1MN1jQG+BQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708971809; c=relaxed/simple; bh=Q+hnu8amVqGGKWiAAjeU+PULKBuLit8f6zcLD9Zz+aM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dEFgOPCsTybtUirtP2zog+No9trgk+9SqnpL/VfZ1mcBotcdfKWw68SRVPDo2haLnOBudMI0Bpvj22erYlc71NP/SXj/QJmxhJNrboamARJrkOmpzoogezlNoL9QEBSMYFYlLoJprY3cUGP4PFazSZezfEa2ImXXcHY4jANz0Rc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ndoDhY9W; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1d944e8f367so23751305ad.0; Mon, 26 Feb 2024 10:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708971807; x=1709576607; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Oq9kS8EeuXsGUVpRBBrLiDhME6a4wGuEkqHoj3EbhjU=; b=ndoDhY9W9X0+nLzs52XUR6L0iuX8Mk88PsKZ6hdRNjbdOGoXtZ0y8ijDVWWZD3QDtD wqb09dlS1MhmLxw3BMchgfSVFCqLDoeKLmjAoH4V6d3hNjwJ9JYXeR5BLnTvwuiJfal0 onYj03PDjQDOSfW+uLqpd7poHntT1WBgK0n/OCD1tBaZkdEMWbWwUtzyb3xP/DhmbQUo ADSXwmjodDpnUiNqun8ywx/oZ0aWEZXwlJCYBYA4wHzzT3bjbxIaETW48gdXb4PQ8Tjz XTzdJ3IznT5aRssBZrrDRCWNnt2UZ6QofuCLaATZVzpup/59IcgDbj8ZeAffSvMVoerw DKwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708971807; x=1709576607; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Oq9kS8EeuXsGUVpRBBrLiDhME6a4wGuEkqHoj3EbhjU=; b=h0rhluAnHrxbZ4UdECYUcs2na4gLRKb+iOWVCDjLqWsh7CKHgzrM4oc5Ek/7XbUSwx YGH/WFklo7oUlVwa6oHYGNnTCmWbw9qBZaxV57HciFzKCg9xC6CTuPf577ll5xlpBAwS BZL2mEACq1EksDeRtku4hKSMUQnIjnpmIou48D6dcQkgnv3yc6hDUgU8Sookpz4N+RPv 5rbfnI+3JZvmHBGWDRuL4wbM76v8Rq0W/cIeTEkZrKZA7ZbYll2dS0bVP1L0PKL1BZLD t2ItLqEyWeEGae1M0aW3jvMnUFIaWK5FnIkHcnZ4d38Byrj25ugHNbEgN+drFL38zA5t yqwg== X-Forwarded-Encrypted: i=1; AJvYcCUlGU4+ob4+NQTGu12BbG7Ua6qa/+9MsZwr+OdJy46K/XarLubihOjypWdUD7+ssjQSXjKsRmjXVmwOf9jZ8+21FD4CppzsVHFg27p0GZtBxPL9SjejR+XJ34KsCZOn5iM8GxYr2WnOhw== X-Gm-Message-State: AOJu0YyraBaR0Syt0ed9gQjhF5olTfpuryqV8NzZTJhSTZ1qHqyK0/Tp gDfWoAdSVUZBkaNFERttOtXbDNgJTubPiHxrMwBB+PNL6HNbaX86 X-Received: by 2002:a17:902:e9c4:b0:1db:f23f:678e with SMTP id 4-20020a170902e9c400b001dbf23f678emr6781170plk.15.1708971806955; Mon, 26 Feb 2024 10:23:26 -0800 (PST) Received: from localhost.localdomain ([113.30.217.222]) by smtp.gmail.com with ESMTPSA id v19-20020a170902d09300b001dba98889a3sm2353plv.71.2024.02.26.10.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:23:26 -0800 (PST) From: Anand Moon <linux.amoon@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de> Cc: Anand Moon <linux.amoon@gmail.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] arm64: dts: rockchip: Add cache information to the Rockchip RK3566 and RK3568 SoC Date: Mon, 26 Feb 2024 23:53:03 +0530 Message-ID: <20240226182310.4032-1-linux.amoon@gmail.com> X-Mailer: git-send-email 2.43.0 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791986841012898721 X-GMAIL-MSGID: 1791986841012898721 |
Series |
[v1] arm64: dts: rockchip: Add cache information to the Rockchip RK3566 and RK3568 SoC
|
|
Commit Message
Anand Moon
Feb. 26, 2024, 6:23 p.m. UTC
As per RK3568 Datasheet and TRM add missing cache information to
the Rockchip RK3566 and RK3568 SoC.
- Each Cortex-A55 core has 32KB of L1 instruction cache available and
32KB of L1 data cache available with ECC.
- Along with 512KB Unified L3 cache with ECC.
With adding instruction cache and data cache and a write buffer to
reduce the effect of main memory bandwidth and latency on data
access performance.
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
[0] http://www.rock-chips.com/uploads/pdf/2022.8.26/191/RK3568%20Brief%20Datasheet.pdf
[1] https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part1%20V1.1-20210301.pdf
---
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 37 ++++++++++++++++++++++++
1 file changed, 37 insertions(+)
Comments
Hello Anand, On 2024-02-26 19:23, Anand Moon wrote: > As per RK3568 Datasheet and TRM add missing cache information to > the Rockchip RK3566 and RK3568 SoC. > > - Each Cortex-A55 core has 32KB of L1 instruction cache available and > 32KB of L1 data cache available with ECC. > - Along with 512KB Unified L3 cache with ECC. > > With adding instruction cache and data cache and a write buffer to > reduce the effect of main memory bandwidth and latency on data > access performance. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> I was about to send my own patch that adds the same missing cache information, so please allow me to describe the proposed way to move forward. The way I see it, your commit summary and description need a rather complete rewrite, to be more readable, more accurate, and to avoid including an irrelevant (and slightly misleading) description of the general role of caches. Also, the changes to the dtsi file would benefit from small touch-ups here and there, for improved consistency, etc. With all that in mind, I propose that you withdraw your patch and let me send my patch that will addresses all these issues, of course with a proper tag that lists you as a co-developer. I think that would save us a fair amount of time going back and forth. I hope you agree. > --- > [0] > http://www.rock-chips.com/uploads/pdf/2022.8.26/191/RK3568%20Brief%20Datasheet.pdf > [1] > https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part1%20V1.1-20210301.pdf > --- > arch/arm64/boot/dts/rockchip/rk356x.dtsi | 37 ++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi > b/arch/arm64/boot/dts/rockchip/rk356x.dtsi > index c19c0f1b3778..49235efefb6b 100644 > --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi > @@ -56,6 +56,13 @@ cpu0: cpu@0 { > clocks = <&scmi_clk 0>; > #cooling-cells = <2>; > enable-method = "psci"; > + d-cache-line-size = <32>; > + d-cache-size = <0x8000>; > + d-cache-sets = <32>; > + i-cache-line-size = <32>; > + i-cache-size = <0x8000>; > + i-cache-sets = <32>; > + next-level-cache = <&l2>; > operating-points-v2 = <&cpu0_opp_table>; > }; > > @@ -65,6 +72,13 @@ cpu1: cpu@100 { > reg = <0x0 0x100>; > #cooling-cells = <2>; > enable-method = "psci"; > + d-cache-line-size = <32>; > + d-cache-size = <0x8000>; > + d-cache-sets = <32>; > + i-cache-line-size = <32>; > + i-cache-size = <0x8000>; > + i-cache-sets = <32>; > + next-level-cache = <&l2>; > operating-points-v2 = <&cpu0_opp_table>; > }; > > @@ -74,6 +88,13 @@ cpu2: cpu@200 { > reg = <0x0 0x200>; > #cooling-cells = <2>; > enable-method = "psci"; > + d-cache-line-size = <32>; > + d-cache-size = <0x8000>; > + d-cache-sets = <32>; > + i-cache-line-size = <32>; > + i-cache-size = <0x8000>; > + i-cache-sets = <32>; > + next-level-cache = <&l2>; > operating-points-v2 = <&cpu0_opp_table>; > }; > > @@ -83,8 +104,24 @@ cpu3: cpu@300 { > reg = <0x0 0x300>; > #cooling-cells = <2>; > enable-method = "psci"; > + d-cache-line-size = <32>; > + d-cache-size = <0x8000>; > + d-cache-sets = <32>; > + i-cache-line-size = <32>; > + i-cache-size = <0x8000>; > + i-cache-sets = <32>; > + next-level-cache = <&l2>; > operating-points-v2 = <&cpu0_opp_table>; > }; > + > + l2: l2-cache0 { > + compatible = "cache"; > + cache-level = <3>; > + cache-unified; > + cache-size = <0x7d000>; /* L3. 512 KB */ > + cache-line-size = <64>; > + cache-sets = <512>; > + }; > }; > > cpu0_opp_table: opp-table-0 {
Hi Dragan On Tue, 27 Feb 2024 at 00:39, Dragan Simic <dsimic@manjaro.org> wrote: > > Hello Anand, > > On 2024-02-26 19:23, Anand Moon wrote: > > As per RK3568 Datasheet and TRM add missing cache information to > > the Rockchip RK3566 and RK3568 SoC. > > > > - Each Cortex-A55 core has 32KB of L1 instruction cache available and > > 32KB of L1 data cache available with ECC. > > - Along with 512KB Unified L3 cache with ECC. > > > > With adding instruction cache and data cache and a write buffer to > > reduce the effect of main memory bandwidth and latency on data > > access performance. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > I was about to send my own patch that adds the same missing cache > information, so please allow me to describe the proposed way to move > forward. > > The way I see it, your commit summary and description need a rather > complete rewrite, to be more readable, more accurate, and to avoid > including an irrelevant (and slightly misleading) description of the > general role of caches. > > Also, the changes to the dtsi file would benefit from small touch-ups > here and there, for improved consistency, etc. > > With all that in mind, I propose that you withdraw your patch and let > me send my patch that will addresses all these issues, of course with > a proper tag that lists you as a co-developer. I think that would > save us a fair amount of time going back and forth. > > I hope you agree. > I have no issue with this,.If you have a better version plz share this. Thanks -Anand
On 2024-02-27 13:49, Anand Moon wrote: > On Tue, 27 Feb 2024 at 00:39, Dragan Simic <dsimic@manjaro.org> wrote: >> On 2024-02-26 19:23, Anand Moon wrote: >> > As per RK3568 Datasheet and TRM add missing cache information to >> > the Rockchip RK3566 and RK3568 SoC. >> > >> > - Each Cortex-A55 core has 32KB of L1 instruction cache available and >> > 32KB of L1 data cache available with ECC. >> > - Along with 512KB Unified L3 cache with ECC. >> > >> > With adding instruction cache and data cache and a write buffer to >> > reduce the effect of main memory bandwidth and latency on data >> > access performance. >> > >> > Signed-off-by: Anand Moon <linux.amoon@gmail.com> >> >> I was about to send my own patch that adds the same missing cache >> information, so please allow me to describe the proposed way to move >> forward. >> >> The way I see it, your commit summary and description need a rather >> complete rewrite, to be more readable, more accurate, and to avoid >> including an irrelevant (and slightly misleading) description of the >> general role of caches. >> >> Also, the changes to the dtsi file would benefit from small touch-ups >> here and there, for improved consistency, etc. >> >> With all that in mind, I propose that you withdraw your patch and let >> me send my patch that will addresses all these issues, of course with >> a proper tag that lists you as a co-developer. I think that would >> save us a fair amount of time going back and forth. >> >> I hope you agree. > > I have no issue with this,.If you have a better version plz share this. Thank you, I'll send my patch within the next couple of days.
Hello Anand, On 2024-02-27 15:58, Dragan Simic wrote: > On 2024-02-27 13:49, Anand Moon wrote: >> On Tue, 27 Feb 2024 at 00:39, Dragan Simic <dsimic@manjaro.org> wrote: >>> On 2024-02-26 19:23, Anand Moon wrote: >>> > As per RK3568 Datasheet and TRM add missing cache information to >>> > the Rockchip RK3566 and RK3568 SoC. >>> > >>> > - Each Cortex-A55 core has 32KB of L1 instruction cache available and >>> > 32KB of L1 data cache available with ECC. >>> > - Along with 512KB Unified L3 cache with ECC. >>> > >>> > With adding instruction cache and data cache and a write buffer to >>> > reduce the effect of main memory bandwidth and latency on data >>> > access performance. >>> > >>> > Signed-off-by: Anand Moon <linux.amoon@gmail.com> >>> >>> I was about to send my own patch that adds the same missing cache >>> information, so please allow me to describe the proposed way to move >>> forward. >>> >>> The way I see it, your commit summary and description need a rather >>> complete rewrite, to be more readable, more accurate, and to avoid >>> including an irrelevant (and slightly misleading) description of the >>> general role of caches. >>> >>> Also, the changes to the dtsi file would benefit from small touch-ups >>> here and there, for improved consistency, etc. >>> >>> With all that in mind, I propose that you withdraw your patch and let >>> me send my patch that will addresses all these issues, of course with >>> a proper tag that lists you as a co-developer. I think that would >>> save us a fair amount of time going back and forth. >>> >>> I hope you agree. >> >> I have no issue with this,.If you have a better version plz share >> this. > > Thank you, I'll send my patch within the next couple of days. Here's a brief update... Basically, not all of the cache-size values found in your patch were correct, but I've got all of them calculated again, double-checked, and cross-compared with the way values in my earlier patch for the RK3399 SoC dtsi were calculated. [2] It all checked out just fine. It's all based on the RK3566 and RK3568 SoC datasheets and a couple of ARM specifications, which I'll describe in detail in my patch description. I'll send the patch after I test it a bit, to make sure it all works as expected. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b72633ba5cfa932405832de25d0f0a11716903b4
On 2024-02-28 11:42, Dragan Simic wrote: > On 2024-02-27 15:58, Dragan Simic wrote: >> On 2024-02-27 13:49, Anand Moon wrote: >>> On Tue, 27 Feb 2024 at 00:39, Dragan Simic <dsimic@manjaro.org> >>> wrote: >>>> On 2024-02-26 19:23, Anand Moon wrote: >>>> > As per RK3568 Datasheet and TRM add missing cache information to >>>> > the Rockchip RK3566 and RK3568 SoC. >>>> > >>>> > - Each Cortex-A55 core has 32KB of L1 instruction cache available and >>>> > 32KB of L1 data cache available with ECC. >>>> > - Along with 512KB Unified L3 cache with ECC. >>>> > >>>> > With adding instruction cache and data cache and a write buffer to >>>> > reduce the effect of main memory bandwidth and latency on data >>>> > access performance. >>>> > >>>> > Signed-off-by: Anand Moon <linux.amoon@gmail.com> >>>> >>>> I was about to send my own patch that adds the same missing cache >>>> information, so please allow me to describe the proposed way to move >>>> forward. >>>> >>>> The way I see it, your commit summary and description need a rather >>>> complete rewrite, to be more readable, more accurate, and to avoid >>>> including an irrelevant (and slightly misleading) description of the >>>> general role of caches. >>>> >>>> Also, the changes to the dtsi file would benefit from small >>>> touch-ups >>>> here and there, for improved consistency, etc. >>>> >>>> With all that in mind, I propose that you withdraw your patch and >>>> let >>>> me send my patch that will addresses all these issues, of course >>>> with >>>> a proper tag that lists you as a co-developer. I think that would >>>> save us a fair amount of time going back and forth. >>>> >>>> I hope you agree. >>> >>> I have no issue with this,.If you have a better version plz share >>> this. >> >> Thank you, I'll send my patch within the next couple of days. > > Here's a brief update... Basically, not all of the cache-size values > found in your patch were correct, but I've got all of them calculated > again, double-checked, and cross-compared with the way values in my > earlier patch for the RK3399 SoC dtsi were calculated. [2] > > It all checked out just fine. It's all based on the RK3566 and RK3568 > SoC datasheets and a couple of ARM specifications, which I'll describe > in detail in my patch description. I'll send the patch after I test > it a bit, to make sure it all works as expected. > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b72633ba5cfa932405832de25d0f0a11716903b4 Pretty much the same patch for the RK3328 is also ready for testing.
Hello Anand, On 2024-02-28 18:50, Dragan Simic wrote: > On 2024-02-28 11:42, Dragan Simic wrote: >> On 2024-02-27 15:58, Dragan Simic wrote: >>> On 2024-02-27 13:49, Anand Moon wrote: >>>> On Tue, 27 Feb 2024 at 00:39, Dragan Simic <dsimic@manjaro.org> >>>> wrote: >>>>> On 2024-02-26 19:23, Anand Moon wrote: >>>>> > As per RK3568 Datasheet and TRM add missing cache information to >>>>> > the Rockchip RK3566 and RK3568 SoC. >>>>> > >>>>> > - Each Cortex-A55 core has 32KB of L1 instruction cache available and >>>>> > 32KB of L1 data cache available with ECC. >>>>> > - Along with 512KB Unified L3 cache with ECC. >>>>> > >>>>> > With adding instruction cache and data cache and a write buffer to >>>>> > reduce the effect of main memory bandwidth and latency on data >>>>> > access performance. >>>>> >>>>> I was about to send my own patch that adds the same missing cache >>>>> information, so please allow me to describe the proposed way to >>>>> move >>>>> forward. >>>>> >>>>> The way I see it, your commit summary and description need a rather >>>>> complete rewrite, to be more readable, more accurate, and to avoid >>>>> including an irrelevant (and slightly misleading) description of >>>>> the >>>>> general role of caches. >>>>> >>>>> Also, the changes to the dtsi file would benefit from small >>>>> touch-ups >>>>> here and there, for improved consistency, etc. >>>>> >>>>> With all that in mind, I propose that you withdraw your patch and >>>>> let >>>>> me send my patch that will addresses all these issues, of course >>>>> with >>>>> a proper tag that lists you as a co-developer. I think that would >>>>> save us a fair amount of time going back and forth. >>>>> >>>>> I hope you agree. >>>> >>>> I have no issue with this,.If you have a better version plz share >>>> this. >>> >>> Thank you, I'll send my patch within the next couple of days. >> >> Here's a brief update... Basically, not all of the cache-size values >> found in your patch were correct, but I've got all of them calculated >> again, double-checked, and cross-compared with the way values in my >> earlier patch for the RK3399 SoC dtsi were calculated. [2] >> >> It all checked out just fine. It's all based on the RK3566 and RK3568 >> SoC datasheets and a couple of ARM specifications, which I'll describe >> in detail in my patch description. I'll send the patch after I test >> it a bit, to make sure it all works as expected. >> >> [1] >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b72633ba5cfa932405832de25d0f0a11716903b4 > > Pretty much the same patch for the RK3328 is also ready for testing. Just sent the patches to the mailing list, please have a look. [2][3] I've "downgraded" the previously proposed "Co-developed-by" tag in the RK356x patch [3] to a "Helped-by" tag, just because the cache-size values in your patch mostly weren't correct and, as a result, differed from the cache-size values in my patch, making the "Co-developed-by" tag technically not applicable. For that tag to be applicable, the most important parts of the patches need to be pretty much identical. I hope you agree. [2] https://lore.kernel.org/linux-rockchip/e61173d87f5f41af80e6f87f8820ce8d06f7c20c.1709491127.git.dsimic@manjaro.org/ [3] https://lore.kernel.org/linux-rockchip/2285ee41e165813011220f9469e28697923aa6e0.1709491108.git.dsimic@manjaro.org/
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index c19c0f1b3778..49235efefb6b 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -56,6 +56,13 @@ cpu0: cpu@0 { clocks = <&scmi_clk 0>; #cooling-cells = <2>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; + next-level-cache = <&l2>; operating-points-v2 = <&cpu0_opp_table>; }; @@ -65,6 +72,13 @@ cpu1: cpu@100 { reg = <0x0 0x100>; #cooling-cells = <2>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; + next-level-cache = <&l2>; operating-points-v2 = <&cpu0_opp_table>; }; @@ -74,6 +88,13 @@ cpu2: cpu@200 { reg = <0x0 0x200>; #cooling-cells = <2>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; + next-level-cache = <&l2>; operating-points-v2 = <&cpu0_opp_table>; }; @@ -83,8 +104,24 @@ cpu3: cpu@300 { reg = <0x0 0x300>; #cooling-cells = <2>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; + next-level-cache = <&l2>; operating-points-v2 = <&cpu0_opp_table>; }; + + l2: l2-cache0 { + compatible = "cache"; + cache-level = <3>; + cache-unified; + cache-size = <0x7d000>; /* L3. 512 KB */ + cache-line-size = <64>; + cache-sets = <512>; + }; }; cpu0_opp_table: opp-table-0 {