From 5a60b3b215125e8d2c145e17867fcfaaae682dcd Mon Sep 17 00:00:00 2001 From: Namyoon Woo Date: Tue, 14 Apr 2020 23:31:51 -0700 Subject: apply INT_AP_L extension on I2CS interface This patch applies INT_AP_L extension on I2CS. It uses GPIO_MONITOR_I2CS_SDA to detect a transaction start during INT_AP_L assertion and to deassert INT_AP_L. BUG=b:148691139 TEST=None Signed-off-by: Namyoon Woo Change-Id: Iedd59b488dfdfaaf71dd71eda6437f1a9402d3c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2150517 Tested-by: Namyoon Woo Reviewed-by: Vadim Bendebury Commit-Queue: Namyoon Woo --- board/cr50/gpio.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'board/cr50/gpio.inc') diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc index 47c35fb2d2..e527f7815b 100644 --- a/board/cr50/gpio.inc +++ b/board/cr50/gpio.inc @@ -109,6 +109,15 @@ GPIO_INT(DETECT_SERVO, PIN(1, 3), GPIO_INT_HIGH | GPIO_PULL_DOWN, GPIO_INT(DETECT_TPM_RST_L_ASSERTED, PIN(1, 4), GPIO_INT_FALLING, tpm_rst_asserted) +/* + * A GPIO to sample the current state of the I2CS SDA line, allowing to detect + * the 'wedged I2C bus' condition. + * + * Also, it works to detect an I2C transaction during extended INT_AP_L + * assertion. + */ +GPIO_INT(MONITOR_I2CS_SDA, PIN(1, 6), GPIO_INT_LOW, i2cs_sda_isr) + /* * These GPIOs are to enable or disable EC-CR50 communication. * NOTE: If these are changed, you must update the information in board.c @@ -187,12 +196,6 @@ GPIO(STRAP_B1, PIN(1, 15), GPIO_INPUT) GPIO(UNWEDGE_I2CS_SCL, PIN(1, 5), GPIO_OUT_HIGH) -/* - * A GPIO to sample the current state of the I2CS SDA line, allowing to detect - * the 'wedged I2C bus' condition. - */ -GPIO(MONITOR_I2CS_SDA, PIN(1, 6), GPIO_INPUT) - /* * If you change the names of EN_PP3300_INA_L, I2C_SCL_INA, or I2C_SDA_INA, * you also need to update the usage in closed_source_set1.c -- cgit v1.2.1