diff options
author | li feng <li1.feng@intel.com> | 2020-12-14 19:58:51 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-05 02:05:44 +0000 |
commit | 0e5eda0e47524c6a5ceb8de28b2de23ba4949b14 (patch) | |
tree | 4f8e8eabec1ce24bc2c633cea1d9859fd5354449 /board/volteer | |
parent | 829aa191a6e2b5b51e7d1fe9a5cb30c233dc210a (diff) | |
download | chrome-ec-0e5eda0e47524c6a5ceb8de28b2de23ba4949b14.tar.gz |
retimer: support retimer firmware update
To support AP to update firmware during boot up, one byte EC RAM is
allocated for AP <-> EC communication. AP queries PD port/requests EC
to perform operations via EC_CMD_ACPI_WRITE; and fetches result from EC
via EC_CMD_ACPI_READ.
The flow is:
1. AP queries EC PD ports which port supports retimer firmware update.
2. AP queries current MUX.
3. a) If no device attached, AP requests EC to suspend PD task of the
port. Then AP requests EC to set MUX to USB mode,
Safe mode, TBT mode. After entering TBT mode, the OS can either
enumerate the retimers or do firmware update on the enumerated
retimers. Once done, AP requests EC to disconnect MUX and resume PD
task.
3. b) If device attached, AP moves on as usual. Retimer firmware update
is not performed.
BUG=b:162528867
BRANCH=none
TEST=Tested NDA case on Voxel board, together with coreboot and kernel
changes. Coreboot changes are merged. Kernel patches list is:
https://chromium-review.googlesource.com/c/chromiumos/
third_party/kernel/+/2670719
After power up, host scans retimers, in sysfs
localhost ~ # ls /sys/bus/thunderbolt/devices/
0-0 0-0:1.1 0-0:3.1 domain0
On PD port 1, manually update retimer firmware. Copy firmware to
nvm_non_active1/nvmem, then authenticate it. Host starts flow to update
firmware.
After it's done, PD port 1 resumes. Hotplug DP dongle/TBT device, devices
should function fully.
TEST=Tested DA cases on Voxel board, together with coreboot and kernel
changes. USB4/TBT devices function as usual.
Signed-off-by: li feng <li1.feng@intel.com>
Change-Id: Ie976e75f892d5caf48a948598a058a4f42e07eb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2594492
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/usbc_config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c index 1fec96a2a3..40d4f9d0f3 100644 --- a/board/volteer/usbc_config.c +++ b/board/volteer/usbc_config.c @@ -241,6 +241,12 @@ struct bb_usb_control bb_controls[] = { }; BUILD_ASSERT(ARRAY_SIZE(bb_controls) == USBC_PORT_COUNT); +__override int usb_retimer_fw_update_query_port(void) +{ + /* USBC_PORT_C1 has burnside bridge retimer */ + return BIT(1); +} + __override enum tbt_compat_cable_speed board_get_max_tbt_speed(int port) { enum ec_cfg_usb_db_type usb_db = ec_cfg_usb_db_type(); |