Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rock 4D - RK3576 NPU clock frequency value defaulting to 300Mhz #432

@swdee

Description

@swdee

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;

rockchip,init-freq = <950000>;

and

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions