Debian Codegraph @

dtschema/schemas/wakeup-source.yaml

raw
1 # SPDX-License-Identifier: BSD-2-Clause
2 # Copyright 2015,2024 Arm Ltd.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/wakeup-source.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Wakeup sources
9
10 description: >
11 Nodes that describe devices which have wakeup capability may contain a
12 "wakeup-source" property. This property can be either boolean or a phandle
13 array containing references to system idle states in which this device has a
14 wakeup capability.
15
16 If the device is marked as a wakeup-source, interrupt wake capability depends
17 on the device specific "interrupt-names" property. If no interrupts are labeled
18 as wake capable, then it is up to the device to determine which interrupts can
19 wake the system.
20
21 However if a device has a dedicated interrupt as the wakeup source, then it
22 needs to specify/identify it using a device specific interrupt name. In such
23 cases only that interrupt can be used as a wakeup interrupt.
24
25 While various legacy interrupt names exist, new devices should use "wakeup" as
26 the canonical interrupt name.
27
28 maintainers:
29 - Rob Herring <[email protected]>
30
31 select: true
32
33 properties:
34 wakeup-source:
35 oneOf:
36 - type: boolean
37 - $ref: /schemas/types.yaml#/definitions/phandle-array
38 items:
39 maxItems: 1
40 description:
41 List of phandles to system idle state nodes. The device can be a
42 wakeup source in the given system states.
43
44 additionalProperties: true
45
46 examples:
47 - |
48 # With "wakeup" interrupt name
49 device@10000 {
50 compatible = "vendor,device-id";
51 reg = <0x10000 0x1000>;
52 interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
53 interrupt-names = "ack", "err", "wakeup";
54 wakeup-source;
55 };
56
57 - |
58 # Without "wakeup" interrupt name
59 embedded-controller@1e {
60 compatible = "google,cros-ec-i2c";
61 reg = <0x1e>;
62 interrupts = <6 0>;
63 wakeup-source;
64 };
65
66 - |
67 # Without interrupts
68 keys {
69 compatible = "gpio-keys";
70 #address-cells = <1>;
71 #size-cells = <0>;
72
73 button {
74 debounce-interval = <50>;
75 wakeup-source;
76 linux,code = <116>;
77 label = "POWER";
78 gpios = <&iofpga_gpio0 0 0x4>;
79 };
80 };
81 - |
82 # With power states specified
83 mcu_mcan0: can@4e08000 {
84 compatible = "bosch,m_can";
85 reg = <0x00 0x4e08000 0x00 0x200>,
86 <0x00 0x4e00000 0x00 0x8000>;
87 reg-names = "m_can", "message_ram";
88 wakeup-source = <&system_partial_io>, <&system_deep_sleep>;
89 };
90 ...