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.

disable power domains

Guru 20755 points
Other Parts Discussed in Thread: OMAP3530

Hello,

I am starting now a session of PM (power mangement) debugging and testing with OMAP3530.

As a preperation, I would like to know if it is possible in some simple way to disable power domains from linux or u-boot (I would like to have the capability for debug through this PM session testing).

Thanks,

Ran 

  • Hi Ran,

    It is purely depends on the processor side so you have to write a driver for that.

    I don't think that linux wont support this by default.

  • Hi Titusrathinaraj Stalin,

    Thanks very much for your support on this.

    I am facing issue where not all power domain are disabled:

    ~ # cat /dbg/pm_debug/count
    usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:0,RET:3,INA:4,ON:7,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (12)
    core_l3_clkdm->core_pwrdm (4)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (0)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)

    I would like to know if there is some strategy how to handle this, or do I need to create my own library which disabled PRCM ? Isn't there any driver/module support this ? or and wiki how to start debugging the PM issue ? or am I the first one who encounter this and need to create libraries for disabling PRCM ?

    Thanks for your assistance ,

    Ran

  • Hi Ran,

    Please redirect me to your TI SDK download link for linux kernel.

  • Hi Titusrathinaraj,

    This is the version we are using in our custom board with OMAP353:

    http://software-dl.ti.com/dsps/dsps_public_sw/psp/LinuxPSP/OMAP_04_02/04_02_00_07/index_FDS.html

    Thank you very much for assistance on this,

    Ran

  • Hi Titusrathinaraj,


    After wakeup from console sleep when I try to see the state I get:
    ~ # cat /dbg/pm_debug/count
    usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:0,RET:3,INA:4,ON:7,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (12)
    core_l3_clkdm->core_pwrdm (4)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (0)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)

    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/time
    811807044
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state2/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state3/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state4/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state5/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state6/time
    0

    Do you have any suggestion, how I can understand why it did not get
    into retention and how to continue from this point ?

    Thanks very much,
    Ran
  • Hi Titusrathinaraj,,

    I hope you can assist me with getting into power save mode:

    When I try to do suspend from userspace, I get better results (than cpuidle which still does not get into retention) and it seems that all domain been put to RET or OFF (as you can see below) but on checking power state time it still shows 0 for all states (except state0). Do you know why ?

    usbhost_pwrdm (ON),OFF:0,RET:2,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:0,RET:2,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:0,RET:5,INA:4,ON:9,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:0,RET:2,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:0,RET:2,INA:0,ON:3,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:0,RET:2,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (12)
    core_l3_clkdm->core_pwrdm (4)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (0)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)


    ~ #
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state1/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state2/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state3/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state4/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state5/time
    0
    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state6/time
    0

    Thank you,
    Ran
  • Hi Ran,

    How did you initiate the low power mode ?

    Is it CPUIdle ?

    Are you initiating CPUIdle low power state (C state of the system)

    C1 -> MPU WFI (Wait for interrupt mode)

    C2 -> MPU WFI + DDR will be put into self refresh mode

    "cat /sys/devices/system/cpu/cpu0/cpuidle/state1/time" command is used to how much time spent with last low power mode only for CPUFreq framework.

  • Hi 

    I made some progress :) It seems I now get into retention !

    >How did you initiate the low power mode ?

    I now get better results. I put all uart in idle (at first I put only console (uart #2) which was not suffecient for moving to deeper state). Now I enable all uart sleep as following:
    echo 1 >  /sys/devices/platform/omap/omap_uart.0/sleep_timeout
    echo 1 >  /sys/devices/platform/omap/omap_uart.1/sleep_timeout
    echo 1 >  /sys/devices/platform/omap/omap_uart.2/sleep_timeout

    I now see that state4 counter is incremented (as I understand state 4 is retention)

    ~ # cat /sys/devices/system/cpu/cpu0/cpuidle/state4/time
    111496918

    Still some strange riddle, there is still picture showing on the screen connected to omap. Does it make sense ?

    Thanks!

    Ran