summaryrefslogtreecommitdiff
path: root/include/i2c_ite_flash_support.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-02-19 09:48:06 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-27 14:35:48 +0000
commitce143d577fa85acae86ae372a7521d7def6c2391 (patch)
tree3ac819ce9d1ac47712238d91e77a47446841821b /include/i2c_ite_flash_support.h
parent21f8be7099d57efdcdffd244758861a604202ad8 (diff)
downloadchrome-ec-ce143d577fa85acae86ae372a7521d7def6c2391.tar.gz
c2d2: add support for I2C-based flashing
Add necessary console command to allow C2D2 to pass through i2c bus for ec and ap. Also hook into common ite programming mode code. BRANCH=servo BUG=b:148610186,b:147381671 TEST=flash ampton with C2D2 adapter Change-Id: I1d9b20684b45ff0d101b9cfff8b0b0a85e6c0c70 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2064594 Reviewed-by: David Schneider <dnschneid@chromium.org> Reviewed-by: Matthew Blecker <matthewb@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/i2c_ite_flash_support.h')
-rw-r--r--include/i2c_ite_flash_support.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/i2c_ite_flash_support.h b/include/i2c_ite_flash_support.h
index e926fe2539..f70bec877a 100644
--- a/include/i2c_ite_flash_support.h
+++ b/include/i2c_ite_flash_support.h
@@ -13,6 +13,14 @@
struct ite_dfu_config_t {
/* I2C port to communicate on */
int i2c_port;
+ /* True if using OC1N instead of OC1 */
+ bool use_complement_timer_channel;
+ /*
+ * Optional function that guards access to i2c port. If present, the
+ * return value should return true if dfu access is allowed and false
+ * otherwise.
+ */
+ bool (*access_allow)(void);
/*
* The gpio signals that moved between TIM16/17 (MODULE_I2C_TIMERS) and
* I2C (MODULE_I2C).