Skip to content

Commit 3e5f73a

Browse files
cencarnagroeck
authored andcommitted
hwmon: (pmbus/adp1050) Add support for adp1051, adp1055 and ltp8800
Introduce hardware monitoring support for the following devices: ADP1051: 6 PWM for I/O Voltage, I/O Current, Temperature ADP1055: 6 PWM for I/O Voltage, I/O Current, Power, Temperature LTP8800-1A/-2/-4A: 150A/135A/200A DC/DC µModule Regulator The ADP1051 and ADP1055 are similar digital controllers for high efficiency DC-DC power conversion while the LTP8800 is a family of step-down μModule regulators that provides microprocessor core voltage from 54V power distribution architecture. All of the above components features telemetry monitoring of input/output voltage, input current, output power, and temperature over PMBus. Reviewed-by: Andy Shevchenko <[email protected]> Co-developed-by: Alexis Czezar Torreno <[email protected]> Signed-off-by: Alexis Czezar Torreno <[email protected]> Signed-off-by: Cedric Encarnacion <[email protected]> Link: https://lore.kernel.org/r/[email protected] [groeck: Dropped unnecessaary spaces after type casts] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 409d2ad commit 3e5f73a

File tree

2 files changed

+124
-9
lines changed

2 files changed

+124
-9
lines changed

Documentation/hwmon/adp1050.rst

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,32 @@ Supported chips:
1313

1414
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP1050.pdf
1515

16+
* Analog Devices ADP1051
17+
18+
Prefix: 'adp1051'
19+
20+
Addresses scanned: I2C 0x70 - 0x77
21+
22+
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP1051.pdf
23+
24+
* Analog Devices ADP1055
25+
26+
Prefix: 'adp1055'
27+
28+
Addresses scanned: I2C 0x4B - 0x77
29+
30+
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP1055.pdf
31+
32+
* Analog Devices LTP8800-1A/-2/-4A
33+
34+
Prefix: 'ltp8800'
35+
36+
Addresses scanned: -
37+
38+
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/LTP8800-1A.pdf
39+
https://www.analog.com/media/en/technical-documentation/data-sheets/LTP8800-2.pdf
40+
https://www.analog.com/media/en/technical-documentation/data-sheets/LTP8800-4A.pdf
41+
1642
Authors:
1743

1844
- Radu Sabau <[email protected]>
@@ -21,14 +47,17 @@ Authors:
2147
Description
2248
-----------
2349

24-
This driver supprts hardware monitoring for Analog Devices ADP1050 Digital
25-
Controller for Isolated Power Supply with PMBus interface.
50+
This driver supports hardware monitoring for Analog Devices ADP1050, ADP1051,
51+
and ADP1055 Digital Controller for Isolated Power Supply with PMBus interface,
52+
and the LTP8800 step-down μModule regulators.
2653

27-
The ADP1050 is an advanced digital controller with a PMBus™
54+
The ADP1050, ADP1051, and ADP1055 are advanced digital controllers with PMBus™
2855
interface targeting high density, high efficiency dc-to-dc power
29-
conversion used to monitor system temperatures, voltages and currents.
30-
Through the PMBus interface, the device can monitor input/output voltages,
31-
input current and temperature.
56+
conversion used to monitor system temperatures, voltages and currents. The
57+
LTP8800 is a family of step-down μModule regulators that provides microprocessor
58+
core voltage from 54V power distribution architecture. Through the PMBus
59+
interface, the device can monitor input/output voltages, input current and
60+
temperature.
3261

3362
Usage Notes
3463
-----------
@@ -49,16 +78,46 @@ Sysfs Attributes
4978
in1_label "vin"
5079
in1_input Measured input voltage
5180
in1_alarm Input voltage alarm
81+
in1_crit Critical maximum input voltage
82+
in1_crit_alarm Input voltage high alarm
83+
in1_lcrit Critical minimum input voltage
84+
in1_lcrit_alarm Input voltage critical low alarm
5285
in2_label "vout1"
5386
in2_input Measured output voltage
5487
in2_crit Critical maximum output voltage
5588
in2_crit_alarm Output voltage high alarm
5689
in2_lcrit Critical minimum output voltage
5790
in2_lcrit_alarm Output voltage critical low alarm
91+
in2_max Critical maximum output voltage
92+
in2_max_alarm Output voltage critical max alarm
93+
in2_min Critical minimum output voltage
94+
in2_min_alarm Output voltage critical min alarm
5895
curr1_label "iin"
5996
curr1_input Measured input current.
6097
curr1_alarm Input current alarm
98+
curr1_crit Critical maximum input current
99+
curr1_crit_alarm Input current high alarm
100+
curr2_label "iout1"
101+
curr2_input Measured output current
102+
curr2_alarm Output current alarm
103+
curr2_crit Critical maximum output current
104+
curr2_crit_alarm Output current high alarm
105+
curr2_lcrit Critical minimum output current
106+
curr2_lcrit_alarm Output current critical low alarm
107+
curr2_max Critical maximum output current
108+
curr2_max_alarm Output current critical max alarm
109+
power1_label "pout1"
110+
power1_input Measured output power
111+
power1_crit Critical maximum output power
112+
power1_crit_alarm Output power high alarm
61113
temp1_input Measured temperature
62114
temp1_crit Critical high temperature
63115
temp1_crit_alarm Chip temperature critical high alarm
116+
temp1_max Critical maximum temperature
117+
temp1_max_alarm Temperature critical max alarm
118+
temp2_input Measured temperature
119+
temp2_crit Critical high temperature
120+
temp2_crit_alarm Chip temperature critical high alarm
121+
temp2_max Critical maximum temperature
122+
temp2_max_alarm Temperature critical max alarm
64123
================= ========================================

