From a9f8632cbaceea7bf93ebba5933b7d658b97fb5d Mon Sep 17 00:00:00 2001 From: Yu-An Chen Date: Tue, 15 Feb 2022 10:28:16 +0800 Subject: volmar: Modify USB C1 i2c port speed Modify the I2C frequency of I2C_PORT_USB_C1_TCPC and I2C_PORT_USB_C1_PPC from 400 kHz to 1000 kHz and disable C1_PPC dynamic speed. BUG=b:211891086 BRANCH=brya TEST=check pd 1 working Signed-off-by: Yu-An Chen Change-Id: Ia6e20ce5ce1064add91de021f00121cf70bcfc96 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3459601 Reviewed-by: caveh jalali Commit-Queue: caveh jalali --- board/volmar/i2c.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/board/volmar/i2c.c b/board/volmar/i2c.c index 74d5d2878e..890a578788 100644 --- a/board/volmar/i2c.c +++ b/board/volmar/i2c.c @@ -60,7 +60,6 @@ const struct i2c_port_t i2c_ports[] = { .kbps = 1000, .scl = GPIO_EC_I2C_USB_C1_MIX_SCL, .sda = GPIO_EC_I2C_USB_C1_MIX_SDA, - .flags = I2C_PORT_FLAG_DYNAMIC_SPEED, }, { /* I2C7 */ @@ -72,19 +71,3 @@ const struct i2c_port_t i2c_ports[] = { }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); - -/* - * I2C controllers are initialized in main.c. This sets the speed much - * later, but before I2C peripherals are initialized. - */ -static void set_board_legacy_i2c_speeds(void) -{ - if (get_board_id() >= BOARD_ID_FAST_PLUS_CAPABLE) - return; - - ccprints("setting USB DB I2C buses to 400 kHz\n"); - - i2c_set_freq(I2C_PORT_USB_C1_TCPC, I2C_FREQ_400KHZ); - i2c_set_freq(I2C_PORT_USB_C1_PPC, I2C_FREQ_400KHZ); -} -DECLARE_HOOK(HOOK_INIT, set_board_legacy_i2c_speeds, HOOK_PRIO_INIT_I2C - 1); -- cgit v1.2.1