From: sashiko-bot@kernel.org
To: "Jiaxing Hu" <gahing@gahingwoo.com>
Cc: conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [RFC PATCH 8/9] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes
Date: Fri, 17 Jul 2026 09:30:29 +0000 [thread overview]
Message-ID: <20260717093029.AA6381F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260717085220.3212274-9-gahing@gahingwoo.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Missing `aclk_cbuf` and `hclk_cbuf` clocks in `rknn_core_1` node.
- [High] Single power-domain definition for NPU cores causes probe failure (`-EEXIST`) and violates hardware constraints.
- [High] The physical register address for `rknn_mmu_1` is incorrectly mapped to `0x2770a000` instead of `0x27712000`.
--
--- Patch [8]: [RFC PATCH 8/9] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes ---
commit 5396e10743f01d595779ccc7127139fe5f89e996
Author: Jiaxing Hu <gahing@gahingwoo.com>
arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes
Add the RK3576 NPU: rknn_core_0/1 and rknn_mmu_0/1, with register
addresses, GIC_SPI 247/248 interrupts, clocks, resets and power-domains.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> index e12a2a0cfb891..5033f762840ae 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
[ ... ]
> @@ -1804,6 +1812,72 @@ qos_npu_m1ro: qos@27f22100 {
> reg = <0x0 0x27f22100 0x0 0x20>;
> };
>
> + rknn_core_0: npu@27700000 {
> + compatible = "rockchip,rk3576-rknn-core";
> + reg = <0x0 0x27700000 0x0 0x1000>,
> + <0x0 0x27701000 0x0 0x1000>,
> + <0x0 0x27703000 0x0 0x1000>,
> + <0x0 0x27704000 0x0 0x1000>,
> + <0x0 0x27705000 0x0 0x1000>;
> + reg-names = "pc", "cna", "core", "dpu", "dpu_rdma";
> + interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru ACLK_RKNN0>, <&cru HCLK_RKNN_ROOT>,
> + <&cru CLK_RKNN_DSU0>, <&cru PCLK_NPUTOP_ROOT>,
> + <&cru ACLK_RKNN_CBUF>, <&cru HCLK_RKNN_CBUF>;
> + clock-names = "aclk", "hclk", "npu", "pclk",
> + "aclk_cbuf", "hclk_cbuf";
> + resets = <&cru SRST_A_RKNN0>;
> + reset-names = "srst_a";
> + power-domains = <&power RK3576_PD_NPU0>;
[Severity: High]
Does listing a single power domain here cause probe to fail?
The rocket_core_init driver expects both RK3576_PD_NPU0 and RK3576_PD_NPU1 on
rknn_core_0 to satisfy a hardware constraint where the CBUF->CMAC read path
requires both.
Because the DT only lists one power domain per core, the kernel platform bus
auto-attaches it and sets dev->pm_domain. When the driver then calls
devm_pm_domain_attach_list(), it will return -EEXIST, which the driver treats
as a fatal error and aborts probe. Missing RK3576_PD_NPU1 on rknn_core_0 also
breaks runtime PM, leading to AXI lockups.
> + iommus = <&rknn_mmu_0>;
> + status = "disabled";
> + };
> +
[ ... ]
> + rknn_core_1: npu@27710000 {
> + compatible = "rockchip,rk3576-rknn-core";
> + reg = <0x0 0x27710000 0x0 0x1000>,
> + <0x0 0x27711000 0x0 0x1000>,
> + <0x0 0x27713000 0x0 0x1000>,
> + <0x0 0x27714000 0x0 0x1000>,
> + <0x0 0x27715000 0x0 0x1000>;
> + reg-names = "pc", "cna", "core", "dpu", "dpu_rdma";
> + interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru ACLK_RKNN1>, <&cru HCLK_RKNN_ROOT>,
> + <&cru CLK_RKNN_DSU0>, <&cru PCLK_NPUTOP_ROOT>;
> + clock-names = "aclk", "hclk", "npu", "pclk";
[Severity: High]
Will the driver fail to probe here due to missing CBUF clocks?
The rocket_core_init function explicitly requests 6 clocks (aclk, hclk, npu,
pclk, aclk_cbuf, hclk_cbuf) using devm_clk_bulk_get(). Since rknn_core_1 only
defines 4 clocks, the API will fail with -ENOENT, making the second NPU core
unusable.
> + resets = <&cru SRST_A_RKNN1>;
> + reset-names = "srst_a";
> + power-domains = <&power RK3576_PD_NPU1>;
> + iommus = <&rknn_mmu_1>;
> + status = "disabled";
> + };
> +
> + rknn_mmu_1: iommu@2770a000 {
> + compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu";
> + reg = <0x0 0x2770a000 0x0 0x100>,
> + <0x0 0x2770a100 0x0 0x100>;
[Severity: High]
Is this physical register address mapped correctly?
It looks like the base address is misplaced by 0x8000 relative to where it
belongs inside the rknn_core_1 memory footprint. The rknn_core_1 registers
span 0x27710000-0x27715000, with a 1-page gap at 0x27712000 for the IOMMU
(which is structurally symmetric to rknn_core_0 having its IOMMU at
0x27702000).
When the IOMMU driver attempts to access 0x2770a000 instead of 0x27712000, it
will likely cause a Synchronous External Abort or fail to translate memory
for the NPU.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717085220.3212274-1-gahing@gahingwoo.com?part=8
next prev parent reply other threads:[~2026-07-17 9:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 8:50 [RFC PATCH 0/9] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 1/9] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 8:59 ` sashiko-bot
2026-07-17 10:02 ` Chaoyi Chen
2026-07-17 10:02 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 2/9] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:07 ` sashiko-bot
2026-07-17 8:50 ` [RFC PATCH 3/9] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:04 ` sashiko-bot
2026-07-17 8:50 ` [RFC PATCH 4/9] iommu/rockchip: skip orphaned-fault banks in rk_iommu_is_stall_active Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:11 ` sashiko-bot
2026-07-17 10:15 ` Chaoyi Chen
2026-07-17 10:15 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 5/9] iommu/rockchip: skip orphaned-fault banks in CMD_ENABLE_STALL dispatch Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:23 ` sashiko-bot
2026-07-17 8:50 ` [RFC PATCH 6/9] iommu/rockchip: take all DT clocks Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 10:19 ` Chaoyi Chen
2026-07-17 10:19 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 7/9] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:21 ` sashiko-bot
2026-07-17 10:29 ` Chaoyi Chen
2026-07-17 10:29 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 8/9] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:30 ` sashiko-bot [this message]
2026-07-17 8:50 ` [RFC PATCH 9/9] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
2026-07-17 8:50 ` Jiaxing Hu
2026-07-17 9:32 ` sashiko-bot
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=20260717093029.AA6381F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gahing@gahingwoo.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.