All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiaxing Hu" <gahing@gahingwoo.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH v2 8/8] arm64: dts: rockchip: rk3576-rock-4d: enable NPU
Date: Sat, 18 Jul 2026 03:24:07 +0000	[thread overview]
Message-ID: <20260718032408.01E2B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260718031146.3368811-9-gahing@gahingwoo.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] An SoC-level power domain dependency is improperly implemented as a board-level override in `rk3576-rock-4d.dts`.
- [Medium] The device tree assigns two power domains to `rknn_core_0`, which violates the DT binding schema's `maxItems: 1` constraint.
- [Medium] The NPU regulator is forced permanently on via `regulator-always-on`, circumventing proper power management, and the `npu-supply` property is functionally dead code.
--

--- Patch [8]: [RFC PATCH v2 8/8] arm64: dts: rockchip: rk3576-rock-4d: enable NPU ---
commit 1ea2a06c9849a71ed6c8698699f42f0e551d0d72
Author: Jiaxing Hu <gahing@gahingwoo.com>

arm64: dts: rockchip: rk3576-rock-4d: enable NPU
    
Enable rknn_core_0 and rknn_mmu_0 on the Radxa ROCK 4D and supply the
NPU rail (vdd_npu_s0) via npu-supply.

> diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> index 272af1012ab03..09d2fc98bb4c1 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> @@ -442,6 +442,7 @@ regulator-state-mem {
>  			};
>  
>  			vdd_npu_s0: dcdc-reg2 {
> +				regulator-always-on;

[Severity: Medium]
Does this unconditionally force the regulator on, completely defeating runtime
power management and causing a permanent power leak when the NPU is idle?

>  				regulator-boot-on;
>  				regulator-enable-ramp-delay = <400>;
>  				regulator-min-microvolt = <550000>;

[ ... ]

> +
> +&rknn_core_0 {
> +	npu-supply = <&vdd_npu_s0>;

[Severity: Medium]
The commit message mentions supplying the NPU rail via npu-supply, but is this
property functionally dead code here?

The rocket driver does not appear to make any regulator API calls, and there
is no OPP table present to trigger generic devfreq parsing.

> +	/*
> +	 * Power BOTH NPU domains (NPU0 + NPU1) like the vendor's single NPU node,
> +	 * even though rocket computes only on core 0: the CBUF->CMAC read path is
> +	 * only fully powered with NPU1 up. rocket attaches the multi-PD list.
> +	 */
> +	power-domains = <&power RK3576_PD_NPU0>, <&power RK3576_PD_NPU1>;

[Severity: Medium]
Will this assignment of two power domains fail dtbs_check validation?

Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml
explicitly enforces maxItems: 1 for power-domains.

[Severity: High]
Should this power domain dependency be placed in the SoC's .dtsi file instead
of a board-specific override?

Since the CBUF->CMAC read path hardware dependency is a property of the RK3576
silicon rather than board wiring, keeping it in the board DTS means any other
RK3576 board enabling rknn_core_0 via the base rk3576.dtsi might silently lack
this dependency, leading to hardware hangs or corrupted reads.

> +	status = "okay";
> +};
> +
> +&rknn_mmu_0 {
> +	status = "okay";
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260718031146.3368811-1-gahing@gahingwoo.com?part=8

      reply	other threads:[~2026-07-18  3:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18  3:11 [RFC PATCH v2 0/8] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-07-18  3:11 ` Jiaxing Hu
2026-07-18  3:11 ` [RFC PATCH v2 1/8] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:19   ` sashiko-bot
2026-07-18  7:49   ` Krzysztof Kozlowski
2026-07-18  7:49     ` Krzysztof Kozlowski
2026-07-18  3:11 ` [RFC PATCH v2 2/8] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:20   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 3/8] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:22   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 4/8] iommu/rockchip: take all DT clocks Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:22   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 5/8] iommu/rockchip: clear stale page faults before enabling stall Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:26   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 6/8] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:27   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 7/8] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:26   ` sashiko-bot
2026-07-18  3:11 ` [RFC PATCH v2 8/8] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
2026-07-18  3:11   ` Jiaxing Hu
2026-07-18  3:24   ` sashiko-bot [this message]

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=20260718032408.01E2B1F000E9@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.