From ed32977a39711656f776f8b8917ae2d63e13e1cc Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 31 Mar 2022 01:37:57 +0200 Subject: soc/amd/common/block/i2c/i23c_pad_ctrl: only configure mode and voltage The fch_i23c_pad_init implementation was written without looking at any reference code and turned out to not work properly on hardware. Before this function writes to the MISC_I23C_PAD_CTRL registers, the value read back is 0x3000003c which results in the I2C bus communication to work while the 0x300003fc the code writes to the register breaks the I2C communication. Removing the code that sets bits 6..9 fixes the I2C bus communication. Signed-off-by: Felix Held Tested-by: Karthikeyan Ramasubramanian Change-Id: Ie6758b3d13c59b20ce810225fca8a365713b7a2b Reviewed-on: https://review.coreboot.org/c/coreboot/+/63234 Reviewed-by: Karthik Ramasubramanian Reviewed-by: Fred Reitberger Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/i2c/i23c_pad_ctrl.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/soc/amd/common') diff --git a/src/soc/amd/common/block/i2c/i23c_pad_ctrl.c b/src/soc/amd/common/block/i2c/i23c_pad_ctrl.c index 243905417e1e..bff6223b7821 100644 --- a/src/soc/amd/common/block/i2c/i23c_pad_ctrl.c +++ b/src/soc/amd/common/block/i2c/i23c_pad_ctrl.c @@ -44,12 +44,5 @@ void fch_i23c_pad_init(unsigned int bus, break; } - pad_ctrl &= ~I23C_PAD_CTRL_FALLSLEW_SEL_MASK; - pad_ctrl |= speed == I2C_SPEED_STANDARD ? - I23C_PAD_CTRL_FALLSLEW_SEL_STD : I23C_PAD_CTRL_FALLSLEW_SEL_LOW; - - pad_ctrl &= ~I23C_PAD_CTRL_SLEW_N_MASK; - pad_ctrl |= I23C_PAD_CTRL_SLEW_N_FAST; - misc_write32(MISC_I23C_PAD_CTRL(bus), pad_ctrl); } -- cgit v1.2.3