summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/boards/arm/trogdor/trogdor.dts21
-rw-r--r--zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml13
-rw-r--r--zephyr/include/dt-bindings/wake_mask_event_defines.h2
3 files changed, 26 insertions, 10 deletions
diff --git a/zephyr/boards/arm/trogdor/trogdor.dts b/zephyr/boards/arm/trogdor/trogdor.dts
index 4bfbaca14d..f5e50d9466 100644
--- a/zephyr/boards/arm/trogdor/trogdor.dts
+++ b/zephyr/boards/arm/trogdor/trogdor.dts
@@ -39,20 +39,21 @@
ec-mkbp-host-event-wakeup-mask {
compatible = "ec-wake-mask-event";
- wakeup-mask = <(HOST_EVENT_LID_OPEN | \
- HOST_EVENT_POWER_BUTTON | \
- HOST_EVENT_AC_CONNECTED | \
- HOST_EVENT_AC_DISCONNECTED | \
- HOST_EVENT_HANG_DETECT | \
- HOST_EVENT_RTC | \
- HOST_EVENT_MODE_CHANGE | \
- HOST_EVENT_DEVICE)>;
+ wakeup-mask = <(
+ HOST_EVENT_MASK(HOST_EVENT_LID_OPEN) |
+ HOST_EVENT_MASK(HOST_EVENT_POWER_BUTTON) |
+ HOST_EVENT_MASK(HOST_EVENT_AC_CONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_AC_DISCONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_HANG_DETECT) |
+ HOST_EVENT_MASK(HOST_EVENT_RTC) |
+ HOST_EVENT_MASK(HOST_EVENT_MODE_CHANGE) |
+ HOST_EVENT_MASK(HOST_EVENT_DEVICE))>;
};
ec-mkbp-event-wakeup-mask {
compatible = "ec-wake-mask-event";
- wakeup-mask = <(MKBP_EVENT_KEY_MATRIX | \
- MKBP_EVENT_HOST_EVENT | \
+ wakeup-mask = <(MKBP_EVENT_KEY_MATRIX |
+ MKBP_EVENT_HOST_EVENT |
MKBP_EVENT_SENSOR_FIFO)>;
};
diff --git a/zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml b/zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml
index c8f5a0c376..73f0e8fdca 100644
--- a/zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml
+++ b/zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml
@@ -14,3 +14,16 @@ properties:
description:
Define the MKBP or host events that will wake up the application
processor from suspend mode.
+ HOST_EVENT_MASK should be used for ec-mkbp-host-event-wakeup-mask e.g.
+ ec-mkbp-host-event-wakeup-mask {
+ compatible = "ec-wake-mask-event";
+ wakeup-mask = <(
+ HOST_EVENT_MASK(HOST_EVENT_LID_OPEN) |
+ HOST_EVENT_MASK(HOST_EVENT_POWER_BUTTON) |
+ HOST_EVENT_MASK(HOST_EVENT_AC_CONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_AC_DISCONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_HANG_DETECT) |
+ HOST_EVENT_MASK(HOST_EVENT_RTC) |
+ HOST_EVENT_MASK(HOST_EVENT_MODE_CHANGE) |
+ HOST_EVENT_MASK(HOST_EVENT_DEVICE))>;
+ };
diff --git a/zephyr/include/dt-bindings/wake_mask_event_defines.h b/zephyr/include/dt-bindings/wake_mask_event_defines.h
index 80be063279..0413fa249c 100644
--- a/zephyr/include/dt-bindings/wake_mask_event_defines.h
+++ b/zephyr/include/dt-bindings/wake_mask_event_defines.h
@@ -33,6 +33,8 @@
#define MKBP_EVENT_ONLINE_CALIBRATION BIT(11)
#define MKBP_EVENT_PCHG BIT(12)
+#define HOST_EVENT_MASK(event) ((event) >> 1)
+
#define HOST_EVENT_NONE BIT(0)
#define HOST_EVENT_LID_CLOSED BIT(1)
#define HOST_EVENT_LID_OPEN BIT(2)