diff options
author | CHLin <CHLIN56@nuvoton.com> | 2019-12-25 16:29:14 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-30 20:23:49 +0000 |
commit | d79ee1cba05d36d568ed6f30ba5dadb45fd57681 (patch) | |
tree | b2fcfdfba2da96fe0efc8daf9ba8b605d40f501b /include | |
parent | 85902285e20f4e6d8390d944b48ccb96ee252f40 (diff) | |
download | chrome-ec-d79ee1cba05d36d568ed6f30ba5dadb45fd57681.tar.gz |
npcx: Add driver support for PS/2 interface
Morphius connects the trackpoint device to EC via the PS/2 interface.
To support it, we implemented the chip level PS/2 driver in this CL.
The PS/2 driver can be used on all series of NPCX EC chips (NPCX5/7).
BUG=b:145575366
BRANCH=none
TEST=No error for "make buildall"
TEST=Apply this and related CLs, connect npcx5/npcx7 EVBs to standard
PS/2 keyboards and PS/2 device emulator with different channels. Verify
that the PS/2 write/read transaction can keep working for several hours
without issue.
Change-Id: I5bae313db2d697999c2da5cf33478be2da754b8c
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982302
Tested-by: CH Lin <chlin56@nuvoton.com>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Auto-Submit: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 4 | ||||
-rw-r--r-- | include/console_channel.inc | 3 | ||||
-rw-r--r-- | include/module_id.h | 1 | ||||
-rw-r--r-- | include/task.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 7741c807eb..ad23405eb1 100644 --- a/include/config.h +++ b/include/config.h @@ -1245,6 +1245,7 @@ #define CONFIG_CMD_PWR_AVG #define CONFIG_CMD_POWER_AP #undef CONFIG_CMD_PPC_DUMP +#undef CONFIG_CMD_PS2 #undef CONFIG_CMD_RAND #define CONFIG_CMD_REGULATOR #undef CONFIG_CMD_RTC @@ -3004,6 +3005,9 @@ */ #undef CONFIG_CPU_PROCHOT_ACTIVE_LOW +/* Support PS/2 interface */ +#undef CONFIG_PS2 + /* * Define this option to enable programmable voltage detector which will * trigger an interrupt when the voltage drops below a threshold specified diff --git a/include/console_channel.inc b/include/console_channel.inc index d4b63040a5..f4558bef3c 100644 --- a/include/console_channel.inc +++ b/include/console_channel.inc @@ -78,6 +78,9 @@ CONSOLE_CHANNEL(CC_MOTION_SENSE, "motionsense") CONSOLE_CHANNEL(CC_PD_HOST_CMD, "pdhostcm") #endif CONSOLE_CHANNEL(CC_PORT80, "port80") +#ifdef CONFIG_PS2 +CONSOLE_CHANNEL(CC_PS2, "ps2") +#endif #if defined(CONFIG_PWM) || defined(CONFIG_FANS) CONSOLE_CHANNEL(CC_PWM, "pwm") #endif diff --git a/include/module_id.h b/include/module_id.h index 10c2ee3b8d..3f26802333 100644 --- a/include/module_id.h +++ b/include/module_id.h @@ -34,6 +34,7 @@ enum module_id { MODULE_PMU, MODULE_PORT80, MODULE_POWER_LED, + MODULE_PS2, MODULE_PWM, MODULE_RDD, MODULE_RBOX, diff --git a/include/task.h b/include/task.h index 897ba79f34..c0ce1e6838 100644 --- a/include/task.h +++ b/include/task.h @@ -40,6 +40,7 @@ #endif #else #define TASK_EVENT_I2C_IDLE BIT(20) +#define TASK_EVENT_PS2_DONE BIT(21) #endif /* DMA transmit complete event */ |