diff options
author | Wai-Hong Tam <waihong@google.com> | 2021-03-23 10:34:02 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-24 02:15:58 +0000 |
commit | f15b0fcff7ab0df04279a3480e80bc67b54ebee5 (patch) | |
tree | f7df76067536456e7620c67faa6531d2c99b65db /zephyr/projects/trogdor/lazor | |
parent | f78b94c011083b6a5620df5aefda04a4047e67e7 (diff) | |
download | chrome-ec-f15b0fcff7ab0df04279a3480e80bc67b54ebee5.tar.gz |
zephyr: lazor: enable keyboard support
Define the keyboard scanlines and the inverted KSO2 GPIO.
Enable the keyboard-related configs.
Some warning of "MKBP not cleared" or "MKBP FIFO being full"
will be showed as the SHI driver is not ready. The MKBP FIFO
won't be dequeued.
BRANCH=None
BUG=b:183445211
TEST=Tested on Lazor by pressing keys, including KSO2.
uart:~$ ksstate on
[26.075200 KB debounced : -- -- -- -- -- -- -- -- -- -- -- -- --]
[26.079600 KB debouncing: -- -- -- -- -- -- -- -- -- -- -- -- --]
Keyboard scan disable mask: 0x00000000
Keyboard scan state printing on
uart:~$ [29.269700 KB state: -- 02 -- -- -- -- -- -- -- -- -- -- --]
[29.392000 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[30.244000 KB state: -- -- 01 -- -- -- -- -- -- -- -- -- --]
[30.274000 MKBP not cleared within threshold, toggling.]
[30.359600 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[31.278800 MKBP not cleared within threshold, toggling.]
[31.872900 KB state: -- -- 08 -- -- -- -- -- -- -- -- -- --]
[32.005100 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[33.060500 KB state: -- -- 04 -- -- -- -- -- -- -- -- -- --]
[33.189500 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[34.065100 MKBP not cleared within threshold, toggling.]
[34.454100 KB state: -- -- 02 -- -- -- -- -- -- -- -- -- --]
[34.556600 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[35.069300 MKBP not cleared within threshold, toggling.]
[37.356900 KB state: -- -- -- -- 08 -- -- -- -- -- -- -- --]
[37.452900 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --]
[38.361500 MKBP not cleared within threshold, toggling.]
[39.365800 MKBP not cleared within threshold, toggling.]
Change-Id: I02390e85f9454d5c93cd54d333d2e242e0c54911
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782368
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/projects/trogdor/lazor')
-rw-r--r-- | zephyr/projects/trogdor/lazor/include/gpio_map.h | 1 | ||||
-rw-r--r-- | zephyr/projects/trogdor/lazor/prj.conf | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/zephyr/projects/trogdor/lazor/include/gpio_map.h b/zephyr/projects/trogdor/lazor/include/gpio_map.h index 605ba9a41c..7a0d86d2fd 100644 --- a/zephyr/projects/trogdor/lazor/include/gpio_map.h +++ b/zephyr/projects/trogdor/lazor/include/gpio_map.h @@ -36,6 +36,7 @@ #define GPIO_WARM_RESET_L NAMED_GPIO(warm_reset_l) #define GPIO_WP_L NAMED_GPIO(ec_wp_odl) #define GPIO_EC_INT_L NAMED_GPIO(ec_int_l) +#define GPIO_KBD_KSO2 NAMED_GPIO(ec_kso_02_inv) /* * Set EC_CROS_GPIO_INTERRUPTS to a space-separated list of GPIO_INT items. diff --git a/zephyr/projects/trogdor/lazor/prj.conf b/zephyr/projects/trogdor/lazor/prj.conf index 352d003028..c9c03ca100 100644 --- a/zephyr/projects/trogdor/lazor/prj.conf +++ b/zephyr/projects/trogdor/lazor/prj.conf @@ -41,9 +41,13 @@ CONFIG_PLATFORM_EC_VBOOT=n CONFIG_PLATFORM_EC_MKBP_EVENT=y CONFIG_PLATFORM_EC_MKBP_USE_GPIO=y +# Keyboard +CONFIG_PLATFORM_EC_KEYBOARD=y +CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP=y +CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED=y +CONFIG_CROS_KB_RAW_NPCX=y + # TODO(b/182398910): bringup these features CONFIG_PLATFORM_EC_BACKLIGHT_LID=n -CONFIG_PLATFORM_EC_KEYBOARD=n CONFIG_PLATFORM_EC_SWITCH=n CONFIG_PLATFORM_EC_VBOOT_HASH=n -CONFIG_CROS_KB_RAW_NPCX=n |