Enable rknn_core_0 and rknn_mmu_0 on the Radxa ROCK 4D. Supply the NPU
rail (vdd_npu_s0) via npu-supply; it is marked regulator-always-on for
now because the NPU power sequencing is still being brought up (see the
cover letter) -- happy to switch to proper runtime control once the
compute path is sorted.

Signed-off-by: Jiaxing Hu <[email protected]>
---
 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts 
b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
index 272af1012..09d2fc98b 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;
                                regulator-boot-on;
                                regulator-enable-ramp-delay = <400>;
                                regulator-min-microvolt = <550000>;
@@ -869,3 +870,18 @@ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
                remote-endpoint = <&hdmi_in_vp0>;
        };
 };
+
+&rknn_core_0 {
+       npu-supply = <&vdd_npu_s0>;
+       /*
+        * 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>;
+       status = "okay";
+};
+
+&rknn_mmu_0 {
+       status = "okay";
+};
-- 
2.43.0

Reply via email to