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.

4AJ.2.5P2 with OMAP4460 suspend issue

We apply JAJ.2.5P2 on our custom board, when system is suspended, we have no method let it resumed from suspended

This is my log attached, I very need someone to give me suggestions. Thank you.

1781.log.txt

  • Hello Bernie,

    I suggest seeing functions in the following files:

    arch/arm/mach-omap2/pm4xxx_5xxx.c

    arch/arm/mach-omap2/pm.c

    These are part from your Android release.


    Best regards,

    Yanko

  • Hi Yanko


    I have surveyed in the internet, and the root cause is that Device omapdss_dpi  led to system in deep sleep with kernel 3.4.  Could you give me some suggestions to fix it please? Thanks.

  • Hello Bernie,

    I will see your question in details.

    You could refer to the link with basic display boot arguments and try to apply them - http://omappedia.org/wiki/Bootargs_for_enabling_display#Basic_usage

    Best regards,

    Yanko

  • Hi Yanko


    Thank you very much. I have disabled  DPI device, but the wrong messages blew cause system doesn't s resume  after suspend.

    PM: Device alarmtimer failed to suspend: error -16 -> It because Nearest alarm wakeup time < 2sec, avoiding suspend

    omap_i2c omap_i2c.3: active I2C transaction detected - suspend aborted-> some driver use I2C.3,but I don't know what driver use it.

     

    Best Regards

    Bernie

  • Hello Bernie,

    I am investigating your issue with suspend mode.

    I think that it might be caused by incorrect clock configuration after/before transition from suspend to active modes.

    You said that you are using custom board with OMAP4460. Did you apply any changes in board files for your device?

    Would you provide more information about the applied changes in your 4AJ.2.5P2?

    I found a similar problem in errata for OMAP4470:

    static struct clockdomain l3_dss_443x_446x_clkdm = {
        .name          = "l3_dss_clkdm",
        .pwrdm          = { .name = "dss_pwrdm" },
        .prcm_partition      = OMAP4430_CM2_PARTITION,
        .cm_inst      = OMAP4430_CM2_DSS_INST,
        .clkdm_offs      = OMAP4430_CM2_DSS_DSS_CDOFFS,
        .dep_bit      = OMAP4430_DSS_STATDEP_SHIFT,
        .wkdep_srcs      = l3_dss_wkup_sleep_deps,
        .sleepdep_srcs      = l3_dss_wkup_sleep_deps,
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
    };

    /*
     * WORK-AROUND: There are currently problems with integration of BB2D with
     * DSS during suspend/resume. Therefore we have added a special version of
     * of l3_dss_clkdm for 4470 which will not use HW_AUTO
     */
    static struct clockdomain l3_dss_447x_clkdm = {
        .name          = "l3_dss_clkdm",
        .pwrdm          = { .name = "dss_pwrdm" },
        .prcm_partition      = OMAP4430_CM2_PARTITION,
        .cm_inst      = OMAP4430_CM2_DSS_INST,
        .clkdm_offs      = OMAP4430_CM2_DSS_DSS_CDOFFS,
        .dep_bit      = OMAP4430_DSS_STATDEP_SHIFT,
        .wkdep_srcs      = l3_dss_wkup_sleep_deps,
        .sleepdep_srcs      = l3_dss_wkup_sleep_deps,
        .flags          = CLKDM_CAN_SWSUP,
    }

    Refer to files - arch/arm/mach-omap2/ clockdomains44xx_data.c

                              arch/arm/mach-omap2/ control.c

                              arch/arm/mach-omap2/ dvfs.c

    Best regards,

    Yanko

     

  • Hi Yanko


    We referenced JorJin's JAJ.2.5P2, so they are many differences between them. And We are downloading  JAJ2.5P2

    source code trying again.


    Threre are three patchs we apply.

    8357.bring_HDMI_up.patch.txt

    4442.bring_USB_serial.txt

    3323.enable_WIFI.patch.txt

  • Hello Bernie,

    I think that suspend issue is caused by this patch:

    @@ -507,14 +507,12 @@ static struct regulator_init_data omap4_vpp_idata = {
     
     static struct regulator_init_data omap4_vusim_idata = {
         .constraints = {
    -        .min_uV            = 1200000,
    -        .max_uV            = 2900000,
    -        .apply_uV        = true,
    +        .min_uV            = 1800000,                              Remove this lines in your configuration and test again.
    +        .max_uV            = 1800000,
             .valid_modes_mask    = REGULATOR_MODE_NORMAL
                         | REGULATOR_MODE_STANDBY,
    -        .valid_ops_mask     = REGULATOR_CHANGE_VOLTAGE
    -                    | REGULATOR_CHANGE_MODE
    -                    | REGULATOR_CHANGE_STATUS,
    +        .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
    +        .always_on = true,
             .state_mem = {
                 .disabled    = true,
             },


    Could you send me your twl-common.c file?

    Did you apply any changes in /kernel/power/ wakelock.c or suspend.c?

    Best regards,

    Yanko

  • Hi Yanko


    Our board are not on here now, so I will try your suggestions later.

    I have looked up "git log" at kernel, JorJin didn't apply any changes in wakelock.c and suspend.c, but twl-common.c did.

    BestRegards

    Bernie

    4035.twl-common.c

    2514.wakelock.c

    2625.suspend.c

  • Hello Bernie,

    I made a comparison between android-3.4/kernel/power/suspend.c in 4AJ.2.5P2 and your suspend.c file.

    It seems that your suspend.c file is not actual and there is no suspend .

    I suggest using suspend.c file from 4AJ.2.5P2 release - 6507.suspend.c

    Apply the following function in your twl-common.c

    static struct regulator_init_data omap4_vusim_idata = {
        .constraints = {
            .min_uV            = 1200000,
            .max_uV            = 2900000,
            .apply_uV        = true,
            .valid_modes_mask    = REGULATOR_MODE_NORMAL
                        | REGULATOR_MODE_STANDBY,
            .valid_ops_mask     = REGULATOR_CHANGE_VOLTAGE
                        | REGULATOR_CHANGE_MODE
                        | REGULATOR_CHANGE_STATUS,
            .state_mem = {
                .disabled    = true,
            },
            .initial_state        = PM_SUSPEND_MEM,
        },
    };

    Best regards,

    Yanko

  • Hi Yanko

    I very appreciate your reply.


    1   I found another the same board which is applied JAJ2.5P2 and do not anything your revises that it can be suspended and resumed when I press suspend button. This is suspend log below.

    root@android:/ #
    [  189.480285] request_suspend_state: sleep (0->3) at 189474121095 (2000-01-01 01:50:07.590606690 UTC)
    [  189.490814] DSSCOMP: dsscomp_early_suspend
    [  189.509460] DSSCOMP: blanked screen
    [  192.287689] HDCP: hdcp_3des_cb: hdcp_keys not loaded = 0
    [  192.287689]
    [  192.317291] input: cec_keyboard as /devices/virtual/input/input4
    [  198.634002] binder: 404:421 transaction failed 29189, size 608-0

    root@android:/ #
    root@android:/ #
    root@android:/ # [  245.227203] request_suspend_state: wakeup (3->0) at 245221008321 (2000-01-01 01:51:03.337524433 UTC)
    [  245.237365] DSSCOMP: dsscomp_late_resume
    [  245.795654] input: cec_keyboard as /devices/virtual/input/input5

    2 I revised voltages you recommend and applied to the board  that it have suspend problem do not fix the suspend issue.

    3 And I replace arch/arm/kernel/suspend.c with yours that it can not be compiled, the error message below

    {MYDROID}/logs/kernel_make.out
      CHK     include/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
      CALL    scripts/checksyscalls.sh
      CHK     include/generated/compile.h
      CC      arch/arm/kernel/suspend.o
    arch/arm/kernel/suspend.c:30:19: fatal error: power.h: No such file or directory
    compilation terminated.
    make[1]: *** [arch/arm/kernel/suspend.o] Error 1
    make: *** [arch/arm/kernel] Error 2

    BestRegards

    Bernie

  • Hello Bernie,

    OK, in this case do not use my suspend.c file, use your suspend.c

    I assume that your problem is caused by disabled power options in your .config file.

    Check your .config file and enable suspend mode support.

    #
    # Power management and ACPI options
    #
    CONFIG_SUSPEND=y
    CONFIG_SUSPEND_FREEZER=y
    # CONFIG_WAKELOCK is not set
    CONFIG_USER_WAKELOCK=y
    # CONFIG_HIBERNATION is not set
    CONFIG_PM_SLEEP=y
    CONFIG_PM_SLEEP_SMP=y
    CONFIG_PM_RUNTIME=y
    CONFIG_PM=y
    CONFIG_PM_DEBUG=y
    # CONFIG_PM_ADVANCED_DEBUG is not set
    CONFIG_PM_TEST_SUSPEND=y
    CONFIG_CAN_PM_TRACE=y
    CONFIG_PM_TRACE=y
    CONFIG_PM_TRACE_RTC=y
    # CONFIG_SUSPEND_TIME is not set

    Best regards,

    Yanko

  • Hi Yanko

    Thank you.

    I enable your selections, but unfortunately It has not any change..

    Best regards

    Bernie