From bf31dd72f0d50d5acc71d7777b5dae6c51b3ba17 Mon Sep 17 00:00:00 2001 From: Yo-Jung Date: Tue, 13 Oct 2026 13:36:03 +0530 Subject: [PATCH] i2c: i801: Gate SPD instantiation on SPD Write Disable bit When DDR5 memory modules are present, probing the spd5118 hub requires page-selection write transactions. If the BIOS has set the SPD Write Disable (SPD_WD) bit in SMBHSTCFG, the transaction fails and wedges the controller into an unrecoverable "SMBus is busy" state. Pass the PCH SPD Write Disable status into the SMBus core via i2c_register_spd_write_disable(). This safely skips spd5118 instantiation under write-protection while leaving legacy DDR4 (ee1004) functional. Retain the original #ifdef CONFIG_I2C_I801_MUX preprocessor block around mux_pdev to prevent compile-time regressions when the multiplexer driver is disabled. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=213345 Co-developed-by: Saranya Gopal Signed-off-by: Saranya Gopal Signed-off-by: Yo-Jung Tested-by: Mark Pearson Reviewed-by: Andy Shevchenko Signed-off-by: Andi Shyti Link: https://patch.msgid.link/20261013080603.808196-1-saranya.gopal@intel.com --- drivers/i2c/busses/i2c-i801.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index b29c99ed3883..810f61e39cad 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1170,6 +1170,14 @@ static void dmi_check_onboard_devices(const struct dmi_header *dm, void *adap) } } +static void i801_register_spd(struct i801_priv *priv) +{ + if (priv->original_hstcfg & SMBHSTCFG_SPD_WD) + i2c_register_spd_write_disable(&priv->adapter); + else + i2c_register_spd_write_enable(&priv->adapter); +} + /* Register optional targets */ static void i801_probe_optional_targets(struct i801_priv *priv) { @@ -1193,7 +1201,7 @@ static void i801_probe_optional_targets(struct i801_priv *priv) #ifdef CONFIG_I2C_I801_MUX if (!priv->mux_pdev) #endif - i2c_register_spd_write_enable(&priv->adapter); + i801_register_spd(priv); } #else static void __init input_apanel_init(void) {}