nyan*: Set GEN2 I2C pads to open-drain mode

The VDDIO to GEN2 I2C SCL/SDA pins is 1.8V and the external
pull-up voltage is 3.3V (the external 3.3V > I/O 1.8V) thus
the pinmux E_OD bit of these two pins needs to be set to
ensure GEN2 I2C pads work fine on 3.3V.

BRANCH=nyan
BUG=none
TEST=observed voltage drop from 3.3V to 2.36V on gen2 i2c
on blaze w/o this change. the waveform looks good on both
scl/sda pins w/ this change.

Original-Change-Id: I1b97f0c9c7580d1e532c3bdf7ac8690241ee7ee3
Original-Signed-off-by: Ken Chang <kenc@nvidia.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/200996
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
(cherry picked from commit 2db39166ec525e56a19746f38a867305a2687365)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>

Change-Id: I0c84eade89311baf0a6f180cb5cc9e2145f6b7ea
Reviewed-on: http://review.coreboot.org/7952
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Ken Chang 2014-05-22 10:54:16 +08:00 committed by Marc Jones
parent 9e208bc357
commit a859aa3df5
3 changed files with 12 additions and 6 deletions

View File

@ -81,10 +81,12 @@ static void setup_pinmux(void)
PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE); PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE);
// I2C2 clock. // I2C2 clock.
pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX,
PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C2 data. // I2C2 data.
pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX,
PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C4 (DDC) clock. // I2C4 (DDC) clock.
pinmux_set_config(PINMUX_DDC_SCL_INDEX, pinmux_set_config(PINMUX_DDC_SCL_INDEX,
PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE); PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE);

View File

@ -81,10 +81,12 @@ static void setup_pinmux(void)
PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE); PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE);
// I2C2 clock. // I2C2 clock.
pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX,
PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C2 data. // I2C2 data.
pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX,
PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C4 (DDC) clock. // I2C4 (DDC) clock.
pinmux_set_config(PINMUX_DDC_SCL_INDEX, pinmux_set_config(PINMUX_DDC_SCL_INDEX,
PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE); PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE);

View File

@ -81,10 +81,12 @@ static void setup_pinmux(void)
PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE); PINMUX_GEN1_I2C_SDA_FUNC_I2C1 | PINMUX_INPUT_ENABLE);
// I2C2 clock. // I2C2 clock.
pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SCL_INDEX,
PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SCL_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C2 data. // I2C2 data.
pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX, pinmux_set_config(PINMUX_GEN2_I2C_SDA_INDEX,
PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE); PINMUX_GEN2_I2C_SDA_FUNC_I2C2 | PINMUX_INPUT_ENABLE |
PINMUX_OPEN_DRAIN);
// I2C4 (DDC) clock. // I2C4 (DDC) clock.
pinmux_set_config(PINMUX_DDC_SCL_INDEX, pinmux_set_config(PINMUX_DDC_SCL_INDEX,
PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE); PINMUX_DDC_SCL_FUNC_I2C4 | PINMUX_INPUT_ENABLE);