Skip to content

Commit e4db771

Browse files
vadimp-nvidiagroeck
authored andcommitted
hwmon: (pmbus) Add support for MPS Multi-phase mp2888 controller
Add support for mp2888 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a digital, multi-phase, pulse-width modulation controller. This device supports: - One power rail. - Programmable Multi-Phase up to 10 Phases. - PWM-VID Interface - One pages 0 for telemetry. - Programmable pins for PMBus Address. - Built-In EEPROM to Store Custom Configurations. - Can configured VOUT readout in direct or VID format and allows setting of different formats on rails 1 and 2. For VID the following protocols are available: VR13 mode with 5-mV DAC; VR13 mode with 10-mV DAC, IMVP9 mode with 5-mV DAC. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210511055619.118104-3-vadimp@nvidia.com [groeck: Add MODULE_IMPORT_NS] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 0c1acde commit e4db771

File tree

4 files changed

+531
-0
lines changed

4 files changed

+531
-0
lines changed

Documentation/hwmon/mp2888.rst

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Kernel driver mp2888
4+
====================
5+
6+
Supported chips:
7+
8+
* MPS MP12254
9+
10+
Prefix: 'mp2888'
11+
12+
Author:
13+
14+
Vadim Pasternak <vadimp@nvidia.com>
15+
16+
Description
17+
-----------
18+
19+
This driver implements support for Monolithic Power Systems, Inc. (MPS)
20+
vendor dual-loop, digital, multi-phase controller MP2888.
21+
22+
This device: supports:
23+
24+
- One power rail.
25+
- Programmable Multi-Phase up to 10 Phases.
26+
- PWM-VID Interface
27+
- One pages 0 for telemetry.
28+
- Programmable pins for PMBus Address.
29+
- Built-In EEPROM to Store Custom Configurations.
30+
31+
Device complaint with:
32+
33+
- PMBus rev 1.3 interface.
34+
35+
Device supports direct format for reading output current, output voltage,
36+
input and output power and temperature.
37+
Device supports linear format for reading input voltage and input power.
38+
39+
The driver provides the next attributes for the current:
40+
41+
- for current out input and maximum alarm;
42+
- for phase current: input and label.
43+
44+
The driver exports the following attributes via the 'sysfs' files, where:
45+
46+
- 'n' is number of configured phases (from 1 to 10);
47+
- index 1 for "iout";
48+
- indexes 2 ... 1 + n for phases.
49+
50+
**curr[1-{1+n}]_input**
51+
52+
**curr[1-{1+n}]_label**
53+
54+
**curr1_max**
55+
56+
**curr1_max_alarm**
57+
58+
The driver provides the next attributes for the voltage:
59+
60+
- for voltage in: input, low and high critical thresholds, low and high
61+
critical alarms;
62+
- for voltage out: input and high alarm;
63+
64+
The driver exports the following attributes via the 'sysfs' files, where
65+
66+
**in1_crit**
67+
68+
**in1_crit_alarm**
69+
70+
**in1_input**
71+
72+
**in1_label**
73+
74+
**in1_min**
75+
76+
**in1_min_alarm**
77+
78+
**in2_alarm**
79+
80+
**in2_input**
81+
82+
**in2_label**
83+
84+
The driver provides the next attributes for the power:
85+
86+
- for power in alarm and input.
87+
- for power out: cap, cap alarm an input.
88+
89+
The driver exports the following attributes via the 'sysfs' files, where
90+
- indexes 1 for "pin";
91+
- indexes 2 for "pout";
92+
93+
**power1_alarm**
94+
95+
**power1_input**
96+
97+
**power1_label**
98+
99+
**power2_input**
100+
101+
**power2_label**
102+
103+
**power2_max**
104+
105+
**power2_max_alarm**
106+
107+
The driver provides the next attributes for the temperature:
108+
109+
**temp1_input**
110+
111+
**temp1_max**
112+
113+
**temp1_max_alarm**

drivers/hwmon/pmbus/Kconfig

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

252+
config SENSORS_MP2888
253+
tristate "MPS MP2888"
254+
help
255+
If you say yes here you get hardware monitoring support for MPS
256+
MP2888 Digital, Multi-Phase, Pulse-Width Modulation Controller.
257+
258+
This driver can also be built as a module. If so, the module will
259+
be called mp2888.
260+
252261
config SENSORS_MP2975
253262
tristate "MPS MP2975"
254263
help

drivers/hwmon/pmbus/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
2828
obj-$(CONFIG_SENSORS_MAX31785) += max31785.o
2929
obj-$(CONFIG_SENSORS_MAX34440) += max34440.o
3030
obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
31+
obj-$(CONFIG_SENSORS_MP2888) += mp2888.o
3132
obj-$(CONFIG_SENSORS_MP2975) += mp2975.o
3233
obj-$(CONFIG_SENSORS_PM6764TR) += pm6764tr.o
3334
obj-$(CONFIG_SENSORS_PXE1610) += pxe1610.o

0 commit comments

Comments
 (0)