From: Heiko Stuebner <heiko@sntech.de>
To: tomeu@tomeuvizoso.net, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, joro@8bytes.org, will@kernel.org,
robin.murphy@arm.com, ulfh@kernel.org, p.zabel@pengutronix.de,
ogabbay@kernel.org, zhangqing@rock-chips.com,
Jiaxing Hu <gahing@gahingwoo.com>
Cc: royalnet026@gmail.com, abel.vesa@oss.qualcomm.com,
sebastian.reichel@collabora.com, sidong.yang@furiosa.ai,
u.kleine-koenig@baylibre.com, chaoyi.chen@rock-chips.com,
diederik@cknow-tech.com, alchark@flipper.net,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org, iommu@lists.linux.dev,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Jiaxing Hu <gahing@gahingwoo.com>
Subject: Re: [PATCH v13 13/14] arm64: dts: rockchip: add NPU (RKNN) nodes to rk3576
Date: Mon, 21 Sep 2026 23:51:33 +0200 [thread overview]
Message-ID: <119338490.nniJfEyVGO@phil> (raw)
In-Reply-To: <20260915104328.45901-14-gahing@gahingwoo.com>
Hi,
Am Dienstag, 15. September 2026, 12:43:27 Mitteleuropäische Sommerzeit schrieb Jiaxing Hu:
> Add the two RKNN cores and their IOMMUs. Both cores are disabled by
> default; boards enable what they wire up.
>
> PD_NPU0 and PD_NPU1 are siblings under PD_NPUTOP and hold one core each,
> but the convolution buffer and the DSU sit above them: ACLK_RKNN_CBUF,
> HCLK_RKNN_CBUF and CLK_RKNN_DSU0 belong to the block rather than to either
> core, and PD_NPUTOP already lists all three. Add them to both core domains
> as well, so a core domain switching state has the clocks of the path it
> shares running, and give each core domain the BIU reset that the pmdomain
> driver now cycles once power is on.
>
> Each core lists both core domains, its own first, so that a core in use has
> the whole block powered. Whether a single core can reach the shared path
> with the sibling domain off is not something this series establishes;
> listing both is the description that has been tested here. The IOMMU in
> front of each core lists that core's domain only.
>
> Label the outer PD_NPU node so a board can attach the NPU rail to the
> domain that gates the block.
>
> Clock the NPU inside the voltage its rail is given. CLK_RKNN_DSU0 clocks
> both cores and the CBUF they share, nothing in mainline sets its rate, and
> the block comes up at 786.432 MHz. Rockchip's OPP table for this NPU asks
> 800 mV of its 800 MHz step at the worst leakage bins, and nothing in
> mainline sets the rail either, so a board that follows this DTS runs the
> NPU above the step whose voltage it happens to boot with.
>
> On a ROCK 4D with both cores enabled and vdd_npu_s0 at the 750 mV its PMIC
> comes up with, two jobs in flight at once make the second core write single
> words of its output wrong: the right value with a bit of the accumulator
> set, always the same position in the array. Either core alone is exact.
> Four device trees, same board, kernel and userspace, four passes of 5400
> rows each, every row compared with the same multiply done one row at a
> time:
>
> 786 MHz, 750 mV 13 to 20 wrong rows a pass
> 594 MHz, 750 mV 0, 0, 0, 0
> 786 MHz, 800 mV 0, 0, 0, 0
> 786 MHz, 850 mV 0, 0, 0, 0
>
> 594 MHz is a divider off GPLL and sits between that table's 500 and 600 MHz
> steps, both of which ask 725 mV at every leakage bin, so it is inside the
> voltage a board that describes no NPU rail already provides.
>
> The trade it buys is a core against a clock, and both halves are measured.
> The rate lives in the device tree, so the two clocks cannot share a boot,
> which means this comparison is across boots and has to clear the noise of
> one. Twenty readings of a single arm inside one boot, nothing changed
> between them, span 2.5%; across boots it can only be worse. So the 4.0 to
> 4.2% below clears that floor by under a factor of two, and the 26 to 37%
> clears it by ten. Five runs an arm, the arms alternating inside a boot,
> one warm-up a model discarded, medians of five:
>
> decode tok/s 594 MHz 786 MHz
> Llama-3.2-1B 17.85 18.60 two cores
> 11.17 13.77 one core
> SmolLM2-135M 41.46 43.12 two cores
> 38.26 41.90 one core
>
> Losing 192 MHz costs 4.0 to 4.2% of decode with both cores running. Losing
> a core costs 26 to 37% on the 1B model, at either clock. The rate is the
> cheaper of the two by six to nine times.
>
> The two arms cross-check each other: the clock is worth 23% on ONE core
> against 4% on two. With both cores running the bottleneck is no longer the
> clock, which is why this configuration can afford to give up 192 MHz.
>
> A core is worth much less on a small model, 2.8 to 7.7% on 135M, where the
> second core's dispatch overhead is not repaid. TTFT moves by under 2%
> either way, so none of this says anything about prefill.
>
> An OPP table with the rail attached is the proper answer, and it wants
> driver support this series does not have.
please trim that commit message A LOT :-) .
You're just adding the nodes for the NPU cores, that does
not need a novel-sized commit message.
Additionally, please split this into two commits:
- Adding the resets to the power-domains
- Adding the nodes for the NPU cores (add pd_npu phandle here too)
Thanks a lot
Heiko
next prev parent reply other threads:[~2026-09-21 21:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 10:43 [PATCH v13 00/14] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 01/14] accel/rocket: request the core clocks by name Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 02/14] accel/rocket: take the completion register writes under job_lock Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 03/14] accel/rocket: wait for a running IRQ handler before resetting a core Jiaxing Hu
2026-09-16 13:28 ` Igor Paunovic
2026-09-15 10:43 ` [PATCH v13 04/14] accel/rocket: let the core suspend after a reset Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 05/14] accel/rocket: factor the completion tail out of the IRQ handler Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 06/14] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 07/14] dt-bindings: power: rockchip: allow resets in a power domain node Jiaxing Hu
2026-09-21 21:52 ` Heiko Stuebner
2026-09-15 10:43 ` [PATCH v13 08/14] dt-bindings: iommu: rockchip: describe the RK3576 NPU MMU Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 09/14] pmdomain: rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-09-21 12:41 ` Ulf Hansson
2026-09-21 22:06 ` Heiko Stuebner
2026-09-22 1:28 ` Chaoyi Chen
2026-09-15 10:43 ` [PATCH v13 10/14] pmdomain: rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-09-21 12:43 ` Ulf Hansson
2026-09-15 10:43 ` [PATCH v13 11/14] accel/rocket: select the per-core clock and reset counts from match data Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 12/14] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-09-15 10:43 ` [PATCH v13 13/14] arm64: dts: rockchip: add NPU (RKNN) nodes to rk3576 Jiaxing Hu
2026-09-21 21:51 ` Heiko Stuebner [this message]
2026-09-15 10:43 ` [PATCH v13 14/14] arm64: dts: rockchip: enable the NPU on rk3576-rock-4d Jiaxing Hu
2026-09-19 7:32 ` [PATCH v13 00/14] accel/rocket: RK3576 NPU (RKNN) enablement Sidong Yang
2026-09-21 12:46 ` Ulf Hansson
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=119338490.nniJfEyVGO@phil \
--to=heiko@sntech.de \
--cc=abel.vesa@oss.qualcomm.com \
--cc=alchark@flipper.net \
--cc=chaoyi.chen@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=diederik@cknow-tech.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gahing@gahingwoo.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=ogabbay@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=royalnet026@gmail.com \
--cc=sebastian.reichel@collabora.com \
--cc=sidong.yang@furiosa.ai \
--cc=tomeu@tomeuvizoso.net \
--cc=u.kleine-koenig@baylibre.com \
--cc=ulfh@kernel.org \
--cc=will@kernel.org \
--cc=zhangqing@rock-chips.com \
/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
all inboxes | Powered by JetHome®