drivers/hwmon/pmbus/adp1050.c

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,75 @@ static struct pmbus_driver_info adp1050_info = {
2323
| PMBUS_HAVE_STATUS_TEMP,
2424
};
2525

26+
static struct pmbus_driver_info adp1051_info = {
27+
.pages = 1,
28+
.format[PSC_VOLTAGE_IN] = linear,
29+
.format[PSC_VOLTAGE_OUT] = linear,
30+
.format[PSC_CURRENT_IN] = linear,
31+
.format[PSC_TEMPERATURE] = linear,
32+
.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN
33+
| PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT
34+
| PMBUS_HAVE_TEMP
35+
| PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT
36+
| PMBUS_HAVE_STATUS_INPUT
37+
| PMBUS_HAVE_STATUS_TEMP,
38+
};
39+
40+
static struct pmbus_driver_info adp1055_info = {
41+
.pages = 1,
42+
.format[PSC_VOLTAGE_IN] = linear,
43+
.format[PSC_VOLTAGE_OUT] = linear,
44+
.format[PSC_CURRENT_IN] = linear,
45+
.format[PSC_TEMPERATURE] = linear,
46+
.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN
47+
| PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT
48+
| PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3
49+
| PMBUS_HAVE_POUT
50+
| PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT
51+
| PMBUS_HAVE_STATUS_INPUT
52+
| PMBUS_HAVE_STATUS_TEMP,
53+
};
54+
55+
static struct pmbus_driver_info ltp8800_info = {
56+
.pages = 1,
57+
.format[PSC_VOLTAGE_IN] = linear,
58+
.format[PSC_VOLTAGE_OUT] = linear,
59+
.format[PSC_CURRENT_IN] = linear,
60+
.format[PSC_TEMPERATURE] = linear,
61+
.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN
62+
| PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT
63+
| PMBUS_HAVE_TEMP
64+
| PMBUS_HAVE_POUT
65+
| PMBUS_HAVE_STATUS_VOUT
66+
| PMBUS_HAVE_STATUS_INPUT
67+
| PMBUS_HAVE_STATUS_TEMP,
68+
};
69+
2670
static int adp1050_probe(struct i2c_client *client)
2771
{
28-
return pmbus_do_probe(client, &adp1050_info);
72+
struct pmbus_driver_info *info;
73+
74+
info = (struct pmbus_driver_info *)i2c_get_match_data(client);
75+
if (!info)
76+
return -ENODEV;
77+
78+
return pmbus_do_probe(client, info);
2979
}
3080

3181
static const struct i2c_device_id adp1050_id[] = {
32-
{"adp1050"},
82+
{ .name = "adp1050", .driver_data = (kernel_ulong_t)&adp1050_info },
83+
{ .name = "adp1051", .driver_data = (kernel_ulong_t)&adp1051_info },
84+
{ .name = "adp1055", .driver_data = (kernel_ulong_t)&adp1055_info },
85+
{ .name = "ltp8800", .driver_data = (kernel_ulong_t)&ltp8800_info },
3386
{}
3487
};
3588
MODULE_DEVICE_TABLE(i2c, adp1050_id);
3689

3790
static const struct of_device_id adp1050_of_match[] = {
38-
{ .compatible = "adi,adp1050"},
91+
{ .compatible = "adi,adp1050", .data = &adp1050_info },
92+
{ .compatible = "adi,adp1051", .data = &adp1051_info },
93+
{ .compatible = "adi,adp1055", .data = &adp1055_info },
94+
{ .compatible = "adi,ltp8800", .data = &ltp8800_info },
3995
{}
4096
};
4197
MODULE_DEVICE_TABLE(of, adp1050_of_match);

0 commit comments

Comments
 (0)