From c6be277af16926c2f780f84e1a307f2751814570 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Thu, 16 Sep 2021 14:49:11 -0600 Subject: zephyr: herobrine_npcx9: Set TCPC I2C speed to 400 kHz The PS8805 supports 1 MHz operation normally, but only 400 kHz operation during flash updates. The I2C passthru interface used by depthcharge doesn't support changing the I2C frequency or informing the EC that a firmware update is going to start, so the lower frequency must be used. BUG=b:199550987 BRANCH=none TEST=Verify PS8805-A3 firmware updates Signed-off-by: Keith Short Change-Id: I9be242ce03cc29c74559c6012b5cc83680b7b288 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3166998 Reviewed-by: Wai-Hong Tam --- zephyr/projects/herobrine/herobrine_npcx9/i2c.dts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts b/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts index 97b6f0661d..8e26fae393 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts +++ b/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts @@ -86,12 +86,22 @@ &i2c1_0 { status = "okay"; - clock-frequency = ; + /* + * TODO(b/200280341): PS8805 SPI ROM access + * + * The PS8805 supports 1 MHz during normal operation, but only + * 400 Khz during firmware updates. The I2C passthru commands don't + * currently support changing the I2C frequency or notifying the EC + * that a programming operation is going to start. Lower the clock + * rate to 400 kHz for all accesses. + */ + clock-frequency = ; }; &i2c2_0 { status = "okay"; - clock-frequency = ; + /* TODO(b/200280341): PS8805 SPI ROM access */ + clock-frequency = ; }; &i2c3_0 { -- cgit v1.2.1