We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:c2_gpio_key_wakeup [2017/07/24 18:02]
joy.cho [3. SW Set-up (1) - Ubuntu]
en:c2_gpio_key_wakeup [2017/07/24 18:07] (current)
joy.cho [2. Available Keys]
Line 1: Line 1:
 ====== Power Off and Wake Up using GPIO Key Button ====== ====== Power Off and Wake Up using GPIO Key Button ======
 This section describes how to set up GPIO key button for power off and wake up purpose.\\ This section describes how to set up GPIO key button for power off and wake up purpose.\\
-  - [[odroid-c2:​application_note:​gpio:gpio_key_wakeup#​hardware_set-up|Hardware Set-up]] +  - [[en:c2_gpio_key_wakeup&​#​hardware_set-up|Hardware Set-up]] 
-  - [[odroid-c2:​application_note:​gpio:gpio_key_wakeup#​available_keys|Available Keys]] +  - [[en:c2_gpio_key_wakeup&​#​available_keys|Available Keys]] 
-  - [[odroid-c2:​application_note:​gpio:gpio_key_wakeup#​sw_set-up_1_-_ubuntu|SW Set-up (1) Ubuntu]] +  - [[en:c2_gpio_key_wakeup&​#​sw_set-up_1_-_ubuntu|SW Set-up (1) Ubuntu]] 
-  - [[odroid-c2:​application_note:​gpio:gpio_key_wakeup#​sw_set-up_2_-_android|SW Set-up (2) Android]] +  - [[en:c2_gpio_key_wakeup&​#​sw_set-up_2_-_android|SW Set-up (2) Android]] 
-  - [[odroid-c2:​application_note:​gpio:gpio_key_wakeup#​troubleshooting|Troubleshooting]]+  - [[en:c2_gpio_key_wakeup&​#​troubleshooting|Troubleshooting]]
  
 The brief set-up flow is as following.\\ The brief set-up flow is as following.\\
Line 67: Line 67:
  
 You can find the detailed information about 40-pin and 7-pin connectors in the following link.\\ You can find the detailed information about 40-pin and 7-pin connectors in the following link.\\
-[[odroid-c2:​hardware:​expansion_connectors|Expansion Connectors]]\\+[[en:c2_hardware&#​expansion_connectors|Expansion Connectors]]\\
  
 ==== 3. SW Set-up (1) - Ubuntu ==== ==== 3. SW Set-up (1) - Ubuntu ====
Line 101: Line 101:
 To wake-up after power off, long-pressing over 2 seconds is needed. To wake-up after power off, long-pressing over 2 seconds is needed.
  
-==== 4. SW Set-up (2) - Android ====+==== 4. SW Set-up (2) - Android ​ ==== 
 +<WRAP center round important>​ 
 +  * Android : You have to modify the dts file in Android Marshmallow (v2.4) and higher version to using this functionality. 
 +</​WRAP>​ 
 +=== (1) Modifying and Flashing Kernel dts === 
 +In case of Android, you have to modify the dts file to activate gpio key functionality.\\ 
 + 
 +[[https://​github.com/​hardkernel/​linux/​blob/​odroidc2-3.14.y-android/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts|C2 Android DTS]]\\ 
 + 
 +<​kernel_path>/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts 
 +<​code>​ 
 +... 
 +gpio_keypad{ 
 +    . 
 +    status = "​okay";​ 
 +    . 
 +}; 
 +... 
 +</​code>​ 
 + 
 +After compiling the dts file, you can flash the dtb file to the board. 
 + 
 +In kernel: 
 +<code bash target>​ 
 +$ make odroidc2_defconfig 
 +$ make dtbs 
 +$ fastboot flash dtb arch/​arm64/​boot/​dts/​meson64_odroidc2.dtb 
 +$ fastboot reboot 
 +</​code>​ 
 + 
 +You have to flash dtbs file when board it is in u-boot fastboot mode. 
 + 
 +In board: 
 +<code bash target>​ 
 +$ reboot fastboot 
 +</​code>​ 
 + 
 +=== (2) Setting boot.ini === 
 +In Android boot.ini, you can find a "​gpiopower"​ example. 
 +Uncomment "​gpiopower"​ part and modify the number with the number you want to use. 
 +<code ini target>​ 
 +## gpio power key : J2 (2x20) Pin#29 , GPIOX.BIT0 
 +setenv gpiopower "​228"​ 
 +</​code>​ 
 + 
 +=== (3) Setting Power Button Action for Power Off === 
 +In Android, you don't need to set any menu for power button actions but it's already defined as following.\\ 
 + 
 +One short power key event is used for sleep, and with long key event, you can handle options of power off/​reboot.\\ 
 +With Android Marshmallow v2.4 or higher version, it's available to enter power off using **long-pressing (5 sec)**. 
 + 
 +=== (4) Wake up Action === 
 +And to wake-up after power off, long-pressing over 2 seconds is needed. 
 + 
 +==== 5. Troubleshooting ​ ==== 
 +https://​forum.odroid.com/​viewtopic.php?​f=137&​t=27602#​p195995 \\ 
 + 
 +https://​forum.odroid.com/​viewtopic.php?​f=136&​t=27636 
 + 
en/c2_gpio_key_wakeup.1500888775.txt.gz · Last modified: 2017/07/24 18:02 by joy.cho
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0