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.

suspend issue : how to debug suspend? OMAP4460 / ES1.1/1.2G

Other Parts Discussed in Thread: TWL6030

Hi all:

I have a problem when debug suspend and idle in Our Custom board.

We use OMAP4460 ES1.1 ,  1.2G, And PMIC is TWL6030. It's an android tablet, and the hardware is refering to Blaze tablet.

Now the hardware is almost the minimum, and the power consumption is 30mA (with the DC power supply voltage is 4.2V).

It's too high for our probuct. 

So My question is: How can Idebug suspend to reduce the suspending power consumption?

Now we can enter suspend state succesfully, and  i can dump the regulator and clock info after All the device is suspended.

(before "static int suspend_enter(suspend_state_t state)" (in file kernel3.0.21/kernel/power/suspend.c))

Below is the dump info:

http://pastebin.com/TEbYRt9B


What the right status of All the regulators after suspend? 

How can i dump the suspend context before omap4_enter_sleep()? ( the function in kernel3.0.21/arch/arm/mach-omap3/pm44xx.c )

What's  the lowest suspend power consumption We can get ? (No 3G modem, just a normal android tablet).


Thank you for your kind help!!

Best regards!




  • teddy stone said:

    Hi all:

    I have a problem when debug suspend and idle in Our Custom board.

    We use OMAP4460 ES1.1 ,  1.2G, And PMIC is TWL6030. It's an android tablet, and the hardware is refering to Blaze tablet.

    Now the hardware is almost the minimum, and the power consumption is 30mA (with the DC power supply voltage is 4.2V).

    It's too high for our probuct. 

    So My question is: How can Idebug suspend to reduce the suspending power consumption?

    First and foremost, is the device entering the OFF state during suspend? The console log on exiting suspend should show if the target states were entered. Can you provide the console log to see what states were entered?

    You can also check off-mode is enabled by ...

    # cat /sys/kernel/debug/pm_debug/enable_off_mode


    teddy stone said:

    Now we can enter suspend state succesfully, and  i can dump the regulator and clock info after All the device is suspended.

    (before "static int suspend_enter(suspend_state_t state)" (in file kernel3.0.21/kernel/power/suspend.c))

    Below is the dump info:

    http://pastebin.com/TEbYRt9B


    What the right status of All the regulators after suspend? 

    I am not sure about the regulator status, but I would have thought measuring the power during suspend would tell you more than after. I am not sure how the regulator status after suspend would help. 

    teddy stone said:

    How can i dump the suspend context before omap4_enter_sleep()? ( the function in kernel3.0.21/arch/arm/mach-omap3/pm44xx.c )

    Specifically what function are you referring too here? As I mentioned, the prcm context after suspend should be dumped to tell you what states the power domains entered.

    teddy stone said:

    What's  the lowest suspend power consumption We can get ? (No 3G modem, just a normal android tablet).


    I believe that for OMAP4460 it should be less than 3mA. However, do you know where who is consuming the 30mA on your board? Do you know if this is OMAP or could be other devices?

    Jon

  • Hi,Jon Hunter:

    Thank you for your quick reply!

    The off-mode is enabled.

    / # cat /sys/kernel/debug/pm_debug/enable_off_mode
    1

    I am sure that all the devices enter suspend state successfully. " Successfully put all powerdomains to target state "

    Below is the kernel log:

    ..........................

    >>>---- powerbutton_irq@84 >>> power button <<<
    >>>---- state_store@184 ........cmd = mem
    request_suspend_state: sleep (0->3) at 28388824465 (2000-01-02 00:50:55.043273925 UTC)
    DSSCOMP: dsscomp_early_suspend
    DSSCOMP: blanked screen
    PM: Syncing filesystems ... done.
    PM: Preparing system for mem sleep
    Freezing user space processes ... (elapsed 0.02 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    PM: Entering mem sleep
    Suspending console(s) (use no_console_suspend to debug)

    PM: suspend of devices complete after 50.140 msecs
    PM: late suspend of devices complete after 0.854 msecs
    Disabling non-boot CPUs ...
    CPU1: shutdown
    Resume caused by IRQ 39, TWL6030-PIH
    Successfully put all powerdomains to target state
    wakeup wake lock: alarm
    Enabling non-boot CPUs ...
    CPU1: Booted secondary processor
    Switched to NOHz mode on CPU #1
    CPU1 is up
    PM: early resume of devices complete after 1.068 msecs
    PM: resume of devices complete after 171.417 msecs
    PM: Finishing wakeup.
    Restarting tasks ... >>>---- hub_activate@713 ----type=HUB_RESUME
    hub 1-0:1.0: activate --> -22
    done.
    suspend: exit suspend, ret = 0 (2000-01-02 00:51:03.026916500 UTC)
    request_suspend_state: wakeup (3->0) at 29081634524 (2000-01-02 00:51:03.043853756 UTC)

    ..........................

    The function i refered is the suspend entry. I remember that In omap3, we can dump some PRCM module's registers before and after suspend. And It's very useful for us to debug suspend and idle. So i wonder if is there a same debug method in omap4's kernel ? Or any other debug method can help the software engineer to Know which power supply or clock source still alive?

    I measured the hardware test point.When suspend , Most of the regulator are disabled(The VCORE1 VCORE2 VCORE3....etc ), but some regulator and clock are still alive.

    But It's hard to isolate all the hardware modules to locate the real problem. So it's very useful if there is a software debug method.

    Is there any infomation about "pm debug"?

    3mA is very good to a product. Our battery's capacity is 4000mAh. 

    Thank you for you help and best regards!

  • teddy stone said:

    I measured the hardware test point.When suspend , Most of the regulator are disabled(The VCORE1 VCORE2 VCORE3....etc ), but some regulator and clock are still alive.

    Are vdd_mpu, vdd_iva and vdd_core 0V? If so then you should be in off mode. I am not sure if these are the same rails as vcore1-3.

    If you are in OFF mode then the main system clock (fref_xtal_in) should be gated to the device. It is important that this clock is shutdown. The only clock input active should be the 32kHz clock (sys_32k). Those would be the first things I would check.

    Cheers
    Jon

  • Hi, Jon Hunter:

    yes , vdd_mpu, vdd_iva and vdd_core are 0V.  I am sure the system is in off mode.

    Thank you for your suggestion!

    I will check the clock firstly.