summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@chromium.org>2019-05-09 17:43:02 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-23 00:12:23 +0000
commiteb4c488043dd6b927bb02dd1b47531c1b5599a88 (patch)
tree0c49b682b009cfa33b49cb8c215628c973b18cb8 /include
parent4ce11542f753aa8cba5d1bfe2c869f2fe9284b5a (diff)
downloadchrome-ec-eb4c488043dd6b927bb02dd1b47531c1b5599a88.tar.gz
common/i2c_master: Add a subcommand to protect all TCPC ports
Currently the I2C tunnels of all TCPC ports are protected implicitly when the system jump is disabled. Depthcharge issues that command after the EC jumps to RW and before the TCPC firmware update is applied. This leads to failure while updating the TCPC firmware and hence a reboot loop. Fix this behavior by adding a sub-command to protect all the I2C tunnels so that depthcharge can issue that command after both EC SW Sync and TCPC Firmware update are done. BUG=b:129545729 BRANCH=None TEST=make -j buildall; Boot to ChromeOS. Force a TCPC FW update and ensure that the reboot loop does not happen. Change-Id: I5dd2314cf82dcfff520dc32ce3ced232326ab3d5 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/1605260 Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1767517 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h5
-rw-r--r--include/i2c.h5
2 files changed, 3 insertions, 7 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index a924f5aceb..c8948d3a9a 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4362,8 +4362,9 @@ struct ec_params_entering_mode {
#define EC_CMD_I2C_PASSTHRU_PROTECT 0x00B7
enum ec_i2c_passthru_protect_subcmd {
- EC_CMD_I2C_PASSTHRU_PROTECT_STATUS = 0x0,
- EC_CMD_I2C_PASSTHRU_PROTECT_ENABLE = 0x1,
+ EC_CMD_I2C_PASSTHRU_PROTECT_STATUS = 0,
+ EC_CMD_I2C_PASSTHRU_PROTECT_ENABLE = 1,
+ EC_CMD_I2C_PASSTHRU_PROTECT_ENABLE_TCPCS = 2,
};
struct ec_params_i2c_passthru_protect {
diff --git a/include/i2c.h b/include/i2c.h
index 66e2e82029..fdc5937e2e 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -420,9 +420,4 @@ void i2c_start_xfer_notify(int port, int slave_addr);
*/
void i2c_end_xfer_notify(int port, int slave_addr);
-/**
- * Function to protect I2C port/tunnel. This is invoked either when through
- * host command or when sys_jump is disabld.
- */
-void i2c_passthru_protect_port(uint32_t port);
#endif /* __CROS_EC_I2C_H */