diff options
author | Wealian Liao <whliao@nuvoton.corp-partner.google.com> | 2021-07-08 11:46:41 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-11 02:35:26 +0000 |
commit | 67a08d2ff371a653190227fe30bfa250174b1d65 (patch) | |
tree | 3d5b70e6522ec3b07ecc065c14fcbc1c69e6f4ec | |
parent | a7c8741522d9f003e37c3e9e7c3c3e4ad897174d (diff) | |
download | chrome-ec-67a08d2ff371a653190227fe30bfa250174b1d65.tar.gz |
zephyr: cros_kb_raw_npcx: Add output high driver config option
This CL adds a Kconfig option 'CROS_KB_RAW_NPCX_KSO_HIGH_DRIVE' for
npcx output buffer high driver function.
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I91f98581f43ca88991345b2e23ab11e5b99353be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077763
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/drivers/cros_kb_raw/Kconfig | 11 | ||||
-rw-r--r-- | zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c | 2 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/zephyr/drivers/cros_kb_raw/Kconfig b/zephyr/drivers/cros_kb_raw/Kconfig index 3109009da5..a037cdd451 100644 --- a/zephyr/drivers/cros_kb_raw/Kconfig +++ b/zephyr/drivers/cros_kb_raw/Kconfig @@ -12,6 +12,17 @@ menuconfig CROS_KB_RAW_NPCX kscan interface so we can continue to use most of the existing keyboard-scanning code in ECOS. +if CROS_KB_RAW_NPCX + +config CROS_KB_RAW_NPCX_KSO_HIGH_DRIVE + bool "Enable quasi-bidirectional buffers for KSO pins" + help + This option enables quasi-bidirectional buffers for KSO pins. The + low-impedance high drive is active when ec changes the output data + buffers from 0 to 1, thereby reducing the low-to-high transition time. + +endif # CROS_KB_RAW_NPCX + menuconfig CROS_KB_RAW_ITE bool "ITE raw-keyboard-scan driver for the Zephyr shim" depends on SOC_FAMILY_RISCV_ITE diff --git a/zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c b/zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c index 69d71e096b..00965b74ca 100644 --- a/zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c +++ b/zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c @@ -190,7 +190,7 @@ static int cros_kb_raw_npcx_init(const struct device *dev) * Select quasi-bidirectional buffers for KSO pins. It reduces the * low-to-high transition time. This feature only supports in npcx7. */ - if (IS_ENABLED(CONFIG_KEYBOARD_KSO_HIGH_DRIVE)) { + if (IS_ENABLED(CONFIG_CROS_KB_RAW_NPCX_KSO_HIGH_DRIVE)) { SET_FIELD(inst->KBSCTL, NPCX_KBSCTL_KBHDRV_FIELD, 0x01); } diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 317591ff86..18a0861cd0 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -62,6 +62,7 @@ #undef CONFIG_CONSOLE_UART /* Only used by the Chromium EC chip drivers */ #undef CONFIG_I2C_MULTI_PORT_CONTROLLER /* Not required by I2C shim */ #undef CONFIG_IRQ_COUNT /* Only used by Chromium EC core drivers */ +#undef CONFIG_KEYBOARD_KSO_HIGH_DRIVE /* Used by the Chromium EC chip drivers */ #undef CONFIG_LTO /* Link time optimization enabled by Zephyr build system */ #undef CONFIG_STACK_SIZE /* Only used in Chromium EC core init code */ #ifndef CONFIG_FPU |