-
Couldn't load subscription status.
- Fork 214
Description
When checking the default NPU clock frequency of the Rock 4D and comparing it to the Rock 5B I noticed the Rock 4D's NPU frequency defaults to the slowest speed of 300Mhz where the Rock 5B defaults to its maximum speed of of 1Ghz. Whilst both SoC's have a 6 TOPS NPU the Rock 4D's was considerably slower.
Rock 4D
$ sudo cat /sys/class/devfreq/27700000.npu/cur_freq
300000000
Rock 5B
$ sudo cat /sys/class/devfreq/fdab0000.npu/cur_freq
1000000000
The default frequencies should correspond to the init-freq in the DTS files of;
kernel/arch/arm64/boot/dts/rockchip/rk3576.dtsi
Line 2497 in 74729d7
| rockchip,init-freq = <950000>; |
and
kernel/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
Line 3585 in 74729d7
| rockchip,init-freq = <1000000>; /* KHz */ |
We can see the RK3576 sets the init-freq to the maximum speed of 950Mhz, however this value is not being defaulted to.
I have not found where in the rknpu driver code is responsible for this, however the rk3576 and rk3588 code paths are different, so when loading the frequency from the OPP table there is a bug somewhere which is causing the rk3576 to default to the lowest available frequency of 300Mhz, instead of the init-freq of 950Mhz.