diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-05 13:16:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-06 01:05:12 +0000 |
commit | 025f8592fbc8fa728dbb5535d9fa74427391e398 (patch) | |
tree | b7060d56e1e7c2b0b543f8e395fb218cda5b84c7 | |
parent | 9fc79b2e2d2b3c0119df50afbad81ea541c36519 (diff) | |
download | chrome-ec-025f8592fbc8fa728dbb5535d9fa74427391e398.tar.gz |
zephyr: Add support for retimer firmware updates
Enable CONFIG_USBC_RETIMER_FW_UPDATE so that retimer chips can be
updated on boot.
BUG=b:175434113
BRANCH=none
TEST=build zephyr for volteer, see that the new code is included
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ie620f322d32bae46c00ff4e8d5477261a7dbe279
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2678926
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 14 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
3 files changed, 21 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index dc02a3eb0d..8e3ed422f9 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -186,6 +186,8 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USB_POWER_DELIVERY zephyr_sources_ifdef(CONFIG_PLATFORM_EC_CONSOLE_CMD_PD "${PLATFORM_EC}/common/usbc/usb_pd_console.c") +zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_FW_UPDATE + "${PLATFORM_EC}/common/usbc/usb_retimer_fw_update.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB "${PLATFORM_EC}/driver/retimer/bb_retimer.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USBC_SS_MUX diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 7587514c04..596c32f663 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -783,6 +783,20 @@ config PLATFORM_EC_USB_MUX_VIRTUAL and is is informed when status changes, via the EC_CMD_USB_PD_MUX_INFO host command. +config PLATFORM_EC_USBC_RETIMER_FW_UPDATE + bool "Support firmware update of USB Type-C retimers" + default y + depends on PLATFORM_EC_USBC_SS_MUX + help + Enable this to support USB Type-C retimer firmware update. Each + Type-C retimer indicates its capability of supporting firmware update + independently in its usb_mux_driver. + + During AP boot-up, the AP scans each PD port for retimers but only + if there are no Type-C devices attached to the port. The firmware + update can only be performed on retimers which show up in the AP + thunderbolt device entries. + endif # PLATFORM_EC_USB_MUX config PLATFORM_EC_CONSOLE_CMD_PPC_DUMP diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index f445cd1212..48e50cc2cf 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -683,6 +683,11 @@ enum battery_type { #define CONFIG_USB_PD_ALT_MODE_UFP #endif +#undef CONFIG_USBC_RETIMER_FW_UPDATE +#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_FW_UPDATE +#define CONFIG_USBC_RETIMER_FW_UPDATE +#endif + #undef CONFIG_USBC_RETIMER_INTEL_BB #ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB |