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.

switch DSP off/on

Guru 20755 points
Other Parts Discussed in Thread: CCSTUDIO

Hello,

Is there a simple way to switch dsp off and on in Linux/u-boot ?

Thank you,

Ran

  • Hi Ran,

    In EZSDK we have DSP firmware which is loaded after u-boot and kernel:

    root@dm814x-evm:~# firmware_loader 0 /usr/share/ti/ti-media-controller-utils/dm814x_c6xdsp.xe674 start

    root@dm814x-evm:~# firmware_loader 0 /usr/share/ti/ti-media-controller-utils/dm814x_c6xdsp.xe674 stop

    In u-boot and linux kernel, you can reuse the code from the DM814x GEL file (used in CCStudio):

    #define CTRL_MODULE_BASE_ADDR 0x48140000
    #define GEM_L2RAM_BASE_ADDR 0x40800000

    /* Control Module*/
    #define CM_CTRL_CLKCTRL 0x481815c4
    #define DSPBOOTADDR (CTRL_MODULE_BASE_ADDR + 0x0048)
    #define DSPMEM_SLEEP (CTRL_MODULE_BASE_ADDR + 0x0650)
    #define GMII_SELECT (CTRL_MODULE_BASE_ADDR + 0x0650)
    #define CM_ALWON_L3_SLOW_CLKSTCTRL (PRCM_BASE_ADDR + 0x1400)

    /*GEMSS PRCM definition*/
    #define CM_GEM_CLKSTCTRL (PRCM_BASE_ADDR + 0x0400)
    #define CM_ACTIVE_GEM_CLKCTRL (PRCM_BASE_ADDR + 0x0420)
    #define PM_ACTIVE_PWRSTST (PRCM_BASE_ADDR + 0x0A04)
    #define RM_ACTIVE_RSTCTRL (PRCM_BASE_ADDR + 0x0A10)
    #define RM_ACTIVE_RSTST (PRCM_BASE_ADDR + 0x0A14)

    #define CM_MMU_CLKSTCTRL (PRCM_BASE_ADDR + 0x140C)
    #define CM_ALWON_MMUDATA_CLKCTRL (PRCM_BASE_ADDR + 0x159C)

    #define CM_MMUCFG_CLKSTCTRL (PRCM_BASE_ADDR + 0x1410)
    #define CM_ALWON_MMUCFG_CLKCTRL (PRCM_BASE_ADDR + 0x15A8)
    /*END OF GEMSS PRCM Definition*/

    #define DSP_PLL_BASE (PLL_BASE_ADDRESS+0x080)

    #define DSPPLL_CLOCK_CONTROL (PLL_SUBSYSTEM_BASE_ADDR + 0x084)

    DSP_PLL_Config();

    GEMSSClkEnable()

    BR
    Pavel
  • Hi Pavel,

    Thank you very much for the info.
    Do I switch between on/off state using the DSPMEM_SLEEP ? If yes - where is the "dsp loading" relevant for this case ?

    Thanks!
    Ran
  • For power off/on the DSP, see bit PM_ACTIVE_PWRSTCTRL[1:0] PowerState

    See also http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/256582/912194#912194

  • Thank you,

    Do you think it is correct to load the dsp binary at startup and then turn off/on the dsp in runtime for power saving ?

    Regards,
    Ran
  • I think this is correct.

    BR
    Pavel