summaryrefslogtreecommitdiff
path: root/zephyr/dts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-06 11:04:06 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-15 03:55:24 +0000
commitc3d4badd49ab9c6239c67ea67f566ee810796793 (patch)
treec2433a4b4b2f962652b8f26f075d1c8db2a408cc /zephyr/dts
parentf3f18351567b7ac37724b5668285eaad4359b226 (diff)
downloadchrome-ec-c3d4badd49ab9c6239c67ea67f566ee810796793.tar.gz
drivers: add NPCX7 cros_kb_raw driver
NPCX keyboard scanning module is supported by up to 18 open-drain output signals and 8 input signals. Switch-based keyboard matrices are supported by Schmitt trigger inputs that have internal pull-up resistors. For power efficiency, the inputs include interrupt and wake-up capability so that pressing/releasing keys can be identified without scanning the keyboard matrix in either Active, Sleep or Deep Sleep power state. The CL also includes: — Add npcx cros_kb_raw device tree declarations. — cros_kb_raw api implementations - Enable Volteer keyboard scan task BRANCH=none BUG=b:167405015, b:172676906 TEST=build pass by zmake configure -B ./build projects/experimental/volteer. TEST=check all the keys on volteer platform by "ksstate". Change-Id: I1cbdaa0e81cbb4447daede82774711f4d50f613d Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Signed-off-by: Mulin Chao <MLChao@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2523940 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630148 Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/dts')
-rw-r--r--zephyr/dts/bindings/cros_kb_raw/cros-kb-raw-controller.yaml12
-rw-r--r--zephyr/dts/bindings/cros_kb_raw/nuvoton,npcx-cros-kb-raw.yaml32
2 files changed, 44 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/cros_kb_raw/cros-kb-raw-controller.yaml b/zephyr/dts/bindings/cros_kb_raw/cros-kb-raw-controller.yaml
new file mode 100644
index 0000000000..e8c95419e1
--- /dev/null
+++ b/zephyr/dts/bindings/cros_kb_raw/cros-kb-raw-controller.yaml
@@ -0,0 +1,12 @@
+# Copyright 2020 Google LLC
+# SPDX-License-Identifier: Apache-2.0
+
+# Common fields for Chrome OS raw keyboard devices
+
+include: base.yaml
+
+bus: croskb
+
+properties:
+ label:
+ required: true
diff --git a/zephyr/dts/bindings/cros_kb_raw/nuvoton,npcx-cros-kb-raw.yaml b/zephyr/dts/bindings/cros_kb_raw/nuvoton,npcx-cros-kb-raw.yaml
new file mode 100644
index 0000000000..7544039ffc
--- /dev/null
+++ b/zephyr/dts/bindings/cros_kb_raw/nuvoton,npcx-cros-kb-raw.yaml
@@ -0,0 +1,32 @@
+# Copyright 2020 Google LLC
+# SPDX-License-Identifier: Apache-2.0
+
+description: Nuvoton, NPCX-cros-kb-raw node
+
+compatible: "nuvoton,npcx-cros-kb-raw"
+
+include: cros-kb-raw-controller.yaml
+
+properties:
+ reg:
+ required: true
+
+ clocks:
+ required: true
+
+ pinctrl-0:
+ type: phandles
+ required: true
+ description: configurations of pinmux controllers
+
+ wui_maps:
+ type: phandles
+ required: true
+ description: |
+ Mapping table between Wake-Up Input (WUI) and 8 IOs belong to this device.
+ Please notice not all IOs connect to WUIs.
+
+ In this case, it will be presented by wui_none.
+ For example the WUI mapping on NPCX7 KSI pads would be
+ wui_maps = <&wui_io30 &wui_io31 &wui_io27 &wui_io26
+ &wui_io25 &wui_io24 &wui_io23 &wui_io22>;