MX8 suspend: Difference between revisions
From Variscite Wiki
No edit summary |
(Add Debian Platform Customization) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8X as default | <!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8X as default | ||
--> {{# | --> {{INIT_RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX8X}} <!-- | ||
--> {{#lst: | --> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!-- | ||
--> {{PageHeader|{{#var:HARDWARE_NAME}} Suspend to RAM}}{{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}} | --> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!-- | ||
--> {{PageHeader|{{#var:HARDWARE_NAME}} Suspend to RAM}}{{DocImage|category1=Yocto|category2=Debian}} [[category:{{#var:HARDWARE_NAME}}]] | |||
= Suspend to RAM = | = Suspend to RAM = | ||
Line 15: | Line 16: | ||
There are many possible ways to wake up from suspend.<br> | There are many possible ways to wake up from suspend.<br> | ||
A few examples:<br> | A few examples:<br> | ||
* Pushing the ON/OFF button (when present on the board)<br> | |||
{{#varexists:PAD_WAKEUP_SUPPORT| | {{#varexists:PAD_WAKEUP_SUPPORT| | ||
* 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.: | |||
{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8| | |||
wakeup from direct GPIOs | wakeup from direct GPIOs | ||
&lsio_gpio5 { | &lsio_gpio5 { | ||
Line 43: | Line 45: | ||
'''pad-wakeup = <IMX8QM_MIPI_CSI0_MCLK_OUT SC_PAD_WAKEUP_LOW_LVL 24>;''' | '''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.: | wakeup from IOexpander GPIOs | ||
&lsio_gpio3 { | |||
/* Enable wakeup-source from all pca9534 gpio-keys*/ | |||
'''pad-wakeup-num = <1>;''' /* Total number of wakeup pads in gpio3 bank */ | |||
/* | |||
IMX8QXP_MIPI_CSI0_MCLK_OUT: PCA9534 IRQ pin id | |||
SC_PAD_WAKEUP_LOW_LVL: trigger type | |||
4: PCA9534 IRQ gpio pin | |||
*/ | |||
'''pad-wakeup = <IMX8QXP_MIPI_CSI0_MCLK_OUT SC_PAD_WAKEUP_LOW_LVL 4>;''' | |||
}; | |||
}} | |||
* 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.: | |||
{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8| | |||
&lsio_gpio1 { | &lsio_gpio1 { | ||
/* Enable wakeup-source from Capacitive touch */ | /* Enable wakeup-source from Capacitive touch */ | ||
Line 55: | Line 70: | ||
'''pad-wakeup = <IMX8QM_LVDS0_GPIO01 SC_PAD_WAKEUP_LOW_LVL 5>;''' | '''pad-wakeup = <IMX8QM_LVDS0_GPIO01 SC_PAD_WAKEUP_LOW_LVL 5>;''' | ||
}; | }; | ||
| | |||
&lsio_gpio0 { | |||
/* Enable wakeup-source from Capacitive touch */ | |||
'''pad-wakeup-num = <1>;''' /* Total number of wakeup pads in gpio0 bank */ | |||
/* | |||
IMX8QXP_UART1_CTS_B: Touch IRQ pin id | |||
SC_PAD_WAKEUP_LOW_LVL: trigger type | |||
24: Touch IRQ gpio pin | |||
*/ | |||
'''pad-wakeup = <IMX8QXP_UART1_CTS_B SC_PAD_WAKEUP_LOW_LVL 24>;''' | |||
}; | |||
}} | |||
| | | | ||
* Pushing a button on the board which has the boolean property "wakeup-source" set in its device tree node (under gpio_keys), e.g.: | |||
gpio-keys { | gpio-keys { | ||
Line 71: | Line 98: | ||
}; | }; | ||
* Touching the capacitive touchscreen which has the "wakeup-source" property set in its device tree node, e.g.: | |||
ft5x06_ts: ft5x06_ts@38 { | ft5x06_ts: ft5x06_ts@38 { | ||
Line 90: | Line 117: | ||
}} | }} | ||
* Pressing any key on debug console defined as wake-up source before entering suspend (see below):<br> | |||
{{#varexists:UART_CONSOLE_PATH| | {{#varexists:UART_CONSOLE_PATH| | ||
echo enabled > {{#var:UART_CONSOLE_PATH}} | $ echo enabled > {{#var:UART_CONSOLE_PATH}} | ||
| | | | ||
{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8X| | {{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8X| | ||
echo enabled > /sys/devices/platform/5a090000.serial/tty/ttyLP3/power/wakeup | $ echo enabled > /sys/devices/platform/5a090000.serial/tty/ttyLP3/power/wakeup | ||
| | | | ||
echo enabled > /sys/devices/platform/5a060000.serial/tty/ttyLP0/power/wakeup | $ echo enabled > /sys/devices/platform/5a060000.serial/tty/ttyLP0/power/wakeup | ||
}} | }} | ||
}} | }} |
Latest revision as of 15:25, 6 June 2023
Warning: This page is designed to be used with a 'release' URL parameter.
This page is using the default release RELEASE_SUMO_V1.0_VAR-SOM-MX8X.
To view this page for a specific Variscite SoM and software release, please follow these steps:
- Visit variwiki.com
- Select your SoM
- Select the software release
VAR-SOM-MX8X 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 boolean property "wakeup-source" set in its device tree node (under gpio_keys), e.g.:
gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_keys>; ... back { label = "Back"; gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; linux,code = <KEY_BACK>; wakeup-source; }; };
- Touching the capacitive touchscreen which has the "wakeup-source" property set in its device tree node, e.g.:
ft5x06_ts: ft5x06_ts@38 { status = "disabled"; compatible = "edt,edt-ft5x06"; reg = <0x38>; reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_touch>; interrupt-parent = <&gpio1>; interrupts = <14 0>; touchscreen-size-x = <800>; touchscreen-size-y = <480>; touchscreen-inverted-x; touchscreen-inverted-y; wakeup-source; };
- Pressing any key on debug console defined as wake-up source before entering suspend (see below):
$ echo enabled > /sys/devices/platform/5a090000.serial/tty/ttyLP3/power/wakeup