All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Daniel Drake" <ddrake@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
	robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
Date: Thu, 03 Dec 2026 22:21:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-248738@kernel.org> (raw)
In-Reply-To: <20261203-vim3l-npu-dts-v1-2-66070d7ff83e@baylibre.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] pmdomain: meson-ee-pwrc: sm1_pwrc_mem_nna only masks 0xff in
  NANOQ regs
--

commit a3044788ce55542c20bfaad8827c7dd78056cc92
Author: Daniel Drake <ddrake@baylibre.com>

arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU

This commit enables the VIPPico v3 NPU node on the Khadas VIM3L board.

> diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> index 4e1e9a5026666..fbf5136c56311 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> @@ -97,3 +97,7 @@ &usb {
>  &sd_emmc_a {
>  	sd-uhs-sdr50;
>  };
> +
> +&npu {
> +	status = "okay";
> +};

[Severity: Medium]
Are the 0xff masks in sm1_pwrc_mem_nna sufficient for the S905D3 NPU?

Enabling npu on Khadas VIM3L is the first in-tree SM1 user of
PWRC_SM1_NNA_ID.  Unlike every other table entry in
drivers/pmdomain/amlogic/meson-ee-pwrc.c, sm1_pwrc_mem_nna uses raw 0xff
masks instead of GENMASK():

drivers/pmdomain/amlogic/meson-ee-pwrc.c:
static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_nna[] = {
	{ HHI_NANOQ_MEM_PD_REG0, 0xff },
	{ HHI_NANOQ_MEM_PD_REG1, 0xff },
};

meson_ee_pwrc_on() and meson_ee_pwrc_off() only touch the masked bits,
leaving bits 31:8 unchanged.  On g12a_pwrc_mem_nna, leaving upper bits
unmasked caused NPU hangs until commit b131329b9bfb ("pmdomain: amlogic:
Fix mask for the second NNA mem PD domain") set both to GENMASK(31, 0).

If S905D3 uses bits 31:8 for NNA SRAM power-down, meson_ee_pwrc_on() will
leave those banks powered down and cause NPU hangs or faults, while
meson_ee_pwrc_off() will fail to power them down.  Should the masks be
verified against the S905D3 documentation or vendor BSP?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-vim3l-npu-dts-v1-0-66070d7ff83e@baylibre.com?part=2

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Daniel Drake" <ddrake@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
	robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
Date: Thu, 03 Dec 2026 22:21:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-248738@kernel.org> (raw)
In-Reply-To: <20261203-vim3l-npu-dts-v1-2-66070d7ff83e@baylibre.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] pmdomain: meson-ee-pwrc: sm1_pwrc_mem_nna only masks 0xff in
  NANOQ regs
--

commit a3044788ce55542c20bfaad8827c7dd78056cc92
Author: Daniel Drake <ddrake@baylibre.com>

arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU

This commit enables the VIPPico v3 NPU node on the Khadas VIM3L board.

> diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> index 4e1e9a5026666..fbf5136c56311 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
> @@ -97,3 +97,7 @@ &usb {
>  &sd_emmc_a {
>  	sd-uhs-sdr50;
>  };
> +
> +&npu {
> +	status = "okay";
> +};

[Severity: Medium]
Are the 0xff masks in sm1_pwrc_mem_nna sufficient for the S905D3 NPU?

Enabling npu on Khadas VIM3L is the first in-tree SM1 user of
PWRC_SM1_NNA_ID.  Unlike every other table entry in
drivers/pmdomain/amlogic/meson-ee-pwrc.c, sm1_pwrc_mem_nna uses raw 0xff
masks instead of GENMASK():

drivers/pmdomain/amlogic/meson-ee-pwrc.c:
static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_nna[] = {
	{ HHI_NANOQ_MEM_PD_REG0, 0xff },
	{ HHI_NANOQ_MEM_PD_REG1, 0xff },
};

meson_ee_pwrc_on() and meson_ee_pwrc_off() only touch the masked bits,
leaving bits 31:8 unchanged.  On g12a_pwrc_mem_nna, leaving upper bits
unmasked caused NPU hangs until commit b131329b9bfb ("pmdomain: amlogic:
Fix mask for the second NNA mem PD domain") set both to GENMASK(31, 0).

If S905D3 uses bits 31:8 for NNA SRAM power-down, meson_ee_pwrc_on() will
leave those banks powered down and cause NPU hangs or faults, while
meson_ee_pwrc_off() will fail to power them down.  Should the masks be
verified against the S905D3 documentation or vendor BSP?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-vim3l-npu-dts-v1-0-66070d7ff83e@baylibre.com?part=2

  reply	other threads:[~2026-12-03 22:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 22:02 [PATCH 0/2] Enable NPU on Amlogic S905D3 Daniel Drake
2026-12-03 22:02 ` Daniel Drake
2026-12-03 22:02 ` [PATCH 1/2] arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt Daniel Drake
2026-12-03 22:02   ` Daniel Drake
2026-12-03 22:08   ` sashiko-bot
2026-12-03 22:08     ` sashiko-bot
2026-12-04  8:16   ` Neil Armstrong
2026-12-04  8:16     ` Neil Armstrong
2026-12-03 22:02 ` [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU Daniel Drake
2026-12-03 22:02   ` Daniel Drake
2026-12-03 22:21   ` sashiko-bot [this message]
2026-12-03 22:21     ` sashiko-bot
2026-12-04  8:16   ` Neil Armstrong
2026-12-04  8:16     ` Neil Armstrong

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=sashiko-outbox-248738@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=ddrake@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --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.