m1zfs Posted 1 hour ago Posted 1 hour ago (edited) Hello Armbian-Community! TL;DR I've successfully enabled the Rockchip RK3568 NPU (0.8 TOPS INT8) on the ODROID-M1 with 8GB RAM running Armbian 6.18.9-current-rockchip64. The only thing needed to make this work for everyone is a 1-line kernel patch in Armbian build that I've already submitted: https://github.com/armbian/build/pull/9403 Once this patch is merged into Armbian, the DKMS modules will work out-of-the-box on all RK3568 boards. The Problem 1. Hardkernel and Rockchip provide NPU patches for quite old kernel versions: rockchip <= 6.6 hardkernel <= 5.10 2. IOMMU page table allocation bug — On systems with >4GB RAM, the kernel's IOMMU allocates page tables above 4GB, but the NPU can only access the first 4GB of physical memory, causing DMA mapping failures and inference timeouts The Solution 1. Kernel Patch (1 line!) - .gfp_flags = 0, + .gfp_flags = GFP_DMA32, This forces IOMMU page tables to be allocated below 4GB, fixing NPU operation on 8GB boards. 2. DKMS Driver Package I've created a complete DKMS package that: - Includes DT overlays for NPU, IOMMU, power-domain, and clock configuration - Supports dynamic frequency scaling (100 MHz - 1000 MHz) - Provides `/dev/dri/renderD129` (DRM/GEM interface) for RKNN Runtime - Would compile against Armbian's stock kernel headers with the above patch merged The Questions 1. What would be the best way to provide those modules for installation in the armbian system? 2. Has someone a 4 GB version of the M1 and could test the modules? Edited 1 hour ago by m1zfs 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.