hwmon: Add support for MPS mp2985
[email protected]
maintainerv4 cover hwmon: Add support for MPS mp2985
From: Wensheng Wang <[email protected]>
Add mp2985 driver in hwmon and add dt-bindings for it.
V3 -> V4:
1. Avoid mantissa data overflow in mp2985_linear_exp_transfer() function.
V2 -> V3:
1. The shifted mantissa be clamped to the range [-1024, 1023] before being masked in mp2985_linear_exp_transfer() function.
2. The PMBUS_VOUT_OV_FAULT_LIMIT and PMBUS_VOUT_UV_FAULT_LIMIT value are clamped to 0xFFF before being written to the mp2985.
3. Fix the vout scale issue for vout linear11 mode.
v1 -> v2:
1. add Krzysztof's Acked-by
2. remove duplicate entry in mp2985.rst
3. clamp vout value to 32767
4. simplify the code for obtaining PMBUS_VOUT_MODE bit value
5. add comment for explaining MP2985 supported vout mode
6. switch back to previous page after obtaining vid scale to avoid confusing the PMBus core
Wensheng Wang (2):
dt-bindings: hwmon: Add MPS mp2985
hwmon: add MP2985 driver
.../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/hwmon/index.rst | 1 + Documentation/hwmon/mp2985.rst | 147 +++++++ MAINTAINERS | 7 + drivers/hwmon/pmbus/Kconfig | 9 + drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/mp2985.c | 402 ++++++++++++++++++ 7 files changed, 569 insertions(+) create mode 100644 Documentation/hwmon/mp2985.rst create mode 100644 drivers/hwmon/pmbus/mp2985.c
Signature · 1 line
2.25.1
[email protected]
maintainerPATCH v4 1/2 dt-bindings: hwmon: Add MPS mp2985
From: Wensheng Wang <[email protected]>
Add support for MPS mp2985 controller.
---
v1 -> v2:
1. add Krzysztof's Acked-by
Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
@@ -325,6 +325,8 @@ properties: - mps,mp29612 # Monolithic Power Systems Inc. multi-phase controller mp29816 - mps,mp29816 + # Monolithic Power Systems Inc. multi-phase controller mp2985 + - mps,mp2985 # Monolithic Power Systems Inc. multi-phase controller mp2993 - mps,mp2993 # Monolithic Power Systems Inc. hot-swap protection device
Signature · 1 line
2.25.1
[email protected]
maintainerPATCH v4 2/2 hwmon: add MP2985 driver
From: Wensheng Wang <[email protected]>
Add support for MPS mp2985 controller. This driver exposes telemetry and limit value readings and writtings.
---
V3 -> V4:
1. Avoid mantissa data overflow in mp2985_linear_exp_transfer() function.
V2 -> V3:
1. The shifted mantissa be clamped to the range [-1024, 1023] before being masked in mp2985_linear_exp_transfer() function.
2. The PMBUS_VOUT_OV_FAULT_LIMIT and PMBUS_VOUT_UV_FAULT_LIMIT value are clamped to 0xFFF before being written to the mp2985.
3. Fix the vout scale issue for vout linear11 mode.
v1 -> v2:
1. remove duplicate entry in mp2985.rst
2. clamp vout value to 32767
3. simplify the code for obtaining PMBUS_VOUT_MODE bit value
4. add comment for explaining MP2985 supported vout mode
5. switch back to previous page after obtaining vid scale to avoid confusing the PMBus core
Documentation/hwmon/index.rst | 1 + Documentation/hwmon/mp2985.rst | 147 ++++++++++++ MAINTAINERS | 7 + drivers/hwmon/pmbus/Kconfig | 9 + drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/mp2985.c | 402 +++++++++++++++++++++++++++++++++ 6 files changed, 567 insertions(+) create mode 100644 Documentation/hwmon/mp2985.rst create mode 100644 drivers/hwmon/pmbus/mp2985.c
Documentation/hwmon/index.rst +1 -0
@@ -183,6 +183,7 @@ Hardware Monitoring Kernel Drivers mp2925 mp29502 mp2975 + mp2985 mp2993 mp5023 mp5920
Documentation/hwmon/mp2985.rst new file +147 -0
147 lines not on this page · raw message
MAINTAINERS +7 -0
@@ -17933,6 +17933,13 @@ S: Maintained F: Documentation/hwmon/mp29502.rst F: drivers/hwmon/pmbus/mp29502.c +MPS MP2985 DRIVER +M: Wensheng Wang <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/hwmon/mp2985.rst +F: drivers/hwmon/pmbus/mp2985.c + MPS MP2993 DRIVER M: Noah Wang <[email protected]> L: [email protected]
drivers/hwmon/pmbus/Kconfig +9 -0
@@ -447,6 +447,15 @@ config SENSORS_MP2975 This driver can also be built as a module. If so, the module will be called mp2975. +config SENSORS_MP2985 + tristate "MPS MP2985" + help + If you say yes here you get hardware monitoring support for MPS + MP2985 Dual Loop Digital Multi-Phase Controller. + + This driver can also be built as a module. If so, the module will + be called mp2985. + config SENSORS_MP2993 tristate "MPS MP2993" help
drivers/hwmon/pmbus/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_SENSORS_MP2891) += mp2891.o obj-$(CONFIG_SENSORS_MP2925) += mp2925.o obj-$(CONFIG_SENSORS_MP29502) += mp29502.o obj-$(CONFIG_SENSORS_MP2975) += mp2975.o +obj-$(CONFIG_SENSORS_MP2985) += mp2985.o obj-$(CONFIG_SENSORS_MP2993) += mp2993.o obj-$(CONFIG_SENSORS_MP5023) += mp5023.o obj-$(CONFIG_SENSORS_MP5920) += mp5920.o
drivers/hwmon/pmbus/mp2985.c new file +402 -0
402 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v4 2/2] hwmon: add MP2985 driver
Quoted 6 lines · On Tue, Apr 14, 2026 at 05:29:21PM +0800, [email protected] wrote:
From: Wensheng Wang <[email protected]>
Add support for MPS mp2985 controller. This driver exposes telemetry and limit value readings and writtings.
Signed-off-by Wensheng Wang <[email protected]>
Applied.
Thanks,
Guenter
Re: [PATCH v4 1/2] dt-bindings: hwmon: Add MPS mp2985
In reply to [email protected]Quoted 6 lines · On Tue, Apr 14, 2026 at 05:29:20PM +0800, [email protected] wrote:
From: Wensheng Wang <[email protected]>
Add support for MPS mp2985 controller.
Signed-off-by Wensheng Wang <[email protected]>
Applied.
Thanks,
Guenter