Skip to contentSkip to conversation

hwmon: pmbus: Add support for MPM82504 and MPM3695 family

PATCH Superseded Pawel Dembicki 2 participants 7 messages May 10, 2025

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover hwmon: pmbus: Add support for MPM82504 and MPM3695 family

This series extends the hwmon PMBus driver for the MPS MPQ8785 to support two additional Monolithic Power Systems devices: the MPM82504 and MPM3695 family.

The driver is restructured to support multiple devices using device tree matching. It also introduces an optional "mps,vout-fb-divider-ratio-permille" property to configure the VOUT_SCALE_LOOP PMBus register, which adjusts reported output voltages depending on the external feedback divider.

Device tree bindings are updated accordingly.

Changes have been tested on hardware with device-tree based matching using the MPM82504 and MPM3695-10.

Pawel Dembicki (5):
dt-bindings: hwmon: Add bindings for mpq8785 driver
hwmon: pmbus: mpq8785: Prepare driver for multiple device support
hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio
configuration
hwmon: pmbus: mpq8785: Add support for MPM82504
hwmon: pmbus: mpq8785: Add support for MPM3695 family

 .../bindings/hwmon/pmbus/mps,mpq8785.yaml     | 74 +++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 Documentation/hwmon/mpq8785.rst               | 27 ++++--
 drivers/hwmon/pmbus/mpq8785.c                 | 95 +++++++++++++++++--
 4 files changed, 182 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml
Signature · 1 line
2.43.0
#1 lore raw

PATCH v3 1/5 dt-bindings: hwmon: Add bindings for mpq8785 driver

Add device tree bindings for Monolithic Power Systems MPQ8785, MPM82504 and MPM3695 PMBus-compliant voltage regulators.

These bindings also documents the optional
"mps,vout-fb-divider-ratio-permille" property.

---
v3:
- added maximum and default value to 'mps,vout-fb-divider-ratio-permille'
- add enum to compatible check
- move 'required' to proper place
v2:
- remove mps,mpq8785 from trivial-devices.yaml
- fix alphabetical order
- rename voltage-scale-loop to mps,vout-fb-divider-ratio-permille
- add mps,vout-fb-divider-ratio-permille min and max values
- rewrite mps,vout-fb-divider-ratio-permille description

---
 .../bindings/hwmon/pmbus/mps,mpq8785.yaml     | 74 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 2 files changed, 74 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml
Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml new file +74 -0
new file mode 100644
index 000000000000..90970a0433e9
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/pmbus/mps,mpq8785.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Monolithic Power Systems Multiphase Voltage Regulators with PMBus
+
+maintainers:
+  - Charles Hsu <[email protected]>
+
+description:
+  Monolithic Power Systems digital multiphase voltage regulators with PMBus.
+
+properties:
+  compatible:
+    enum:
+      - mps,mpm3695
+      - mps,mpm3695-25
+      - mps,mpm82504
+      - mps,mpq8785
+
+  reg:
+    maxItems: 1
+
+  mps,vout-fb-divider-ratio-permille:
+    description:
+      The feedback resistor divider ratio, expressed in permille
+      (Vfb / Vout * 1000). This value is written to the PMBUS_VOUT_SCALE_LOOP
+      register and is required for correct output voltage presentation.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 4095
+    default: 706
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - mps,mpm3695
+            - mps,mpm82504
+    then:
+      properties:
+        mps,vout-fb-divider-ratio-permille:
+          maximum: 1023
+
+  - if:
+      properties:
+        compatible:
+          const: mps,mpq8785
+    then:
+      properties:
+        mps,vout-fb-divider-ratio-permille:
+          maximum: 2047
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pmic@30 {
+        compatible = "mps,mpm82504";
+        reg = <0x30>;
+        mps,vout-fb-divider-ratio-permille = <600>;
+      };
+    };
Documentation/devicetree/bindings/trivial-devices.yaml +0 -2
index 8da408107e55..7c1c0cc29655 100644
@@ -293,8 +293,6 @@ properties:
           - mps,mp5990
             # Monolithic Power Systems Inc. digital step-down converter mp9941
           - mps,mp9941
-            # Monolithic Power Systems Inc. synchronous step-down converter mpq8785
-          - mps,mpq8785
             # Temperature sensor with integrated fan control
           - national,lm63
             # Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
Signature · 1 line
2.43.0
#2 lore raw

