summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2022-01-18 14:03:30 -0800
committerCommit Bot <commit-bot@chromium.org>2022-01-23 04:28:11 +0000
commitaf1da08a314b7bdf6bfa8044d19aa80f471ec3fb (patch)
tree8a8d0dea925bd10a8dafaa8b5ab0c4fd79562b36
parent5340a3299dd6193c5821fbc57d3fb1852137cf01 (diff)
downloadchrome-ec-af1da08a314b7bdf6bfa8044d19aa80f471ec3fb.tar.gz
herobrine: Move the common EC nodes from board to project
Make the board independent from the hardware project. Move several common EC nodes to the project directory. BRANCH=None BUG=b:214613810 TEST=Built the herobrine_npcx9 project and checked generated source.dts unchanged. Change-Id: Icc89a5fbf53cc26dd5f06c4919c4ec416d6a91be Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3400545 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts28
-rw-r--r--zephyr/projects/herobrine/BUILD.py1
-rw-r--r--zephyr/projects/herobrine/common.dts37
3 files changed, 38 insertions, 28 deletions
diff --git a/zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts b/zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts
index 913bdbb98b..d2ea7a2975 100644
--- a/zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts
+++ b/zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts
@@ -19,35 +19,7 @@
zephyr,shell-uart = &uart1;
zephyr,flash = &flash0;
zephyr,flash-controller = &int_flash;
- cros,rtc = &pcf85063a;
};
-
- ec-console {
- compatible = "ec-console";
-
- disabled = "hostcmd";
- };
-
- 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))>;
- };
-
- ec-mkbp-event-wakeup-mask {
- compatible = "ec-wake-mask-event";
- wakeup-mask = <(MKBP_EVENT_KEY_MATRIX | \
- MKBP_EVENT_HOST_EVENT | \
- MKBP_EVENT_SENSOR_FIFO)>;
- };
-
};
&uart1 {
diff --git a/zephyr/projects/herobrine/BUILD.py b/zephyr/projects/herobrine/BUILD.py
index 05498ddc20..6d4fba5eef 100644
--- a/zephyr/projects/herobrine/BUILD.py
+++ b/zephyr/projects/herobrine/BUILD.py
@@ -12,6 +12,7 @@ def register_variant(project_name, extra_dts_overlays=(), extra_kconfig_files=()
here / "adc.dts",
here / "battery.dts",
here / "gpio.dts",
+ here / "common.dts",
here / "i2c.dts",
here / "motionsense.dts",
here / "pwm.dts",
diff --git a/zephyr/projects/herobrine/common.dts b/zephyr/projects/herobrine/common.dts
new file mode 100644
index 0000000000..cc75e8e89b
--- /dev/null
+++ b/zephyr/projects/herobrine/common.dts
@@ -0,0 +1,37 @@
+/* Copyright 2022 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <dt-bindings/wake_mask_event_defines.h>
+
+/ {
+ chosen {
+ cros,rtc = &pcf85063a;
+ };
+
+ ec-console {
+ compatible = "ec-console";
+ disabled = "hostcmd";
+ };
+
+ 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))>;
+ };
+
+ ec-mkbp-event-wakeup-mask {
+ compatible = "ec-wake-mask-event";
+ wakeup-mask = <(MKBP_EVENT_KEY_MATRIX | \
+ MKBP_EVENT_HOST_EVENT | \
+ MKBP_EVENT_SENSOR_FIFO)>;
+ };
+};