diff options
author | Diana Z <dzigterman@chromium.org> | 2020-10-14 15:16:16 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-21 00:26:47 +0000 |
commit | d6458e209c36770ec482a25e5d2e8e29cb20dcac (patch) | |
tree | 49987dcbd4b338cfec7be32bc1c4e86f94d429ca | |
parent | 3cac50952113db8ec86a187c61a02132e423ee52 (diff) | |
download | chrome-ec-d6458e209c36770ec482a25e5d2e8e29cb20dcac.tar.gz |
TCPMv2: Report TYPEC commands as a feature
To ease the AP's use of the new TYPEC_* host commands, add a feature
flag to indicate their presence. Since ToT TCPMv2 always supports these
commands, use that configuration as the trigger for it.
Note for firmware branch pickers: this commit should only be picked if
the branch is also picking the corresponding TYPEC commands (currently
as of this CL: STATUS, DISCOVERY, and CONTROL).
BRANCH=None
BUG=b:167700356
TEST=on waddledoo, confirm Type-c command support shows up in "ectool
inventory"
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I4ff78c9b6ca297933611d4abf239fb67b1221751
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2473100
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r-- | common/ec_features.c | 3 | ||||
-rw-r--r-- | include/ec_commands.h | 2 | ||||
-rw-r--r-- | util/ectool.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/common/ec_features.c b/common/ec_features.c index 5abe121591..21b9445101 100644 --- a/common/ec_features.c +++ b/common/ec_features.c @@ -138,6 +138,9 @@ uint32_t get_feature_flags1(void) #ifdef CHIP_ISH | EC_FEATURE_MASK_1(EC_FEATURE_ISH) #endif +#ifdef CONFIG_USB_PD_TCPMV2 + | EC_FEATURE_MASK_1(EC_FEATURE_TYPEC_CMD) +#endif ; return board_override_feature_flags1(result); } diff --git a/include/ec_commands.h b/include/ec_commands.h index 651c6dd740..226571b005 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1400,6 +1400,8 @@ enum ec_feature_code { EC_FEATURE_SCP = 39, /* The MCU is an Integrated Sensor Hub */ EC_FEATURE_ISH = 40, + /* New TCPMv2 TYPEC_ prefaced commands supported */ + EC_FEATURE_TYPEC_CMD = 41, }; #define EC_FEATURE_MASK_0(event_code) BIT(event_code % 32) diff --git a/util/ectool.c b/util/ectool.c index ebc201e3f1..3220f3fd98 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -856,6 +856,7 @@ static const char * const ec_feature_names[] = { "Refined tablet mode hysteresis", [EC_FEATURE_EFS2] = "Early Firmware Selection v2", [EC_FEATURE_ISH] = "Intel Integrated Sensor Hub", + [EC_FEATURE_TYPEC_CMD] = "TCPMv2 Type-C commands", }; int cmd_inventory(int argc, char *argv[]) |