Skip to content

Commit 8fcefe7

Browse files
CHKDSK88groeck
authored andcommitted
hwmon: pmbus: mpq8785: Add support for MPM3695 family
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 therefore needs to have a separate compatible entry. Tested with device tree based matching (MPM3695-10). Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://lore.kernel.org/r/20250511035701.2607947-6-paweldembicki@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent c272914 commit 8fcefe7

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

Documentation/hwmon/mpq8785.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Kernel driver mpq8785
55

66
Supported chips:
77

8+
* MPS MPM3695 family
89
* MPS MPM82504
910
* MPS MPQ8785
1011

@@ -15,6 +16,14 @@ Author: Charles Hsu <ythsu0511@gmail.com>
1516
Description
1617
-----------
1718

19+
The MPM3695 family is a scalable, ultra-thin, fully integrated power module with
20+
a PMBus interface. It offers a complete power solution that achieves up to
21+
10A (-10 variant), 20A (-25 variant), 25A (-20 variant), 100A (-100 variant)
22+
of output current with excellent load and line regulation across a wide input
23+
voltage range. It operates at high efficiency over a wide load range, and can
24+
be parallled to deliver higher current. Variants -10,-20 and -100 have different
25+
voltage scale configuration register range (10 bits) than -25 version (11 bits).
26+
1827
The MPM82504 is a quad 25A, scalable, fully integrated power module with a PMBus
1928
interface. The device offers a complete power solution that achieves up to 25A
2029
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),
4251
over-voltage protection (OVP), under-voltage protection (UVP), and
4352
over-temperature protection (OTP).
4453

45-
All supported modules require a minimal number of readily available, standard
46-
external components. The MPM82504 is available in a BGA (15mmx30mmx5.18mm)
47-
package and the MPQ8785 is available in a TLGA (5mmx6mm) package.
48-
4954
Device compliant with:
5055

5156
- PMBus rev 1.3 interface.

drivers/hwmon/pmbus/mpq8785.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
#define MPM82504_READ_TEMPERATURE_1_SIGN_POS 9
1414

15-
enum chips { mpm82504, mpq8785 };
15+
enum chips { mpm3695, mpm3695_25, mpm82504, mpq8785 };
1616

1717
static u16 voltage_scale_loop_max_val[] = {
18+
[mpm3695] = GENMASK(9, 0),
19+
[mpm3695_25] = GENMASK(11, 0),
1820
[mpm82504] = GENMASK(9, 0),
1921
[mpq8785] = GENMASK(10, 0),
2022
};
@@ -81,13 +83,17 @@ static struct pmbus_driver_info mpq8785_info = {
8183
};
8284

8385
static const struct i2c_device_id mpq8785_id[] = {
86+
{ "mpm3695", mpm3695 },
87+
{ "mpm3695-25", mpm3695_25 },
8488
{ "mpm82504", mpm82504 },
8589
{ "mpq8785", mpq8785 },
8690
{ },
8791
};
8892
MODULE_DEVICE_TABLE(i2c, mpq8785_id);
8993

9094
static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
95+
{ .compatible = "mps,mpm3695", .data = (void *)mpm3695 },
96+
{ .compatible = "mps,mpm3695-25", .data = (void *)mpm3695_25 },
9197
{ .compatible = "mps,mpm82504", .data = (void *)mpm82504 },
9298
{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
9399
{}
@@ -112,6 +118,8 @@ static int mpq8785_probe(struct i2c_client *client)
112118
chip_id = (kernel_ulong_t)i2c_get_match_data(client);
113119

114120
switch (chip_id) {
121+
case mpm3695:
122+
case mpm3695_25:
115123
case mpm82504:
116124
info->format[PSC_VOLTAGE_OUT] = direct;
117125
info->m[PSC_VOLTAGE_OUT] = 8;

0 commit comments

Comments
 (0)