=?y?q?=5BPATCH=20v2=202/3=5D=20hwmon=3A=20=28pmbus/core=29=20Add=20support=20for=C2=A0NVIDIA=C2=A0nvidia195mv=20mode?=
From: ASHISH YADAV
Date: Thu Feb 19 2026 - 05:59:22 EST
From: Ashish Yadav <ashish.yadav@xxxxxxxxxxxx>
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@xxxxxxxxxxxx>
---
drivers/hwmon/pmbus/pmbus.h | 2 +-
drivers/hwmon/pmbus/pmbus_core.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index d2e9bfb5320f..3ddcb742d289 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -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 */
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index be6d05def115..4d7634ee6148 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -885,6 +885,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;
}
--
2.39.5