forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tag-chrome-platform-for-v5.2' of ssh://gitolite.kernel.org…
…/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "CrOS EC: - Add EC host command support using rpmsg - Add new CrOS USB PD logging driver - Transfer spi messages at high priority - Add support to trace CrOS EC commands - Minor fixes and cleanups in protocol and debugfs Wilco EC: - Standardize Wilco EC mailbox interface - Add h1_gpio status to debugfs" * tag 'tag-chrome-platform-for-v5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_proto: Add trace event to trace EC commands platform/chrome: cros_ec_debugfs: Use cros_ec_cmd_xfer_status helper platform/chrome: cros_ec: Add EC host command support using rpmsg platform/chrome: wilco_ec: Add h1_gpio status to debugfs platform/chrome: wilco_ec: Standardize mailbox interface platform/chrome: cros_ec_proto: check for NULL transfer function platform/chrome: Add CrOS USB PD logging driver platform/chrome: cros_ec_spi: Transfer messages at high priority platform/chrome: cros_ec_debugfs: no need to check return value of debugfs_create functions platform/chrome: cros_ec_debugfs: Remove dev_warn when console log is not supported
- Loading branch information
Showing
14 changed files
with
984 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,46 @@ | ||
What: /sys/kernel/debug/wilco_ec/h1_gpio | ||
Date: April 2019 | ||
KernelVersion: 5.2 | ||
Description: | ||
As part of Chrome OS's FAFT (Fully Automated Firmware Testing) | ||
tests, we need to ensure that the H1 chip is properly setting | ||
some GPIO lines. The h1_gpio attribute exposes the state | ||
of the lines: | ||
- ENTRY_TO_FACT_MODE in BIT(0) | ||
- SPI_CHROME_SEL in BIT(1) | ||
|
||
Output will formatted with "0x%02x\n". | ||
|
||
What: /sys/kernel/debug/wilco_ec/raw | ||
Date: January 2019 | ||
KernelVersion: 5.1 | ||
Description: | ||
Write and read raw mailbox commands to the EC. | ||
|
||
For writing: | ||
Bytes 0-1 indicate the message type: | ||
00 F0 = Execute Legacy Command | ||
00 F2 = Read/Write NVRAM Property | ||
Byte 2 provides the command code | ||
Bytes 3+ consist of the data passed in the request | ||
You can write a hexadecimal sentence to raw, and that series of | ||
bytes will be sent to the EC. Then, you can read the bytes of | ||
response by reading from raw. | ||
|
||
At least three bytes are required, for the msg type and command, | ||
with additional bytes optional for additional data. | ||
For writing, bytes 0-1 indicate the message type, one of enum | ||
wilco_ec_msg_type. Byte 2+ consist of the data passed in the | ||
request, starting at MBOX[0] | ||
|
||
At least three bytes are required for writing, two for the type | ||
and at least a single byte of data. Only the first | ||
EC_MAILBOX_DATA_SIZE bytes of MBOX will be used. | ||
|
||
Example: | ||
// Request EC info type 3 (EC firmware build date) | ||
$ echo 00 f0 38 00 03 00 > raw | ||
// Corresponds with sending type 0x00f0 with | ||
// MBOX = [38, 00, 03, 00] | ||
$ echo 00 f0 38 00 03 00 > /sys/kernel/debug/wilco_ec/raw | ||
// View the result. The decoded ASCII result "12/21/18" is | ||
// included after the raw hex. | ||
$ cat raw | ||
00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 .12/21/18.8... | ||
// Corresponds with MBOX = [00, 00, 31, 32, 2f, 32, 31, 38, ...] | ||
$ cat /sys/kernel/debug/wilco_ec/raw | ||
00 00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 ..12/21/18.8... | ||
|
||
Note that the first 32 bytes of the received MBOX[] will be | ||
printed, even if some of the data is junk. It is up to you to | ||
know how many of the first bytes of data are the actual | ||
response. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
# tell define_trace.h where to find the cros ec trace header | ||
CFLAGS_cros_ec_trace.o:= -I$(src) | ||
|
||
obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o | ||
obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o | ||
obj-$(CONFIG_CHROMEOS_TBMC) += chromeos_tbmc.o | ||
obj-$(CONFIG_CROS_EC_I2C) += cros_ec_i2c.o | ||
obj-$(CONFIG_CROS_EC_RPMSG) += cros_ec_rpmsg.o | ||
obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o | ||
cros_ec_lpcs-objs := cros_ec_lpc.o cros_ec_lpc_reg.o | ||
cros_ec_lpcs-$(CONFIG_CROS_EC_LPC_MEC) += cros_ec_lpc_mec.o | ||
obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpcs.o | ||
obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o | ||
obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o cros_ec_trace.o | ||
obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o | ||
obj-$(CONFIG_CROS_EC_LIGHTBAR) += cros_ec_lightbar.o | ||
obj-$(CONFIG_CROS_EC_VBC) += cros_ec_vbc.o | ||
obj-$(CONFIG_CROS_EC_DEBUGFS) += cros_ec_debugfs.o | ||
obj-$(CONFIG_CROS_EC_SYSFS) += cros_ec_sysfs.o | ||
obj-$(CONFIG_CROS_USBPD_LOGGER) += cros_usbpd_logger.o | ||
|
||
obj-$(CONFIG_WILCO_EC) += wilco_ec/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.