blob: a6c8978964aa163250f070aa1ead247792fffa50 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001Specifying wakeup capability for devices
2============================================
3
4Any device nodes
5----------------
Tom Rini93743d22024-04-01 09:08:13 -04006Nodes that describe devices which have wakeup capability may contain a
Tom Rini53633a82024-02-29 12:33:36 -05007"wakeup-source" boolean property.
8
Tom Rini93743d22024-04-01 09:08:13 -04009If the device is marked as a wakeup-source, interrupt wake capability depends
10on the device specific "interrupt-names" property. If no interrupts are labeled
11as wake capable, then it is up to the device to determine which interrupts can
12wake the system.
13
14However if a device has a dedicated interrupt as the wakeup source, then it
15needs to specify/identify it using a device specific interrupt name. In such
16cases only that interrupt can be used as a wakeup interrupt.
Tom Rini53633a82024-02-29 12:33:36 -050017
Tom Rini93743d22024-04-01 09:08:13 -040018While various legacy interrupt names exist, new devices should use "wakeup" as
19the canonical interrupt name.
Tom Rini53633a82024-02-29 12:33:36 -050020
21List of legacy properties and respective binding document
22---------------------------------------------------------
23
241. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
252. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
263. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
27 Documentation/devicetree/bindings/mfd/tc3589x.txt
28 Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
294. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
Tom Rini6bb92fc2024-05-20 09:54:58 -0600305. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml
Tom Rini53633a82024-02-29 12:33:36 -0500316. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
32
33Examples
34--------
35
361. With "wakeup" interrupt name
37
38 device@10000 {
39 compatible = "vendor,device-id";
40 reg = <0x10000 0x1000>;
41 interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
42 interrupt-names = "ack", "err", "wakeup";
43 wakeup-source;
44 };
45
462. Without "wakeup" interrupt name
47
48 embedded-controller {
49 compatible = "google,cros-ec-i2c";
50 reg = <0x1e>;
51 interrupts = <6 0>;
52 interrupt-parent = <&gpx1>;
53 pinctrl-names = "default";
54 pinctrl-0 = <&ec_irq>;
55 wakeup-source;
56 };
57
583. Without interrupts
59
60 gpio_keys {
61 compatible = "gpio-keys";
62 #address-cells = <1>;
63 #size-cells = <0>;
64
65 button@1 {
66 debounce-interval = <50>;
67 wakeup-source;
68 linux,code = <116>;
69 label = "POWER";
70 gpios = <&iofpga_gpio0 0 0x4>;
71 };
72 [....]
73 };