xref: /freebsd/sys/contrib/device-tree/Bindings/power/wakeup-source.txt (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1Specifying wakeup capability for devices
2============================================
3
4Any device nodes
5----------------
6Nodes that describe devices which has wakeup capability must contain an
7"wakeup-source" boolean property.
8
9Also, if device is marked as a wakeup source, then all the primary
10interrupt(s) can be used as wakeup interrupt(s).
11
12However if the devices have dedicated interrupt as the wakeup source
13then they need to specify/identify the same using device specific
14interrupt name. In such cases only that interrupt can be used as wakeup
15interrupt.
16
17List of legacy properties and respective binding document
18---------------------------------------------------------
19
201. "gpio-key,wakeup"		Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
212. "has-tpo"			Documentation/devicetree/bindings/rtc/rtc-opal.txt
223. "linux,wakeup"		Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
23				Documentation/devicetree/bindings/mfd/tc3589x.txt
24				Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
254. "linux,keypad-wakeup"	Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
265. "linux,input-wakeup"		Documentation/devicetree/bindings/input/samsung-keypad.txt
276. "nvidia,wakeup-source"	Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
28
29Examples
30--------
31
321. With "wakeup" interrupt name
33
34	device@10000 {
35		compatible	= "vendor,device-id";
36		reg		= <0x10000 0x1000>;
37		interrupts	= <0 19 4>, <0 21 4>, <0 22 4>;
38		interrupt-names	= "ack", "err", "wakeup";
39		wakeup-source;
40	};
41
422. Without "wakeup" interrupt name
43
44	embedded-controller {
45		compatible = "google,cros-ec-i2c";
46		reg = <0x1e>;
47		interrupts = <6 0>;
48		interrupt-parent = <&gpx1>;
49		pinctrl-names = "default";
50		pinctrl-0 = <&ec_irq>;
51		wakeup-source;
52	};
53
543. Without interrupts
55
56	gpio_keys {
57		compatible = "gpio-keys";
58		#address-cells = <1>;
59		#size-cells = <0>;
60
61		button@1 {
62			debounce-interval = <50>;
63			wakeup-source;
64			linux,code = <116>;
65			label = "POWER";
66			gpios = <&iofpga_gpio0 0 0x4>;
67		};
68		[....]
69	};
70