18c2ecf20Sopenharmony_ciSpecifying wakeup capability for devices 28c2ecf20Sopenharmony_ci============================================ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciAny device nodes 58c2ecf20Sopenharmony_ci---------------- 68c2ecf20Sopenharmony_ciNodes that describe devices which has wakeup capability must contain an 78c2ecf20Sopenharmony_ci"wakeup-source" boolean property. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciAlso, if device is marked as a wakeup source, then all the primary 108c2ecf20Sopenharmony_ciinterrupt(s) can be used as wakeup interrupt(s). 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciHowever if the devices have dedicated interrupt as the wakeup source 138c2ecf20Sopenharmony_cithen they need to specify/identify the same using device specific 148c2ecf20Sopenharmony_ciinterrupt name. In such cases only that interrupt can be used as wakeup 158c2ecf20Sopenharmony_ciinterrupt. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciList of legacy properties and respective binding document 188c2ecf20Sopenharmony_ci--------------------------------------------------------- 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt 218c2ecf20Sopenharmony_ci2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt 228c2ecf20Sopenharmony_ci3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt 238c2ecf20Sopenharmony_ci4. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt 248c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/mfd/tc3589x.txt 258c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/input/touchscreen/ads7846.txt 268c2ecf20Sopenharmony_ci5. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt 278c2ecf20Sopenharmony_ci6. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt 288c2ecf20Sopenharmony_ci7. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciExamples 318c2ecf20Sopenharmony_ci-------- 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci1. With "wakeup" interrupt name 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci device@10000 { 368c2ecf20Sopenharmony_ci compatible = "vendor,device-id"; 378c2ecf20Sopenharmony_ci reg = <0x10000 0x1000>; 388c2ecf20Sopenharmony_ci interrupts = <0 19 4>, <0 21 4>, <0 22 4>; 398c2ecf20Sopenharmony_ci interrupt-names = "ack", "err", "wakeup"; 408c2ecf20Sopenharmony_ci wakeup-source; 418c2ecf20Sopenharmony_ci }; 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci2. Without "wakeup" interrupt name 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci embedded-controller { 468c2ecf20Sopenharmony_ci compatible = "google,cros-ec-i2c"; 478c2ecf20Sopenharmony_ci reg = <0x1e>; 488c2ecf20Sopenharmony_ci interrupts = <6 0>; 498c2ecf20Sopenharmony_ci interrupt-parent = <&gpx1>; 508c2ecf20Sopenharmony_ci pinctrl-names = "default"; 518c2ecf20Sopenharmony_ci pinctrl-0 = <&ec_irq>; 528c2ecf20Sopenharmony_ci wakeup-source; 538c2ecf20Sopenharmony_ci }; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci3. Without interrupts 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci gpio_keys { 588c2ecf20Sopenharmony_ci compatible = "gpio-keys"; 598c2ecf20Sopenharmony_ci #address-cells = <1>; 608c2ecf20Sopenharmony_ci #size-cells = <0>; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci button@1 { 638c2ecf20Sopenharmony_ci debounce-interval = <50>; 648c2ecf20Sopenharmony_ci wakeup-source; 658c2ecf20Sopenharmony_ci linux,code = <116>; 668c2ecf20Sopenharmony_ci label = "POWER"; 678c2ecf20Sopenharmony_ci gpios = <&iofpga_gpio0 0 0x4>; 688c2ecf20Sopenharmony_ci }; 698c2ecf20Sopenharmony_ci [....] 708c2ecf20Sopenharmony_ci }; 71