xref: /openbmc/qemu/include/hw/misc/pmbus_regs.h (revision 46f3d6a1)
1 /*
2  * Common defines and structures for PMBus devices
3  *
4  * Extracted from Linux drivers/hwmon/pmbus/pmbus.h
5  *
6  * Copyright (c) 2010, 2011 Ericsson AB.
7  * Copyright (c) 2012 Guenter Roeck
8  *
9  * This code is licensed under the GPL version 2 or later. See the
10  * COPYING file in the top-level directory.
11  */
12 
13 #ifndef PMBUS_REGS_H
14 #define PMBUS_REGS_H
15 
16 /*
17  * Registers
18  */
19 enum PmbusRegs {
20         PMBUS_PAGE                      = 0x00,
21         PMBUS_OPERATION                 = 0x01,
22         PMBUS_ON_OFF_CONFIG             = 0x02,
23         PMBUS_CLEAR_FAULTS              = 0x03,
24         PMBUS_PHASE                     = 0x04,
25 
26         PMBUS_CAPABILITY                = 0x19,
27         PMBUS_QUERY                     = 0x1A,
28 
29         PMBUS_VOUT_MODE                 = 0x20,
30         PMBUS_VOUT_COMMAND              = 0x21,
31         PMBUS_VOUT_TRIM                 = 0x22,
32         PMBUS_VOUT_CAL_OFFSET           = 0x23,
33         PMBUS_VOUT_MAX                  = 0x24,
34         PMBUS_VOUT_MARGIN_HIGH          = 0x25,
35         PMBUS_VOUT_MARGIN_LOW           = 0x26,
36         PMBUS_VOUT_TRANSITION_RATE      = 0x27,
37         PMBUS_VOUT_DROOP                = 0x28,
38         PMBUS_VOUT_SCALE_LOOP           = 0x29,
39         PMBUS_VOUT_SCALE_MONITOR        = 0x2A,
40 
41         PMBUS_COEFFICIENTS              = 0x30,
42         PMBUS_POUT_MAX                  = 0x31,
43 
44         PMBUS_FAN_CONFIG_12             = 0x3A,
45         PMBUS_FAN_COMMAND_1             = 0x3B,
46         PMBUS_FAN_COMMAND_2             = 0x3C,
47         PMBUS_FAN_CONFIG_34             = 0x3D,
48         PMBUS_FAN_COMMAND_3             = 0x3E,
49         PMBUS_FAN_COMMAND_4             = 0x3F,
50 
51         PMBUS_VOUT_OV_FAULT_LIMIT       = 0x40,
52         PMBUS_VOUT_OV_FAULT_RESPONSE    = 0x41,
53         PMBUS_VOUT_OV_WARN_LIMIT        = 0x42,
54         PMBUS_VOUT_UV_WARN_LIMIT        = 0x43,
55         PMBUS_VOUT_UV_FAULT_LIMIT       = 0x44,
56         PMBUS_VOUT_UV_FAULT_RESPONSE    = 0x45,
57         PMBUS_IOUT_OC_FAULT_LIMIT       = 0x46,
58         PMBUS_IOUT_OC_FAULT_RESPONSE    = 0x47,
59         PMBUS_IOUT_OC_LV_FAULT_LIMIT    = 0x48,
60         PMBUS_IOUT_OC_LV_FAULT_RESPONSE = 0x49,
61         PMBUS_IOUT_OC_WARN_LIMIT        = 0x4A,
62         PMBUS_IOUT_UC_FAULT_LIMIT       = 0x4B,
63         PMBUS_IOUT_UC_FAULT_RESPONSE    = 0x4C,
64 
65         PMBUS_OT_FAULT_LIMIT            = 0x4F,
66         PMBUS_OT_FAULT_RESPONSE         = 0x50,
67         PMBUS_OT_WARN_LIMIT             = 0x51,
68         PMBUS_UT_WARN_LIMIT             = 0x52,
69         PMBUS_UT_FAULT_LIMIT            = 0x53,
70         PMBUS_UT_FAULT_RESPONSE         = 0x54,
71         PMBUS_VIN_OV_FAULT_LIMIT        = 0x55,
72         PMBUS_VIN_OV_FAULT_RESPONSE     = 0x56,
73         PMBUS_VIN_OV_WARN_LIMIT         = 0x57,
74         PMBUS_VIN_UV_WARN_LIMIT         = 0x58,
75         PMBUS_VIN_UV_FAULT_LIMIT        = 0x59,
76 
77         PMBUS_IIN_OC_FAULT_LIMIT        = 0x5B,
78         PMBUS_IIN_OC_WARN_LIMIT         = 0x5D,
79 
80         PMBUS_POUT_OP_FAULT_LIMIT       = 0x68,
81         PMBUS_POUT_OP_WARN_LIMIT        = 0x6A,
82         PMBUS_PIN_OP_WARN_LIMIT         = 0x6B,
83 
84         PMBUS_STATUS_BYTE               = 0x78,
85         PMBUS_STATUS_WORD               = 0x79,
86         PMBUS_STATUS_VOUT               = 0x7A,
87         PMBUS_STATUS_IOUT               = 0x7B,
88         PMBUS_STATUS_INPUT              = 0x7C,
89         PMBUS_STATUS_TEMPERATURE        = 0x7D,
90         PMBUS_STATUS_CML                = 0x7E,
91         PMBUS_STATUS_OTHER              = 0x7F,
92         PMBUS_STATUS_MFR_SPECIFIC       = 0x80,
93         PMBUS_STATUS_FAN_12             = 0x81,
94         PMBUS_STATUS_FAN_34             = 0x82,
95 
96         PMBUS_READ_VIN                  = 0x88,
97         PMBUS_READ_IIN                  = 0x89,
98         PMBUS_READ_VCAP                 = 0x8A,
99         PMBUS_READ_VOUT                 = 0x8B,
100         PMBUS_READ_IOUT                 = 0x8C,
101         PMBUS_READ_TEMPERATURE_1        = 0x8D,
102         PMBUS_READ_TEMPERATURE_2        = 0x8E,
103         PMBUS_READ_TEMPERATURE_3        = 0x8F,
104         PMBUS_READ_FAN_SPEED_1          = 0x90,
105         PMBUS_READ_FAN_SPEED_2          = 0x91,
106         PMBUS_READ_FAN_SPEED_3          = 0x92,
107         PMBUS_READ_FAN_SPEED_4          = 0x93,
108         PMBUS_READ_DUTY_CYCLE           = 0x94,
109         PMBUS_READ_FREQUENCY            = 0x95,
110         PMBUS_READ_POUT                 = 0x96,
111         PMBUS_READ_PIN                  = 0x97,
112 
113         PMBUS_REVISION                  = 0x98,
114         PMBUS_MFR_ID                    = 0x99,
115         PMBUS_MFR_MODEL                 = 0x9A,
116         PMBUS_MFR_REVISION              = 0x9B,
117         PMBUS_MFR_LOCATION              = 0x9C,
118         PMBUS_MFR_DATE                  = 0x9D,
119         PMBUS_MFR_SERIAL                = 0x9E,
120 };
121 
122 #endif
123