diff options
author | Ruibin Chang <Ruibin.Chang@ite.com.tw> | 2021-05-21 17:27:12 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-25 06:21:31 +0000 |
commit | b5cba6b5005d3e427ba29388bf4cedf9e7803512 (patch) | |
tree | 14164b3197747f9b50c82b26ad5f19b816b304d7 /zephyr | |
parent | edc2839d0d6315c8f00280fd4fe523910c1bd939 (diff) | |
download | chrome-ec-b5cba6b5005d3e427ba29388bf4cedf9e7803512.tar.gz |
zephyr: hayato: Enable config to support keyboard scan
Enable config for keyboard scan function, and we use default keyboard
scan timing config on board hayato.
BUG=b:187192587
BRANCH=none
TEST=on hayato, console cmd "ksstate" then press key:
[115.097839 KB state: -- -- -- 02 -- -- 02 -- -- -- -- -- --]
[116.462371 KB state: -- -- -- -- -- -- 02 -- -- -- -- -- --]
[116.499633 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
Change-Id: Ie717d7333c2ff3f4279ec7c2f8c01fcb306fc5ad
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2883376
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/drivers/cros_kb_raw/Kconfig | 16 | ||||
-rw-r--r-- | zephyr/projects/asurada/boards/riscv/asurada/asurada.dts | 15 | ||||
-rw-r--r-- | zephyr/projects/asurada/boards/riscv/asurada/asurada_defconfig | 6 | ||||
-rw-r--r-- | zephyr/projects/asurada/hayato/prj.conf | 5 | ||||
-rw-r--r-- | zephyr/projects/it8xxx2_evb/prj.conf | 1 |
5 files changed, 39 insertions, 4 deletions
diff --git a/zephyr/drivers/cros_kb_raw/Kconfig b/zephyr/drivers/cros_kb_raw/Kconfig index fb525261c4..3109009da5 100644 --- a/zephyr/drivers/cros_kb_raw/Kconfig +++ b/zephyr/drivers/cros_kb_raw/Kconfig @@ -1,6 +1,6 @@ - -# Copyright 2020 Google LLC -# SPDX-License-Identifier: Apache-2.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. menuconfig CROS_KB_RAW_NPCX bool "Nuvoton NPCX raw-keyboard-scan driver for the Zephyr shim" @@ -11,3 +11,13 @@ menuconfig CROS_KB_RAW_NPCX keyboard-scan peripheral in the chip. This is used instead of the kscan interface so we can continue to use most of the existing keyboard-scanning code in ECOS. + +menuconfig CROS_KB_RAW_ITE + bool "ITE raw-keyboard-scan driver for the Zephyr shim" + depends on SOC_FAMILY_RISCV_ITE + default y + help + This option enables a driver for providing raw access to the + keyboard-scan peripheral in the chip. This is used instead of the + kscan interface so we can continue to use most of the existing + keyboard-scanning code in ECOS. diff --git a/zephyr/projects/asurada/boards/riscv/asurada/asurada.dts b/zephyr/projects/asurada/boards/riscv/asurada/asurada.dts index dfab47e66d..91018284fb 100644 --- a/zephyr/projects/asurada/boards/riscv/asurada/asurada.dts +++ b/zephyr/projects/asurada/boards/riscv/asurada/asurada.dts @@ -97,6 +97,17 @@ label = "USB_C1"; }; }; + + soc { + 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"; + }; + }; }; &uart1 { @@ -132,3 +143,7 @@ status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; + +&cros_kb_raw { + status = "okay"; +}; diff --git a/zephyr/projects/asurada/boards/riscv/asurada/asurada_defconfig b/zephyr/projects/asurada/boards/riscv/asurada/asurada_defconfig index 55ad884dbe..57ce99c5aa 100644 --- a/zephyr/projects/asurada/boards/riscv/asurada/asurada_defconfig +++ b/zephyr/projects/asurada/boards/riscv/asurada/asurada_defconfig @@ -43,3 +43,9 @@ CONFIG_CROS_EC_RO_MEM_OFF=0x0 CONFIG_CROS_EC_RO_SIZE=0x40000 CONFIG_CROS_EC_RW_MEM_OFF=0x40000 CONFIG_CROS_EC_RW_SIZE=0x40000 + +# MKBP +CONFIG_PLATFORM_EC_MKBP_EVENT=y +CONFIG_PLATFORM_EC_MKBP_INPUT_DEVICES=y +CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP=y +CONFIG_PLATFORM_EC_MKBP_USE_GPIO=y diff --git a/zephyr/projects/asurada/hayato/prj.conf b/zephyr/projects/asurada/hayato/prj.conf index 748d7772bb..97a895d34e 100644 --- a/zephyr/projects/asurada/hayato/prj.conf +++ b/zephyr/projects/asurada/hayato/prj.conf @@ -25,6 +25,10 @@ CONFIG_PLATFORM_EC_FLASH_CROS=y CONFIG_I2C_ITE_IT8XXX2=y CONFIG_PLATFORM_EC_I2C=y +# Keyboard +CONFIG_PLATFORM_EC_KEYBOARD=y +CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED=y + # Lid Switch CONFIG_PLATFORM_EC_LID_SWITCH=y @@ -47,7 +51,6 @@ CONFIG_PLATFORM_EC_BACKLIGHT_LID=n CONFIG_PLATFORM_EC_BOARD_VERSION=n CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSINFO=n CONFIG_PLATFORM_EC_HOSTCMD=y -CONFIG_PLATFORM_EC_KEYBOARD=n CONFIG_PLATFORM_EC_SWITCH=n CONFIG_PLATFORM_EC_VBOOT=n CONFIG_PLATFORM_EC_VBOOT_HASH=n diff --git a/zephyr/projects/it8xxx2_evb/prj.conf b/zephyr/projects/it8xxx2_evb/prj.conf index f9da4185b5..8b1980cb91 100644 --- a/zephyr/projects/it8xxx2_evb/prj.conf +++ b/zephyr/projects/it8xxx2_evb/prj.conf @@ -32,6 +32,7 @@ CONFIG_LOG=y CONFIG_PLATFORM_EC_BACKLIGHT_LID=n CONFIG_PLATFORM_EC_BOARD_VERSION=n CONFIG_PLATFORM_EC_KEYBOARD=n +CONFIG_CROS_KB_RAW_ITE=n CONFIG_PLATFORM_EC_SWITCH=n CONFIG_PLATFORM_EC_VBOOT=n CONFIG_PLATFORM_EC_VBOOT_HASH=n |