[PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Dec 3 14:21:46 PST 2026
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 at 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
More information about the linux-amlogic
mailing list