From aea8b2d79860ee0cf1117455070c6af45892309c Mon Sep 17 00:00:00 2001 From: "Vic (Chun-Ju) Yang" Date: Thu, 9 Jan 2014 15:01:23 +0800 Subject: Enable internal pull-up for MEC1322 EVB I2C bus The external pull-up resistors are too weak, and cause slow-down on I2C speed. Let's enable internal pull-up to compensate this. BUG=chrome-os-partner:24389 TEST=Measure I2C speed with scope, and see better slew rate. BRANCH=None Change-Id: Iefb5fca3c88250bbd8cad29d7998d590a7cc7c35 Signed-off-by: Vic (Chun-Ju) Yang Reviewed-on: https://chromium-review.googlesource.com/181999 Reviewed-by: Vincent Palatin --- board/mec1322_evb/board.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/mec1322_evb/board.c b/board/mec1322_evb/board.c index 5d7dd42bb9..f363baf788 100644 --- a/board/mec1322_evb/board.c +++ b/board/mec1322_evb/board.c @@ -35,7 +35,11 @@ const struct gpio_alt_func gpio_alt_funcs[] = { {GPIO_PORT(16), 0x24, 1, MODULE_UART}, /* UART0 */ {GPIO_PORT(3), (1 << 4), 3, MODULE_PWM_FAN}, {GPIO_PORT(14), (1 << 0), 3, MODULE_PWM_FAN}, - {GPIO_PORT(1), 0x60, 2, MODULE_I2C}, /* I2C0 */ + /* + * I2C0: External pull-up resistors on EVB are too weak. Let's + * also enable internal pull-up here. + */ + {GPIO_PORT(1), 0x60, 2, MODULE_I2C, GPIO_PULL_UP}, {GPIO_PORT(0), 0xfe, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_OUTPUT}, {GPIO_PORT(1), 0x03, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_OUTPUT}, {GPIO_PORT(3), 0x04, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_INPUT}, -- cgit v1.2.1