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.

SYS_OFF_MODE not toggling

Hi,

I am using OMAP3621  for my product with Linux 2.6.35(p-android-omap-2.6.35).

When the device go to suspend state VDD1/VDD2 remain at  .94v/1.13v. Console gets disabled and from the print it looks like CORE and MPU went into idle state.

We would like to bring VDD1/2 to 0v for more power saving.

While probing SYS_OFF_MODE line in dont see this line toggling.

After looking into the code "arch/arm/mach-omap2/pm34xx.c" I dont see any place where "OMAP3430_AUTO_OFF_MASK" is set.

As per TRM unless this bit is set OMAP will not toggle SYS_OFF_MODE line.

I tried setting the bit like below.  But once I set this bit it looks like OMAP wakes up immediately after suspend without any external trigger.  And this loop keeps on with repeated prints on the terminal.

     if (core_next_state == PWRDM_POWER_OFF) {
                      prm_set_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,
                                              OMAP3430_GR_MOD,
                                              OMAP3_PRM_VOLTCTRL_OFFSET);

Need help to understand why setting this bit wakes up OMAP ?

Attached register dumps without above modification.

3731.register_before.txt

Thanks & Regards

Freddy

  • As a part of PSP release, we never made any release on 2.6.35 kernel,  so I may not be able to help you directly from 2.6.35 kernel baseline perspective.

    you may want to refer/review the 2.637 based PSP release where we have validated full off mode. There are some patches which you may have to back-port to your kernel baseline (2.6.35), patches quickly I can point you to are -

    Git Repo - http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog;h=refs/heads/OMAPPSP_04.02.00.07

    Commits--

      omap3evm: Configure to use sys_offmode
      mfd: twl: Prevent dual initialization of PMIC scripts
      omap3evm: Add support for PMIC scripts
      omap3evm: Board specific initialization (workaround)
      mfd: twl: Enable execution of power scripts (as default)
      mfd: twl: Use appropriate config option

    Thanks,

    Vaibhav

  • Hi Vaibhav,

    Thanks for clarifying about the feature support in 2.6.35.

    As a quick trial to back port changes suggested above, I tried to apply the changes related to OMAP(since some of the changes are specific to PMIC).

    My approach here was to first make OMAP assert SYS_OFF_MODE and then look at PMIC behaviour. Please correct me if it wont work this way.

    Our issue here is that when we add these changes to support SYS_OFF_MODE(setting AUTO_OFF_MASK bit), OMAP wakes  back automatically from suspend state.

    If I don't have those changes to the kernel, it goes to suspend mode and I can see "successfully put all power domain put to target state 0"  on next wake up due to key press.

    It never generates a SYS_OFF_MODE or i2c  signal since we dont set  AUTO_OFF_MASK bit.

    Is it possible to find out from the above attached register dumps why OMAP is waking up immediately if we set  AUTO_OFF_MASK ?

    Thanks,

    Freddy