devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Charkov <alchark@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Alexey Charkov <alchark@gmail.com>
Subject: [PATCH v2 5/5] ARM: dts: vt8500: Add L2 cache controller on WM8850/WM8950
Date: Thu, 15 May 2025 22:38:44 +0300	[thread overview]
Message-ID: <20250515-wmt-dts-updates-v2-5-246937484cc8@gmail.com> (raw)
In-Reply-To: <20250515-wmt-dts-updates-v2-0-246937484cc8@gmail.com>

WonderMedia WM8850/WM8950 uses an ARM PL310 cache controller for its
L2 cache, add it.

The parameters have been deduced from vendor's U-boot environment
variables, which the downstream code uses to initialize the
controller. They set the following register values:

aux = 0x3e440000
prefetch_ctrl = 0x70000007

Their initialization code also unconditionally sets the flags
L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN, so encode those too

Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
 arch/arm/boot/dts/vt8500/wm8850.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/vt8500/wm8850.dtsi b/arch/arm/boot/dts/vt8500/wm8850.dtsi
index f741a3e88d74ab4740f200b9b96201b3dc799bad..58109aa05f74b67cda82b5ebd0127662e475ded6 100644
--- a/arch/arm/boot/dts/vt8500/wm8850.dtsi
+++ b/arch/arm/boot/dts/vt8500/wm8850.dtsi
@@ -18,6 +18,7 @@ cpu@0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <0x0>;
+			next-level-cache = <&l2_cache>;
 		};
 	};
 
@@ -308,5 +309,18 @@ ethernet@d8004000 {
 			reg = <0xd8004000 0x100>;
 			interrupts = <10>;
                 };
+
+		l2_cache: cache-controller@d9000000 {
+			compatible = "arm,pl310-cache";
+			reg = <0xd9000000 0x1000>;
+			arm,double-linefill = <1>;
+			arm,dynamic-clock-gating = <1>;
+			arm,shared-override;
+			arm,standby-mode = <1>;
+			cache-level = <2>;
+			cache-unified;
+			prefetch-data = <1>;
+			prefetch-instr = <1>;
+		};
 	};
 };

-- 
2.49.0


  parent reply	other threads:[~2025-05-15 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15 19:38 [PATCH v2 0/5] ARM: dts: vt8500: Minor fixups and L2 cache on WM8850 Alexey Charkov
2025-05-15 19:38 ` [PATCH v2 1/5] ARM: dts: vt8500: Add node address and reg in CPU nodes Alexey Charkov
2025-05-15 19:38 ` [PATCH v2 2/5] ARM: dts: vt8500: Move memory nodes to board dts and fix addr/size Alexey Charkov
2025-05-15 19:38 ` [PATCH v2 3/5] ARM: dts: vt8500: Use generic node name for the SD/MMC controller Alexey Charkov
2025-05-15 19:38 ` [PATCH v2 4/5] ARM: dts: vt8500: Fix the unit address of the VT8500 LCD controller Alexey Charkov
2025-05-15 19:38 ` Alexey Charkov [this message]
2025-05-21 13:28 ` [PATCH v2 0/5] ARM: dts: vt8500: Minor fixups and L2 cache on WM8850 Alexey Charkov
2025-05-21 13:32   ` Krzysztof Kozlowski
2025-05-21 14:04     ` Alexey Charkov
2025-06-12 15:26 ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250515-wmt-dts-updates-v2-5-246937484cc8@gmail.com \
    --to=alchark@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).