summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@chromium.org>2018-12-19 14:01:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-01-08 14:33:35 -0800
commit9e4474e561ec165cf24e8aa249c2aeeed8e7f1ef (patch)
treebc5e884a87efd1b852945c37f90ee0e8518a2d69 /include/i2c.h
parenta3a17f0013e294b9b9496d78b9b2ab6cefa45270 (diff)
downloadchrome-ec-9e4474e561ec165cf24e8aa249c2aeeed8e7f1ef.tar.gz
i2c_master: Protect TCPC I2C tunnels as part of EC_REBOOT_DISABLE_JUMP
Currently EC keeps the I2C tunnels open enabling depthcharge to perform firmware update on those ports. Once the firmware update is done, depthcharge triggers a command to protect the I2C tunnels. But not all TCPC ports are registered for firmware update in depthcharge. This causes some I2C tunnels to be left unprotected. Update EC to protect all the TCPC I2C tunnels when depthcharge invokes EC_REBOOT_DISABLE_JUMP command. This usually happens when the EC software sync is complete and the control jumps to OS. Also protect the TCPC I2C tunnels only when the WP is enabled. BUG=b:119130829 BRANCH=octopus TEST=make -j buildall && Boot to ChromeOS and ensure that the TCPC I2C tunnels are protected. Change-Id: Ice681038bbf725b3aa44b13ff71724937c6045e9 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/1390944 Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/i2c.h')
-rw-r--r--include/i2c.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 1dcfe46332..bb7f28000d 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -392,4 +392,9 @@ 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 */