I’m currently trying to get the NPU on my Orange Pi 5 Plus working to run various AI-related Docker projects, with a specific focus on getting the rkllama project up and running. I’m hoping to get some guidance or share experiences with anyone who might have attempted something similar.
My Hardware:
Device: Orange Pi 5 Plus (32GB RAM)
Storage: NVMe SSD
OS: DietPi v9.15.2
My Goal:
My plan is to use DietPi as the base OS, install OpenMediaVault (OMV) on top of it, and then use Docker to run several different containers. A primary goal is to leverage the NPU for performance in projects like rkllama.
What I’ve Tried So Far:
Unfortunately, I’ve already had a few unsuccessful attempts. I’ve tried this with the official Orange Pi image and also with Armbian, but in every case, I’ve failed to get access to the NPU driver from within the operating system or the Docker container.
I’m relatively new to the world of single-board computers with NPUs, so I’m still learning. My current setup is a Raspberry Pi 4 running OMV with a few Docker containers, and I’m looking to migrate and expand on my new Orange Pi.
Has anyone had success with accessing the NPU on the Orange Pi 5 Plus with a recent DietPi build? I would be very grateful for any help, tips, or pointers on how to get the driver recognized and passed through to Docker containers.
Hi,
Just installed v9.20.1 on OPi 5 Max and can’t get the NPU to work either, no kernel module present and it seems to be as if disabled by firmware… The vendor repo - RKlinux do have the driver, yet it doesn’t seem to be in the kernel (or initrd) image, or maybe disabled somehow?
TL;DR: Does modprobe brcmfmac actually work instead? While the driver is located below some Rockchip vendor subdir, and the chip is labelled AP6611, it is a Broadcom chip (indicated by the module name, but also clearly stated in source files). There is some info that the bcmdhd driver is actually an Android Broadcom WiFi driver, while Linux ships its brcmfmac. That wouldn’t be so surprising, since Rockchip had shared Android and Linux sources earlier, one of the issues with earlier Rockchip vendor kernels throwing a bunch of additional errors and warnings since Android-only flags were enabled. I gave them a hint a while ago related to some particular prominent multi-line warning caused by a flag that really made sense on Android only, and they separated sources with 5.10 IIRC. But I would not wonder if some (originally) Android drivers remained in the sources.
Let’s see, the two supplies it looks up are defined here:
This is the same for all RK3588 boards (with vendor kernel). The nodes are defined here:
There we have the regions it can’t request. And then it seems to retry 2 times, causing the “already present” errors from debugfs.
No idea, neither the driver nor those parts in the device trees (which are all the same across all boards) have seen any changed within 2 years. Do you have any overlays active? Also maybe try with an older kernel builds:
apt policy linux-image-vendor-rk35xx
Don’t forget to downgrade the linux-dtb-vendor-rk35xx package as well. Reminds me that I want to merge those two packages.
Didn’t use overlays (except the ones present in the images, if any). The board appears to be of “rev 1.1”, no idea if this may be the reason, but doubtful. The npu is initialized perfectly in the mainline - 6.18.0-edge-rockchip64: [ 0.997022] platform fdab0000.npu: Adding to iommu group 0 [ 0.998374] platform fdac0000.npu: Adding to iommu group 1 [ 0.999665] platform fdad0000.npu: Adding to iommu group 2 [ 10.949953] rocket fdab0000.npu: Rockchip NPU core 0 version: 1179210309 [ 10.950294] rocket fdac0000.npu: Rockchip NPU core 1 version: 1179210309 [ 10.950584] rocket fdad0000.npu: Rockchip NPU core 2 version: 1179210309
My bad about the vpu and hantro module mixup, it was a bad grep output very similar to npu initialization… Trying the modprobe brcmfmac on the edge has yielded only this:
[ 512.582827] usbcore: registered new interface driver brcmfmac
wlan didn’t turn up:(
Please, I beg of you to merge these two! Silly me tried to switch kernels using apt install, rendering the setup unbootable. Due to that, I must add that armbian’s Kernel menu is awesome, makes switching pretty automated.
P.S.
After witnessing armbian’s setup, I must extend deepest gratitude and respect to Michalng and the Team for all the efforts! Und a Happy New Year to everyone!
The TensorFlow Lite delegate Teflon also works as a liteRT backend for etnaviv
(VeriSilicon VIPNano NPU), which has long been upstream, as well as for the upcoming ethosu (Arm Ethos-U65/U85 NPU).
Though it might not contain all needed chip IDs. Always a problem with scattered sources patched independently, everyone adds own chip IDs and firmware paths as needed.