blob: 693bff082301bd23f1c2c1ee4b2e1bc951ea9faf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
menuconfig PLATFORM_EC_KEYBOARD
bool "Keyboard support"
select HAS_TASK_KEYSCAN
default n if ARCH_POSIX
default y
help
Enable compilation of support for scanning a keyboard and providing
the resulting input to the AP over the host interface. This consists
of a keyboard-scanning task which provides key scans via it calling
keyboard_state_changed() (for i8042) or its client calling
keyboard_scan_get_state() (for MKBP).
Enabling this automatically enables HAS_TASK_KEYSCAN since keyboard
scanning must run in its own task.
if PLATFORM_EC_KEYBOARD
choice "Protocol select"
prompt "Select the keyboard protocol to use"
help
Select the keyboard protocol used to communicate key presses to the
AP. PLATFORM_EC_KEYBOARD_PROTOCOL_8042 is supported by x86-compatible
application processors, and PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP is
used for ARM application processors.
config PLATFORM_EC_KEYBOARD_PROTOCOL_8042
bool "i8042"
select HAS_TASK_KEYPROTO
help
Use the i8042 protocol to communicate with the AP. This dates from the
Intel 8042 keyboard controller chip released in 1976. It uses two-way
communication via a few 8-bit registers, allowing key codes to be
sent to the AP when keys are pressed and released.
See here for docs: https://wiki.osdev.org/%228042%22_PS/2_Controller
endchoice # PLATFORM_EC_KEYBOARD
config PLATFORM_EC_KEYBOARD_BOARD_CONFIG
bool "Use custom keyboard config"
help
Enable support for custom keyboard config. in which case
keyscan_config must be defined by the board, using
struct keyboard_scan_config.
If this is not enabled, default values in common/keyboard_scan.c are
used.
config PLATFORM_EC_KEYBOARD_KEYPAD
bool "Support a numeric keypad"
help
Enable support for a keypad, a palm-sized keyboard section usually
placed on the far right. This contains nuumber keys and also some
commonly used symbols, to help speed up numeric data entry.
choice "Power button interference"
prompt "Select the impact of pressing the power button"
help
On some boards one of the keyboard-scan inputs is affected by pressing
the power button. When the power button is pressed, that input needs
to be ignored in that case.
config PLATFORM_EC_KEYBOARD_PWRBTN_INDEPENDENT
bool "No impact on keyboard-scan inputs"
help
Select this if pressing the power button does not affect any
keyboard-scan inputs.
config PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI2
bool "Forces KSI2 to be asserted"
help
Enable this if KSI2 is stuck 'asserted' for all scan columns if the
power button is held. We must be aware of this case in order to
correctly handle recovery-mode key combinations.
config PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI3
bool "Forces KSI3 to be asserted"
help
Enable this if KSI3 is stuck 'asserted' for all scan columns if the
power button is held. We must be aware of this case in order to
correctly handle recovery-mode key combinations.
endchoice # "Power button interference"
config PLATFORM_EC_KEYBOARD_COL2_INVERTED
bool "A mechanism for passing KSO2 to H1 which inverts the signal"
help
This option enables a mechanism for passing the column 2
to H1 which inverts the signal. The signal passing through H1
adds more delay. Need a larger delay value. Otherwise, pressing
Refresh key will also trigger T key, which is in the next scanning
column line. See http://b/156007029.
config PLATFORM_EC_VOLUME_BUTTONS
bool "Board has volume-up and volume-down buttons"
help
Enable this if the board has physical buttons for the volume controls.
These are buttons controlled by GPIOs and are not part of the keyboard
matrix.
Your board must define GPIO_VOLUME_UP_L and GPIO_VOLUME_DOWN_L in
gpio_map.h
config PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042
bool "Console command: i8042"
default y if PLATFORM_EC_KEYBOARD_PROTOCOL_8042
help
This command prints the state of the i8042 keyboard protocol and
includes the following subcommands:
codeset - Get/set keyboard codeset
ctrlram - Get/set keyboard controller RAM
internal - Show internal information
kbd - Print or toggle keyboard info
kblog - Print or toggle keyboard event log (current disabled)
typematic - Get/set typematic delays
choice
prompt "Keyboard backlight"
optional
help
Enable support for EC control of a keyboard backlight. This enables
the "kblight" console command for manual control of the keyboard
backlight. This also enables the EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT and
EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT host commands for automatic control
by the AP.
TODO: support CONFIG_IO_EXPANDER_IT8801 driver which provides
PWM keyboard support.
config PLATFORM_EC_PWM_KBLIGHT
bool "PWM keyboard backlight"
depends on PLATFORM_EC_PWM
help
Enables a PWM-controlled keyboard backlight controlled by a PWM signal
connected directly to the EC chipset. The board files must define
the C reference PWM_CH_KBLIGHT to the PWM channel used for the
keyboard backlight control.
endchoice # Keyboard backlight
endif # PLATFORM_EC_KEYBOARD
|