[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250430-for-upstream-i801-spd5118-no-instantiate-v2-0-2f54d91ae2c7@canonical.com>
Date: Wed, 30 Apr 2025 19:26:15 +0800
From: "Yo-Jung (Leo) Lin" <leo.lin@...onical.com>
To: Jean Delvare <jdelvare@...e.com>, Andi Shyti <andi.shyti@...nel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
"Chia-Lin Kao (AceLan)" <acelan.kao@...onical.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
"Yo-Jung Lin (Leo)" <leo.lin@...onical.com>
Subject: [PATCH v2 0/2] i2c: i801: don't instantiate spd5118 under SPD
Write Disable
On some PC platforms, the BIOS may enable i801's SPD Write Disable bit and
forbid writes to certain SMBus addresses. For the i801 family those addresses
are 0x50 to 0x57[1], where the spd5118 sensors are usually probed.
The write-disabling bit will make sensor functions related to writes and
nvmem access unusable.
Also, the driver is unable to sync back values from regcache to the sensors
during resume, leading to resume failure. This has been observed on multiple
existing PC platforms from Dell and HP.
Furthermore, BIOS can be implemented in a way that, after a reset, the sensor
page value must be selected to 0 first before its values can be read.
Not being able to write to the registers renders the temperature reading
unusable. See discussion in [2].
To address these issues, do not instantiate spd5118 if the SPD Write Disable
bit is set.
[1] 18.1.16 HOSTC—Host Configuration Register (SMBus—D31:F3),
Intel 8 Series/C220 Series Chipset Family Platform Controller Hub(PCH)
[2] https://lore.kernel.org/all/acf31929-5d13-4fc5-b370-ab7fc5062455@roeck-us.net/
Signed-off-by: Yo-Jung Lin (Leo) <leo.lin@...onical.com>
---
Changes in v2:
- Instead of passing a bool to i2c_register_spd(), make dedicated i2c_register_spd_write_{en,dis}able() functions for each case.
- Rename variables.
- Refine commit descriptions.
- Link to v1: https://lore.kernel.org/r/20250424-for-upstream-i801-spd5118-no-instantiate-v1-0-627398268a1f@canonical.com
---
Yo-Jung (Leo) Lin (2):
i2c: smbus: introduce Write Disable-aware SPD instantiating functions
i2c: i801: don't instantiate spd5118 under SPD Write Disable
drivers/i2c/busses/i2c-i801.c | 15 ++++++++++-----
drivers/i2c/busses/i2c-piix4.c | 2 +-
drivers/i2c/i2c-smbus.c | 21 +++++++++++++++++++--
include/linux/i2c-smbus.h | 6 ++++--
4 files changed, 34 insertions(+), 10 deletions(-)
---
base-commit: 9d9096722447b77662d4237a09909bde7774f22e
change-id: 20250423-for-upstream-i801-spd5118-no-instantiate-3b52d489e7a6
Best regards,
--
Yo-Jung (Leo) Lin <leo.lin@...onical.com>
Powered by blists - more mailing lists