Skip to content

Commit

Permalink
hwmon: (pmbus) Add support for MPS Multi-phase mp2888 controller
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vadimp-nvidia authored and groeck committed Jun 17, 2021
1 parent 0c1acde commit e4db771
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Documentation/hwmon/mp2888.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
.. SPDX-License-Identifier: GPL-2.0
Kernel driver mp2888
====================

Supported chips:

* MPS MP12254

Prefix: 'mp2888'

Author:

Vadim Pasternak <vadimp@nvidia.com>

Description
-----------

This driver implements support for Monolithic Power Systems, Inc. (MPS)
vendor dual-loop, digital, multi-phase controller MP2888.

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.

Device complaint with:

- PMBus rev 1.3 interface.

Device supports direct format for reading output current, output voltage,
input and output power and temperature.
Device supports linear format for reading input voltage and input power.

The driver provides the next attributes for the current:

- for current out input and maximum alarm;
- for phase current: input and label.

The driver exports the following attributes via the 'sysfs' files, where:

- 'n' is number of configured phases (from 1 to 10);
- index 1 for "iout";
- indexes 2 ... 1 + n for phases.

**curr[1-{1+n}]_input**

**curr[1-{1+n}]_label**

**curr1_max**

**curr1_max_alarm**

The driver provides the next attributes for the voltage:

- for voltage in: input, low and high critical thresholds, low and high
critical alarms;
- for voltage out: input and high alarm;

The driver exports the following attributes via the 'sysfs' files, where

**in1_crit**

**in1_crit_alarm**

**in1_input**

**in1_label**

**in1_min**

**in1_min_alarm**

**in2_alarm**

**in2_input**

**in2_label**

The driver provides the next attributes for the power:

- for power in alarm and input.
- for power out: cap, cap alarm an input.

The driver exports the following attributes via the 'sysfs' files, where
- indexes 1 for "pin";
- indexes 2 for "pout";

**power1_alarm**

**power1_input**

**power1_label**

**power2_input**

**power2_label**

**power2_max**

**power2_max_alarm**

The driver provides the next attributes for the temperature:

**temp1_input**

**temp1_max**

**temp1_max_alarm**
9 changes: 9 additions & 0 deletions drivers/hwmon/pmbus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ config SENSORS_MAX8688
This driver can also be built as a module. If so, the module will
be called max8688.

config SENSORS_MP2888
tristate "MPS MP2888"
help
If you say yes here you get hardware monitoring support for MPS
MP2888 Digital, Multi-Phase, Pulse-Width Modulation Controller.

This driver can also be built as a module. If so, the module will
be called mp2888.

config SENSORS_MP2975
tristate "MPS MP2975"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/pmbus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
obj-$(CONFIG_SENSORS_MAX31785) += max31785.o
obj-$(CONFIG_SENSORS_MAX34440) += max34440.o
obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
obj-$(CONFIG_SENSORS_MP2888) += mp2888.o
obj-$(CONFIG_SENSORS_MP2975) += mp2975.o
obj-$(CONFIG_SENSORS_PM6764TR) += pm6764tr.o
obj-$(CONFIG_SENSORS_PXE1610) += pxe1610.o
Expand Down
Loading

0 comments on commit e4db771

Please sign in to comment.