summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2021-12-08 13:34:39 +1100
committerCommit Bot <commit-bot@chromium.org>2021-12-08 23:12:46 +0000
commit83f78d2ee16d33fa580a815916fbaf08a339cf72 (patch)
tree9fb1a7ebbc0da299f6a0c23ea8e9c85df661f84a
parenta37797b99b45effaefc9e4a3e1b7ceccaf80c739 (diff)
downloadchrome-ec-83f78d2ee16d33fa580a815916fbaf08a339cf72.tar.gz
it8xxx2: Restore raw_kb config to common it8xxx2 config
Restore keyboard scanning config to common it8xxx2 config. Projects that do not have keyboards can disable it separately. V2 - remove keyboard config from drawcia_riscv. BUG=b:209324248 TEST=zmake configure -b krabby BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Iab6844b696ce49c5700a8479df47542705a90643 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322214 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/boards/riscv/it8xxx2/it8xxx2.dts17
-rw-r--r--zephyr/projects/corsola/BUILD.py1
-rw-r--r--zephyr/projects/corsola/gpio_krabby.dts18
-rw-r--r--zephyr/projects/corsola/kb_krabby.dts43
-rw-r--r--zephyr/projects/drawcia_riscv/BUILD.py2
-rw-r--r--zephyr/projects/drawcia_riscv/kb.dts24
6 files changed, 36 insertions, 69 deletions
diff --git a/zephyr/boards/riscv/it8xxx2/it8xxx2.dts b/zephyr/boards/riscv/it8xxx2/it8xxx2.dts
index 82b5bbc7f1..29fb718f70 100644
--- a/zephyr/boards/riscv/it8xxx2/it8xxx2.dts
+++ b/zephyr/boards/riscv/it8xxx2/it8xxx2.dts
@@ -18,6 +18,19 @@
zephyr,flash = &flash0;
zephyr,flash-controller = &flashctrl;
};
+
+ /* Override keyboard scanning */
+ soc {
+ /delete-node/ kscan@f01d00;
+
+ cros_kb_raw: cros-kb-raw@f01d00 {
+ compatible = "ite,it8xxx2-cros-kb-raw";
+ reg = <0x00f01d00 0x29>;
+ label = "CROS_KB_RAW_0";
+ interrupt-parent = <&intc>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
};
&uart1 {
@@ -29,3 +42,7 @@
&ite_uart1_wrapper {
status = "okay";
};
+
+&cros_kb_raw {
+ status = "okay"; /* Override in project dts if not required */
+};
diff --git a/zephyr/projects/corsola/BUILD.py b/zephyr/projects/corsola/BUILD.py
index 4ee076bee3..beb7e3ab7c 100644
--- a/zephyr/projects/corsola/BUILD.py
+++ b/zephyr/projects/corsola/BUILD.py
@@ -30,7 +30,6 @@ register_corsola_project(
here / "battery_krabby.dts",
here / "gpio_krabby.dts",
here / "i2c_krabby.dts",
- here / "kb_krabby.dts",
here / "motionsense_krabby.dts",
here / "pwm_krabby.dts",
],
diff --git a/zephyr/projects/corsola/gpio_krabby.dts b/zephyr/projects/corsola/gpio_krabby.dts
index 0fed46c405..1b93376582 100644
--- a/zephyr/projects/corsola/gpio_krabby.dts
+++ b/zephyr/projects/corsola/gpio_krabby.dts
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/gpio_defines.h>
+#include <dt-bindings/wake_mask_event_defines.h>
/ {
gpiox: gpio@0 {
@@ -281,6 +282,23 @@
};
};
+ ec-mkbp-host-event-wakeup-mask {
+ compatible = "ec-wake-mask-event";
+ wakeup-mask = <(
+ HOST_EVENT_MASK(HOST_EVENT_AC_CONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_AC_DISCONNECTED) |
+ HOST_EVENT_MASK(HOST_EVENT_LID_OPEN) |
+ HOST_EVENT_MASK(HOST_EVENT_POWER_BUTTON) |
+ HOST_EVENT_MASK(HOST_EVENT_HANG_DETECT) |
+ HOST_EVENT_MASK(HOST_EVENT_MODE_CHANGE))>;
+ };
+
+ ec-mkbp-event-wakeup-mask {
+ compatible = "ec-wake-mask-event";
+ wakeup-mask = <(MKBP_EVENT_KEY_MATRIX |
+ MKBP_EVENT_HOST_EVENT)>;
+ };
+
hibernate-wake-pins {
compatible = "cros-ec,hibernate-wake-pins";
wakeup-pins = <&ac_present
diff --git a/zephyr/projects/corsola/kb_krabby.dts b/zephyr/projects/corsola/kb_krabby.dts
deleted file mode 100644
index 7e4c501df5..0000000000
--- a/zephyr/projects/corsola/kb_krabby.dts
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright 2021 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>
-
-/ {
- ec-mkbp-host-event-wakeup-mask {
- compatible = "ec-wake-mask-event";
- wakeup-mask = <(
- HOST_EVENT_MASK(HOST_EVENT_AC_CONNECTED) |
- HOST_EVENT_MASK(HOST_EVENT_AC_DISCONNECTED) |
- HOST_EVENT_MASK(HOST_EVENT_LID_OPEN) |
- HOST_EVENT_MASK(HOST_EVENT_POWER_BUTTON) |
- HOST_EVENT_MASK(HOST_EVENT_HANG_DETECT) |
- HOST_EVENT_MASK(HOST_EVENT_MODE_CHANGE))>;
- };
-
- ec-mkbp-event-wakeup-mask {
- compatible = "ec-wake-mask-event";
- wakeup-mask = <(MKBP_EVENT_KEY_MATRIX |
- MKBP_EVENT_HOST_EVENT)>;
- };
-
- /* Override keyboard scanning */
- soc {
- /delete-node/ kscan@f01d00;
-
- cros_kb_raw: cros-kb-raw@f01d00 {
- compatible = "ite,it8xxx2-cros-kb-raw";
- reg = <0x00f01d00 0x29>;
- label = "CROS_KB_RAW_0";
- interrupt-parent = <&intc>;
- interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
- };
-};
-
-&cros_kb_raw {
- status = "okay";
-};
diff --git a/zephyr/projects/drawcia_riscv/BUILD.py b/zephyr/projects/drawcia_riscv/BUILD.py
index d2515ece06..ef839c0927 100644
--- a/zephyr/projects/drawcia_riscv/BUILD.py
+++ b/zephyr/projects/drawcia_riscv/BUILD.py
@@ -7,5 +7,5 @@
register_binman_project(
project_name="drawcia_riscv",
zephyr_board="it8xxx2",
- dts_overlays=["gpio.dts", "kb.dts"],
+ dts_overlays=["gpio.dts"],
)
diff --git a/zephyr/projects/drawcia_riscv/kb.dts b/zephyr/projects/drawcia_riscv/kb.dts
deleted file mode 100644
index 6fce08f43b..0000000000
--- a/zephyr/projects/drawcia_riscv/kb.dts
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright 2021 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.
- */
-
-/ {
- /* Override keyboard scanning */
- soc {
- /delete-node/ kscan@f01d00;
-
- cros_kb_raw: cros-kb-raw@f01d00 {
- compatible = "ite,it8xxx2-cros-kb-raw";
- reg = <0x00f01d00 0x29>;
- label = "CROS_KB_RAW_0";
- interrupt-parent = <&intc>;
- interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
- };
-};
-
-&cros_kb_raw {
- status = "okay";
-};