Skip to content

Commit f9e5f28

Browse files
Peter Yingroeck
authored andcommitted
hwmon: (pmbus) Add support for MPS Multi-phase mp2856/mp2857 controller
Add support for mp2856/mp2857 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a dual-loop, digital, multi-phase, modulation controller. Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://lore.kernel.org/r/20231211160519.21254-3-potin.lai.pt@gmail.com [groeck: Fix checkpatch issues, use i2c_get_match_data()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 956cf09 commit f9e5f28

5 files changed

Lines changed: 575 additions & 0 deletions

File tree

Documentation/hwmon/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Hardware Monitoring Kernel Drivers
158158
mcp3021
159159
menf21bmc
160160
mlxreg-fan
161+
mp2856
161162
mp2888
162163
mp2975
163164
mp5023

Documentation/hwmon/mp2856.rst

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Kernel driver mp2856
4+
====================
5+
6+
Supported chips:
7+
8+
* MPS MP2856
9+
10+
Prefix: 'mp2856'
11+
12+
* MPS MP2857
13+
14+
Prefix: 'mp2857'
15+
16+
Author:
17+
18+
Peter Yin <peter.yin@quantatw.com>
19+
20+
Description
21+
-----------
22+
23+
This driver implements support for Monolithic Power Systems, Inc. (MPS)
24+
vendor dual-loop, digital, multi-phase controller MP2856/MP2857
25+
26+
This device:
27+
28+
- Supports up to two power rail.
29+
- Supports two pages 0 and 1 for and also pages 2 for configuration.
30+
- Can configured VOUT readout in direct or VID format and allows
31+
setting of different formats on rails 1 and 2. For VID the following
32+
protocols are available: AMD SVI3 mode with 5-mV/LSB.
33+
34+
Device supports:
35+
36+
- SVID interface.
37+
- AVSBus interface.
38+
39+
Device compliant with:
40+
41+
- PMBus rev 1.3 interface.
42+
43+
Device supports direct format for reading output current, output voltage,
44+
input and output power and temperature.
45+
Device supports linear format for reading input voltage and input power.
46+
Device supports VID and direct formats for reading output voltage.
47+
The below VID modes are supported: AMD SVI3.
48+
49+
The driver provides the following sysfs attributes for current measurements:
50+
51+
- indexes 1 for "iin";
52+
- indexes 2, 3 for "iout";
53+
54+
**curr[1-3]_alarm**
55+
56+
**curr[1-3]_input**
57+
58+
**curr[1-3]_label**
59+
60+
The driver provides the following sysfs attributes for voltage measurements.
61+
62+
- indexes 1 for "vin";
63+
- indexes 2, 3 for "vout";
64+
65+
**in[1-3]_crit**
66+
67+
**in[1-3]_crit_alarm**
68+
69+
**in[1-3]_input**
70+
71+
**in[1-3]_label**
72+
73+
**in[1-3]_lcrit**
74+
75+
**in[1-3]_lcrit_alarm**
76+
77+
The driver provides the following sysfs attributes for power measurements.
78+
79+
- indexes 1 for "pin";
80+
- indexes 2, 3 for "pout";
81+
82+
**power[1-3]_alarm**
83+
84+
**power[1-3]_input**
85+
86+
**power[1-3]_label**
87+
88+
The driver provides the following sysfs attributes for temperature measurements.
89+
90+
**temp[1-2]_crit**
91+
92+
**temp[1-2]_crit_alarm**
93+
94+
**temp[1-2]_input**
95+
96+
**temp[1-2]_max**
97+
98+
**temp[1-2]_max_alarm**

drivers/hwmon/pmbus/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,15 @@ config SENSORS_MAX8688
309309
This driver can also be built as a module. If so, the module will
310310
be called max8688.
311311

312+
config SENSORS_MP2856
313+
tristate "MPS MP2856"
314+
help
315+
If you say yes here you get hardware monitoring support for MPS
316+
MP2856 MP2857 Dual Loop Digital Multi-Phase Controller.
317+
318+
This driver can also be built as a module. If so, the module will
319+
be called mp2856.
320+
312321
config SENSORS_MP2888
313322
tristate "MPS MP2888"
314323
help

drivers/hwmon/pmbus/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
3333
obj-$(CONFIG_SENSORS_MAX31785) += max31785.o
3434
obj-$(CONFIG_SENSORS_MAX34440) += max34440.o
3535
obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
36+
obj-$(CONFIG_SENSORS_MP2856) += mp2856.o
3637
obj-$(CONFIG_SENSORS_MP2888) += mp2888.o
3738
obj-$(CONFIG_SENSORS_MP2975) += mp2975.o
3839
obj-$(CONFIG_SENSORS_MP5023) += mp5023.o

0 commit comments

Comments
 (0)