This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to control AM5728's DSP frequency in Linux? (or if I want to write a kernel driver to do it, how?)

Other Parts Discussed in Thread: AM5728

Hi, everyone,


I'm doing power optimization for a AM5728 board.

I found out my DSP frequency stays at 600MHz no matter what the CPU frequency governor is doing to the ARM frequency.

The /drivers/cpufreq/driversomap_cpufreq.c that implements the frequency change is currently only setting the ARM frequency.

The cpufreq core driver, /drivers/cpufreq/cpufreq.c, is also only accepting one low level driver to be registered so there's no way to add another driver that adjusts DSP frequency.

Question:

1. In the 4.4 kernel in Processor SDK 3.0x, does the kernel already provide adjust DSP frequency in user space? (probably not, right?)

2. If I want to write a kernel driver that exports a sysfs file to do this, where shall I put the driver and what device tree binding shall I use?

    There are a few options here:

    First, there is already cpu@0 node in the device tree. Is it OK if I add a cpu@1 and use that to instantiate a different driver to control DSP frequency?

    Second, there is the DSP1 node in the device tree, which instantiate the rproc driver /drivers/remoteproc/omap_remoteproc.c. Then it may be a good choice to implement frequency control here, isn't it? This would also open up the possibility of reusing the code to control the IPU frequency.

3. I kind of understand DSP frequency can be adjusted by changing PRCM registers, but what if I want to deep sleep the DSP, how shall I do it?

The imaging device I'm designing is battery operated and DSP is only useful when it's imaging. It is desirable to turn down the DSP or put it into deep sleep when when the device is not imaging. So this is something worth figuring out early.

Thanks everyone for reading through all my questions and I would appreciate your help.

Dehuan