[PATCH] i2c-smbus: Add disable_spd module parameter to skip automatic SPD EEPROM instantiation
From: Mani, Aravind
Date: Wed Mar 11 2026 - 05:53:32 EST
From: Aravind Mani <aravind.m1@xxxxxxxx>
Date: Mon, 03 Mar 2026 00:00:00 +0000
Subject: [PATCH] i2c-smbus: Add disable_spd module parameter to skip automatic SPD EEPROM instantiation
Some systems use address 0x50 on a non‑DIMM SMBus channel for system EEPROM.
The automatic SPD probing in i2c_register_spd() claims this address via ee1004 driver before the platform driver binds with at24 driver and
it breaks system EEPROM access.
To address this issue, introduce a new module parameter 'disable_spd' (default 0).
When disable_spd module parameter is set, automatic SPD EEPROM instantiation is skipped, and it allows platform drivers to claim address 0x50.
This change preserves current behavior for all systems unless disable_spd flag is set.
Usage:
modprobe i2c-smbus
or
modprobe i2c-smbus disable_spd=1
or:
echo "options i2c-smbus disable_spd=1" > /etc/modprobe.d/i2c-smbus.conf
Signed-off-by: Aravind Mani <aravind.m1@xxxxxxxx>
---
drivers/i2c/i2c-smbus.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
index 1234567..8901234 100644
--- a/drivers/i2c/i2c-smbus.c
+++ b/drivers/i2c/i2c-smbus.c
@@ -370,6 +370,10 @@
* - Only works on systems with 1 to 8 memory slots
*/
#if IS_ENABLED(CONFIG_DMI)
+static bool disable_spd;
+module_param(disable_spd, bool, 0644);
+MODULE_PARM_DESC(disable_spd, "Disable automatic SPD EEPROM instantiation (default: false)");
+
static void i2c_register_spd(struct i2c_adapter *adap, bool write_disabled)
{
int n, slot_count = 0, dimm_count = 0;
@@ -378,6 +382,9 @@ static void i2c_register_spd(struct i2c_adapter *adap, bool write_disabled)
u64 mem_size;
bool instantiate = true;
const char *name;
+
+ if (disable_spd)
+ return;
while ((handle = dmi_memdev_handle(slot_count)) != 0xffff) {
slot_count++;
--
2.39.2