mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 18:22:00 -04:00
hwmon: (pmbus/core) Add support for NVIDIA nvidia195mv mode
Extend the PMBus core vrm_version handling to support NVIDIA nvidia195mv VID mode. This adds a new VRM/VID encoding type and the corresponding voltage conversion logic so devices reporting nvidia195mv can have their VOUT/VID values interpreted correctly by the hwmon PMBus core. Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Link: https://lore.kernel.org/r/20260223050804.4287-3-Ashish.Yadav@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
committed by
Guenter Roeck
parent
4c9d861b42
commit
969a4ec86c
@@ -416,7 +416,7 @@ enum pmbus_sensor_classes {
|
||||
#define PMBUS_PAGE_VIRTUAL BIT(31) /* Page is virtual */
|
||||
|
||||
enum pmbus_data_format { linear = 0, ieee754, direct, vid };
|
||||
enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv };
|
||||
enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv, nvidia195mv };
|
||||
|
||||
/* PMBus revision identifiers */
|
||||
#define PMBUS_REV_10 0x00 /* PMBus revision 1.0 */
|
||||
|
||||
@@ -891,6 +891,10 @@ static s64 pmbus_reg2data_vid(struct pmbus_data *data,
|
||||
if (val >= 0x0 && val <= 0xd8)
|
||||
rv = DIV_ROUND_CLOSEST(155000 - val * 625, 100);
|
||||
break;
|
||||
case nvidia195mv:
|
||||
if (val >= 0x01)
|
||||
rv = 195 + (val - 1) * 5; /* VID step is 5mv */
|
||||
break;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user