summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-05-24 05:16:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-26 00:21:44 -0700
commit1910779d4185d4806bae1a3a1e21da3bc22f4e1e (patch)
treef0fca6e0f7818b0646c043354864fb5ad88b0a6f
parentc25b78ae0263463a0a635f6336379612078b5566 (diff)
downloadchrome-ec-1910779d4185d4806bae1a3a1e21da3bc22f4e1e.tar.gz
it83xx: Add a config option for enabling mouse LDN
Not all boards using ITE83XX use mouse LDN. This change adds a config option to allow boards to explicity enable this device. Currently, this device is enabled only for glkrvp_ite and it83xx_evb. It is disabled for reef_ite and bip. Change-Id: I7149fd0cb35cc9f49f2b7b80f6c2deefe2edda55 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1070785 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Dino Li <dino.li@ite.corp-partner.google.com>
-rw-r--r--board/glkrvp_ite/board.h1
-rw-r--r--board/it83xx_evb/board.h1
-rw-r--r--chip/it83xx/ec2i.c4
-rw-r--r--include/config.h3
4 files changed, 9 insertions, 0 deletions
diff --git a/board/glkrvp_ite/board.h b/board/glkrvp_ite/board.h
index 52bf94e3f1..4209a06bf8 100644
--- a/board/glkrvp_ite/board.h
+++ b/board/glkrvp_ite/board.h
@@ -101,6 +101,7 @@
#define CONFIG_VSTORE_SLOT_COUNT 1
/* Optional feature - used by ITE */
+#define CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
#define CONFIG_IT83XX_FLASH_CLOCK_48MHZ
/* I2C ports */
diff --git a/board/it83xx_evb/board.h b/board/it83xx_evb/board.h
index a3e02f1c8e..b018fb65c6 100644
--- a/board/it83xx_evb/board.h
+++ b/board/it83xx_evb/board.h
@@ -17,6 +17,7 @@
#define CONFIG_FANS 1
#define CONFIG_I2C
#define CONFIG_I2C_MASTER
+#define CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
#define CONFIG_IT83XX_SMCLK2_ON_GPC7
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_PROTOCOL_8042
diff --git a/chip/it83xx/ec2i.c b/chip/it83xx/ec2i.c
index 3804061407..38216592ad 100644
--- a/chip/it83xx/ec2i.c
+++ b/chip/it83xx/ec2i.c
@@ -45,6 +45,7 @@ static const struct ec2i_t keyboard_settings[] = {
{HOST_INDEX_LDA, 0x01},
};
+#ifdef CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
static const struct ec2i_t mouse_settings[] = {
/* Select logical device 05h(mouse) */
{HOST_INDEX_LDN, LDN_KBC_MOUSE},
@@ -53,6 +54,7 @@ static const struct ec2i_t mouse_settings[] = {
/* Enable logical device */
{HOST_INDEX_LDA, 0x01},
};
+#endif
static const struct ec2i_t pm1_settings[] = {
/* Select logical device 11h(PM1 ACPI) */
@@ -297,7 +299,9 @@ static void pnpcfg_init(void)
IT83XX_EC2I_LSIOHA |= 0x3;
PNPCFG(keyboard);
+#ifdef CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
PNPCFG(mouse);
+#endif
PNPCFG(pm1);
PNPCFG(pm2);
PNPCFG(smfi);
diff --git a/include/config.h b/include/config.h
index 4a44d82df8..a094bbff42 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1817,6 +1817,9 @@
/* Number of IRQs supported on the EC chip */
#undef CONFIG_IRQ_COUNT
+/* Enable LDN for KBC mouse */
+#undef CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
+
/*
* The IT8320 supports e-flash clock up to 48 MHz (IT8390 maximum is 32 MHz).
* Enable it if we want better performance of fetching instruction from e-flash.