MX8 suspend

From Variscite Wiki
VAR-SOM-MX8 Suspend to RAM

Suspend to RAM

This state offers significant power savings as everything in the system is put into a low-power state, except for memory, which is placed into the self-refresh mode to retain its contents.

To suspend to RAM execute the following command:

# pm-suspend

Wake up

There are many possible ways to wake up from suspend.
A few examples:

  • Pushing the ON/OFF button (when present on the board)
  • Pushing a button on the board which has the properties "pad-wakeup-num" and "pad-wakeup" set in its device tree node (under gpio related node), e.g.:
   wakeup from direct GPIOs
   &lsio_gpio5 {
       /* Enable wakeup-source from all gpio-keys*/
       pad-wakeup-num = <4>;  /* Total number of wakeup pads in gpio5 bank */
       /*
        Each triple means:
        gpio-key pin id
        trigger type
        gpio pin
       */
       /*            KEY_BACK                                        KEY_DOWN,                                        KEY_HOME,                                       KEY_UP */
       pad-wakeup = <IMX8QM_USDHC1_DATA4 SC_PAD_WAKEUP_LOW_LVL 19>, <IMX8QM_USDHC1_STROBE SC_PAD_WAKEUP_LOW_LVL 23>, <IMX8QM_USDHC1_DATA5 SC_PAD_WAKEUP_LOW_LVL 20>, <IMX8QM_USDHC1_DATA6 SC_PAD_WAKEUP_LOW_LVL 21>;
   };
   wakeup from IOexpander GPIOs
   &lsio_gpio1 {
       /* Enable wakeup-source from all pca9534 gpio-keys*/
       pad-wakeup-num = <1>;	/* Total number of wakeup pads in gpio1 bank */
       /*
        IMX8QM_MIPI_CSI0_MCLK_OUT: PCA9534 IRQ pin id
        SC_PAD_WAKEUP_LOW_LVL:     trigger type
        24:                        PCA9534 IRQ gpio pin
       */
       pad-wakeup = <IMX8QM_MIPI_CSI0_MCLK_OUT SC_PAD_WAKEUP_LOW_LVL 24>;
   };
  • Pressing the capacitive touch which has the properties "pad-wakeup-num" and "pad-wakeup" set in its device tree node (under touch IRQ gpio related node), e.g.:
   &lsio_gpio1 {
       /* Enable wakeup-source from Capacitive touch */
       pad-wakeup-num = <1>; /* Total number of wakeup pads in gpio1 bank */
       /*
        IMX8QM_LVDS0_GPIO01:   Touch IRQ pin id
        SC_PAD_WAKEUP_LOW_LVL: trigger type
        5:                     Touch IRQ gpio pin
       */
       pad-wakeup = <IMX8QM_LVDS0_GPIO01 SC_PAD_WAKEUP_LOW_LVL 5>;
   };
  • Pressing any key on debug console defined as wake-up source before entering suspend (see below):
$ echo enabled > /sys/devices/platform/bus@5a000000/5a060000.serial/tty/ttyLP0/power/wakeup