* [PATCH 0/2] Enable NPU on Amlogic S905D3
@ 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 ` [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU Daniel Drake
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Drake @ 2026-12-03 22:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: devicetree, linux-arm-kernel, linux-amlogic, Daniel Drake
Assign the correct interrupt and enable the NPU on Amlogic S905D3 found
in Khadas VIM3L. This NPU will be supported by mesa's existing
etnaviv ml driver with some minor changes:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/47056
Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
Daniel Drake (2):
arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt
arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts | 4 ++++
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 1 +
2 files changed, 5 insertions(+)
---
base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
change-id: 20261203-vim3l-npu-dts-72569d296bf0
Best regards,
--
Daniel Drake <ddrake@baylibre.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt
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:08 ` sashiko-bot
2026-12-03 22:02 ` [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU Daniel Drake
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Drake @ 2026-12-03 22:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: devicetree, linux-arm-kernel, linux-amlogic, Daniel Drake
On SM1 the NPU interrupt is SPI 186, as confirmed in the Khadas VIM3L
vendor device tree (mesonsm1.dtsi in khadas-vims-5.15.y).
Override the interrupts property accordingly. This fixes interrupts on
the SM1 NPU and allows NPU jobs to run to completion on Khadas VIM3L.
Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
index 8f5b850b1774..dae336d5f820 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
@@ -587,5 +587,6 @@ &usb {
};
&npu {
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&pwrc PWRC_SM1_NNA_ID>;
};
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt
2026-12-03 22:02 ` [PATCH 1/2] arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt Daniel Drake
@ 2026-12-03 22:08 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-12-03 22:08 UTC (permalink / raw)
To: Daniel Drake; +Cc: devicetree, linux-amlogic, robh, conor+dt, neil.armstrong
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] arm64: dts: amlogic: missing Fixes trailer on SM1 NPU interrupt
bug fix
--
commit 34328d3445e7a3d2372f1a7bdac63434b85e4b9c
Author: Daniel Drake <ddrake@baylibre.com>
> arm64: dts: amlogic: meson-sm1: Fix the NPU interrupt
>
> On SM1 the NPU interrupt is SPI 186, as confirmed in the Khadas VIM3L
> vendor device tree (mesonsm1.dtsi in khadas-vims-5.15.y).
>
> Override the interrupts property accordingly. This fixes interrupts on
> the SM1 NPU and allows NPU jobs to run to completion on Khadas VIM3L.
>
> Signed-off-by: Daniel Drake <ddrake@baylibre.com>
[Severity: Low]
This fixes the SM1 &npu node inheriting the G12B/A311D interrupt
(GIC SPI 147) from meson-g12-common.dtsi. Should this include:
Fixes: 18b542e544d3 ("arm64: dts: Add DT node for the VIPNano-QI on the A311D")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-vim3l-npu-dts-v1-0-66070d7ff83e@baylibre.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
2026-12-03 22:02 [PATCH 0/2] Enable NPU on Amlogic S905D3 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:21 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Drake @ 2026-12-03 22:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: devicetree, linux-arm-kernel, linux-amlogic, Daniel Drake
Enable the VIPPico v3 NPU of the S905D3 on the Khadas VIM3L.
Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts | 4 ++++
1 file changed, 4 insertions(+)
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 4e1e9a502666..fbf5136c5631 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";
+};
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU
2026-12-03 22:02 ` [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU Daniel Drake
@ 2026-12-03 22:21 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-12-03 22:21 UTC (permalink / raw)
To: Daniel Drake; +Cc: devicetree, linux-amlogic, robh, conor+dt, neil.armstrong
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-03 22:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 22:02 [PATCH 0/2] Enable NPU on Amlogic S905D3 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:08 ` sashiko-bot
2026-12-03 22:02 ` [PATCH 2/2] arm64: dts: amlogic: meson-sm1-khadas-vim3l: Enable NPU Daniel Drake
2026-12-03 22:21 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox