summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/drivers/cros_kb_raw/Kconfig11
-rw-r--r--zephyr/drivers/cros_kb_raw/cros_kb_raw_npcx.c2
-rw-r--r--zephyr/shim/include/config_chip.h1
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