-
Notifications
You must be signed in to change notification settings - Fork 103
/
digi,mca-powerkey.txt
75 lines (65 loc) · 2.63 KB
/
digi,mca-powerkey.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
* Digi Power Key for MCA of ConnectCore SOMs device tree bindings
The MCA Power key driver enables the POWER Key function on the ConnectCore
embedded modules.
The Power Key is used to:
- Power ON the system, from the OFF state.
- Suspend the system.
- Resume from suspend state.
- Power OFF the system.
When enabled, the driver can generate two type of Key events (KEY_POWER and
KEY_SLEEP).
The event generated by the driver depends on the duration of the "key press"
(time that the POWER_ON input is at low level).
There is a debounce filter that can be used to filter undesired rebounds when
using a power button.
Long press
If the duration exceeds the configured "Delay" time, the driver will trigger a
KEY_POWER event to start the Power OFF of the device.
After a configurable "Guard" time, if linux has not sent the Power Off command
to the MCA it will automatically perform the Power OFF of the system.
Short press
If the duration of the key press is shorter than the configured "Delay" time,
the driver will generate a KEY_SLEEP event when the key is released.
This should be used by the OS to set the system in suspend state.
When the system is in suspend state or in Power OFF, pressing the Power Key will
wakeup the system.
Required properties:
- compatible: must be one of
"digi,mca-cc6ul-pwrkey"
"digi,mca-cc8x-pwrkey"
Optional properties:
- key-power: enable the KEY_POWER event (KEY_POWER DOWN)
- key-power-up: enable an additional KEY_POWER UP event when the power button is
released after KEY_POWER DOWN.
- key-sleep: enable the KEY_SLEEP events
- debounce-ms: debounce filter in ms. Number of ms that the input/Key must be
stable (low level) in order to be considered valid. The upper
limit depends on the MCA firmware version.
CC6UL MCAv1.07 and CC8X MCAv0.13 support up-to 12750ms.
Earlier versions just up-to 255mS.
- pwroff-delay-sec (0-255): number of seconds that the Power Key must be pressed
to generate a KEY_POWER event.
- pwroff-guard-sec (0-255): time that the MCA will wait for the OS to power off
the system. After that the MCA will switch it off.
Example:
mca_cc6ul: mca@7e {
pwrkey {
compatible = "digi,mca-cc6ul-pwrkey";
digi,key-power;
digi,key-power-up;
digi,key-sleep;
digi,debounce-ms = <100>;
digi,pwroff-delay-sec = <6>;
digi,pwroff-guard-sec = <30>;
};
};
mca_cc8x: mca@63 {
pwrkey {
compatible = "digi,mca-cc8x-pwrkey";
digi,key-power;
digi,key-sleep;
digi,debounce-ms = <100>;
digi,pwroff-delay-sec = <6>;
digi,pwroff-guard-sec = <30>;
};
};