@@ -64,32 +64,8 @@ Kconfig sub-options | Default | Documentation
6464
6565### MKBP - Matrix Keyboard Protocol
6666
67- MKBP was originally used to send keyboard events to AP OS.
68- Later, more functionalities were added and more types of events can be sent
69- using this protocol. It can transfer information about keystrokes, sensors,
70- switches, fingerprints and more.
71-
72- Kconfig sub-options | Default | Documentation
73- :------------------------------------------- | :---------: | :------------
74- ` CONFIG_PLATFORM_EC_MKBP_INPUT_DEVICES ` | n | [ MKBP input devices]
75- ` CONFIG_PLATFORM_EC_MKBP_EVENT ` | n | [ MKBP event]
76-
77- The following options must be enabled to use respective masks specified in
78- device tree. See [ Device Tree nodes] ( #device-tree-nodes ) paragraph for details.
79-
80- Kconfig sub-options | Default | Documentation
81- :---------------------------------------------- | :---------: | :------------
82- ` CONFIG_PLATFORM_EC_MKBP_EVENT_WAKEUP_MASK ` | n | [ MKBP event wake-up mask]
83- ` CONFIG_PLATFORM_EC_MKBP_HOST_EVENT_WAKEUP_MASK ` | n | [ MKBP host event wake-up mask]
84-
85- The following options select the delivery method of MKBP messages.
86-
87- Kconfig sub-options | Default | Documentation
88- :----------------------------------------------- | :---------: | :------------
89- ` CONFIG_PLATFORM_EC_MKBP_USE_GPIO ` | y | [ MKBP gpio]
90- ` CONFIG_PLATFORM_EC_MKBP_USE_HOST_EVENT ` | n | [ MKBP host event]
91- ` CONFIG_PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT ` | n | [ MKBP gpio and host event]
92- ` CONFIG_PLATFORM_EC_MKBP_USE_CUSTOM ` | n | [ MKBP custom]
67+ See the [ MKBP documentation] for information about configuration of MKBP
68+ protocol.
9369
9470### Debug
9571
@@ -152,47 +128,6 @@ The node's required properties are defined in yaml files: [SHI bindings]
152128}
153129```
154130
155- ### MKBP Wake-up Masks
156-
157- The EC can wake up the AP from sleep modes based on multiple event types.
158- A wake-up mask specifies which specific event types are able to wake the AP.
159-
160- For x86 based Chromebooks, the wake-up mask is controlled by the AP firmware
161- directly using host commands ` EC_CMD_HOST_EVENT_SET_SMI_MASK ` ,
162- ` EC_CMD_HOST_EVENT_SET_SCI_MASK ` and ` EC_CMD_HOST_EVENT_SET_WAKE_MASK ` .
163-
164- For ARM based Chromebooks, the wake-up mask is defined as device tree nodes,
165- one for MKBP events and one for generic host events.
166- They have respective Kconfig options, which must be enabled to take the masks
167- into account.
168-
169- Both masks have to be compatible with binding file: [ MKBP event mask yaml]
170-
171- Possible enums to use in these nodes are specified in file: [ MKBP event mask enums]
172-
173- ```
174- / {
175- ec-mkbp-host-event-wakeup-mask {
176- compatible = "ec-wake-mask-event";
177- wakeup-mask = <(HOST_EVENT_LID_OPEN |
178- HOST_EVENT_POWER_BUTTON |
179- HOST_EVENT_AC_CONNECTED |
180- HOST_EVENT_AC_DISCONNECTED |
181- HOST_EVENT_HANG_DETECT |
182- HOST_EVENT_RTC |
183- HOST_EVENT_MODE_CHANGE |
184- HOST_EVENT_DEVICE)>;
185- };
186-
187- ec-mkbp-event-wakeup-mask {
188- compatible = "ec-wake-mask-event";
189- wakeup-mask = <(MKBP_EVENT_KEY_MATRIX |
190- MKBP_EVENT_HOST_EVENT |
191- MKBP_EVENT_SENSOR_FIFO)>;
192- };
193- }
194- ```
195-
196131## Board Specific Code
197132
198133No board specific code is required.
@@ -246,10 +181,6 @@ messages visible on EC console since boot-up.
246181
247182## Examples
248183
249- [ Lazor MKBP wake-up] ( https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/trogdor/lazor/gpio.dts?q=ec-mkbp-host-event-wakeup-mask )
250-
251- [ Lazor MKBP Kconfig] ( https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/projects/trogdor/lazor/prj.conf?q=CONFIG_PLATFORM_EC_MKBP_EVENT_WAKEUP_MASK )
252-
253184[ NPCX eSPI selection] ( https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/include/cros/nuvoton/npcx.dtsi?q=cros-ec,espi )
254185
255186[ NPCX SHI definition] ( https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/include/cros/nuvoton/npcx.dtsi?q=shi )
@@ -272,25 +203,14 @@ Links to the documentation
272203[ Host command console buffer size ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.console?q=%22config%20PLATFORM_EC_HOSTCMD_CONSOLE_BUF_SIZE%22
273204[ Host command - status ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_HOST_COMMAND_STATUS%22
274205
275- [ MKBP input devices ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_MKBP_INPUT_DEVICES%22
276- [ MKBP event ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_MKBP_EVENT%22
277-
278- [ MKBP event wake-up mask ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_MKBP_EVENT_WAKEUP_MASK%22
279- [ MKBP host event wake-up mask ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_MKBP_HOST_EVENT_WAKEUP_MASK%22
280-
281- [ MKBP gpio ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.mkbp_event?q=%22config%20PLATFORM_EC_MKBP_USE_GPIO%22
282- [ MKBP host event ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.mkbp_event?q=%22config%20PLATFORM_EC_MKBP_USE_HOST_EVENT%22
283- [ MKBP gpio and host event ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.mkbp_event?q=%22config%20PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT%22
284- [ MKBP custom ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.mkbp_event?q=%22config%20PLATFORM_EC_MKBP_USE_CUSTOM%22
206+ [ MKBP documentation ] :zephyr_mkbp.md
285207
286208[ Debug off ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20HCDEBUG_OFF%22
287209[ Debug normal ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20HCDEBUG_NORMAL%22
288210[ Debug every ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20HCDEBUG_EVERY%22
289211[ Debug params ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20HCDEBUG_PARAMS%22
290212
291213[ SHI bindings ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/cros_shi/
292- [ MKBP event mask yaml ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/cros_mkbp_event/ec-mkbp-event.yaml
293- [ MKBP event mask enums ] :https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/include/dt-bindings/wake_mask_event_defines.h
294214
295215[ CrOS EC documentation ] :../ap-ec-comm.md#ectool
296216[ stress test ] :../ap-ec-comm.md#stress-test
0 commit comments