2b68134925
- Strip the perf-trace debug instrumentation (dbg_* counters + HWSUB/rkopnu-trace dev_err); it served its purpose (proved the drm_sched glue is ~3% of a submit). No functional change. - README.md: full build+setup guide (kernel requirements, DT enablement, rocket blacklist, out-of-tree build, librknnrt + rk-llama.cpp rknpu2 userspace, perf notes, limitations). - dt/rk3588-npu-enable.dtso: the necessary DT patch -- mainline ships the RKNN cores + IOMMUs status=disabled; this enables them + OPP table (example board: CoolPi CM5 GenBook; supplies are board-specific). - config/rkopnu.config: kernel config fragment (DRM_ACCEL etc.). - LICENSE: GPL-2.0. A third party can now recreate the mainline-NPU stack from this repo alone.
94 lines
2.2 KiB
Plaintext
94 lines
2.2 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
/*
|
|
* RK3588 NPU enablement overlay for rkopnu (example: CoolPi CM5 GenBook).
|
|
*
|
|
* Mainline ships the three RKNN cores + IOMMUs status = "disabled". This
|
|
* overlay enables them and attaches a DVFS OPP table (vendor V/f pairs,
|
|
* 300 MHz-1 GHz). Apply it (extlinux `fdtoverlays`, U-Boot `fdt apply`, or
|
|
* fold the changes into your board .dts) to bring the NPU up for rkopnu.
|
|
*
|
|
* BOARD-SPECIFIC: point npu-supply/sram-supply at YOUR board's NPU regulator
|
|
* (commonly vdd_npu_s0) and make sure &pd_npu has a domain-supply (most RK3588
|
|
* board DTs already wire this). Deleting assigned-clock-rates lets the driver's
|
|
* OPP DVFS own the NPU clock. Node labels (rknn_core_0.., rknn_mmu_0..) are the
|
|
* mainline rk3588-base.dtsi labels.
|
|
*/
|
|
|
|
/dts-v1/;
|
|
/plugin/;
|
|
|
|
&{/} {
|
|
npu_opp_table: opp-table-npu {
|
|
compatible = "operating-points-v2";
|
|
|
|
opp-300000000 {
|
|
opp-hz = /bits/ 64 <300000000>;
|
|
opp-microvolt = <700000>;
|
|
};
|
|
opp-400000000 {
|
|
opp-hz = /bits/ 64 <400000000>;
|
|
opp-microvolt = <700000>;
|
|
};
|
|
opp-500000000 {
|
|
opp-hz = /bits/ 64 <500000000>;
|
|
opp-microvolt = <700000>;
|
|
};
|
|
opp-600000000 {
|
|
opp-hz = /bits/ 64 <600000000>;
|
|
opp-microvolt = <700000>;
|
|
};
|
|
opp-700000000 {
|
|
opp-hz = /bits/ 64 <700000000>;
|
|
opp-microvolt = <700000>;
|
|
};
|
|
opp-800000000 {
|
|
opp-hz = /bits/ 64 <800000000>;
|
|
opp-microvolt = <750000>;
|
|
};
|
|
opp-900000000 {
|
|
opp-hz = /bits/ 64 <900000000>;
|
|
opp-microvolt = <800000>;
|
|
};
|
|
opp-1000000000 {
|
|
opp-hz = /bits/ 64 <1000000000>;
|
|
opp-microvolt = <850000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&rknn_core_0 {
|
|
npu-supply = <&vdd_npu_s0>;
|
|
sram-supply = <&vdd_npu_s0>;
|
|
operating-points-v2 = <&npu_opp_table>;
|
|
/delete-property/ assigned-clock-rates;
|
|
status = "okay";
|
|
};
|
|
|
|
&rknn_core_1 {
|
|
npu-supply = <&vdd_npu_s0>;
|
|
sram-supply = <&vdd_npu_s0>;
|
|
operating-points-v2 = <&npu_opp_table>;
|
|
/delete-property/ assigned-clock-rates;
|
|
status = "okay";
|
|
};
|
|
|
|
&rknn_core_2 {
|
|
npu-supply = <&vdd_npu_s0>;
|
|
sram-supply = <&vdd_npu_s0>;
|
|
operating-points-v2 = <&npu_opp_table>;
|
|
/delete-property/ assigned-clock-rates;
|
|
status = "okay";
|
|
};
|
|
|
|
&rknn_mmu_0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&rknn_mmu_1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&rknn_mmu_2 {
|
|
status = "okay";
|
|
};
|