[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220428134634.1610241-1-dev_public@wujek.eu>
Date: Thu, 28 Apr 2022 13:46:59 +0000
From: Adam Wujek <dev_public@...ek.eu>
To: unlisted-recipients:; (no To-header on input)
Cc: Adam Wujek <dev_public@...ek.eu>,
Guenter Roeck <linux@...ck-us.net>,
Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] hwmon: (pmbus) add missing definitions of pmbus registers
Definitions are taken from the table 31 of the PMBUS specification
revision 1.3.1, 13 March 2015.
Signed-off-by: Adam Wujek <dev_public@...ek.eu>
---
drivers/hwmon/pmbus/pmbus.h | 145 ++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index e74b6ef070f3..902bb9cce950 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -21,11 +21,29 @@ enum pmbus_regs {
PMBUS_ON_OFF_CONFIG = 0x02,
PMBUS_CLEAR_FAULTS = 0x03,
PMBUS_PHASE = 0x04,
+ PMBUS_PAGE_PLUS_WRITE = 0x05,
+ PMBUS_PAGE_PLUS_READ = 0x06,
+ PMBUS_ZONE_CONFIG = 0x07,
+ PMBUS_ZONE_ACTIVE = 0x08,
+
+ /* 0x09 - 0x0F are reserved */
PMBUS_WRITE_PROTECT = 0x10,
+ PMBUS_STORE_DEFAULT_ALL = 0x11,
+ PMBUS_RESTORE_DEFAULT_ALL = 0x12,
+ PMBUS_STORE_DEFAULT_CODE = 0x13,
+ PMBUS_RESTORE_DEFAULT_CODE = 0x14,
+ PMBUS_STORE_USER_ALL = 0x15,
+ PMBUS_RESTORE_USER_ALL = 0x16,
+ PMBUS_STORE_USER_CODE = 0x17,
+ PMBUS_RESTORE_USER_CODE = 0x18,
PMBUS_CAPABILITY = 0x19,
+
PMBUS_QUERY = 0x1A,
+ PMBUS_SMBALERT_MASK = 0x1B,
+
+ /* 0x1C - 0x1F are reserved */
PMBUS_VOUT_MODE = 0x20,
PMBUS_VOUT_COMMAND = 0x21,
@@ -38,10 +56,22 @@ enum pmbus_regs {
PMBUS_VOUT_DROOP = 0x28,
PMBUS_VOUT_SCALE_LOOP = 0x29,
PMBUS_VOUT_SCALE_MONITOR = 0x2A,
+ PMBUS_VOUT_MIN = 0x2B,
+
+ /* 0x2C - 0x2F are reserved */
PMBUS_COEFFICIENTS = 0x30,
PMBUS_POUT_MAX = 0x31,
+ PMBUS_MAX_DUTY = 0x32,
+ PMBUS_FREQUENCY_SWITCH = 0x33,
+ PMBUS_POWER_MODE = 0x34,
+ PMBUS_VIN_ON = 0x35,
+ PMBUS_VIN_OFF = 0x36,
+ PMBUS_INTERLEAVE = 0x37,
+ PMBUS_IOUT_CAL_GAIN = 0x38,
+ PMBUS_IOUT_CAL_OFFSET = 0x39,
+
PMBUS_FAN_CONFIG_12 = 0x3A,
PMBUS_FAN_COMMAND_1 = 0x3B,
PMBUS_FAN_COMMAND_2 = 0x3C,
@@ -63,6 +93,9 @@ enum pmbus_regs {
PMBUS_IOUT_UC_FAULT_LIMIT = 0x4B,
PMBUS_IOUT_UC_FAULT_RESPONSE = 0x4C,
+ /* 0x4D is reserved */
+ /* 0x4E is reserved */
+
PMBUS_OT_FAULT_LIMIT = 0x4F,
PMBUS_OT_FAULT_RESPONSE = 0x50,
PMBUS_OT_WARN_LIMIT = 0x51,
@@ -74,14 +107,28 @@ enum pmbus_regs {
PMBUS_VIN_OV_WARN_LIMIT = 0x57,
PMBUS_VIN_UV_WARN_LIMIT = 0x58,
PMBUS_VIN_UV_FAULT_LIMIT = 0x59,
+ PMBUS_VIN_UV_FAULT_RESPONSE = 0x5A,
PMBUS_IIN_OC_FAULT_LIMIT = 0x5B,
PMBUS_IIN_OC_WARN_LIMIT = 0x5D,
+ PMBUS_POWER_GOOD_ON = 0x5E,
+ PMBUS_POWER_GOOD_OFF = 0x5F,
+ PMBUS_TON_DELAY = 0x60,
+ PMBUS_TON_RISE = 0x61,
+ PMBUS_TON_MAX_FAULT_LIMIT = 0x62,
+ PMBUS_TON_MAX_FAULT_RESPONSE = 0x63,
+ PMBUS_TOFF_DELAY = 0x64,
+ PMBUS_TOFF_FALL = 0x65,
+ PMBUS_TOFF_MAX_WARN_LIMIT = 0x66,
+ /* 0x67 is reserved (Was Used In PMBUS Revision 1.0) */
PMBUS_POUT_OP_FAULT_LIMIT = 0x68,
+ PMBUS_POUT_OP_FAULT_RESPONSE = 0x69,
PMBUS_POUT_OP_WARN_LIMIT = 0x6A,
PMBUS_PIN_OP_WARN_LIMIT = 0x6B,
+ /* 0x6C - 0x77 are reserved */
+
PMBUS_STATUS_BYTE = 0x78,
PMBUS_STATUS_WORD = 0x79,
PMBUS_STATUS_VOUT = 0x7A,
@@ -94,6 +141,11 @@ enum pmbus_regs {
PMBUS_STATUS_FAN_12 = 0x81,
PMBUS_STATUS_FAN_34 = 0x82,
+ PMBUS_READ_KWH_IN = 0x83,
+ PMBUS_READ_KWH_OUT = 0x84,
+ PMBUS_READ_KWH_CONFIG = 0x85,
+ PMBUS_READ_EIN = 0x86,
+ PMBUS_READ_EOUT = 0x87,
PMBUS_READ_VIN = 0x88,
PMBUS_READ_IIN = 0x89,
PMBUS_READ_VCAP = 0x8A,
@@ -118,6 +170,7 @@ enum pmbus_regs {
PMBUS_MFR_LOCATION = 0x9C,
PMBUS_MFR_DATE = 0x9D,
PMBUS_MFR_SERIAL = 0x9E,
+ PMBUS_APP_PROFILE_SUPPORT = 0x9F,
PMBUS_MFR_VIN_MIN = 0xA0,
PMBUS_MFR_VIN_MAX = 0xA1,
@@ -128,13 +181,105 @@ enum pmbus_regs {
PMBUS_MFR_IOUT_MAX = 0xA6,
PMBUS_MFR_POUT_MAX = 0xA7,
+ PMBUS_MFR_TAMBIENT_MAX = 0xA8,
+ PMBUS_MFR_TAMBIENT_MIN = 0xA9,
+ PMBUS_MFR_EFFICIENCY_LL = 0xAA,
+ PMBUS_MFR_EFFICIENCY_HL = 0xAB,
+ PMBUS_MFR_PIN_ACCURACY = 0xAC,
+
PMBUS_IC_DEVICE_ID = 0xAD,
PMBUS_IC_DEVICE_REV = 0xAE,
+ /* 0xAF is reserved */
+
+ PMBUS_USER_DATA_00 = 0xB0,
+ PMBUS_USER_DATA_01 = 0xB1,
+ PMBUS_USER_DATA_02 = 0xB2,
+ PMBUS_USER_DATA_03 = 0xB3,
+ PMBUS_USER_DATA_04 = 0xB4,
+ PMBUS_USER_DATA_05 = 0xB5,
+ PMBUS_USER_DATA_06 = 0xB6,
+ PMBUS_USER_DATA_07 = 0xB7,
+ PMBUS_USER_DATA_08 = 0xB8,
+ PMBUS_USER_DATA_09 = 0xB9,
+ PMBUS_USER_DATA_10 = 0xBA,
+ PMBUS_USER_DATA_11 = 0xBB,
+ PMBUS_USER_DATA_12 = 0xBC,
+ PMBUS_USER_DATA_13 = 0xBD,
+ PMBUS_USER_DATA_14 = 0xBE,
+ PMBUS_USER_DATA_15 = 0xBF,
+
PMBUS_MFR_MAX_TEMP_1 = 0xC0,
PMBUS_MFR_MAX_TEMP_2 = 0xC1,
PMBUS_MFR_MAX_TEMP_3 = 0xC2,
+ /* 0xC3 is reserved */
+
+ PMBUS_MFR_SPECIFIC_C4 = 0xC4,
+ PMBUS_MFR_SPECIFIC_C5 = 0xC5,
+ PMBUS_MFR_SPECIFIC_C6 = 0xC6,
+ PMBUS_MFR_SPECIFIC_C7 = 0xC7,
+ PMBUS_MFR_SPECIFIC_C8 = 0xC8,
+ PMBUS_MFR_SPECIFIC_C9 = 0xC9,
+ PMBUS_MFR_SPECIFIC_CA = 0xCA,
+ PMBUS_MFR_SPECIFIC_CB = 0xCB,
+ PMBUS_MFR_SPECIFIC_CC = 0xCC,
+ PMBUS_MFR_SPECIFIC_CD = 0xCD,
+ PMBUS_MFR_SPECIFIC_CE = 0xCE,
+ PMBUS_MFR_SPECIFIC_CF = 0x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BUS_MFR_SPECIFIC_F1 = 0xF1,
+ PMBUS_MFR_SPECIFIC_F2 = 0xF2,
+ PMBUS_MFR_SPECIFIC_F3 = 0xF3,
+ PMBUS_MFR_SPECIFIC_F4 = 0xF4,
+ PMBUS_MFR_SPECIFIC_F5 = 0xF5,
+ PMBUS_MFR_SPECIFIC_F6 = 0xF6,
+ PMBUS_MFR_SPECIFIC_F7 = 0xF7,
+ PMBUS_MFR_SPECIFIC_F8 = 0xF8,
+ PMBUS_MFR_SPECIFIC_F9 = 0xF9,
+ PMBUS_MFR_SPECIFIC_FA = 0xFA,
+ PMBUS_MFR_SPECIFIC_FB = 0xFB,
+ PMBUS_MFR_SPECIFIC_FC = 0xFC,
+ PMBUS_MFR_SPECIFIC_FD = 0xFD,
+
+ PMBUS_MFR_SPECIFIC_COMMAND_EXT = 0xFE,
+ PMBUS_COMMAND_EXT = 0xFF,
+
/*
* Virtual registers.
* Useful to support attributes which are not supported by standard PMBus
--
2.25.1
Powered by blists - more mailing lists