[PATCH] arm64: dts: rockchip: Enable the NPU on LubanCat 4
Pufan Jin <[email protected]> Tue, 4 Aug 2026 22:29:42 +0800
| Newsgroups | org.infradead.lists.linux-rockchip,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The three RKNN cores and their IOMMUs are disabled by default in the SoC dtsi, so the board has to describe the NPU supply before they can be enabled. This board feeds both the NPU logic and its SRAM from a single RK8602 output on i2c1. The vendor DTS makes that explicit by giving the same regulator node two labels, vdd_npu_s0 and vdd_npu_mem_s0, and then handing one to rknpu-supply and the other to mem-supply. There is no separate memory rail to describe, so npu-supply and sram-supply both point at vdd_npu_s0. The binding requires both properties. Neither property is what actually enables the rail: the rocket driver never requests a regulator, it only takes clocks, resets, register ranges and a power domain. The rk3588 power domain driver marks RK3588_PD_NPU as needing a regulator, so the rail has to be described on pd_npu, the root of VD_NPU that the three per-core domains hang off. This matches what rock-5b does. Mainline has no NPU OPP table, so all three cores stay at the 200 MHz the SoC dtsi assigns to the shared SCMI clock. Clocking them higher needs an OPP table to move vdd_npu_s0 along with the frequency, which is left for later work. Tested on rev 20241026 hardware: all three cores probe, each reporting NPU core version 1179210309 and landing in its own IOMMU group, the rocket driver registers /dev/accel/accel0, vdd_npu_s0 comes up enabled at 800 mV and dmesg is free of NPU errors. Signed-off-by: Pufan Jin <[email protected]> --- .../boot/dts/rockchip/rk3588s-lubancat-4.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts index a0fc128ce6e1..c623a4c46d22 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts @@ -365,6 +365,10 @@ &pd_gpu { domain-supply = <&vdd_gpu_s0>; }; +&pd_npu { + domain-supply = <&vdd_npu_s0>; +}; + &pinctrl { hym8563 { hym8563_int: hym8563-int { @@ -407,6 +411,36 @@ &pwm0 { status = "okay"; }; +&rknn_core_0 { + npu-supply = <&vdd_npu_s0>; + sram-supply = <&vdd_npu_s0>; + status = "okay"; +}; + +&rknn_core_1 { + npu-supply = <&vdd_npu_s0>; + sram-supply = <&vdd_npu_s0>; + status = "okay"; +}; + +&rknn_core_2 { + npu-supply = <&vdd_npu_s0>; + sram-supply = <&vdd_npu_s0>; + status = "okay"; +}; + +&rknn_mmu_0 { + status = "okay"; +}; + +&rknn_mmu_1 { + status = "okay"; +}; + +&rknn_mmu_2 { + status = "okay"; +}; + &saradc { vref-supply = <&avcc_1v8_s0>; status = "okay"; -- 2.55.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip