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.

AM5728 ARM and DSP cores power management

Other Parts Discussed in Thread: AM5728, AM5718

Hello, 

I'm trying to learn power management of AM5728 cpu.
I'm using latest TI Linux SDK
 
could you please help we with the following questions.
- how can I check  the DSP cores state - is it currently halted   (idle state?) or not.
Is there any info like wiki page or something where I can learn about DSP power management in Linux 
- Is it possible to turn off 3d accelerator if I'm not using it? Currently I'm using only the  framebuffer device.
If so - is it possible to check the power state of 3d accelerator?
- Is it possible to put one of the ARM cpu cores in an IDLE state?
Thanks!
  • Hi Sergey,

    Sergey Danilov said:
    how can I check  the DSP cores state - is it currently halted   (idle state?) or not.

    The best way is to check the corresponding PRCM registers: 

     CM_DSP1_CLKSTCTRL - at address 0x4A00 5400
     CM_DSP1_DSP1_CLKCTRL - at address 0x4A005420

     CM_DSP2_CLKSTCTRL - at address 0x4A005600

     CM_DSP2_DSP2_CLKCTRL - at address 0x4A005620

    Sergey Danilov said:
    Is it possible to turn off 3d accelerator if I'm not using it? Currently I'm using only the  framebuffer device.

    You could add status = "disabled" in the sgx: sgx@0x56000000 section from dra7.dtsi or comment out the entire sgx node. This should disable the sgx. However you should have in mind that further kernel modifications may be needed, due to dependencies. 

    Another, recommended, option is to disable pvr-init script from /etc/init.d/ without modifying the kernel source code. This way kernel will boot up fine & init scripts will NOT enable the SGX. Again you should be aware that any application that requires OpenGL or SGX acceleration will NOT work. 

    Sergey Danilov said:
    If so - is it possible to check the power state of 3d accelerator?

     

    Again see the PRCM chapter & read the appropriate registers. 

    Sergey Danilov said:
    Is it possible to put one of the ARM cpu cores in an IDLE state?

    Yes, you can execute the following commands: 
      ls /sys/devices/system/cpu

      echo 0 > /sys/devices/system/cpuX/online    // X = 0 or 1

    Hope this helps. 


    Best Regards, 
    Yordan

  • Thank you!

    I'll try your suggestions shortly

    Could I ask you one more question - is it possible to shut down the DSP completely the same way as GPU?

    We are getting about 60C degrees in idle on the TI EVM board according to cat /sys/class/thermal/thermal_zone0/temp , and it looks strange to me. Trying to find out the way to bring the power consumption down

  • Hi Sergey,

    Try unloading the dsp firmware as described here: processors.wiki.ti.com/.../Processor_Training:_Multimedia

    This way the DSP cores should remain with status="disabled", as specified in dra7.dtsi.

    Best Regards,
    Yordan
  • Thanks
    Could you please suggest the overall strategy for power consumption optimization?
    These are the features that we use on AM5728
    - Cortex A15 cores (already working on 1000mhz - it seems to be minimum possible frequency)
    - Sata, SPI, i2c, McASP ports
    - SD card
    - LCD interface (no need for 3D GPU)
    - USB

    - no need for PRUSS, onboard Cortex m4 etc
    - no need for ethernet etc

    Is it ok to have 60C temperature in idle state (TOP is showing almost zero CPU load)?
  • Hi,

    The following tool mey be of use in your case:
    processors.wiki.ti.com/.../AM572x_Power_Estimation_Tool

    Best Regards,
    Yordan
  • Thank you!

    That is very useful document.

    But I can't find a common way to manage SoC units power states in Linux.

    I mean that it's probably possible to review power state (enabled/desabled etc) of each SoC uint (like PCIe, HDMI etc), and manage these states in some common way?

    For example - I checked the Power Estimation Tool  and found that I don't need HDMI, PCIe, MMC0, MMC1, and a few more units in my application.

    How can I power them off?

    I found that even in Idle state units consume a considerable amount of Power, so that is why I'm looking for a way to  power them down completely.

    PS one side question - is it possible to Power down one of the ARM Cortex A15 cores (on AM5728)? That would be very useful to estimate power consumption of AM5718 for my application.

  • Hi Sergey,

    To prevent unnecessary peripherals from powering on, you could keep their status = "disabled" in the device tree.

    As for the temperature of the SoC, 60 degrees is quite high.. Can you verify that you run the ARM at 1GHz frequency (OPP_NOM):
    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

    Can you try to lower the defined voltages for the OPPs? The definitions are located in: arch/arm/mach-omap2/opp7xx_data.c. Have in mind that you should keep the voltages within the ranges described in Section 5.5.2 Voltage And Core Clock Specifications of AM572x DM, notes bellow Table 5-7. Voltage Domains Operating Performance Points.

    Best Regards,
    Yordan
  • Thanks!
    According to your previous reply -
    "You could add status = "disabled" in the sgx: sgx@0x56000000 section from dra7.dtsi or comment out the entire sgx node. This should disable the sgx. However you should have in mind that further kernel modifications may be needed, due to dependencies.
    Another, recommended, option is to disable pvr-init script from /etc/init.d/ without modifying the kernel source code. This way kernel will boot up fine & init scripts will NOT enable the SGX. Again you should be aware that any application that requires OpenGL or SGX acceleration will NOT work. "
    - I thought that it is not a recommended way to do these kind of things - so that is why I asked for some common way to manage power states.

    The cpu is working on 1GHZ but I'll check the voltages, thanks for you suggestion.

    BTW - I see that cpuidle is not supported on AM57x. Is it a matter of some Cortex A15 core architecture details? If not - are there plans to add support for this feature?

    Thanks for a help!