2010-06-28 21:29:03 +00:00
|
|
|
Kernel driver pmbus
|
2019-04-17 09:46:26 +00:00
|
|
|
===================
|
2010-06-28 21:29:03 +00:00
|
|
|
|
|
|
|
Supported chips:
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-10-02 00:35:44 +00:00
|
|
|
* Ericsson BMR453, BMR454
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-10-02 00:35:44 +00:00
|
|
|
Prefixes: 'bmr453', 'bmr454'
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
Addresses scanned: -
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
Datasheet:
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146395
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
* ON Semiconductor ADP4000, NCP4200, NCP4208
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
Prefixes: 'adp4000', 'ncp4200', 'ncp4208'
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
Addresses scanned: -
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
Datasheets:
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
http://www.onsemi.com/pub_link/Collateral/ADP4000-D.PDF
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-06-25 22:13:44 +00:00
|
|
|
http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
* Lineage Power
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2012-02-28 19:00:54 +00:00
|
|
|
Prefixes: 'mdt040', 'pdt003', 'pdt006', 'pdt012', 'udt020'
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
Addresses scanned: -
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
Datasheets:
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2011-09-15 17:43:40 +00:00
|
|
|
http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2012-02-28 19:00:54 +00:00
|
|
|
http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
* Texas Instruments TPS40400, TPS544B20, TPS544B25, TPS544C20, TPS544C25
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
Prefixes: 'tps40400', 'tps544b20', 'tps544b25', 'tps544c20', 'tps544c25'
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2012-02-28 18:24:54 +00:00
|
|
|
Addresses scanned: -
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2012-02-28 18:24:54 +00:00
|
|
|
Datasheets:
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2012-02-28 18:24:54 +00:00
|
|
|
http://www.ti.com/lit/gpn/tps40400
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
http://www.ti.com/lit/gpn/tps544b20
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
http://www.ti.com/lit/gpn/tps544b25
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
http://www.ti.com/lit/gpn/tps544c20
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2015-08-08 03:55:59 +00:00
|
|
|
http://www.ti.com/lit/gpn/tps544c25
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2019-12-13 21:36:36 +00:00
|
|
|
* Maxim MAX20796
|
|
|
|
|
|
|
|
Prefix: 'max20796'
|
|
|
|
|
|
|
|
Addresses scanned: -
|
|
|
|
|
|
|
|
Datasheet:
|
|
|
|
|
|
|
|
Not published
|
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
* Generic PMBus devices
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
Prefix: 'pmbus'
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
Addresses scanned: -
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2010-06-28 21:29:03 +00:00
|
|
|
Datasheet: n.a.
|
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
|
2013-02-21 04:58:42 +00:00
|
|
|
Author: Guenter Roeck <linux@roeck-us.net>
|
2010-06-28 21:29:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
|
|
|
|
2016-02-28 03:57:57 +00:00
|
|
|
This driver supports hardware monitoring for various PMBus compliant devices.
|
2010-06-28 21:29:03 +00:00
|
|
|
It supports voltage, current, power, and temperature sensors as supported
|
|
|
|
by the device.
|
|
|
|
|
|
|
|
Each monitored channel has its own high and low limits, plus a critical
|
|
|
|
limit.
|
|
|
|
|
|
|
|
Fan support will be added in a later version of this driver.
|
|
|
|
|
|
|
|
|
|
|
|
Usage Notes
|
|
|
|
-----------
|
|
|
|
|
|
|
|
This driver does not probe for PMBus devices, since there is no register
|
|
|
|
which can be safely used to identify the chip (The MFG_ID register is not
|
|
|
|
supported by all chips), and since there is no well defined address range for
|
|
|
|
PMBus devices. You will have to instantiate the devices explicitly.
|
|
|
|
|
|
|
|
Example: the following will load the driver for an LTC2978 at address 0x60
|
2019-04-17 09:46:26 +00:00
|
|
|
on I2C bus #1::
|
|
|
|
|
|
|
|
$ modprobe pmbus
|
|
|
|
$ echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device
|
2010-06-28 21:29:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
Platform data support
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
Support for additional PMBus chips can be added by defining chip parameters in
|
|
|
|
a new chip specific driver file. For example, (untested) code to add support for
|
2019-04-17 09:46:26 +00:00
|
|
|
Emerson DS1200 power modules might look as follows::
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static struct pmbus_driver_info ds1200_info = {
|
2010-06-28 21:29:03 +00:00
|
|
|
.pages = 1,
|
|
|
|
/* Note: All other sensors are in linear mode */
|
|
|
|
.direct[PSC_VOLTAGE_OUT] = true,
|
|
|
|
.direct[PSC_TEMPERATURE] = true,
|
|
|
|
.direct[PSC_CURRENT_OUT] = true,
|
|
|
|
.m[PSC_VOLTAGE_IN] = 1,
|
|
|
|
.b[PSC_VOLTAGE_IN] = 0,
|
|
|
|
.R[PSC_VOLTAGE_IN] = 3,
|
|
|
|
.m[PSC_VOLTAGE_OUT] = 1,
|
|
|
|
.b[PSC_VOLTAGE_OUT] = 0,
|
|
|
|
.R[PSC_VOLTAGE_OUT] = 3,
|
|
|
|
.m[PSC_TEMPERATURE] = 1,
|
|
|
|
.b[PSC_TEMPERATURE] = 0,
|
|
|
|
.R[PSC_TEMPERATURE] = 3,
|
|
|
|
.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_STATUS_INPUT
|
|
|
|
| PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
|
|
|
|
| PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
|
|
|
|
| PMBUS_HAVE_PIN | PMBUS_HAVE_POUT
|
|
|
|
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP
|
|
|
|
| PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_FAN12,
|
2019-04-17 09:46:26 +00:00
|
|
|
};
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static int ds1200_probe(struct i2c_client *client,
|
|
|
|
const struct i2c_device_id *id)
|
|
|
|
{
|
2010-06-28 21:29:03 +00:00
|
|
|
return pmbus_do_probe(client, id, &ds1200_info);
|
2019-04-17 09:46:26 +00:00
|
|
|
}
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static int ds1200_remove(struct i2c_client *client)
|
|
|
|
{
|
2010-06-28 21:29:03 +00:00
|
|
|
return pmbus_do_remove(client);
|
2019-04-17 09:46:26 +00:00
|
|
|
}
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static const struct i2c_device_id ds1200_id[] = {
|
2010-06-28 21:29:03 +00:00
|
|
|
{"ds1200", 0},
|
|
|
|
{}
|
2019-04-17 09:46:26 +00:00
|
|
|
};
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
MODULE_DEVICE_TABLE(i2c, ds1200_id);
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
/* This is the driver that will be inserted */
|
|
|
|
static struct i2c_driver ds1200_driver = {
|
2010-06-28 21:29:03 +00:00
|
|
|
.driver = {
|
|
|
|
.name = "ds1200",
|
|
|
|
},
|
|
|
|
.probe = ds1200_probe,
|
|
|
|
.remove = ds1200_remove,
|
|
|
|
.id_table = ds1200_id,
|
2019-04-17 09:46:26 +00:00
|
|
|
};
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static int __init ds1200_init(void)
|
|
|
|
{
|
2010-06-28 21:29:03 +00:00
|
|
|
return i2c_add_driver(&ds1200_driver);
|
2019-04-17 09:46:26 +00:00
|
|
|
}
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
static void __exit ds1200_exit(void)
|
|
|
|
{
|
2010-06-28 21:29:03 +00:00
|
|
|
i2c_del_driver(&ds1200_driver);
|
2019-04-17 09:46:26 +00:00
|
|
|
}
|
2010-06-28 21:29:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
Sysfs entries
|
|
|
|
-------------
|
|
|
|
|
|
|
|
When probing the chip, the driver identifies which PMBus registers are
|
|
|
|
supported, and determines available sensors from this information.
|
2012-08-22 10:11:26 +00:00
|
|
|
Attribute files only exist if respective sensors are supported by the chip.
|
2010-06-28 21:29:03 +00:00
|
|
|
Labels are provided to inform the user about the sensor associated with
|
|
|
|
a given sysfs entry.
|
|
|
|
|
|
|
|
The following attributes are supported. Limits are read-write; all other
|
|
|
|
attributes are read-only.
|
|
|
|
|
2019-04-17 09:46:26 +00:00
|
|
|
======================= ========================================================
|
2010-06-28 21:29:03 +00:00
|
|
|
inX_input Measured voltage. From READ_VIN or READ_VOUT register.
|
2011-03-31 01:57:33 +00:00
|
|
|
inX_min Minimum Voltage.
|
2010-06-28 21:29:03 +00:00
|
|
|
From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register.
|
|
|
|
inX_max Maximum voltage.
|
|
|
|
From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register.
|
2011-03-31 01:57:33 +00:00
|
|
|
inX_lcrit Critical minimum Voltage.
|
2010-06-28 21:29:03 +00:00
|
|
|
From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register.
|
|
|
|
inX_crit Critical maximum voltage.
|
|
|
|
From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register.
|
|
|
|
inX_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
|
|
|
|
inX_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
|
|
|
|
inX_lcrit_alarm Voltage critical low alarm.
|
|
|
|
From VOLTAGE_UV_FAULT status.
|
|
|
|
inX_crit_alarm Voltage critical high alarm.
|
|
|
|
From VOLTAGE_OV_FAULT status.
|
|
|
|
inX_label "vin", "vcap", or "voutY"
|
|
|
|
|
|
|
|
currX_input Measured current. From READ_IIN or READ_IOUT register.
|
|
|
|
currX_max Maximum current.
|
|
|
|
From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register.
|
2011-03-31 01:57:33 +00:00
|
|
|
currX_lcrit Critical minimum output current.
|
2010-06-28 21:29:03 +00:00
|
|
|
From IOUT_UC_FAULT_LIMIT register.
|
|
|
|
currX_crit Critical maximum current.
|
|
|
|
From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register.
|
|
|
|
currX_alarm Current high alarm.
|
|
|
|
From IIN_OC_WARNING or IOUT_OC_WARNING status.
|
2011-04-18 16:48:58 +00:00
|
|
|
currX_max_alarm Current high alarm.
|
|
|
|
From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT status.
|
2010-06-28 21:29:03 +00:00
|
|
|
currX_lcrit_alarm Output current critical low alarm.
|
|
|
|
From IOUT_UC_FAULT status.
|
|
|
|
currX_crit_alarm Current critical high alarm.
|
|
|
|
From IIN_OC_FAULT or IOUT_OC_FAULT status.
|
2020-01-13 23:30:14 +00:00
|
|
|
currX_label "iin", "iinY", "iinY.Z", "ioutY", or "ioutY.Z",
|
|
|
|
where Y reflects the page number and Z reflects the
|
|
|
|
phase.
|
2010-06-28 21:29:03 +00:00
|
|
|
|
|
|
|
powerX_input Measured power. From READ_PIN or READ_POUT register.
|
|
|
|
powerX_cap Output power cap. From POUT_MAX register.
|
|
|
|
powerX_max Power limit. From PIN_OP_WARN_LIMIT or
|
|
|
|
POUT_OP_WARN_LIMIT register.
|
|
|
|
powerX_crit Critical output power limit.
|
|
|
|
From POUT_OP_FAULT_LIMIT register.
|
|
|
|
powerX_alarm Power high alarm.
|
|
|
|
From PIN_OP_WARNING or POUT_OP_WARNING status.
|
|
|
|
powerX_crit_alarm Output power critical high alarm.
|
|
|
|
From POUT_OP_FAULT status.
|
2020-01-13 23:30:14 +00:00
|
|
|
powerX_label "pin", "pinY", "pinY.Z", "poutY", or "poutY.Z",
|
|
|
|
where Y reflects the page number and Z reflects the
|
|
|
|
phase.
|
2010-06-28 21:29:03 +00:00
|
|
|
|
2011-04-18 16:48:58 +00:00
|
|
|
tempX_input Measured temperature.
|
2010-06-28 21:29:03 +00:00
|
|
|
From READ_TEMPERATURE_X register.
|
2011-04-18 16:48:58 +00:00
|
|
|
tempX_min Mimimum temperature. From UT_WARN_LIMIT register.
|
|
|
|
tempX_max Maximum temperature. From OT_WARN_LIMIT register.
|
|
|
|
tempX_lcrit Critical low temperature.
|
2010-06-28 21:29:03 +00:00
|
|
|
From UT_FAULT_LIMIT register.
|
2011-04-18 16:48:58 +00:00
|
|
|
tempX_crit Critical high temperature.
|
2010-06-28 21:29:03 +00:00
|
|
|
From OT_FAULT_LIMIT register.
|
|
|
|
tempX_min_alarm Chip temperature low alarm. Set by comparing
|
|
|
|
READ_TEMPERATURE_X with UT_WARN_LIMIT if
|
|
|
|
TEMP_UT_WARNING status is set.
|
|
|
|
tempX_max_alarm Chip temperature high alarm. Set by comparing
|
|
|
|
READ_TEMPERATURE_X with OT_WARN_LIMIT if
|
|
|
|
TEMP_OT_WARNING status is set.
|
|
|
|
tempX_lcrit_alarm Chip temperature critical low alarm. Set by comparing
|
|
|
|
READ_TEMPERATURE_X with UT_FAULT_LIMIT if
|
|
|
|
TEMP_UT_FAULT status is set.
|
|
|
|
tempX_crit_alarm Chip temperature critical high alarm. Set by comparing
|
|
|
|
READ_TEMPERATURE_X with OT_FAULT_LIMIT if
|
|
|
|
TEMP_OT_FAULT status is set.
|
2019-04-17 09:46:26 +00:00
|
|
|
======================= ========================================================
|