DART-6UL WakeableGPIO: Difference between revisions
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
= Define GPIO as a key pad = | = Define GPIO as a key pad = | ||
Add the following section to the '''imx6ul-var-dart.dtsi''' file, right after leds section: | Add the following section to the '''imx6ul-imx6ull-var-dart-common.dtsi''' file, right after leds section: | ||
<pre> | <pre> | ||
gpio_keys { | gpio_keys { | ||
Line 24: | Line 24: | ||
= Add GPIO pad configuration = | = Add GPIO pad configuration = | ||
Add the following section to the '''imx6ul-var-dart.dtsi''' file, into pinctrl_hog_1 group: | Add the following section to the '''imx6ul-imx6ull-var-dart-common.dtsi''' file, into pinctrl_hog_1 group: | ||
<pre> | <pre> | ||
MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01 0x1b0b0 /* WAKE gpio */ | MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01 0x1b0b0 /* WAKE gpio */ |
Revision as of 08:22, 12 April 2018
In Suspend mode, The power domains of all pins of the SOM are switched off in memory retention mode => All GPIOs lose their state.
The only domain that remains alive is RTC domain (SNVS) and the only pins that still accessible are bank 5 of the GPIO.
The DART-6UL provides 4 external GPIO pins that are a part of bank 5, and can be used for waking the system up and for controlling external peripherals in sleep mode.
In the below example we will use GPIO5_1 to wake up the system. This pin is exposed on J2.64 of the SOM and on pin J6.6 of the EVK.
Define GPIO as a key pad
Add the following section to the imx6ul-imx6ull-var-dart-common.dtsi file, right after leds section:
gpio_keys { compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; autorepeat; button@21 { label = "GPIO Key UP"; linux,code = <103>; gpios = <&gpio5 1 1>; gpio-key,wakeup; }; };
Add GPIO pad configuration
Add the following section to the imx6ul-imx6ull-var-dart-common.dtsi file, into pinctrl_hog_1 group:
MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01 0x1b0b0 /* WAKE gpio */
Enter memory retention mode
$ echo mem > /sys/power/state
Wake up the system
Connect pins J6.6 and J6,8 with a jumper. It will wake the system up.
You can also press the PWR button to wake up the system.