PATCH v3 2/5 hwmon: pmbus: mpq8785: Prepare driver for multiple device support

In reply to Pawel Dembicki

Refactor the driver to support multiple Monolithic Power Systems devices. Introduce chip ID handling based on device tree matching.

No functional changes intended.

---
v3:
- replaced (uintptr_t) with (kernel_ulong_t)
- used i2c_get_match_data() instead i2c_match_id(mpq8785_id, client)->driver_data
v2:
- no changes done

---
 drivers/hwmon/pmbus/mpq8785.c | 38 +++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)
drivers/hwmon/pmbus/mpq8785.c +30 -8
index 331c274ca892..d0ac294b4bbc 100644
@@ -8,6 +8,8 @@
 #include <linux/of_device.h>
 #include "pmbus.h"
 
+enum chips { mpq8785 };
+
 static int mpq8785_identify(struct i2c_client *client,
 			    struct pmbus_driver_info *info)
 {
@@ -53,26 +55,46 @@ static struct pmbus_driver_info mpq8785_info = {
 		PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
 		PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
 		PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
-	.identify = mpq8785_identify,
-};
-
-static int mpq8785_probe(struct i2c_client *client)
-{
-	return pmbus_do_probe(client, &mpq8785_info);
 };
 
 static const struct i2c_device_id mpq8785_id[] = {
-	{ "mpq8785" },
+	{ "mpq8785", mpq8785 },
 	{ },
 };
 MODULE_DEVICE_TABLE(i2c, mpq8785_id);
 
 static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
-	{ .compatible = "mps,mpq8785" },
+	{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
 	{}
 };
 MODULE_DEVICE_TABLE(of, mpq8785_of_match);
 
+static int mpq8785_probe(struct i2c_client *client)
+{
+	struct device *dev = &client->dev;
+	struct pmbus_driver_info *info;
+	enum chips chip_id;
+
+	info = devm_kmemdup(dev, &mpq8785_info, sizeof(*info), GFP_KERNEL);
+	if (!info)
+		return -ENOMEM;
+
+	if (dev->of_node)
+		chip_id = (kernel_ulong_t)of_device_get_match_data(dev);
+	else
+		chip_id = (kernel_ulong_t)i2c_get_match_data(client);
+
+	switch (chip_id) {
+	case mpq8785:
+		info->identify = mpq8785_identify;
+		break;
+	default:
+		return -ENODEV;
+	}
+
+	return pmbus_do_probe(client, info);
+};
+
 static struct i2c_driver mpq8785_driver = {
 	.driver = {
 		   .name = "mpq8785",
Signature · 1 line
2.43.0
#3 lore raw

PATCH v3 3/5 hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configuration

In reply to Pawel Dembicki

Implement support for setting the VOUT_SCALE_LOOP PMBus register based on an optional device tree property "mps,vout-fb-divider-ratio-permille".

This allows the driver to provide the correct VOUT value depending on the feedback voltage divider configuration for chips where the bootloader does not configure the VOUT_SCALE_LOOP register.

---
v3:
- droped comments and indexed the table with enums instead
- use device_property_read_u32() instead of_property_read_u32()
v2:
- renamed property to mps,vout-fb-divider-ratio-permille
- added register value range checking

---
 drivers/hwmon/pmbus/mpq8785.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/hwmon/pmbus/mpq8785.c +18 -0
index d0ac294b4bbc..2e7c0d0c3f81 100644
@@ -5,11 +5,16 @@
 
 #include <linux/i2c.h>
 #include <linux/module.h>
+#include <linux/property.h>
 #include <linux/of_device.h>
 #include "pmbus.h"
 
 enum chips { mpq8785 };
 
+static u16 voltage_scale_loop_max_val[] = {
+	[mpq8785] = GENMASK(10, 0),
+};
+
 static int mpq8785_identify(struct i2c_client *client,
 			    struct pmbus_driver_info *info)
 {
@@ -74,6 +79,8 @@ static int mpq8785_probe(struct i2c_client *client)
 	struct device *dev = &client->dev;
 	struct pmbus_driver_info *info;
 	enum chips chip_id;
+	u32 voltage_scale;
+	int ret;
 
 	info = devm_kmemdup(dev, &mpq8785_info, sizeof(*info), GFP_KERNEL);
 	if (!info)
@@ -92,6 +99,17 @@ static int mpq8785_probe(struct i2c_client *client)
 		return -ENODEV;
 	}
 
+	if (!device_property_read_u32(dev, "mps,vout-fb-divider-ratio-permille",
+				      &voltage_scale)) {
+		if (voltage_scale > voltage_scale_loop_max_val[chip_id])
+			return -EINVAL;
+
+		ret = i2c_smbus_write_word_data(client, PMBUS_VOUT_SCALE_LOOP,
+						voltage_scale);
+		if (ret)
+			return ret;
+	}
+
 	return pmbus_do_probe(client, info);
 };
 
Signature · 1 line
2.43.0
#4 lore raw

PATCH v3 4/5 hwmon: pmbus: mpq8785: Add support for MPM82504

In reply to Pawel Dembicki

Add support for the Monolithic Power Systems MPM82504 digital voltage regulator. MPM82504 uses PMBus direct format for voltage output.

Tested with device tree based matching.

---
v3:
- fix alphabetical order in multiple places
- change PMBUS_READ_TEMPERATURE_1_SIGN macro name to

    MPM82504_READ_TEMPERATURE_1_SIGN

- use sign_extend32()
- fix typo in documentation
v2:
- fixed signedess for temperatures < 0 deg C
- removed empty lines

---
 Documentation/hwmon/mpq8785.rst | 20 +++++++++++++++-----
 drivers/hwmon/pmbus/mpq8785.c   | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 47 insertions(+), 6 deletions(-)
Documentation/hwmon/mpq8785.rst +15 -5
index bf8176b87086..b91fefb1a84c 100644
@@ -5,6 +5,7 @@ Kernel driver mpq8785
 
 Supported chips:
 
+  * MPS MPM82504
   * MPS MPQ8785
 
     Prefix: 'mpq8785'
@@ -14,6 +15,14 @@ Author: Charles Hsu <[email protected]>
 Description
 -----------
 
+The MPM82504 is a quad 25A, scalable, fully integrated power module with a PMBus
+interface. The device offers a complete power solution that achieves up to 25A
+per output channel. The MPM82504 has four output channels that can be paralleled
+to provide 50A, 75A, or 100A of output current for flexible configurations.
+The device can also operate in parallel with the MPM3695-100 and additional
+MPM82504 devices to provide a higher output current. The MPM82504 operates
+at high efficiency across a wide load range.
+
 The MPQ8785 is a fully integrated, PMBus-compatible, high-frequency, synchronous
 buck converter. The MPQ8785 offers a very compact solution that achieves up to
 40A output current per phase, with excellent load and line regulation over a
@@ -23,18 +32,19 @@ output current load range.
 The PMBus interface provides converter configurations and key parameters
 monitoring.
 
-The MPQ8785 adopts MPS's proprietary multi-phase digital constant-on-time (MCOT)
+The devices adopts MPS's proprietary multi-phase digital constant-on-time (MCOT)
 control, which provides fast transient response and eases loop stabilization.
-The MCOT scheme also allows multiple MPQ8785 devices to be connected in parallel
-with excellent current sharing and phase interleaving for high-current
+The MCOT scheme also allows multiple devices or channels to be connected in
+parallel with excellent current sharing and phase interleaving for high-current
 applications.
 
 Fully integrated protection features include over-current protection (OCP),
 over-voltage protection (OVP), under-voltage protection (UVP), and
 over-temperature protection (OTP).
 
-The MPQ8785 requires a minimal number of readily available, standard external
-components, and is available in a TLGA (5mmx6mm) package.
+All supported modules require a minimal number of readily available, standard
+external components. The MPM82504 is available in a BGA (15mmx30mmx5.18mm)
+package and the MPQ8785 is available in a TLGA (5mmx6mm) package.
 
 Device compliant with:
 
drivers/hwmon/pmbus/mpq8785.c +32 -1
index 2e7c0d0c3f81..1e12e7267a7f 100644
@@ -4,14 +4,19 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/bitops.h>
 #include <linux/module.h>
 #include <linux/property.h>
 #include <linux/of_device.h>
 #include "pmbus.h"
 
-enum chips { mpq8785 };
+#define MPM82504_READ_TEMPERATURE_1_SIGN	BIT(9)
+#define MPM82504_READ_TEMPERATURE_1_SIGN_POS	9
+
+enum chips { mpm82504, mpq8785 };
 
 static u16 voltage_scale_loop_max_val[] = {
+	[mpm82504] = GENMASK(9, 0),
 	[mpq8785] = GENMASK(10, 0),
 };
 
@@ -41,6 +46,23 @@ static int mpq8785_identify(struct i2c_client *client,
 	return 0;
 };
 
+static int mpm82504_read_word_data(struct i2c_client *client, int page,
+				   int phase, int reg)
+{
+	int ret;
+
+	ret = pmbus_read_word_data(client, page, phase, reg);
+
+	if (ret < 0 || reg != PMBUS_READ_TEMPERATURE_1)
+		return ret;
+
+	/* Fix PMBUS_READ_TEMPERATURE_1 signedness */
+	if (ret & MPM82504_READ_TEMPERATURE_1_SIGN)
+		ret = sign_extend32(ret, MPM82504_READ_TEMPERATURE_1_SIGN_POS) & 0xffff;
+
+	return ret;
+}
+
 static struct pmbus_driver_info mpq8785_info = {
 	.pages = 1,
 	.format[PSC_VOLTAGE_IN] = direct,
@@ -63,12 +85,14 @@ static struct pmbus_driver_info mpq8785_info = {
 };
 
 static const struct i2c_device_id mpq8785_id[] = {
+	{ "mpm82504", mpm82504 },
 	{ "mpq8785", mpq8785 },
 	{ },
 };
 MODULE_DEVICE_TABLE(i2c, mpq8785_id);
 
 static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
+	{ .compatible = "mps,mpm82504", .data = (void *)mpm82504 },
 	{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
 	{}
 };
@@ -92,6 +116,13 @@ static int mpq8785_probe(struct i2c_client *client)
 		chip_id = (kernel_ulong_t)i2c_get_match_data(client);
 
 	switch (chip_id) {
+	case mpm82504:
+		info->format[PSC_VOLTAGE_OUT] = direct;
+		info->m[PSC_VOLTAGE_OUT] = 8;
+		info->b[PSC_VOLTAGE_OUT] = 0;
+		info->R[PSC_VOLTAGE_OUT] = 2;
+		info->read_word_data = mpm82504_read_word_data;
+		break;
 	case mpq8785:
 		info->identify = mpq8785_identify;
 		break;
Signature · 1 line
2.43.0
maintainer
#5 lore raw

Re: [PATCH v3 4/5] hwmon: pmbus: mpq8785: Add support for MPM82504

Quoted 105 lines · Pawel Dembicki

Add support for the Monolithic Power Systems MPM82504 digital voltage regulator. MPM82504 uses PMBus direct format for voltage output.

Tested with device tree based matching.

---
v3:
- fix alphabetical order in multiple places
- change PMBUS_READ_TEMPERATURE_1_SIGN macro name to

     MPM82504_READ_TEMPERATURE_1_SIGN

- use sign_extend32()
- fix typo in documentation
v2:
- fixed signedess for temperatures < 0 deg C
- removed empty lines

---
  Documentation/hwmon/mpq8785.rst | 20 +++++++++++++++-----
  drivers/hwmon/pmbus/mpq8785.c   | 33 ++++++++++++++++++++++++++++++++-
  2 files changed, 47 insertions(+), 6 deletions(-)
Documentation/hwmon/mpq8785.rst +15 -5
index bf8176b87086..b91fefb1a84c 100644
@@ -5,6 +5,7 @@ Kernel driver mpq8785
 
  Supported chips:
 
+  * MPS MPM82504
    * MPS MPQ8785
 
      Prefix: 'mpq8785'
@@ -14,6 +15,14 @@ Author: Charles Hsu <[email protected]>
  Description
  -----------
 
+The MPM82504 is a quad 25A, scalable, fully integrated power module with a PMBus
+interface. The device offers a complete power solution that achieves up to 25A
+per output channel. The MPM82504 has four output channels that can be paralleled
+to provide 50A, 75A, or 100A of output current for flexible configurations.
+The device can also operate in parallel with the MPM3695-100 and additional
+MPM82504 devices to provide a higher output current. The MPM82504 operates
+at high efficiency across a wide load range.
+
  The MPQ8785 is a fully integrated, PMBus-compatible, high-frequency, synchronous
  buck converter. The MPQ8785 offers a very compact solution that achieves up to
  40A output current per phase, with excellent load and line regulation over a
@@ -23,18 +32,19 @@ output current load range.
  The PMBus interface provides converter configurations and key parameters
  monitoring.
 
-The MPQ8785 adopts MPS's proprietary multi-phase digital constant-on-time (MCOT)
+The devices adopts MPS's proprietary multi-phase digital constant-on-time (MCOT)
  control, which provides fast transient response and eases loop stabilization.
-The MCOT scheme also allows multiple MPQ8785 devices to be connected in parallel
-with excellent current sharing and phase interleaving for high-current
+The MCOT scheme also allows multiple devices or channels to be connected in
+parallel with excellent current sharing and phase interleaving for high-current
  applications.
 
  Fully integrated protection features include over-current protection (OCP),
  over-voltage protection (OVP), under-voltage protection (UVP), and
  over-temperature protection (OTP).
 
-The MPQ8785 requires a minimal number of readily available, standard external
-components, and is available in a TLGA (5mmx6mm) package.
+All supported modules require a minimal number of readily available, standard
+external components. The MPM82504 is available in a BGA (15mmx30mmx5.18mm)
+package and the MPQ8785 is available in a TLGA (5mmx6mm) package.
 
  Device compliant with:
 
drivers/hwmon/pmbus/mpq8785.c +8 -1
index 2e7c0d0c3f81..1e12e7267a7f 100644
@@ -4,14 +4,19 @@
   */
 
  #include <linux/i2c.h>
+#include <linux/bitops.h>
  #include <linux/module.h>
  #include <linux/property.h>
  #include <linux/of_device.h>
  #include "pmbus.h"
 
-enum chips { mpq8785 };
+#define MPM82504_READ_TEMPERATURE_1_SIGN	BIT(9)
+#define MPM82504_READ_TEMPERATURE_1_SIGN_POS	9
+
+enum chips { mpm82504, mpq8785 };
 
  static u16 voltage_scale_loop_max_val[] = {
+	[mpm82504] = GENMASK(9, 0),
  	[mpq8785] = GENMASK(10, 0),
  };
 
@@ -41,6 +46,23 @@ static int mpq8785_identify(struct i2c_client *client,
  	return 0;
  };
 
+static int mpm82504_read_word_data(struct i2c_client *client, int page,
+				   int phase, int reg)

drivers/hwmon/pmbus/mpq8785.c static int mpq8785_identify(struct i2c_client *client, · line 60

Quoted 10 lines
drivers/hwmon/pmbus/mpq8785.c +10 -0
+{
+	int ret;
+
+	ret = pmbus_read_word_data(client, page, phase, reg);
+
+	if (ret < 0 || reg != PMBUS_READ_TEMPERATURE_1)
+		return ret;
+
+	/* Fix PMBUS_READ_TEMPERATURE_1 signedness */
+	if (ret & MPM82504_READ_TEMPERATURE_1_SIGN)

When using sign_extend32() is that the conditional is not needed.

Guenter

Quoted 37 lines
drivers/hwmon/pmbus/mpq8785.c +14 -0
+		ret = sign_extend32(ret, MPM82504_READ_TEMPERATURE_1_SIGN_POS) & 0xffff;
+
+	return ret;
+}
+
  static struct pmbus_driver_info mpq8785_info = {
  	.pages = 1,
  	.format[PSC_VOLTAGE_IN] = direct,
@@ -63,12 +85,14 @@ static struct pmbus_driver_info mpq8785_info = {
  };
 
  static const struct i2c_device_id mpq8785_id[] = {
+	{ "mpm82504", mpm82504 },
  	{ "mpq8785", mpq8785 },
  	{ },
  };
  MODULE_DEVICE_TABLE(i2c, mpq8785_id);
 
  static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
+	{ .compatible = "mps,mpm82504", .data = (void *)mpm82504 },
  	{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
  	{}
  };
@@ -92,6 +116,13 @@ static int mpq8785_probe(struct i2c_client *client)
  		chip_id = (kernel_ulong_t)i2c_get_match_data(client);
 
  	switch (chip_id) {
+	case mpm82504:
+		info->format[PSC_VOLTAGE_OUT] = direct;
+		info->m[PSC_VOLTAGE_OUT] = 8;
+		info->b[PSC_VOLTAGE_OUT] = 0;
+		info->R[PSC_VOLTAGE_OUT] = 2;
+		info->read_word_data = mpm82504_read_word_data;
+		break;
  	case mpq8785:
  		info->identify = mpq8785_identify;
  		break;
#6 lore raw

PATCH v3 5/5 hwmon: pmbus: mpq8785: Add support for MPM3695 family

In reply to Pawel Dembicki

Add support for the Monolithic Power Systems MPM3695 family. It contains four devices with suffixes: -10, -20, -25 and -100. The device is PMBus compliant and shares characteristics with the MPM82504.

MPM3695-25 has different VOLTAGE_SCALE_LOOP register size [11:0] and it needs to be separated because it will be configured in the next commit.

Tested with device tree based matching (MPM3695-10).

---
v3:
- fix alphabetical order in couple places
- adjust patch after patch order change
v2:
- Added whole MPM3695 family

---
 Documentation/hwmon/mpq8785.rst | 13 +++++++++----
 drivers/hwmon/pmbus/mpq8785.c   | 10 +++++++++-
 2 files changed, 18 insertions(+), 5 deletions(-)
Documentation/hwmon/mpq8785.rst +9 -4
index b91fefb1a84c..198d5dfd7c30 100644
@@ -5,6 +5,7 @@ Kernel driver mpq8785
 
 Supported chips:
 
+  * MPS MPM3695 family
   * MPS MPM82504
   * MPS MPQ8785
 
@@ -15,6 +16,14 @@ Author: Charles Hsu <[email protected]>
 Description
 -----------
 
+The MPM3695 family is a scalable, ultra-thin, fully integrated power module with
+a PMBus interface. It offers a complete power solution that achieves up to
+10A (-10 variant), 20A (-25 variant), 25A (-20 variant), 100A (-100 variant)
+of output current with excellent load and line regulation across a wide input
+voltage range. It operates at high efficiency over a wide load range, and can
+be parallled to deliver higher current. Variants -10,-20 and -100 have different
+voltage scale configuration register range (10 bits) than -25 version (11 bits).
+
 The MPM82504 is a quad 25A, scalable, fully integrated power module with a PMBus
 interface. The device offers a complete power solution that achieves up to 25A
 per output channel. The MPM82504 has four output channels that can be paralleled
@@ -42,10 +51,6 @@ Fully integrated protection features include over-current protection (OCP),
 over-voltage protection (OVP), under-voltage protection (UVP), and
 over-temperature protection (OTP).
 
-All supported modules require a minimal number of readily available, standard
-external components. The MPM82504 is available in a BGA (15mmx30mmx5.18mm)
-package and the MPQ8785 is available in a TLGA (5mmx6mm) package.
-
 Device compliant with:
 
 - PMBus rev 1.3 interface.
drivers/hwmon/pmbus/mpq8785.c +9 -1
index 1e12e7267a7f..6c9c0970e5d6 100644
@@ -13,9 +13,11 @@
 #define MPM82504_READ_TEMPERATURE_1_SIGN	BIT(9)
 #define MPM82504_READ_TEMPERATURE_1_SIGN_POS	9
 
-enum chips { mpm82504, mpq8785 };
+enum chips { mpm3695, mpm3695_25, mpm82504, mpq8785 };
 
 static u16 voltage_scale_loop_max_val[] = {
+	[mpm3695] = GENMASK(9, 0),
+	[mpm3695_25] = GENMASK(11, 0),
 	[mpm82504] = GENMASK(9, 0),
 	[mpq8785] = GENMASK(10, 0),
 };
@@ -85,6 +87,8 @@ static struct pmbus_driver_info mpq8785_info = {
 };
 
 static const struct i2c_device_id mpq8785_id[] = {
+	{ "mpm3695", mpm3695 },
+	{ "mpm3695-25", mpm3695_25 },
 	{ "mpm82504", mpm82504 },
 	{ "mpq8785", mpq8785 },
 	{ },
@@ -92,6 +96,8 @@ static const struct i2c_device_id mpq8785_id[] = {
 MODULE_DEVICE_TABLE(i2c, mpq8785_id);
 
 static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
+	{ .compatible = "mps,mpm3695", .data = (void *)mpm3695 },
+	{ .compatible = "mps,mpm3695-25", .data = (void *)mpm3695_25 },
 	{ .compatible = "mps,mpm82504", .data = (void *)mpm82504 },
 	{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
 	{}
@@ -116,6 +122,8 @@ static int mpq8785_probe(struct i2c_client *client)
 		chip_id = (kernel_ulong_t)i2c_get_match_data(client);
 
 	switch (chip_id) {
+	case mpm3695:
+	case mpm3695_25:
 	case mpm82504:
 		info->format[PSC_VOLTAGE_OUT] = direct;
 		info->m[PSC_VOLTAGE_OUT] = 8;
Signature · 1 line
2.43.0